summaryrefslogtreecommitdiff
path: root/npc/functions
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2019-05-13 23:17:23 +0300
committerAndrei Karas <akaras@inbox.ru>2019-05-13 23:17:23 +0300
commitd887701df743a8e4469b37cabfa260c4529ac89a (patch)
tree4fe4e2a082ce6b2fb5db12dd7c69d6c7d5569722 /npc/functions
parent913383b9f1078e8c1fd5f5db8a0698501d4b14f7 (diff)
downloadserverdata-d887701df743a8e4469b37cabfa260c4529ac89a.tar.gz
serverdata-d887701df743a8e4469b37cabfa260c4529ac89a.tar.bz2
serverdata-d887701df743a8e4469b37cabfa260c4529ac89a.tar.xz
serverdata-d887701df743a8e4469b37cabfa260c4529ac89a.zip
Update from hercules
Diffstat (limited to 'npc/functions')
-rw-r--r--npc/functions/inventoryplace.txt2
-rw-r--r--npc/functions/main.txt2
-rw-r--r--npc/functions/npcmovegraph.txt18
-rw-r--r--npc/functions/warp.txt2
4 files changed, 12 insertions, 12 deletions
diff --git a/npc/functions/inventoryplace.txt b/npc/functions/inventoryplace.txt
index 4a5e08ca..c7eff88b 100644
--- a/npc/functions/inventoryplace.txt
+++ b/npc/functions/inventoryplace.txt
@@ -13,7 +13,7 @@ function script inventoryplace {
if (.@argc % 2 != 0)
{
- debugmes "inventoryplace: Wrong argument count.";
+ consolemes(CONSOLEMES_ERROR, "inventoryplace: Wrong argument count.");
close;
}
diff --git a/npc/functions/main.txt b/npc/functions/main.txt
index e31b02d0..c8a37b1c 100644
--- a/npc/functions/main.txt
+++ b/npc/functions/main.txt
@@ -146,7 +146,7 @@ function script speech {
// Show debug message if .debug variable of NPC is set to 1
function script npcdebug {
if (getvariableofnpc(.debug, strnpcinfo(3)))
- debugmes strnpcinfo(3) + ": " + getarg(0);
+ consolemes(CONSOLEMES_DEBUG, strnpcinfo(3) + ": " + getarg(0));
return;
}
diff --git a/npc/functions/npcmovegraph.txt b/npc/functions/npcmovegraph.txt
index d03f15c5..54e4e783 100644
--- a/npc/functions/npcmovegraph.txt
+++ b/npc/functions/npcmovegraph.txt
@@ -35,12 +35,12 @@ function script initmovegraph {
function script findmovegraphlabel {
if (!getargcount())
{
- debugmes "findmovegraphlabel: no argument";
+ consolemes(CONSOLEMES_DEBUG, "findmovegraphlabel: no argument");
return -1;
}
if (!isstr(getarg(0)))
{
- debugmes "findmovegraphlabel: need string argument";
+ consolemes(CONSOLEMES_DEBUG, "findmovegraphlabel: need string argument");
return -1;
}
@@ -144,7 +144,7 @@ function script execmovecmd {
}
else
{
- debugmes "execmovecmd: unknown WARP destination label: " + .@cmd$[1];
+ consolemes(CONSOLEMES_DEBUG, "execmovecmd: unknown WARP destination label: " + .@cmd$[1]);
}
}
else if (.@cmd$[0] == "call")
@@ -152,7 +152,7 @@ function script execmovecmd {
switch (getarraysize(.@cmd$))
{
case 1:
- debugmes "execmovecmd: CALL command needs some parameters";
+ consolemes(CONSOLEMES_DEBUG, "execmovecmd: CALL command needs some parameters");
return 0;
case 2:
return callfunc(.@cmd$[1]);
@@ -176,7 +176,7 @@ function script execmovecmd {
else if (.@cmd$[0] == "debugmes")
{
deletearray .@cmd$[0], 1;
- debugmes implode(.@cmd$, " ");
+ consolemes(CONSOLEMES_DEBUG, implode(.@cmd$, " "));
}
else if (.@cmd$[0] == "flags")
{
@@ -196,7 +196,7 @@ function script execmovecmd {
}
else
{
- debugmes "Unknown move graph cmd: " + .@cmd$[0];
+ consolemes(CONSOLEMES_DEBUG, "Unknown move graph cmd: " + .@cmd$[0]);
}
return 0;
}
@@ -226,7 +226,7 @@ function script getnextmovecmd {
function script getrandompoint {
if (getargcount() < 4)
{
- debugmes "error: getrandompoint(x1, y1, x2, y2) takes 4 arguments";
+ consolemes(CONSOLEMES_DEBUG, "error: getrandompoint(x1, y1, x2, y2) takes 4 arguments");
return -1;
}
@@ -264,7 +264,7 @@ function script getrandompoint {
goto L_Found;
// finally, if we don't find anything
- debugmes "error: getrandompoint: cannot find walkable cell in rectangle [(" + .@x1 + "," + .@y1 + ") , (" + .@x2 + "," + .@y2 + ")]";
+ consolemes(CONSOLEMES_DEBUG, "error: getrandompoint: cannot find walkable cell in rectangle [(" + .@x1 + "," + .@y1 + ") , (" + .@x2 + "," + .@y2 + ")]");
return -1;
L_Found:
@@ -282,7 +282,7 @@ L_Found:
function script mg_npcwalkto {
if (getargcount() < 2)
{
- debugmes "usage: mg_npcwalkto(x1,y1[,x2,y2])";
+ consolemes(CONSOLEMES_DEBUG, "usage: mg_npcwalkto(x1,y1[,x2,y2])");
return -1;
}
diff --git a/npc/functions/warp.txt b/npc/functions/warp.txt
index df7b76b0..46c390ad 100644
--- a/npc/functions/warp.txt
+++ b/npc/functions/warp.txt
@@ -38,7 +38,7 @@ function script slide_or_warp {
if (!isloggedin(.@aid)) {
if ((.@aid = playerattached()) == 0) {
- debugmes("slide_or_warp: no player attached!");
+ consolemes(CONSOLEMES_DEBUG, "slide_or_warp: no player attached!");
return false;
}
}