summaryrefslogtreecommitdiff
path: root/npc/009-2/ryan.txt
blob: e1061eda20612f3dda117905af63bd7227d51161 (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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
// TMW-2 Script.
// Author:
//    Saulc
//    Jesusalva
// Notes:
//    Buys Tonori Delight

009-2,29,57,0	script	Ryan	NPC_PLAYER,{
    if (BaseLevel < 17) goto L_Weak;
    if (!getq(HalinarzoQuest_LifeDelight)) goto L_Prologue;
    .@q=getq2(HalinarzoQuest_LifeDelight);
    .@a=(.@q**2)+18;
    // Maximum: 10'020 Delights
    if (.@q > 100) goto L_Complete;
    mesn;
    mesq l("Ah, I just wanted @@... Yummy, lovely @@...", getitemlink(TonoriDelight), getitemlink(TonoriDelight));
    next;
    mesn;
    mesq l("If you bring me @@ @@, I'll give you a reward!", .@a, getitemlink(TonoriDelight));
    next;
    select
        rif(countitem(TonoriDelight) >= .@a, l("I have everything!")),
        l("Ah, not now...");
    mes "";
    if (@menu == 2)
        close;

    inventoryplace ChefHat, 1;

    delitem TonoriDelight, .@a;
    getexp rand(.@a, .@a*2)+.@q*rand(10,30), 0;
    Zeny=Zeny+.@a*21;
    setq2 HalinarzoQuest_LifeDelight, .@q+1;
    mesn;
    mesq l("Hmmm... Yummy!");

    // Landmark rewards
    // Chef hat last stage: 120 Delights - 605 in total
    .@r=getq(HalinarzoQuest_LifeDelight);
    .@q=getq2(HalinarzoQuest_LifeDelight);
    if (.@r < 2 && .@q >= 11) {
        setq1 HalinarzoQuest_LifeDelight, 2;
        getitem ChefHat, 1;
        getexp 13500, 10;
        next;
        mesn;
        mesq l("Ah, you really deserve this @@. Good job!", getitemlink(ChefHat));
    }
    if (.@q >= 21) {
        Zeny=Zeny+rand(1,.@a);
        getexp rand(1,.@q), rand(1, .@q);
    }
    if (.@q >= 51) {
        Zeny=Zeny+rand(.@q,.@a);
        getexp rand(1,.@a), rand(1, .@q);
    }
    if (.@q >= 91) {
        Zeny=Zeny+rand(.@a, .@a+.@q);
        getexp rand(.@q,.@a), rand(1, .@q);
    }
    if (.@r < 3 && .@q == 100) {
        setq1 HalinarzoQuest_LifeDelight, 3;
        getitem PlatinumIngot, 1;
        next;
        mesn;
        mesq l("Ah, I have enough @@ for a life! Take this EXTREMELY RARE @@. Good job!", getitemlink(TonoriDelight), getitemlink(PlatinumIngot));
    }

    close;

L_Complete:
    mesn;
    mesq l("Thanks for the help! Yummy!");
    close;

L_Weak:
    mesn;
    mesq l("How did you even got here? There are dangerous swamps north, and dangerous deserts south...");
    close;

L_Prologue:
    setq HalinarzoQuest_LifeDelight, 1, 0;
    mesn;
    mesq l("Ah, I just wanted @@... Yummy, lovely @@...", getitemlink(TonoriDelight), getitemlink(TonoriDelight));
    next;
    mesn;
    mesq l("There's a big prize in the end... Could you bring me some later?");
    close;

OnInit:
    .@npcId = getnpcid(.name$);
    setunitdata(.@npcId, UDT_HEADTOP, ChefHat);
    setunitdata(.@npcId, UDT_HEADMIDDLE, SilkRobe);
    setunitdata(.@npcId, UDT_HEADBOTTOM, CottonTrousers);
    setunitdata(.@npcId, UDT_WEAPON, Boots);
    setunitdata(.@npcId, UDT_HAIRSTYLE, 26);
    setunitdata(.@npcId, UDT_HAIRCOLOR, 2);

    .sex = G_MALE;
    .distance = 4;
    end;
}