summaryrefslogtreecommitdiff
path: root/npc/xmas/2010/golbanez.txt
blob: 0c308ef4789048deb77513ab2d338df6d3fe4b45 (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
//#################################################################################
//#
//#    Golbanez for Christmas 2010
//#
//#    Authors: alastrim, PjotrOrial
//#
//#    reviewed by:
//#
//#    This is Golbanez, he took Santa Claus as a hostage.
//#    Santa will be freed on Dec24, so players need to pass a labyrinth
//#    if the players bring Golbanez stuff, santa will donate some other stuff to the players.
//#    
//#################################################################################

019-1.gat,93,41,0	script	#Golbenez#_M	204,{
	set $Golbenez_Santa_Free, gettime(5);
	
	if (gettime(7) > 2010)  set $Golbenez_Santa_Free, 25;

	if ($Golbenez_Santa_Free >= 24 || gettime(7) > 2010) goto Glb_Inn_Enough;

	mes "[Golbenez]";
	mes "\"Mortal!  I am Golbenez!  I have broken through the barriers of space and time!\"";
	next;
	mes "\"Well to let you know, I am taking Santa Claus and rudolph and the fellow rendiers as hostages.\"";
	next;
	mes "\"This sounds hard to you maybe... But I need lots of stuff for building the way to the leisure place.";
	next;
	mes "\"So if you want to have donations at christmas... we should make a deal: Bring me money or presents.";
	next;
	mes "\"Maybe I will release Santa Claus and the rendiers then.\"";
	next;
	mes "\"Do you really expect a promise to let him free on christmas?\"";
	next;
	mes "\"Uhm well, then you should get away!\"";
	next;
	mes "\"What do you like to give?\"";

	menu
		"I'd like to spend some money.", Glb_money,
		"I'd like to give some yellow presents.", -, 
		"I'd like to give some blue presents.", -,
		"I'd like to give some green presents.", -,
		"I'd like to give some pink presents.", -,
		"Why do you want present boxes?",Glb_whypresents,
		"Can I bring other items?", Glb_otheritems,
		"Nevermind.", Glb_nvm;

	// in this array the items should be filled in
	setarray @menuitem[2], 4021, 516, 538, 515;
	setarray @menuvalue[2], 100000, 20000, 50000, 10000;

	mes "\"How many presents do you want to give?\"";

	input @count;

	if (countitem(@menuitem[@menu]) < @count ) goto Glb_noitems;
	delitem @menuitem[@menu], @count;
	set @Give, (@count * @menuvalue[@menu]);
	//mes ""+@Give+"";
	set @Gave_Presents, 1;
	goto Glb_checkGlAn;

Glb_money:
	input @Give;

	set @Give, @Give;

	if (@Give <= 0) close;
	if (zeny < @Give) goto Glb_Inn_NotEnoughZeny;

Glb_checkGlAn:
	// if a player gave boxes, at least 20 yellows are needed, or lots of others.
	if(@Gave_Presents == 1 && @Give<2000000 )goto Golbenez_pay;
	// if the @Give amount is below 30% of the players money, just let him pay
	if( @Give<100000 || ( 100 * @Give / (zeny+1) )<30 ) goto Golbenez_pay;

	set @glob_an$ , "Golbenez: " + strcharinfo(0) + " accounted to free santa";

	// depending on the absolute amount setup another global announcement.
	if( @Give >10000000 ) goto Golbenez_an_5;
	if( @Give > 5000000 ) goto Golbenez_an_4;
	if( @Give > 1000000 ) goto Golbenez_an_3;
	if( @Give >  720000 ) goto Golbenez_an_2;
	if( @Give >  355000 ) goto Golbenez_an_1;

	goto Golbenez_an;

Golbenez_an_1:
	set @glob_an$, @glob_an$ + " with a great effort.";
	goto Golbenez_an;

Golbenez_an_2:
	set @glob_an$, @glob_an$ + " with a honest contribution.";
	goto Golbenez_an;

Golbenez_an_3:
	set @glob_an$, @glob_an$ + " with a great effort. Such a generous person.";
	goto Golbenez_an;

Golbenez_an_4:
	set @glob_an$, @glob_an$ + " with a remarkable effort. Impressive!";
	goto Golbenez_an;

Golbenez_an_5:
	set @glob_an$, @glob_an$ + " with a huge effort. What a honorable donation!";
	goto Golbenez_an;

Golbenez_an:
	announce @glob_an$, 0;

Golbenez_pay:
	set Golbenez_Inn_Cost, Golbenez_Inn_Cost + @Give;
	set $Golbenez_Inn_Cost, $Golbenez_Inn_Cost + @Give;
	if (@Gave_Presents == 1) close;
	set zeny, zeny - @Give;
	close;

Glb_Inn_NotEnoughZeny:
	mes "[Golbenez]";
	mes "\"You don't have as much as you say you do.  Come back when you can give the gold pieces you say you can.\"";
	close;

Glb_noitems:
	mes "[Golbenez]";
	mes "\"You don't have as many as you say you do.  Come back when you have enough.\"";
	close;

Glb_nvm:
	mes "[Golbenez]";
	mes "\"That's too bad.\"";
	close;

Glb_whypresents:
	mes "[Golbenez]";
	mes "\"The presents contain some sort of spiritual attachment that aids in the creation of dimensional connections to this plane of existence. The green ones contain the stronger spiritual attachment, followed by the blue and then pink present boxes. But the yellow ones, they have amazing spiritual attachment.\"";
	close;

Glb_otheritems:
	mes "[Golbenez]";
	mes "\"No you cannot!\"";
	next;
	mes "\"I will not discuss any further, mortal!\"";
	next;
	mes "\"So bring me the needed stuff and maybe you get some stuff as a reward, little coward!\"";
	close;

Glb_Inn_Enough:
	mes "[Golbenez]";
	mes "\"Ok mortal!\"";
	next;
	mes "\"I have collected enough for now.\"";
	next;
	mes "\"This helps me working on the leisure place.\"";
	next;
	mes "\"Although I did not promise I let Santa be free again!\"";
	next;
	mes "\"He can be found in some cave around here.\"";
	close;
}