summaryrefslogtreecommitdiff
path: root/npc/017-3/vault.txt
blob: 06f048efcd712ebec23dd35e23788bfa00d705de (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
// TMW2/LoF Script.
// Author:
//    Jesusalva
// Notes:
//    Based on BenB idea.

017-3,80,39,0	script	Vault	NPC_NO_SPRITE,{
    if (MERC_RANK) goto L_Debug;
    mesn;
    mesq l("There's a shiny safe here. How much money is inside? Nobody is looking at you, great!");
    // 2*3 = 6 possibilities, 5 attempts
    if (LockPicking(2, 3)) {
        Zeny=Zeny+$VAULT_01738039;
        $VAULT_01738039=0;
        mesn;
        mesq l("Booty!");
    } else {
        mesn;
        mesq l("Arrested!");
        .@inch=(Zeny/100);
        Zeny-=.@inch;
        $VAULT_01738039+=.@inch;
        atcommand("@jailfor 5mn "+strcharinfo(0));
    }
    close;

// TODO: And remove from here.
L_Debug:
    mesn;
    mesq l("Thiefs frequently attack this vault, and locking it again is a pain. If you break the lock you'll need to pay 100 GP.");
    if (Zeny < 100)
        close;
    // 2*3 = 6 possibilities, 5 attempts
    if (ToDoMerc(2, 3)) {
        getexp 20, 0;
        $VAULT_01738039+=2;
        mesn;
        mesq l("Safe again! You've gained some experience for your hard work!");
    } else {
        mesn;
        mesq l("Dargh, you broke the lock!!");
        Zeny-=100;
    }
    close;

OnInit:
    .distance=3;
    end;

OnClock0201:
    $VAULT_01738039+=rand(5,25);
    end;
}