From da88cb0bd57ebf1bd7bd19056cb1d057b9417a96 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Sat, 16 Jun 2018 00:05:49 -0300 Subject: Add more local variables to GHQ_Assign to make script more readable. --- npc/functions/mobhunter.txt | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'npc/functions/mobhunter.txt') diff --git a/npc/functions/mobhunter.txt b/npc/functions/mobhunter.txt index 6f99c5451..4cd58f6c5 100644 --- a/npc/functions/mobhunter.txt +++ b/npc/functions/mobhunter.txt @@ -54,18 +54,21 @@ function script GHQ_GetMonsterIDByQuestID { // MobID, Place, Prize function script GHQ_Assign { .@id=GHQ_GetQuestIDByMonsterID(getarg(0)); + .@q=getq(General_Hunter); + .@p=getq2(General_Hunter); + .@m=GHQ_GetMonsterIDByQuestID(.@q); next; - //mesq l("Current Quest Progress: @@/10,000 kills", getq2(General_Hunter)); + //mesq l("Current Quest Progress: @@/10,000 kills", .@p); mesn; mes l("I represent the @@ Hunters. We hunt @@.", getarg(1), getmonsterlink(getarg(0))); mes l("The great prize is @@. It can be claimed with Aidan, on Tulimshar.", getarg(2)); - if (getq(General_Hunter) == .@id) { - mes l("You are currently hunting @@/10000 @@. When done, remember to claim rewards with Aidan, on Tulimshar!", getq2(General_Hunter), getmonsterlink(GHQ_GetMonsterIDByQuestID(getq(General_Hunter)))); + if (.@q == .@id) { + mes l("You are currently hunting @@/10000 @@. When done, remember to claim rewards with Aidan, on Tulimshar!", .@p, getmonsterlink(.@m)); next; closedialog; goodbye; } - if (getq(General_Hunter)) mes l("You are currently hunting @@/10000 @@. Do you want to switch?", getq2(General_Hunter), getmonsterlink(GHQ_GetMonsterIDByQuestID(getq(General_Hunter)))); + if (.@q) mes l("You are currently hunting @@/10000 @@. Do you want to switch?", .@p, getmonsterlink(.@m)); select l("I'm not interested."), rif(GHMEMO[.@id] < 10000,l("I'll hunt them for you.")); -- cgit v1.2.3-70-g09d2