summaryrefslogtreecommitdiff
path: root/npc/033-1/trainer.txt
blob: c4be75b6698dfd0c08049be72f68fe442205219a (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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
// TMW2 scripts.
// Authors:
//    Jesusalva
// Description:
//    Mercenary Trainer

033-1,180,100,0	script	Mercenary Trainer	NPC_REDY_MALE_SWORD,{
    mesn;
    mesq l("Hello, I am a sword to hire, a Mercenary Trainer and Chief.");
    next;
    mesn;
    mesq l("Do you want to hire a mercenary? Or perhaps get a card so you can invoke them later? I can even make them stronger if you wish.");
    mesc l("With a discrete motion, you notice they also sell scrolls.");
    next;
    goto L_Main;

L_Main:
    select
        l("Hire a mercenary"),
        l("Buy a mercenary card"),
        l("Evolve mercenaries"),
        l("Bye.");
    mes "";
    switch (@menu) {
        // Hire Card
        case 1:
            menuint
                l("[%d GP] [Lv 1~25] Hire for one hour", 1000), 1,
                l("[%d GP] [Lv 26~40] Hire for one hour", 3000), 2,
                l("[%d GP] [Lv 41~60] Hire for one hour", 7500), 3,
                l("[%d GP] [Lv 61~79] Hire for one hour", 15000), 4,
                l("[%d GP] [Lv 80~100] Hire for one hour", 25000), 5,
                l("I've changed my mind"), 0;
            switch (@menuret) {
                case 1:
                    .@gp=1000;
                    if (Zeny < .@gp) {
                        mesc l("You cannot pay."), 1;
                        next;
                    } else {
                        .@mid=merc_randid(0, 0, 0, 0, 1000);
                        mercenary_create(.@mid, 3600000);
                        POL_PlayerMoney(.@gp);
                    }
                    break;
                case 2:
                    .@gp=3000;
                    if (Zeny < .@gp) {
                        mesc l("You cannot pay."), 1;
                        next;
                    } else {
                        .@mid=merc_randid(0, 0, 0, 1000, 0);
                        mercenary_create(.@mid, 3600000);
                        POL_PlayerMoney(.@gp);
                    }
                    break;
                case 3:
                    .@gp=7500;
                    if (Zeny < .@gp) {
                        mesc l("You cannot pay."), 1;
                        next;
                    } else {
                        mercenary_create merc_randid(0, 0, 1000, 0, 0), 3600000;
                        POL_PlayerMoney(.@gp);
                    }
                    break;
                case 4:
                    .@gp=15000;
                    if (Zeny < .@gp) {
                        mesc l("You cannot pay."), 1;
                        next;
                    } else {
                        mercenary_create merc_randid(0, 1000, 0, 0, 0), 3600000;
                        POL_PlayerMoney(.@gp);
                    }
                    break;
                case 5:
                    .@gp=25000;
                    if (Zeny < .@gp) {
                        mesc l("You cannot pay."), 1;
                        next;
                    } else {
                        mercenary_create merc_randid(1000, 0, 0, 0, 0), 3600000;
                        POL_PlayerMoney(.@gp);
                    }
                    break;
                default:
                    break;
            }
            break;
        // Buy Card
        case 2:
            npcshopattach(.name$);
            openshop;
            closedialog;
            close;
            break;
        // Evolve Card
        case 3:
            mesn;
            mesq l("Give me %s cards of the same type, and I'll give you one card of a higher rarity. There is no cost, but the card is random.", b(l("three")));
            next;
            mes "##B" + l("Drag and drop an item from your inventory.") + "##b";

            .@card = requestitem();
            if (.@card <= 1) break;
            if (countitem(.@card) < 3) {
                mesc l("You need at least %d cards of same kind.", 3), 1;
                break;
            }
            .@st = merc_getstar(.@card);
            if (.@st < 1 || .@st >= 5) {
                mesc l("This cannot be evolved."), 1;
                break;
            }
            delitem .@card, 3;
            merc_boxset(
                        (.@st == 4 ? 1000 : 0),
                        (.@st == 3 ? 1000 : 0),
                        (.@st == 2 ? 1000 : 0),
                        (.@st == 1 ? 1000 : 0),
                        0);
            mesn;
            mesq l("Here you go! Wasn't this a sweet deal?");
            break;
        // Leave
        default:
            closeclientdialog;
            goodbye;
            close;
            break;
    }
    goto L_Main;

OnInit:
	tradertype(NST_ZENY);
    sellitem MercBoxEE, 25000;
    sellitem MercBoxDD, 15000;
    sellitem MercBoxCC, 7500;
    sellitem MercBoxBB, 3750;
    sellitem MercBoxAA, 1250;

    sellitem ScrollSMaggot,    1000;
    sellitem ScrollSCave,      1500;
    sellitem ScrollSWolvern,   2000;
    sellitem ScrollSYeti,      2500;
    sellitem ScrollSTerranite, 3000;
    sellitem ScrollSDragon,    3500;

    sellitem SacredImmortalityPotion, 25000;

    sellitem ScrollMagnusHealA, 500;
    sellitem ScrollMagnusHealB,1000;
    sellitem ScrollMagnusHealC,2000;

    sellitem ScrollBattlePlansA, 400;
    sellitem ScrollBattlePlansB,1000;
    //sellitem ScrollBattlePlansC,1500;

    sellitem ScrollDefenseBlessA, 400;
    sellitem ScrollDefenseBlessB,1000;
    //sellitem ScrollDefenseBlessC,1500;

    sellitem ScrollCriticalFortuneA, 400;
    sellitem ScrollCriticalFortuneB,1000;
    //sellitem ScrollCriticalFortuneC,1500;

    .distance=5;
    .sex=G_MALE;
	end;

// Pay your taxes!
OnBuyItem:
    debugmes("Purchase confirmed");
    PurchaseTaxes("Nival");
    end;

OnSellItem:
    debugmes("Sale confirmed");
    PurchaseTaxes("Nival");
    end;

}