summaryrefslogtreecommitdiff
path: root/npc/002-1/peter.txt
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2019-01-04 22:42:06 -0200
committerJesusaves <cpntb1@ymail.com>2019-01-04 22:42:06 -0200
commitce3282b903cd137e6091619fe3b7d716a942bd88 (patch)
tree59b01aaf5929b7ddd7a5e429fcc977820905f0fc /npc/002-1/peter.txt
parentb30b4f5f1bd8c8559fe1d7422e9811f123d69c82 (diff)
downloadserverdata-ce3282b903cd137e6091619fe3b7d716a942bd88.tar.gz
serverdata-ce3282b903cd137e6091619fe3b7d716a942bd88.tar.bz2
serverdata-ce3282b903cd137e6091619fe3b7d716a942bd88.tar.xz
serverdata-ce3282b903cd137e6091619fe3b7d716a942bd88.zip
Fix edge cases on Peter which could cause server to crash
Diffstat (limited to 'npc/002-1/peter.txt')
-rw-r--r--npc/002-1/peter.txt5
1 files changed, 3 insertions, 2 deletions
diff --git a/npc/002-1/peter.txt b/npc/002-1/peter.txt
index ea71fd4bf..eed98a55c 100644
--- a/npc/002-1/peter.txt
+++ b/npc/002-1/peter.txt
@@ -34,7 +34,7 @@ OnTouch:
.@q3 = getq3(ShipQuests_Peter);
if (BaseLevel < 8) goto L_Stop;
- if (.@q && isinstance(.@q3)) goto L_Rfail;
+ if (.@q && isinstance(.@q3) && .@q3 > 0) goto L_Rfail;
doevent "Peter::OnGiveTask";
close;
@@ -53,7 +53,7 @@ L_Rfail:
.@q3 = getq3(ShipQuests_Peter);
if (BaseLevel < 8) goto OnTooWeak;
- if (!.@q || !isinstance(.@q3)) goto L_Task;
+ if (!.@q || !isinstance(.@q3) || .@q3 == 0) goto L_Task;
if (.@q2 < 15) goto L_ReturnFail;
dispbottom l("I am broken?! Please report! Debug data: @@ (@@)", .@q, .@q2);
close;
@@ -138,6 +138,7 @@ L_BonusTask:
mes l("I'll give you @@ GP for this job.", 1000);
mes "";
}
+ // TODO: This could be done a daily quest
if (.@q == 15) {
mes l("- I currently need your help with @@, but there's no reward.", getmonsterlink(Ratto));
}