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
|
// TMW2/LoF scripts.
// Authors:
// TMW-LoF Team
// Jesusalva
// Description:
// Part Of Christmas Events
// SQuest_XmasCollector
// Status, Delivered Gifts, Current Year
// Status:
// 0 - Quest is unknown
// 1 - Quest is known
// 2 - Rewards Collected
022-1,65,53,0 script Gift Fanatic NPC_GNOME_C,{
// Last year
if (getq3(SQuest_XmasCollector) == gettime(GETTIME_YEAR)-1)
goto L_Reward;
if ($EVENT$ != "Christmas")
goto L_OutOfSeason;
// Start Event for the first time
if (getq3(SQuest_XmasCollector) < gettime(GETTIME_YEAR))
setq SQuest_XmasCollector, 1, 0, gettime(GETTIME_YEAR);
// Main Loop
goto L_Main;
L_OutOfSeason:
mesn;
mesq l("Hey, collect lots of @@ and give them to me on Christmas! Not now. On Christmas!", getitemlink(PresentBox));
close;
// The reward is actually just an extra bonus, there is nothing WOW to see here...
L_Reward:
.@q=getq2(SQuest_XmasCollector);
.@q=max(0, .@q-BaseLevel);
mesn;
mesq l("Hey, huge THANKS for the help! I love gifts! Here's your due reward!");
mesc l("Got @@ EXP, @@ JExp and @@ GP for helping out.", .@q*7, .@q, .@q*5);
getexp .@q*7, .@q;
Zeny=Zeny+(.@q*5);
setq SQuest_XmasCollector, 2, 0, 0;
close;
L_Main:
.@q=getq2(SQuest_XmasCollector);
mesn;
mesq l("I want @@! I want @@!!", getitemlink(PresentBox), getitemlink(PresentBox));
next;
.@price=(getiteminfo(PresentBox, ITEMINFO_SELLPRICE)+2;
mesn;
mesq l("I am willing to pay @@ GP for each you bring me! Do you want to give me ALL your @@?!", .@price, getitemlink(PresentBox));
next;
select
rif(countitem(PresentBox), l("Yes, of course!")),
l("Not now...");
mes "";
if (@menu == 1) {
.@qnt=countitem(PresentBox);
.@q2+=.@qnt;
delitem PresentBox, .@qnt;
Zeny=Zeny+.@price*.@qnt;
getexp .@qnt*.@price, .@qnt;
setq2 SQuest_XmasCollector, .@q2;
mesn;
mesq l("Many, many thanks! Thus far, you delivered me @@ gift boxes!", .@q2);
next;
}
mesn;
mesq l("Come back and give me more gifts!");
close;
OnInit:
.sex=G_OTHER;
.distance=5;
end;
}
|