diff options
author | Jesusaves <cpntb1@ymail.com> | 2018-06-01 12:35:45 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2018-06-01 12:35:45 -0300 |
commit | 7242d6b1599b876334f70495c743ed35788f0625 (patch) | |
tree | 2fcf21789cf2cd74564332d4635a077392dbdc05 /npc/functions/mobhunter.txt | |
parent | d0c86604a47aad5288e2bbe903699903be4c0259 (diff) | |
download | serverdata-7242d6b1599b876334f70495c743ed35788f0625.tar.gz serverdata-7242d6b1599b876334f70495c743ed35788f0625.tar.bz2 serverdata-7242d6b1599b876334f70495c743ed35788f0625.tar.xz serverdata-7242d6b1599b876334f70495c743ed35788f0625.zip |
Use a helper for Grand Hunter Quest
Diffstat (limited to 'npc/functions/mobhunter.txt')
-rw-r--r-- | npc/functions/mobhunter.txt | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/npc/functions/mobhunter.txt b/npc/functions/mobhunter.txt new file mode 100644 index 000000000..e11a08559 --- /dev/null +++ b/npc/functions/mobhunter.txt @@ -0,0 +1,51 @@ +// TMW-2 Script +// Author: Jesusalva +// Desc: Grand Hunter Quest Utils + +// MobID, Place, Prize +function GHQ_Assign { + .@id=GHQ_GetQuestIDByMonsterID(getarg(0)); + next; + //mesq l("Current Quest Progress: @@/10,000 kills", getq2(General_Hunter)); + 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)) mes l("You are already hunting something else. Do you want to switch?"); + select + l("I'm not interested."), + rif(GHMEMO[.@id] < 10000,l("I'll hunt them for you.")); + + switch (@menu) { + case 2: + GHMEMO[getq(General_Hunter)]=getq2(General_Hunter); + setq(General_Hunter, .@id, GHMEMO[.@id]); + mesn; + mesq l("Good luck! Don't come back until you reach 10000 kills!"); + close; + break; + default: + close; + } + + close; + +} + +// MobID +function GHQ_GetQuestIDByMonsterID { + switch (getarg(0)) { + case Maggot: + return 1; + break; + case Snake: + return 2; + break; + default: + debugmes "Invalid mob ID: " + getarg(0); + dispbottom l("ERROR, Please report: GHQ GQID: Invalid ID: @@", getarg(0)); + return 0; + break; + } + +} + |