summaryrefslogtreecommitdiff
path: root/npc/003-1/swezanne.txt
blob: ea3257b63d797128c6e53c4ef54e677f5ed1ec1e (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
// TMW-2 Script
// Author:
//    Jesusalva
// Note:
//    DO NOT USE QUEST STATUS 2. Thing from past.
//    Structure:
//    GEQ1
//      0 - Not Accepted
//      1 - Finished Once
//      3 - Silvia Arc
//    GEQ2
//      Timer
//    GEQ3
//      Times complete

003-1,70,100,0	script	Swezanne	NPC_FEMALE,{
    .@q=getq(TulimsharQuest_Swezanne);
    mesn;
    mesq l("Hi.");
    next;
    .@q2=getq2(TulimsharQuest_Swezanne);
    if (.@q == 0) goto L_Quest;
    else if (.@q == 3) goto L_Silvia;
    else if (.@q2 < santime()) goto L_Repeat;
    if ($FIRESOFSTEAM < 10)
        mesq l("I fight every day in hopes to meet Andrei, the famous hero who prevented Hurnscald from total destruction against a horde of monsters alone.");
    else
        mesq l("I fight every day in hopes to be like Andrei, the famous hero who prevented Hurnscald from total destruction against a horde of monsters alone.");
    if ($MOST_HEROIC$ != "") goto L_Heroics;
    close;

L_Heroics:
    next;
    mesn;
    .@d=rand2(1,6);

    if      (.@d == 1) .@deed$="protected our cities!";
    else if (.@d == 2) .@deed$="did great acts of bravery!";
    else if (.@d == 3) .@deed$="is just awesome!";
    else if (.@d == 4) .@deed$="killed a monster army single-handed!";
    else if (.@d == 5) .@deed$="proved their worth in battlefield!";
    else if (.@d == 6) .@deed$="impressed even the High Council!";
    else .@deed$="is awesome like me!"; // Should not happen

    mesq l("I hope to one day be like @@, who @@", $MOST_HEROIC$, .@deed$);
    close;

L_Quest:
    mesq l("Ah, fighting monsters under this desert heat makes me thirsty. But someone must do this job, otherwise Tulimshar could fall.");
    next;
    mesq l("Maybe you could bring me 5 delicious @@? They have a great effect in quenching thirst and recovering vigour.", getitemlink(CactusDrink));
    menu
        rif(countitem(CactusDrink) >= 5, l("Here they are!")), L_Finish,
        l("I'll get to it."), L_Close;
    close; // double sure

L_Repeat:
    mesq l("Ah, fighting monsters under this desert heat makes me thirsty. But someone must do this job, otherwise Tulimshar could fall.");
    next;
    mesq l("Maybe you could bring me 5 delicious @@? They have a great effect in quenching thirst and recovering vigour.", getitemlink(CactusPotion));
    menu
        rif(countitem(CactusPotion) >= 5, l("Here they are!")), L_Finish2,
        l("I'll get to it."), L_Close;
    close;

L_Finish2:
    delitem CactusPotion, 5;
    getexp 37, 0;
    // Bonus: +400%
    .@price = getiteminfo(CactusPotion, ITEMINFO_SELLPRICE) * 5 * 4;
    Zeny += .@price;
    .@q3=getq3(TulimsharQuest_Swezanne)+1;
    setq2 TulimsharQuest_Swezanne, gettimetick(2)+60*60*24;
    setq3 TulimsharQuest_Swezanne, .@q3;
    if (!(.@q3 % 30)) {
        //inventoryplace MercCard_Swezanne, 1;
        getitem MercCard_Swezanne, 10;
        mesn;
        mesq l("Thanks for helping me this month. Here is my card, just call me if you need.");
    }
    close;

L_Finish:
    delitem CactusDrink, 5;
    getexp 63, 4; // 4 Job points! A "great" reward.
    Zeny = (Zeny + 250); // 5*25 = 125 base (+100%)
    setq TulimsharQuest_Swezanne, 3;
    setq2 TulimsharQuest_Swezanne, gettimetick(2)+60*60*24;
    close;

L_Silvia:
    mesn;
    mesq l("Ah, my daughter Silvia is so far away... But I don't want to leave the shade of this tree...");
    next;
    mesn;
    mesq l("Perhaps you could tell her how much I love her? It is already some days since I last talked to her.");
    next;
    mesn;
    mesq l("I don't want her to think that I am a bad mother.");
    mes "";
    menu
        l("Sure, I'll do it."), L_SilviaAccept,
        l("One day more or less won't make a difference."), L_Close;

L_SilviaAccept:
    mes "";
    mesn;
    mesq l("Oh, thank you! My daughter means a lot to me.");
    mesc l("Silvia is in Noble District of Tulimshar.");
    setq TulimsharQuest_Swezanne, 4;
    close;

L_Close:
    if (.@q == 0) {
        mesc l("Protip: @@ can be found from @@ and @@. For the later one, ask Lua for strategies.", getitemlink(CactusDrink), getmonsterlink(Maggot), getmonsterlink(GiantMaggot));
        mesc l("Protip 2: Drop rates are low. Try other quests while you slay mobs for this one.");
        next;
    }

    closedialog;
    goodbye;
    close;

OnInit:
    .@npcId = getnpcid(.name$);
    setunitdata(.@npcId, UDT_HEADTOP, BromenalChest);
    setunitdata(.@npcId, UDT_HEADMIDDLE, CottonTrousers);
    setunitdata(.@npcId, UDT_HEADBOTTOM, NPCEyes);
    setunitdata(.@npcId, UDT_WEAPON, DeepBlackBoots); // Boots
    setunitdata(.@npcId, UDT_HAIRSTYLE, 12);
    setunitdata(.@npcId, UDT_HAIRCOLOR, 7);

    .sex = G_FEMALE;
    .distance = 5;


    /*
    // Preventive check against faulty update. Must be removed afterwards.
    // UPDATE `quest` SET `count1` = '3' WHERE `quest`.`quest_id` = 54 AND `count1` != '1';
	.@nb = query_sql("select `char_id` from `quest` WHERE ((`count1`=1 or `count1`=2) and `quest_id`=54) LIMIT 2", .@name$);
    if (getarraysize(.@name$) > 0) {
        debugmes "FATAL ERROR: Quest log not updated.";
        debugmes "disabling Swezanne to prevent weirder bugs.";
        disablenpc .name$;
    }
    */
    end;
}