diff options
author | Jesusaves <cpntb1@ymail.com> | 2019-01-04 22:42:06 -0200 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2019-01-04 22:42:06 -0200 |
commit | ce3282b903cd137e6091619fe3b7d716a942bd88 (patch) | |
tree | 59b01aaf5929b7ddd7a5e429fcc977820905f0fc /npc/002-1/peter.txt | |
parent | b30b4f5f1bd8c8559fe1d7422e9811f123d69c82 (diff) | |
download | serverdata-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.txt | 5 |
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)); } |