summaryrefslogtreecommitdiff
path: root/npc/016-1/laranja.txt
blob: d7de072242b62a89e4d69fac13ad23c802d2a698 (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
// TMW2 Script
// Author:
//    Saulc
//    Povo
// Description:
//  Laranja, orange in portuges is a orange dye seller in ship

016-1,25,24,0	script	Laranja	NPC_FEMALE,{

    mesn;
    mesq l("I'm Laranja.");
    next;
    mesn;
    mesq l("My father runs a dye business, I'm in charge of selling %s around the world.", getitemlink(OrangeDye));
    next;
    mesn;
    mesq l("How can I help you?");
    mes "";
    menu
        l("Orange Dye? How much does it cost?"), -,
        l("Nothing. Take care!"), L_Quit;

L_Dye:
    mesn;
    mesq l("Thanks to pirate activity, dye has become more difficult to obtain lately.");
    mesq l("In fact, %s is considered by most to be rare these days.", getitemlink(OrangeDye));
    next;
    if (BaseLevel < 45) { 
        mesn; 
        mesq l("Since supplies are limited, I currently prioritize orders placed by higher level players.");
        mesq l("Come back when you are stronger and we can trade.");
        next;
        goto L_Quit;
    }
    
    mesn;
    mesq l("I can trade some with you. Just bring me the following cash payment and supplies:");
    mes "";
    mesq l("%s/%s GP",fnum(Zeny), fnum(3000));
    mesq l("%d/%d %s",countitem(BottleOfTonoriWater), 1, getitemlink(BottleOfTonoriWater));
    mesq l("%d/%d %s",countitem(GambogeHerb), 60, getitemlink(GambogeHerb));
    mesq l("%d/%d %s",countitem(AlizarinHerb), 70, getitemlink(AlizarinHerb));
    mesq l("%d/%d %s",countitem(Piberries), 5, getitemlink(Piberries));
    mesq l("%d/%d %s",countitem(PileOfAsh), 5, getitemlink(PileOfAsh)); 
    compareandsetq TulimsharQuest_Laranja, 0, 1;
    next;
    select
        l("Yeah, I need one."),
        l("No thank you.");
    mes "";
    if (@menu == 2)
        goto L_Quit;
    if (countitem(BottleOfTonoriWater) >= 1 &&
          countitem(GambogeHerb) >= 60 &&
          countitem(AlizarinHerb) >= 75 &&
          countitem(Piberries) >= 5 &&
          countitem(PileOfAsh) >= 5 && Zeny >= 1500) {
        inventoryplace OrangeDye, 1, EmptyBottle, 1;
        delitem BottleOfTonoriWater, 1;
        delitem GambogeHerb,60;
        delitem AlizarinHerb, 70;
        delitem Piberries, 5;
        delitem PileOfAsh, 5;
        Zeny=Zeny-1500;
        getitem OrangeDye, 1;
        getitem EmptyBottle, 1;
        if (getq(TulimsharQuest_Laranja) == 1) {
            setq TulimsharQuest_Laranja, 2;
            getexp 9000, 0;
        }   
        
        mesn;
        mesq l("Pleasure doing business with you! Do you want any more?");
        next;
        goto L_Dye;
    } else {
        mesn;
        mesq l("Looks like you are a bit short on supplies. Come back when you have everything I need.");
    }
    close;

L_Quit:
    closedialog;
    goodbye;
    close;

OnInit:
    .@npcId = getnpcid(.name$);
    setunitdata(.@npcId, UDT_HEADTOP, NPCEyes);
    setunitdata(.@npcId, UDT_HEADMIDDLE, ShortTankTop);
    setunitdata(.@npcId, UDT_HEADBOTTOM, RaidTrousers);
    setunitdata(.@npcId, UDT_WEAPON, LousyMoccasins); // Boots
    setunitdata(.@npcId, UDT_HAIRSTYLE, 10);
    setunitdata(.@npcId, UDT_HAIRCOLOR, 9);

    .sex = G_FEMALE;
    .distance = 4;
    end;
    
OnInstanceInit:
    .@npcId = getnpcid(instance_npcname(.name$));
    setunitdata(.@npcId, UDT_HEADTOP, NPCEyes);
    setunitdata(.@npcId, UDT_HEADMIDDLE, ShortTankTop);
    setunitdata(.@npcId, UDT_HEADBOTTOM, RaidTrousers);
    setunitdata(.@npcId, UDT_WEAPON, LousyMoccasins); // Boots
    setunitdata(.@npcId, UDT_HAIRSTYLE, 10);
    setunitdata(.@npcId, UDT_HAIRCOLOR, 9);

    end;
}