From d970624d6127ee9e8add09d811d4ee0ff9e04b2a Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Sun, 9 Jun 2019 15:37:54 -0300 Subject: Update DanCheck() so it is easier to read --- npc/002-1/dan.txt | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'npc/002-1/dan.txt') diff --git a/npc/002-1/dan.txt b/npc/002-1/dan.txt index 5dd9a0153..04a04a814 100644 --- a/npc/002-1/dan.txt +++ b/npc/002-1/dan.txt @@ -92,11 +92,18 @@ OnInit: 002-1,0,0,0 script PiouSpwn NPC_HIDDEN,{ function DanCheck { if (player_attached()) { + // Quest not in progress - nothing to do if (getq(ShipQuests_Dan) != 1) return; + + // If you complete, finish it. Otherwise, sum it up. .@t=getq2(ShipQuests_Dan); - if (.@t+1 >= 12) setq ShipQuests_Dan, 2, 0; - if (.@t+1 < 12) setq2 ShipQuests_Dan, .@t+1; + if (.@t+1 >= 12) + setq ShipQuests_Dan, 2, 0; + else + setq2 ShipQuests_Dan, .@t+1; + + // Report progress dispbottom l("@@/@@", .@t+1, 12); } return; -- cgit v1.2.3-60-g2f50