summaryrefslogtreecommitdiff
path: root/npc/functions
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2021-09-20 20:42:54 -0300
committerJesusaves <cpntb1@ymail.com>2021-09-20 20:42:54 -0300
commit4e3eb2b1fdc7000571bc955a284fdd644a8abea8 (patch)
tree38636d308eae05a52f456628486ceafe700c153a /npc/functions
parent03bad31d7fe788a25a91e1097c376a763f560713 (diff)
downloadserverdata-4e3eb2b1fdc7000571bc955a284fdd644a8abea8.tar.gz
serverdata-4e3eb2b1fdc7000571bc955a284fdd644a8abea8.tar.bz2
serverdata-4e3eb2b1fdc7000571bc955a284fdd644a8abea8.tar.xz
serverdata-4e3eb2b1fdc7000571bc955a284fdd644a8abea8.zip
Update some of the debugmes for usage with syslog facility
Diffstat (limited to 'npc/functions')
-rw-r--r--npc/functions/estate.txt2
-rw-r--r--npc/functions/event.txt2
-rw-r--r--npc/functions/main.txt6
-rw-r--r--npc/functions/npcmovegraph.txt18
-rw-r--r--npc/functions/util.txt12
-rw-r--r--npc/functions/vault.txt2
-rw-r--r--npc/functions/weather.txt4
7 files changed, 24 insertions, 22 deletions
diff --git a/npc/functions/estate.txt b/npc/functions/estate.txt
index 6f8c2acfd..445f672ff 100644
--- a/npc/functions/estate.txt
+++ b/npc/functions/estate.txt
@@ -88,7 +88,7 @@ function script realestate_hasmobilia {
case 6:
return $ESTATE_MOBILIA_2[getarg(0)] & getarg(2);
default:
- debugmes("[ERROR] [CRITICAL] [REAL ESTATE]: Object %d have Invalid Collision Type: %d (must range 1~6)", getarg(2), getarg(1));
+ consolebug("[ERROR] [CRITICAL] [REAL ESTATE]: Object %d have Invalid Collision Type: %d (must range 1~6)", getarg(2), getarg(1));
return false;
}
return false;
diff --git a/npc/functions/event.txt b/npc/functions/event.txt
index 3e0086371..9efcd68e8 100644
--- a/npc/functions/event.txt
+++ b/npc/functions/event.txt
@@ -467,7 +467,7 @@ OnClock0000:
.@d=$@DEBUG_OD;
if ($@DEBUG_OM)
.@m=$@DEBUG_OM;
- debugmes "EVENT CORE, the %02d/%02d", .@d, .@m;
+ consoleinfo "EVENT CORE, the %02d/%02d", .@d, .@m;
// Is there another event this week?
if (!$HARDCORE && .@o == MONDAY && !.@isinit) {
diff --git a/npc/functions/main.txt b/npc/functions/main.txt
index e28de3b8d..787c230a1 100644
--- a/npc/functions/main.txt
+++ b/npc/functions/main.txt
@@ -439,7 +439,8 @@ function script Exception {
dispbottom("ERROR: "+.@msg$);
if (.@gf & RB_DEBUGMES)
- debugmes("[Warning] "+.@msg$);
+ consolewarn(.@msg$);
+ //debugmes("[Warning] "+.@msg$);
if (.@gf & RB_SPEECH)
mesc("ERROR, REPORT ME! "+.@msg$, 1);
@@ -463,7 +464,8 @@ function script Exception {
dispbottom("This error is fatal, we stop execution.");
if (.@gf & RB_DEBUGMES)
- debugmes("[Error] The error is fatal.");
+ consolebug("Previous warning was fatal, halting execution.");
+ //debugmes("[Error] The error is fatal.");
if (.@gf & RB_SPEECH) {
mesc l("This error is fatal, we stop execution."), 1;
diff --git a/npc/functions/npcmovegraph.txt b/npc/functions/npcmovegraph.txt
index 0877b7487..1391e0d72 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";
+ consolebug "findmovegraphlabel: no argument";
return -1;
}
if (!isstr(getarg(0)))
{
- debugmes "findmovegraphlabel: need string argument";
+ consolebug "findmovegraphlabel: need string argument";
return -1;
}
@@ -144,7 +144,7 @@ function script execmovecmd {
}
else
{
- debugmes "execmovecmd: unknown WARP destination label: " + .@cmd$[1];
+ consolewarn "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";
+ consolewarn "execmovecmd: CALL command needs some parameters";
return 0;
case 2:
return callfunc(.@cmd$[1]);
@@ -175,7 +175,7 @@ function script execmovecmd {
if (.@msg$ != "" && .@msg$ != " ")
npctalk .@msg$;
else
- debugmes "Invalid message passed to execmovecmd/npctalk";
+ consolewarn "Invalid message passed to execmovecmd/npctalk";
}
else if (.@cmd$[0] == "debugmes")
{
@@ -200,7 +200,7 @@ function script execmovecmd {
}
else
{
- debugmes "Unknown move graph cmd: " + .@cmd$[0];
+ consolebug "Unknown move graph cmd: " + .@cmd$[0];
}
return 0;
}
@@ -230,7 +230,7 @@ function script getnextmovecmd {
function script getrandompoint {
if (getargcount() < 4)
{
- debugmes "error: getrandompoint(x1, y1, x2, y2) takes 4 arguments";
+ consolebug "error: getrandompoint(x1, y1, x2, y2) takes 4 arguments";
return -1;
}
@@ -268,7 +268,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 + ")]";
+ consolebug "error: getrandompoint: cannot find walkable cell in rectangle [(" + .@x1 + "," + .@y1 + ") , (" + .@x2 + "," + .@y2 + ")]";
return -1;
L_Found:
@@ -286,7 +286,7 @@ L_Found:
function script mg_npcwalkto {
if (getargcount() < 2)
{
- debugmes "usage: mg_npcwalkto(x1,y1[,x2,y2])";
+ consolebug "usage: mg_npcwalkto(x1,y1[,x2,y2])";
return -1;
}
diff --git a/npc/functions/util.txt b/npc/functions/util.txt
index 420c856f2..a276cd541 100644
--- a/npc/functions/util.txt
+++ b/npc/functions/util.txt
@@ -18,7 +18,7 @@ function script DelItemFromEveryPlayer {
query_sql("DELETE FROM `guild_storage` WHERE `nameid`="+getarg(0));
query_sql("DELETE FROM `rodex_items` WHERE `nameid`="+getarg(0));
query_sql("DELETE FROM `auction` WHERE `nameid`="+getarg(0));
- debugmes "Deleting item %d", getarg(0);
+ consolewarn "Deleting item %d", getarg(0);
// Del items which SQL can't reach
.@c = getunits(BL_PC, .@players, MAX_CYCLE_PC);
@@ -105,7 +105,7 @@ function script DelQuestFromEveryPlayer {
function script ReplaceItemFromEveryPlayer {
if (getarg(0, -1) < 0)
return;
- debugmes("* Server update: %d item was replaced by %d", getarg(0), getarg(1));
+ consoleinfo("* Server update: %d item was replaced by %d", getarg(0), getarg(1));
query_sql("UPDATE `inventory` SET `nameid`='"+getarg(1)+"' WHERE `nameid`="+getarg(0));
query_sql("UPDATE `cart_inventory` SET `nameid`='"+getarg(1)+"' WHERE `nameid`="+getarg(0));
query_sql("UPDATE `storage` SET `nameid`='"+getarg(1)+"' WHERE `nameid`="+getarg(0));
@@ -120,7 +120,7 @@ function script ReplaceItemFromEveryPlayer {
function script ReplaceSkillFromEveryPlayer {
if (getarg(0, -1) < 0)
return;
- debugmes("* Server update: skill %d was replaced by %d", getarg(0), getarg(1));
+ consoleinfo("* Server update: skill %d was replaced by %d", getarg(0), getarg(1));
// If new ID already exists, it will skip
query_sql("UPDATE IGNORE `skill` SET `id`='"+getarg(1)+"' WHERE `id`="+getarg(0));
return;
@@ -625,8 +625,8 @@ function script nard_time {
}
// Error
- debugmes "ERROR, INVALID LOCATION AND DESTINATION";
- debugmes l("@@ -> @@", LOCATION$, getarg(0));
+ consolewarn "ERROR, INVALID LOCATION AND DESTINATION";
+ consolewarn("%s -> %s", LOCATION$, getarg(0));
dispbottom l("An error on your travel time happened. Please report.");
return INT_MAX;
}
@@ -1110,7 +1110,7 @@ function script teleporthome {
if (.@i >= 0)
EnterTown($@LOCMASTER_LOC$[.@i]);
else
- debugmes("[ERROR] Invalid Town Map for Time Flask: %s", getmap());
+ consolewarn("[ERROR] Invalid Town Map for Time Flask: %s", getmap());
return;
}
diff --git a/npc/functions/vault.txt b/npc/functions/vault.txt
index 2911a47c1..78eb5e7db 100644
--- a/npc/functions/vault.txt
+++ b/npc/functions/vault.txt
@@ -19,7 +19,7 @@ function script getvaultexp {
RB_DEBUGMES | RB_IRCBROADCAST | RB_GLOBALANNOUNCE | RB_ISFATAL);
if (getvaultid()) {
##VAULT_EXP+=.@exp;
- debugmes("Granting %d Soul Exp to %d under the Moubootaur's authority.",
+ consoleinfo("Granting %d Soul Exp to %d under the Moubootaur's authority.",
.@exp, ##VAULT);
}
return;
diff --git a/npc/functions/weather.txt b/npc/functions/weather.txt
index 596f1bde1..91e9bfe5e 100644
--- a/npc/functions/weather.txt
+++ b/npc/functions/weather.txt
@@ -104,7 +104,7 @@ OnInit:
htput(.wcore, "011-3", "special");
- debugmes "[Weather.sys] Total Maps = " + htsize(.wcore);
+ consoleinfo "[Weather.sys] Total Maps = " + htsize(.wcore);
// No "end" here, so server starts with weather
OnMinute00:
OnMinute15:
@@ -178,7 +178,7 @@ OnMinute45:
.@mk=.@mk|MASK_MATTACK;
} else {
- debugmes "Warning warning, blame Saulc! Weather system error on map "+.@key$;
+ consolebug "Warning warning, blame Saulc! Weather system error on map "+.@key$;
announce("ERROR BLAME SAULC! WEATHER SYSTEM CORRUPTED.", bc_all);
}