summaryrefslogtreecommitdiff
path: root/npc/017-1/stranger.txt
blob: d2e04004b5d8472f418601013e1c152d05ec054e (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
// TMW2/LoF scripts.
// Authors:
//    TMW-LoF Team
//    Jesusalva
// Description:
//    Special quest, can be done every three months, on days 18~25.
//    Months: February, May, August, September

017-1,44,37,0	script	Stranger#LoF	NPC_LOF_STRANGER,{
    if (!$@GM_OVERRIDE && gettime(GETTIME_MONTH) % 3 != 2 || gettime(GETTIME_DAYOFMONTH) < 18 || gettime(GETTIME_DAYOFMONTH) > 25) {
        dispbottom l("An error with Stranger#LoF happened! Please report!!");
        disablenpc .name$;
        end;
    }

    .@q=getq(LoFQuest_Hitchhiker);
    if (.@q == 2) goto L_Complete;
    if (.@q == 1) goto L_Quizz;
    mesn;
    mesq l("Hello, hello! It's great to see you. Maybe you can help me with a little problem I have.");
    next;
    mesn;
    mesq l("I need some materials to repair my spacesh- ahm, it's not important why I need it."); // Translators: Spacesh(ip)
    next;
    mesn;
    mesq l("Anyway, I'd be really happy if you could give me @@ @@, @@ @@, @@ @@ and @@ @@.",
            100, getitemlink(Chagashroom),
            3, getitemlink(FluoPowder),
            1, getitemlink(TinIngot),
            1, getitemlink(TitaniumIngot));

    if (countitem(Chagashroom) < 100 ||
        countitem(FluoPowder) < 3 ||
        countitem(TinIngot) < 1 ||
        countitem(TitaniumIngot) < 1)
        close;
    next;
    mesn;
    mesq l("Do you have that for me?");
    if (askyesno() == ASK_NO)
        close;
    mes "";
    // We already checked, cheaters will have their inventory ripped apart and I don't care ~ Jesusalva
    delitem Chagashroom, 100;
    delitem FluoPowder, 3;
    delitem TinIngot, 1;
    delitem TitaniumIngot, 1;
    getexp (BaseLevel**2)*5, JobLevel*2;
    setq LoFQuest_Hitchhiker, 1;
    mesn;
    mesq l("Great! Thank you!");
    next;
    mesn;
    mesq l("I have a lot of work to do now. But before you leave...");
    goto L_Quizz;

L_Quizz:
    inventoryplace OldTowel, 1;
    mesn;
    mesq l("Did you knew May 25th it is a very special day - the Towel Day?");
    next;
    mesn;
    mesq l("To celebrate this I'll ask you some questions about my favourite book, The Hitchhiker's Guide to the Galaxy. If you can answer them, I'll give you something very useful.");
    next;
    mesn;
    mesq l("The answers might need to have whitespaces. DO NOT, BY ALL MEANS, insert two whitespaces instead of one.");
    mesq l("I'll get so mad at you that even if you are correct, I'll say otherwise. Also, mind special characters.");
    mesq l("If I don't know the answer in your language, try answering in English. That always works.");
    mesc l("Are you ready?"), 1;
    mesc l("There's no time limit on this riddle.");
    next;
    if (askyesno() == ASK_NO)
        close;
    goto L_Easy;

L_Easy:
    mes "";
    mesn;
    mesq l("The first one is easy.");
    next;
    mes "";
    if (0171_Stranger_BlackBox(EASY))
        goto L_Medium;
    else
        goto L_Fail;

L_Medium:
    mes "";
    mesn;
    mesq l("You're absolutely right. The next one will be more tricky.");
    next;
    mes "";
    if (0171_Stranger_BlackBox(MEDIUM))
        goto L_Hard;
    else
        goto L_Fail;

L_Hard:
    mes "";
    mesn;
    mesq l("Not bad, not bad. Let's see if you can answer an even more difficult one.");
    next;
    mes "";
    if (0171_Stranger_BlackBox(HARD))
        goto L_Reward;
    else
        goto L_Fail;


// Failure
L_Fail:
    mes "";
    mesn;
    if (rand(1,2) == 1) {
        mesq l("Sorry, but that's not right.");
        next;
        mesn;
        mesq l("Come try again, some other time.");
    } else {
        mesq l("Nah, that's wrong. Come back if you want to try again.");
    }
    close;

// Reward
L_Reward:
    mes "";
    mesn;
    mesq l("Unbelievable! You're really a wise person.");
    next;
    mesn;
    mesq l("One last question, but this shouldn't be a problem for you.");
    next;
    mesn;
    mesq l("What is the most important item for every hitchhiker to have?");
    input .@answer$;
    if (strip(strtolower(.@answer$)) != "towel" && strip(strtolower(.@answer$)) != l("towel"))
        goto L_Fail;
    mes "";
    mesn;
    mesq l("There you are! A towel is really the most important item for a hitchhiker to have.");

    getitem OldTowel, 1;
    // If you complete the quest in May, you get 50% more experience
    if (gettime(GETTIME_MONTH) == MAY)
        getexp JobLevel*BaseLevel*3/2, BaseLevel*3;
    else
        getexp JobLevel*BaseLevel, BaseLevel*2;
    setq LoFQuest_Hitchhiker, 2;
    next;
    mesn;
    mesq l("It really comes in handy that I have my towel with me. A towel is about the most massively useful thing an inte- ahm, a person can have.");
    close;

// TODO: Enable another quest after main quest has been completed
// TODO: Completing sub quest on May shall give better bonus (gettime(GETTIME_MONTH) == MAY)
// TODO: Keep your Towel well guarded; It can only be obtained once and is required in further quests.
L_Complete:
    mesn;
    mesq l("I have a lot of work to do now.");
    close;

// Proccessing Core
OnInit:
    .sex=G_OTHER;
    .distance=5;
OnClock0000:
    if (gettime(GETTIME_MONTH) % 3 == 2) {
        if (gettime(GETTIME_DAYOFMONTH) >= 18 && gettime(GETTIME_DAYOFMONTH) <= 25) {
            enablenpc .name$;
            end;
        }
    }
    disablenpc .name$;
    end;

}