summaryrefslogtreecommitdiff
path: root/npc/009-2-6/jpmorbid.txt
blob: 473b337d1d4d3fa6b9d4f061b2f1a8f13e21ffcf (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
52
53
54
55
56
57
58
59
60
61
62
// The Mana World scripts.
// Author:
//    Jesusalva
// Description:
//    J.P.Morbid the Asphodel Moors storage guy.

009-2-6,27,30,0	script	J.P. Morbid	NPC_JPMORBID,{
    // Storage/Banking function not unlocked in Artis
    if (!getq(ArtisQuests_Lloyd)) {
        speech
            l("Oh hey!"),
            l("I was supposed to act as storagekeeper, but I forgot my key."),
            l("Come back later, perhaps I can find it.");
        close;
    }
    mesn;
    mesq l("Welcome to %s's Bank!", l($@BANK_TOWN$[.bankid]));
    next;

    do
    {
        select
            l("I would like to store some items."),
            l("I would like to perform money transactions."),
            l("Is there any request for me?"),
            menuaction(l("Quit"));

        mes "";

        switch (@menu) {
            case 1:
                mesn;
                mesq l("Sure thing! I'll have your items transported here from Artis before you realize!");
                next;
                closeclientdialog();
                openstorage();
                close;
            case 2:
                MerchantGuild_Bank();
                break;
            case 3:
                MerchantGuild_Quests(.bankid);
                break;
            default:
                closeclientdialog;
                goodbye;
                close;
        }

    } while (true);
    close;

OnInit:
    .bodytype = BODYTYPE_3;
    .distance = 4;

    // Bank configuration
    array_push($@BANK_NAME$, .name$);
    array_push($@BANK_TOWN$, "Asphodel Moors");
    .bankid = getarraysize($@BANK_NAME$)-1;
    end;
}