summaryrefslogtreecommitdiff
path: root/npc/003-5/jeweler.txt
blob: 3fbf5ae04adb547da54482c14da83f2e61aa444f (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
// TMW2 Script
// Author:
//    Jesusalva
// Description:
//  Sells and crafts jewels
//
// Notes:
//  Gold Ore (dropped by bifs) → Pieces or Ingot, depends on what you want to forge
//  Jeweler only works with Gold PIECES. The Ingots are for forges.

003-5,33,37,0	script	Jeweler	NPC_FEMALE,{
    mesn;
    mesq l("Hello!");
    goto L_Menu;

L_Menu:
    mes "";
    mesn strcharinfo(0);
    menu
        l("I want to shop."), -,
        l("I want to craft rings."), L_Craft,
        rif(countitem(GoldenRing) >= 1, l("I want to add gemstones to a ring.")), L_Gemstone,
        l("Nothing, sorry."), L_Close;

    openshop;
    closedialog;
    close;

L_Craft:
    mes "";
    mesn;
    mesq l("Of course, you can trade a @@, with 200 GP, for a @@.", getitemlink(GoldPieces), getitemlink(GoldenRing));
    next;
    menu
        rif(countitem(GoldPieces) >= 1 && Zeny >= 200, l("Yes, deal. Gimme the ring.")), -,
        l("...I'll be back later."), L_Close;

    inventoryplace GoldenRing, 1;
    delitem GoldPieces, 1;
    Zeny=Zeny-200;

    getitem GoldenRing, 1;
    getexp 100, 25;
    mes "";
    mesn;
    mesq l("Here you go! Anything else?");
    next;
    goto L_Menu;

L_Gemstone:
    mes "";
    mesn;
    mesq l("Adding gems will give special stats to rings, and they'll become lighter, but these gems cannot be removed easily.");
    mesq l("I charge a service fee of 1000 GP.");
    next;
    if (Zeny < 1000) {
        mesn;
        mesq lg("You clearly don't have money, so let's not bother with that right now.");
        next;
        goto L_Menu;
    }
    menu
        rif(countitem(Diamond) >= 1 , l("Diamond Ring (+2 vit)")), L_Diamond,
        rif(countitem(Ruby) >= 1    , l("Ruby Ring (+2 str)")),     L_Ruby,
        rif(countitem(Amethyst) >= 1, l("Amethyst Ring (+2 dex)")), L_Amethyst,
        rif(countitem(Sapphire) >= 1, l("Sapphire Ring (+2 int)")), L_Sapphire,
        rif(countitem(Topaz) >= 1   , l("Topaz Ring (+2 agi)")),    L_Topaz,

        rif(countitem(Emerald) >= 1 , l("Emerald Ring (+2 luck)")), L_Emerald,
        rif(countitem(Pearl) >= 3   , l("3x Pearl Ring (+1 agi/int/dex)")), L_Pearl,
        rif(countitem(BlackPearl) >= 1, l("Black Pearl Ring (+1 str/vit/luk)")), L_BlackPearl,
        l("I don't have any gemstone or three pearls with me."), L_Close;

// As usual, I don't care with cheaters, so if you try to cheat money or gemstones, YOU WILL LOSE ALL REAGENTS. No refunds.
L_Diamond:
    inventoryplace GoldenDiamondRing;
    delitem GoldenRing, 1;
    Zeny=Zeny-1000;
    delitem Diamond, 1;
    getitem GoldenDiamondRing, 1;
    getexp 800, 0;
    goto L_Menu;

L_Ruby:
    inventoryplace GoldenRubyRing;
    delitem GoldenRing, 1;
    Zeny=Zeny-1000;
    delitem Ruby, 1;
    getitem GoldenRubyRing, 1;
    getexp 800, 0;
    goto L_Menu;

L_Amethyst:
    inventoryplace GoldenAmethystRing;
    delitem GoldenRing, 1;
    Zeny=Zeny-1000;
    delitem Amethyst, 1;
    getitem GoldenAmethystRing, 1;
    getexp 800, 0;
    goto L_Menu;

L_Sapphire:
    inventoryplace GoldenSapphireRing;
    delitem GoldenRing, 1;
    Zeny=Zeny-1000;
    delitem Sapphire, 1;
    getitem GoldenSapphireRing, 1;
    getexp 800, 0;
    goto L_Menu;

L_Topaz:
    inventoryplace GoldenTopazRing;
    delitem GoldenRing, 1;
    Zeny=Zeny-1000;
    delitem Topaz, 1;
    getitem GoldenTopazRing, 1;
    getexp 800, 0;
    goto L_Menu;

L_Emerald:
    inventoryplace GoldenEmeraldRing;
    delitem GoldenRing, 1;
    Zeny=Zeny-1000;
    delitem Emerald, 1;
    getitem GoldenEmeraldRing, 1;
    getexp 800, 0;
    goto L_Menu;

L_Pearl:
    inventoryplace GoldenPearlRing;
    delitem GoldenRing, 1;
    Zeny=Zeny-1000;
    delitem Pearl, 3;
    getitem GoldenPearlRing, 1;
    getexp 1000, 0;
    goto L_Menu;

L_Pearl:
    inventoryplace GoldenBlackPearlRing;
    delitem GoldenRing, 1;
    Zeny=Zeny-1000;
    delitem BlackPearl, 1;
    getitem GoldenBlackPearlRing, 1;
    getexp 1000, 0;
    goto L_Menu;


L_Close:
    closedialog;
    goodbye;
    end;

OnInit:
    .@npcId = getnpcid(0, .name$);
    setunitdata(.@npcId, UDT_HEADTOP, NPCEyes);
    setunitdata(.@npcId, UDT_HEADMIDDLE, VneckJumper);
    setunitdata(.@npcId, UDT_HEADBOTTOM, RaidTrousers);
    setunitdata(.@npcId, UDT_WEAPON, LousyMoccasins); // Boots
    setunitdata(.@npcId, UDT_HAIRSTYLE, 3);
    setunitdata(.@npcId, UDT_HAIRCOLOR, 8);
    npcsit;

    .sex = G_FEMALE;
    .distance = 5;

    tradertype(NST_ZENY);
    sellitem WeddingRing, 5000;
    end;

}