summaryrefslogtreecommitdiff
path: root/npc/functions
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-09-27 19:06:59 +0300
committerAndrei Karas <akaras@inbox.ru>2015-09-27 19:06:59 +0300
commit7c6c2416bc152de0758d7441a373e260b40c4d5b (patch)
treeb992f72b272550240cac03938bea3d455ba47135 /npc/functions
parentd7143f263c94bb70e67674d2243c765226e8fb12 (diff)
downloadserverdata-7c6c2416bc152de0758d7441a373e260b40c4d5b.tar.gz
serverdata-7c6c2416bc152de0758d7441a373e260b40c4d5b.tar.bz2
serverdata-7c6c2416bc152de0758d7441a373e260b40c4d5b.tar.xz
serverdata-7c6c2416bc152de0758d7441a373e260b40c4d5b.zip
Replace getnpcdir and setnpcdir with one or zero parameters to variable '.dir'.
Diffstat (limited to 'npc/functions')
-rw-r--r--npc/functions/doors.txt10
-rw-r--r--npc/functions/hammocks.txt10
-rw-r--r--npc/functions/harbours.txt12
-rw-r--r--npc/functions/npcmovegraph.txt2
4 files changed, 17 insertions, 17 deletions
diff --git a/npc/functions/doors.txt b/npc/functions/doors.txt
index 1ddc0d12..49b2846e 100644
--- a/npc/functions/doors.txt
+++ b/npc/functions/doors.txt
@@ -9,7 +9,7 @@
function script doorTouch {
if (getareausers() <= 1)
{
- setnpcdir 2;
+ .dir = 2;
stopnpctimer;
initnpctimer;
}
@@ -19,7 +19,7 @@ function script doorTouch {
function script doorUnTouch {
if (getareausers() == 0)
{
- setnpcdir 4;
+ .dir = 4;
initnpctimer;
startnpctimer;
}
@@ -28,15 +28,15 @@ function script doorUnTouch {
function script doorTimer {
stopnpctimer;
- if (getnpcdir() == 2) setnpcdir 6;
- if (getnpcdir() == 4) setnpcdir 8;
+ if (.dir == 2) .dir = 6;
+ if (.dir == 4) .dir = 8;
end;
}
function script open_door {
.@door$ = getarg(0);
- setnpcdir .@door$, 2;
+ setnpcdir.@door$, 2;
sleep 300;
setnpcdir .@door$, 6;
sleep 300;
diff --git a/npc/functions/hammocks.txt b/npc/functions/hammocks.txt
index 79b9328d..8e1c2fec 100644
--- a/npc/functions/hammocks.txt
+++ b/npc/functions/hammocks.txt
@@ -10,7 +10,7 @@
function script hamTouchLeft {
if (getareausers() <= 1)
{
- setnpcdir 0;
+ .dir = 0;
stopnpctimer;
initnpctimer;
}
@@ -20,7 +20,7 @@ function script hamTouchLeft {
function script hamUnTouch {
if (getareausers() == 0)
{
- setnpcdir 2;
+ .dir = 2;
initnpctimer;
startnpctimer;
}
@@ -29,14 +29,14 @@ function script hamUnTouch {
function script hamTimerLeft {
stopnpctimer;
- if (getnpcdir() == 2) setnpcdir 0;
+ if (.dir == 2) .dir = 0;
end;
}
function script hamTouchRight {
if (getareausers() <= 1)
{
- setnpcdir 0;
+ .dir = 0;
stopnpctimer;
initnpctimer;
}
@@ -45,6 +45,6 @@ function script hamTouchRight {
function script hamTimerRight {
stopnpctimer;
- if (getnpcdir() == 2) setnpcdir 0;
+ if (.dir == 2) .dir = 0;
end;
}
diff --git a/npc/functions/harbours.txt b/npc/functions/harbours.txt
index eae24e24..0cb91bab 100644
--- a/npc/functions/harbours.txt
+++ b/npc/functions/harbours.txt
@@ -12,18 +12,18 @@
// 8 Hook up.
function script harbourClic {
- if (getnpcdir () == 0)
+ if (.dir == 0)
{
- setnpcdir 2;
+ .dir = 2;
initnpctimer;
startnpctimer;
close;
}
- if (getnpcdir () == 6)
+ if (.dir == 6)
{
- setnpcdir 4;
+ .dir = 4;
initnpctimer;
startnpctimer;
@@ -33,7 +33,7 @@ function script harbourClic {
function script harbourTimer {
stopnpctimer;
- if (getnpcdir () == 2) setnpcdir 6;
- if (getnpcdir () == 4) setnpcdir 0;
+ if (.dir == 2) .dir = 6;
+ if (.dir == 4) .dir = 0;
end;
}
diff --git a/npc/functions/npcmovegraph.txt b/npc/functions/npcmovegraph.txt
index 9bfebc99..cb2c3471 100644
--- a/npc/functions/npcmovegraph.txt
+++ b/npc/functions/npcmovegraph.txt
@@ -102,7 +102,7 @@ function script execmovecmd {
}
else if (.@cmd$[0] == "dir")
{
- setnpcdir atoi(.@cmd$[1]);
+ .dir = atoi(.@cmd$[1]);
}
else if (.@cmd$[0] == "sit")
{