summaryrefslogtreecommitdiff
path: root/npc/functions
diff options
context:
space:
mode:
Diffstat (limited to 'npc/functions')
-rw-r--r--npc/functions/fishing.txt2
-rw-r--r--npc/functions/instances.txt6
-rw-r--r--npc/functions/inventoryplace.txt3
-rw-r--r--npc/functions/mobhunter.txt8
-rw-r--r--npc/functions/util.txt11
5 files changed, 17 insertions, 13 deletions
diff --git a/npc/functions/fishing.txt b/npc/functions/fishing.txt
index e84b11cef..b09cb0d48 100644
--- a/npc/functions/fishing.txt
+++ b/npc/functions/fishing.txt
@@ -76,7 +76,7 @@ function script fishing {
};
freeloop(false);
}
- debugmes("[FISH] Initialized with %d common and %d rare fishes", getarraysize(.@common_fish), getarraysize(.@rare_fish));
+ //debugmes("[FISH] Initialized with %d common and %d rare fishes", getarraysize(.@common_fish), getarraysize(.@rare_fish));
.@npc$ = strnpcinfo(0); // the full name of the fishing spot
diff --git a/npc/functions/instances.txt b/npc/functions/instances.txt
index ee9c3081e..86d08d0a5 100644
--- a/npc/functions/instances.txt
+++ b/npc/functions/instances.txt
@@ -15,14 +15,14 @@ OnInstRestart:
// Candor Instance (we do all tests for debugmes here)
.CANDOR_INSTID = instance_create("002-1@CandorInst", 0, IOT_NONE);
if (.CANDOR_INSTID < 0) {
- debugmes "Error: No instance ID";
+ Exception("CANDY Instance ID failed", RB_DEBUGMES|RB_IRCBROADCAST);
} else {
//debugmes("created new instance id: %s", str(.CANDOR_INSTID));
.CANDOR1$=instance_attachmap("002-1", .CANDOR_INSTID, 0, "002-1@Candor");
- if (.CANDOR1$ == "") debugmes "Error: Map 002-1 CANDY failed";
+ if (.CANDOR1$ == "") Exception("Map 002-1 CANDY failed", RB_DEBUGMES|RB_IRCBROADCAST);
.CANDOR3$=instance_attachmap("002-3", .CANDOR_INSTID, 0, "002-3@Candor");
- if (.CANDOR3$ == "") debugmes "Error: Map 002-3 CANDY failed";
+ if (.CANDOR3$ == "") Exception("Map 002-3 CANDY failed", RB_DEBUGMES|RB_IRCBROADCAST);
debugmes "Nard's Ship in Candor instance is set.";
instance_set_timeout(1000000, 1000000, .CANDOR_INSTID);
diff --git a/npc/functions/inventoryplace.txt b/npc/functions/inventoryplace.txt
index 4a5e08cad..76cdad21f 100644
--- a/npc/functions/inventoryplace.txt
+++ b/npc/functions/inventoryplace.txt
@@ -13,8 +13,7 @@ function script inventoryplace {
if (.@argc % 2 != 0)
{
- debugmes "inventoryplace: Wrong argument count.";
- close;
+ Exception("inventoryplace: Wrong argument count.", RB_SPEECH|RB_ISFATAL|RB_PLEASEREPORT|RB_DEBUGMES);
}
for (.@i = .@j = 0; .@i < .@argc; .@i += 2)
diff --git a/npc/functions/mobhunter.txt b/npc/functions/mobhunter.txt
index 464a88ef9..e7bf03421 100644
--- a/npc/functions/mobhunter.txt
+++ b/npc/functions/mobhunter.txt
@@ -30,9 +30,7 @@ function script GHQ_GetQuestIDByMonsterID {
return 8;
break;
default:
- debugmes "Invalid mob ID: " + getarg(0);
- dispbottom l("ERROR, Please report: GHQ GQID: Invalid ID: @@", getarg(0));
- return 0;
+ return Exception("GHQ GQID: Invalid ID: "+getarg(0), RB_DEFAULT^RB_PLEASEREPORT|RB_ISFATAL);
break;
}
@@ -66,9 +64,7 @@ function script GHQ_GetMonsterIDByQuestID {
return MountainSnake;
break;
default:
- debugmes "Invalid quest ID: " + getarg(0);
- dispbottom l("ERROR, Please report: GHQ GMID: Invalid ID: @@", getarg(0));
- return 0;
+ return Exception("GHQ GMID: Invalid ID: "+getarg(0), RB_DEFAULT^RB_PLEASEREPORT|RB_ISFATAL);
break;
}
diff --git a/npc/functions/util.txt b/npc/functions/util.txt
index 3f4ab0a09..1c6652a7e 100644
--- a/npc/functions/util.txt
+++ b/npc/functions/util.txt
@@ -667,9 +667,18 @@ function script Exception {
if (.@gf & RB_SPEECH)
mesc("ERROR, REPORT ME! "+.@msg$, 1);
- if (.@gf & RB_PLEASEREPORT)
+ if (.@gf & RB_IRCBROADCAST)
+ channelmes("#world", "Error in script: "+.@msg$);
+
+ if (.@gf & RB_GLOBALANNOUNCE)
+ announce("Error in script: "+.@msg$, bc_all);
+
+ if (.@gf & RB_PLEASEREPORT|RB_DISPBOTTOM)
dispbottom("Please take a screenshot and report this bug, explaining how it happened.");
+ if (.@gf & RB_PLEASEREPORT|RB_SPEECH)
+ mesc("Please take a screenshot and report this bug, explaining how it happened."), 1;
+
if (.@gf & RB_ISFATAL) {
if (.@gf & RB_SPEECH) {
mesc l("This error is fatal."), 1;