summaryrefslogtreecommitdiff
path: root/src/map/script.c
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-07-25 14:32:56 +0300
committerAndrei Karas <akaras@inbox.ru>2015-08-05 14:28:30 +0300
commit81d0eb8441fa7d1bcfde8a1ca9bf09666d5139d8 (patch)
tree12d608e3dd6fd989ca6c46bb988fe91f54630976 /src/map/script.c
parentac9dc43ac589e0c70f1f4f27d04dad0a302805bc (diff)
downloadhercules-81d0eb8441fa7d1bcfde8a1ca9bf09666d5139d8.tar.gz
hercules-81d0eb8441fa7d1bcfde8a1ca9bf09666d5139d8.tar.bz2
hercules-81d0eb8441fa7d1bcfde8a1ca9bf09666d5139d8.tar.xz
hercules-81d0eb8441fa7d1bcfde8a1ca9bf09666d5139d8.zip
Add optional parameter to warp script command for prevent stoping npc scripts after warp.
Diffstat (limited to 'src/map/script.c')
-rw-r--r--src/map/script.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/map/script.c b/src/map/script.c
index 30af4d0f7..e7a0175c7 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -5763,6 +5763,7 @@ BUILDIN(warp)
{
int ret;
int x,y;
+ int warp_clean = 1;
const char* str;
TBL_PC* sd;
@@ -5774,6 +5775,11 @@ BUILDIN(warp)
x = script_getnum(st,3);
y = script_getnum(st,4);
+ if (script_hasdata(st, 5)) {
+ warp_clean = script_getnum(st, 5);
+ }
+
+ sd->state.warp_clean = warp_clean;
if(strcmp(str,"Random")==0)
ret = pc->randomwarp(sd,CLR_TELEPORT);
else if(strcmp(str,"SavePoint")==0 || strcmp(str,"Save")==0)
@@ -19855,7 +19861,7 @@ void script_parse_builtin(void) {
BUILDIN_DEF(jobchange,"i?"),
BUILDIN_DEF(jobname,"i"),
BUILDIN_DEF(input,"r??"),
- BUILDIN_DEF(warp,"sii"),
+ BUILDIN_DEF(warp,"sii?"),
BUILDIN_DEF(areawarp,"siiiisii??"),
BUILDIN_DEF(warpchar,"siii"), // [LuzZza]
BUILDIN_DEF(warpparty,"siii?"), // [Fredzilla] [Paradox924X]