summaryrefslogtreecommitdiff
path: root/npc
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
parent913383b9f1078e8c1fd5f5db8a0698501d4b14f7 (diff)
downloadserverdata-d887701df743a8e4469b37cabfa260c4529ac89a.tar.gz
serverdata-d887701df743a8e4469b37cabfa260c4529ac89a.tar.bz2
serverdata-d887701df743a8e4469b37cabfa260c4529ac89a.tar.xz
serverdata-d887701df743a8e4469b37cabfa260c4529ac89a.zip
Update from hercules
Diffstat (limited to 'npc')
-rw-r--r--npc/001-1/calypsan.txt2
-rw-r--r--npc/001-2-33/lozerk.txt2
-rw-r--r--npc/dev/test.txt10
-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
-rw-r--r--npc/items/shovel.txt6
-rw-r--r--npc/test/npc1.txt4
9 files changed, 24 insertions, 24 deletions
diff --git a/npc/001-1/calypsan.txt b/npc/001-1/calypsan.txt
index c8b5b8bb..36668f1b 100644
--- a/npc/001-1/calypsan.txt
+++ b/npc/001-1/calypsan.txt
@@ -46,7 +46,7 @@
shop "Cashmere#Dye001-1";
break;
default:
- debugmes "Calypsan script error, tissue_type is incorrect";
+ consolemes(CONSOLEMES_ERROR, "Calypsan script error, tissue_type is incorrect");
break;
}
close;
diff --git a/npc/001-2-33/lozerk.txt b/npc/001-2-33/lozerk.txt
index cdafb6bf..c751d4a0 100644
--- a/npc/001-2-33/lozerk.txt
+++ b/npc/001-2-33/lozerk.txt
@@ -143,7 +143,7 @@
{
.@legion_progress = getq(Artis_Legion_Progress);
.@enora = getq(ArtisQuests_Enora);
- debugmes .@legion_progress + " " + .@enora;
+ consolemes(CONSOLEMES_DEBUG, .@legion_progress + " " + .@enora);
select
rif((.@legion_progress == 0) && (.@enora == 11), lg("Enora sent me here.")),
rif(.@legion_progress == 2, lg("I'm done with my training.")),
diff --git a/npc/dev/test.txt b/npc/dev/test.txt
index e9058aee..f98651df 100644
--- a/npc/dev/test.txt
+++ b/npc/dev/test.txt
@@ -730,10 +730,10 @@ function script HerculesSelfTestHelper {
callsub(OnCheckStr, "sprintf (positional)", sprintf("'%2$s' '%1$c'", "First", "Second"), "'Second' 'F'");
if (.errors) {
- debugmes "Script engine self-test [ \033[0;31mFAILED\033[0m ]";
- debugmes "**** The test was completed with " + .errors + " errors. ****";
+ consolemes(CONSOLEMES_DEBUG, "Script engine self-test [ \033[0;31mFAILED\033[0m ]");
+ consolemes(CONSOLEMES_ERROR, "**** The test was completed with " + .errors + " errors. ****");
} else {
- debugmes "Script engine self-test [ \033[0;32mPASSED\033[0m ]";
+ consolemes(CONSOLEMES_DEBUG, "Script engine self-test [ \033[0;32mPASSED\033[0m ]");
}
return .errors;
end;
@@ -778,8 +778,8 @@ OnReportError:
.@val$ = getarg(1,"");
.@ref$ = getarg(2,"");
if (.errors == 1)
- debugmes "**** WARNING: Any self-test results past this point are unreliable because of previous errors. ****";
- debugmes "Error: "+.@msg$+": '"+.@val$+"' (found) != '"+.@ref$+"' (expected)";
+ consolemes(CONSOLEMES_ERROR, "**** WARNING: Any self-test results past this point are unreliable because of previous errors. ****");
+ consolemes(CONSOLEMES_ERROR, "Error: "+.@msg$+": '"+.@val$+"' (found) != '"+.@ref$+"' (expected)");
++.errors;
//end;
return;
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;
}
}
diff --git a/npc/items/shovel.txt b/npc/items/shovel.txt
index 81c0d22e..fef4c24f 100644
--- a/npc/items/shovel.txt
+++ b/npc/items/shovel.txt
@@ -36,7 +36,7 @@
function AddDigRect {
if (getargcount() < 5)
{
- debugmes "usage: AddDigRect(map$,x1,y1,x2,y2)";
+ consolemes(CONSOLEMES_ERROR, "usage: AddDigRect(map$,x1,y1,x2,y2)");
return 0;
}
.@map$ = str(getarg(0));
@@ -201,7 +201,7 @@ OnInit:
function script shovel_addquest {
if (getargcount() < 4)
{
- debugmes "usage: shovel_addquest(map$,x,y,func$)";
+ consolemes(CONSOLEMES_ERROR, "usage: shovel_addquest(map$,x,y,func$)");
return 0;
}
.@map$ = str(getarg(0));
@@ -219,7 +219,7 @@ function script shovel_addquest {
function script shovel_adddigrect {
if (getargcount() < 5)
{
- debugmes "usage: shovel_adddigrect(map$,x1,y1,x2,y2)";
+ consolemes(CONSOLEMES_ERROR, "usage: shovel_adddigrect(map$,x1,y1,x2,y2)");
return 0;
}
.@map$ = str(getarg(0));
diff --git a/npc/test/npc1.txt b/npc/test/npc1.txt
index 38a03142..a75a0120 100644
--- a/npc/test/npc1.txt
+++ b/npc/test/npc1.txt
@@ -709,9 +709,9 @@ OnSkillInvoke:
end;
OnReadyCheck:
- debugmes "OnReadyCheck";
+ consolemes(CONSOLEMES_DEBUG, "OnReadyCheck");
$@bgid1 = waitingroom2bg("testbg", 10, 10, "bgnpc1::OnLogout","bgnpc1:OnDie");
- debugmes "bgid=" + str($@bgid1);
+ consolemes(CONSOLEMES_DEBUG, "bgid=" + str($@bgid1));
setbgteam $@bgid1, 1;
bg_warp $@bgid1, "testbg", 10, 10;
}