summaryrefslogtreecommitdiff
path: root/npc/functions/mobhunter.txt
blob: e11a08559355262dfa11022dfa2619809005b43e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
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;
    }

}