summaryrefslogtreecommitdiff
path: root/npc/012-1/jack.txt
blob: 55eef5d2dd4dbc74ca47411b2637951ad05541bf (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
// TMW-2 Script
// Originals: TMW Org.
//
// Author:
//    Jesusalva
// Description:
//    Jack is Hurnscald Lumberjack

012-1,69,93,0	script	Jack	NPC_LUMBERJACK,{
    .@q1=getq(HurnscaldQuest_ForestBow);
    //.@q2=getq(HurnscaldQuest_WoodShield);

    mesn "Jack, the Lumberjack";
    mesq l("Hello there! I'm Jack, the Lumberjack, and enemy of all trees. If you need some firewood, just let me know.");
    mes "";
    select
        l("Nothing at the moment, thanks."),
        l("I want you to transform my raw log in a wooden log"),
        rif(.@q1 == 1, l("I need a sturdy wood piece for a Forest Bow."));

    mes "";

    switch (@menu) {
        case 1:
            close;
            break;
        case 2:
            goto L_Polish;
            break;
        case 3:
            goto L_ForestBow;
            break;
    }

    close;

L_Polish:
    mesn;
    mes l("Yes, unless you're doing something VERY special, a Wooden Log is what you need.");
    mes l("I can make a @@ for just one @@ and 200 GP for my work.", getitemlink(WoodenLog), getitemlink(RawLog));
    input .@count;
    mes "";

    if (.@count == 0)
        close;

    .@Cost = .@count * 200;
    .@empty = countitem(RawLog);

    if (.@empty < .@count || Zeny < .@Cost) {
        mesn;
        mesq l("You can't afford my services for that amount. Sorry.");
    }

    getinventorylist;
    inventoryplace WoodenLog, .@count;

    Zeny = Zeny - .@Cost;
    delitem RawLog, .@count;
    getitem WoodenLog, .@count;
    close;

L_ForestBow:
    .@k=getq2(HurnscaldQuest_ForestBow);

    switch (.@k) {
    case 0:
        mesn;
        mesq l("Ah, don't bother me with that. That wood must be special, it must bend and cannot break. Too difficult to find!");
        next;
        mesn;
        mesq l("I also do not keep any stock of them. If you really want it, you can bring me some Raw Logs. I'll show you which one is the good one. Deal?");
        next;
        if (BaseLevel < 25) {
            mesn;
            mesq l("Actually, nevermind. I'll wait you grind level 25 first, then we can do this."); // Note: Fisherman part is level 30!
            close;
        }
        mesn strcharinfo(0);
        mesq l("I'm railroaded here, I cannot say no. I'll bring you some @@. Break them until one of them fit.", getitemlink(RawLog));
        setq2 HurnscaldQuest_ForestBow, 1;
        close;
        break;
    case 99:
        mesn;
        mesq l("Good luck...");
        break;
    default:
        goto L_Loop;
    }
    goto L_Close;

L_Loop:
    .@k=getq2(HurnscaldQuest_ForestBow);
    mesn;
    mesq l("Bring me your wood, and I'll show you which one is sturdy, yet flexible enough to make a good Forest Bow.");
    mes "";
    select
        rif(countitem(RawLog) > 0, l("Try this one.")),
        l("Don't break my stuff.");

    if (@menu == 2)
        close;

    mesc l("Jack bends the log over his knee.");
    delitem RawLog, 1;
    .@success=rand(6,26)-.@k; // You will never need more than 20 logs nor less than 5 logs

    if (.@success <= 1) {
        mesc l("The wood bends a little, but doesn't breaks.");
        getexp 295, 100; // 10% of max exp
        setq2 HurnscaldQuest_ForestBow, 99;
        next;
        mesn;
        mesq lg("That's the right wood, my son. Here, I'll wrap it so you don't accidentaly lose it. Good luck with your quest!");
        close;
    } else {
        mesc l("However, the log breaks with a loud crack.");
        Zeny=Zeny+10;
        getexp 5, 1;
        setq2 HurnscaldQuest_ForestBow, .@k+1;
        next;
        mesn;
        mesq lg("Sorry, son. I know how hard this is. But this is teaching you a valuable lesson, your eye will be more sharp for quality wood from now on.");
        next;
    }        

    goto L_Loop;

/* Copy-paste from TMW Org.
   I'll uncomment and rewrite when time comes.

L_NohMask_Ask:
    menu
        "I'll keep that in mind.", L_Close,
        "I heard you aren't delivering any more living wood. Why not?", L_Next,
        "Have you seen anything that might be connected to the recent robberies in town?", L_NohMask_Answer;

L_NohMask_Answer:
    mesn "Jack, the Lumberjack";
    mes "\"Sorry, no.\"";
    goto L_Close;

L_Made_Shield:
    mesn "Jack, the Lumberjack";
    mes "\"Speaking of that shield...\"";
    mes "\"It has put me behind on all these new Nivalis orders, now that the ship is running there.\"";
    next;
    mes "\"Care to help out? I'll pay you for your time.\"";
    goto L_Daily;

L_Daily:
    @dq_level = 30;
    @dq_cost = 25;
    @dq_count = 30;
    @dq_name$ = "RawLog";
    @dq_friendly_name$ = "raw logs";
    @dq_money = 4000;
    @dq_exp = 4000;

    callfunc "DailyQuest";

    next;

    mesn "Jack, the Lumberjack";
    mes "\"Check back with me tomorrow, and I'll let you know if I need any help with that shipment.\"";

    goto L_Close;
*/

L_Close:
    close;

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

}