summaryrefslogtreecommitdiff
path: root/src/map/script.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/script.c')
-rw-r--r--src/map/script.c28
1 files changed, 18 insertions, 10 deletions
diff --git a/src/map/script.c b/src/map/script.c
index 0d781906c..6f34e3058 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -216,7 +216,9 @@ struct Script_Config script_config = {
"OnPCLogoutEvent", //logout_event_name
"OnPCLoadMapEvent", //loadmap_event_name
"OnPCBaseLvUpEvent", //baselvup_event_name
- "OnPCJobLvUpEvent" //joblvup_event_name
+ "OnPCJobLvUpEvent", //joblvup_event_name
+ "OnTouch", //Official version of OnTouch
+ "OnTouch2", //Official version of OnTouch2
};
static jmp_buf error_jump;
@@ -3338,6 +3340,12 @@ int script_config_read(char *cfgName)
else if(strcmpi(w1,"input_max_value")==0) {
script_config.input_max_value = config_switch(w2);
}
+ else if(strcmpi(w1, "OnTouch_Label") == 0) {
+ safestrncpy(script_config.ontouch_name, w2, NAME_LENGTH);
+ }
+ else if(strcmpi(w1, "OnTouch2_Label") == 0) {
+ safestrncpy(script_config.ontouch2_name, w2, NAME_LENGTH);
+ }
else if(strcmpi(w1,"import")==0){
script_config_read(w2);
}
@@ -4110,7 +4118,7 @@ BUILDIN_FUNC(areawarp)
else if(!(index=mapindex_name2id(str)))
return 0;
- map_foreachinarea(buildin_areawarp_sub, m,x0,y0,x1,y1,BL_PC, index,x,y);
+ map_forsomeinarea(buildin_areawarp_sub, m,x0,y0,x1,y1,0,BL_PC, index,x,y);
return 0;
}
@@ -4142,7 +4150,7 @@ BUILDIN_FUNC(areapercentheal)
if( (m=map_mapname2mapid(mapname))< 0)
return 0;
- map_foreachinarea(buildin_areapercentheal_sub,m,x0,y0,x1,y1,BL_PC,hp,sp);
+ map_forsomeinarea(buildin_areapercentheal_sub,m,x0,y0,x1,y1,0,BL_PC,hp,sp);
return 0;
}
@@ -8170,8 +8178,8 @@ BUILDIN_FUNC(areaannounce)
if( (m=map_mapname2mapid(map))<0 )
return 0;
- map_foreachinarea(buildin_mapannounce_sub,
- m,x0,y0,x1,y1,BL_PC, str,strlen(str)+1,flag&0x10, color);
+ map_forsomeinarea(buildin_mapannounce_sub,
+ m,x0,y0,x1,y1,0,BL_PC, str,strlen(str)+1,flag&0x10, color);
return 0;
}
@@ -8281,8 +8289,8 @@ BUILDIN_FUNC(getareausers)
script_pushint(st,-1);
return 0;
}
- map_foreachinarea(buildin_getareausers_sub,
- m,x0,y0,x1,y1,BL_PC,&users);
+ map_forsomeinarea(buildin_getareausers_sub,
+ m,x0,y0,x1,y1,0,BL_PC,&users);
script_pushint(st,users);
return 0;
}
@@ -8328,8 +8336,8 @@ BUILDIN_FUNC(getareadropitem)
script_pushint(st,-1);
return 0;
}
- map_foreachinarea(buildin_getareadropitem_sub,
- m,x0,y0,x1,y1,BL_ITEM,item,&amount);
+ map_forsomeinarea(buildin_getareadropitem_sub,
+ m,x0,y0,x1,y1,0,BL_ITEM,item,&amount);
script_pushint(st,amount);
return 0;
}
@@ -10639,7 +10647,7 @@ BUILDIN_FUNC(soundeffectall)
int y0 = script_getnum(st,6);
int x1 = script_getnum(st,7);
int y1 = script_getnum(st,8);
- map_foreachinarea(soundeffect_sub, map_mapname2mapid(map), x0, y0, x1, y1, BL_PC, name, type);
+ map_forsomeinarea(soundeffect_sub, map_mapname2mapid(map), x0, y0, x1, y1, 0, BL_PC, name, type);
}
else
{