i have noticed that when you are already inside a map, then the mapflag suddenly changed eg. PVPON , restricted equipments that are equipped still have their effect until you make a move that will result in triggering the status recalculation so i have made a code that triggers the recalculation automatically after changing mapflags but i have some problem with it.
/**
* Set a mapflag
* @param m: Map ID
* @param mapflag: Mapflag ID
* @param status: true - Set mapflag, false - Remove mapflag
* @param args: Arguments for special flags
* @return True on success or false on failure
*/@-4647,6+4662,7@@bool map_setmapflag_sub(int16 m,enum e_mapflag mapflag,bool status,union u_ma
clif_map_property_mapall(m, MAPPROPERTY_NOTHING);
map_foreachinmap(map_mapflag_pvp_stop_sub, m, BL_PC);
map_foreachinmap(unit_stopattack, m, BL_CHAR,0);++ map_foreachinmap(map_instacalc, m, BL_PC);}else{if(!battle_config.pk_mode){
clif_map_property_mapall(m, MAPPROPERTY_FREEPVPZONE);@-4684,6+4700,7@@bool map_setmapflag_sub(int16 m,enum e_mapflag mapflag,bool status,union u_ma
if(!status){
clif_map_property_mapall(m, MAPPROPERTY_NOTHING);
map_foreachinmap(unit_stopattack, m, BL_CHAR,0);++ map_foreachinmap(map_instacalc, m, BL_PC);}else{
clif_map_property_mapall(m, MAPPROPERTY_AGITZONE);if(mapdata->flag[MF_PVP]){
This code is working but the problem is when i reload script theres an error showing on console and after i reload 2nd time = automatic server crash. please help.
This is what it shows on console on first and second @reloadscript , i dont know why it triggers quest i did not edit anything there.
[Status]:set users RAGNAROK :1[Status]:Done loading '0' entries for'0' NPC Markets from 'market' table.[Error]: quest_add:Character150003 already has quest 6025.[Debug]:Source(NPC):#B_camp_start03 at bat_c03 (146,56)[Debug]:Function: setquest (1 parameter):[Debug]:Data: number value=6025[Info]:Done loading '13035'NPCs:-'3091'Warps-'187'Shops-'9756'Scripts-'3911'Spawn sets
-'79336'MobsCached-'0'MobsNotCached[Status]:Event'OnInit' executed with '1480'NPCs.[Status]:Event'OnInterIfInit' executed with '0'NPCs.[Status]:Done loading '0' entries for'0' NPC Markets from 'market' table.[Error]:Server received crash signal!Attempting to save all online characters![Info]:SavedInventory(0) data to table inventory for char_id:150003[Info]:SavedCart(0) data to table cart_inventory for char_id:150003[Info]:Savedchar150003- PUKEKE: status skills.[Status]:Map-server #0 has disconnected.[Status]:set users RAGNAROK :0
Question
Lord Turtle
Please check the codes below.
map.cpp
map.cpp
This code is working but the problem is when i reload script theres an error showing on console and after i reload 2nd time = automatic server crash. please help.
This is what it shows on console on first and second @reloadscript , i dont know why it triggers quest i did not edit anything there.
Link to comment
Share on other sites
2 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.