viewing paste Battle Ground Vg v3 | Athena
Posted on the
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
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
| //=========================================
//By : goddameit
//Ver : 3
//=========================================
prontera,157,185,4 script Warp Battle Ground Vg 100,{
warp "pvp_room",80,43;
end;
}
//=======================================================================//
//===============================Register================================//
//=======================================================================//
pvp_room,87,38,4 script Battleground Vg#1 100,{
end;
OnInitC:
if(!.k){end;}
enablenpc strnpcinfo(0);
waitingroom "Battle Ground",getvariableofnpc(.gameplayeramount,"batleVg"),"Battleground Vg#1::OnJoin",getvariableofnpc(.gameplayeramount,"batleVg");
end;
OnJoin:
if(getvariableofnpc(.game,"batleVg")==3){
mapannounce "pvp_room","[Battle Ground System] Wait for game over completely.",0;
end;
}
set .k,0;
set $bgvgbid1,waitingroom2bg("bat_b01",87,75,"","batleVg::OnGu1Die");
warpwaitingpc "bat_b01",87,75;
delwaitingroom;
disablenpc strnpcinfo(0);
set getvariableofnpc(.game,"batleVg"),getvariableofnpc(.game,"batleVg")+1;
if(getvariableofnpc(.game,"batleVg")==1){
donpcevent "batleVg::OnGameStart";
}
end;
OnPCLoadMapEvent:
if(getcharid(4)){
bg_leave;
dispbottom "=======================================";
dispbottom "================[Leave]================";
dispbottom "=======================================";
}
end;
}
pvp_room,72,38,4 script Battleground Vg#2 100,{
end;
OnInitC:
if(!.k){end;}
enablenpc strnpcinfo(0);
waitingroom "Battle Ground",getvariableofnpc(.gameplayeramount,"batleVg"),"Battleground Vg#2::OnJoin",getvariableofnpc(.gameplayeramount,"batleVg");
end;
OnJoin:
if(getvariableofnpc(.game,"batleVg")==3){
mapannounce "pvp_room","[Battle Ground System] Wait for game over completely.",0;
end;
}
set .k,0;
set $bgvgbid2,waitingroom2bg("bat_b01",311,224,"","batleVg::OnGu2Die");
warpwaitingpc "bat_b01",311,224;
delwaitingroom;
disablenpc strnpcinfo(0);
set getvariableofnpc(.game,"batleVg"),getvariableofnpc(.game,"batleVg")+1;
if(getvariableofnpc(.game,"batleVg")==1){
donpcevent "batleVg::OnGameStart";
}
end;
}
//=======================================================================//
//================================Set====================================//
//=======================================================================//
- script batleVg -1,{
ii:
setarray .hpto,50,50,10000,90000,10000; //HP of Ground 1 , HP of Ground 2 , time 1(Register) , time 2(During) , time 3(Respwan)
if(!getvariableofnpc(.k,"Battleground Vg#2")){
set getvariableofnpc(.k,"Battleground Vg#2"),1;
donpcevent "Battleground Vg#2::OnInitC";
}
if(!getvariableofnpc(.k,"Battleground Vg#1")){
set getvariableofnpc(.k,"Battleground Vg#1"),1;
donpcevent "Battleground Vg#1::OnInitC";
}
set .game,0;
killmonsterall "bat_b01";
mapwarp "bat_b01","prontera",150,180;
return;
OnInit:
set .gameplayeramount,1;
callsub ii;
//=======================================================================//
//===============================SetWall=================================//
//=======================================================================//
setwall "bat_b01",327,173,5,6,1,"battleground Vg wall 1";
setwall "bat_b01",332,172,2,6,1,"battleground Vg wall 2";
setwall "bat_b01",244,185,3,4,1,"battleground Vg wall 3";
setwall "bat_b01",244,182,4,6,1,"battleground Vg wall 4";
setwall "bat_b01",67,128,10,1,1,"battleground Vg wall 5";
setwall "bat_b01",152,118,4,6,1,"battleground Vg wall 6";
setwall "bat_b01",156,118,5,4,1,"battleground Vg wall 7";
disablenpc "battleground Vg warp 1";
disablenpc "battleground Vg warp 2";
disablenpc "battleground Vg warp 3";
disablenpc "battleground Vg warp 4";
end;
//=======================================================================//
//================================Control================================//
//=======================================================================//
OnGameStart:
bg_updatescore "bat_b01",.hpto[0],.hpto[1];
mapwarp "bat_b01","prontera",150,180;
setarray .@k,gettime(3),gettime(2),gettime(1)+.hpto[2]/1000;
while(.@k[2]>=60){
if(.@k[2]>=60){
setarray .@k[1],.@k[1]+1,.@k[2]-60;
}
if(.@k[1]>=60){
setarray .@k[0],.@k[0]+1,.@k[1]-60;
}
if(.@k[0]>=24){
set .@k[0],.@k[0]-24;
}
}
announce "[Battle Ground System] Will Start at "+.@k[0]+":"+.@k[1]+":"+.@k[2]+" !",0;
sleep(.hpto[2]);
OnTimerC:
if(.game!=2){
sleep(2000);
if(.game){
announce "[Battle Ground System] Game Over.",0;
}
callsub ii;
end;
}
announce "[Battle Ground System] Go !",0;
set .ib2,bg_monster($bgvgbid2,"bat_b01",326,149," ",1956,"batleVg::OnKiillT2");
set .ib1,bg_monster($bgvgbid1,"bat_b01",61,149," ",1916,"batleVg::OnKiillT1");
enablenpc "battleground Vg warp 1";
enablenpc "battleground Vg warp 2";
enablenpc "battleground Vg warp 3";
enablenpc "battleground Vg warp 4";
initnpctimer "#bgvg_heal1";
//=======================================================================//
//=================================OnEnd=================================//
//=======================================================================//
OnTimerB:
sleep(.hpto[3]);
if(.hpto[0]>.hpto[1]){
set .@c4,1;
}else if(.hpto[0]<.hpto[1]){
set .@c4,2;
}
announce "[Battle Ground System] Ground "+(.@c4?.@c4+" Win":"Tie")+" !",0;
callsub ii;
end;
//=======================================================================//
//================================OnBreak================================//
//=======================================================================//
OnKiillT2:
bg_warp $bgvgbid1,"bat_b01",87,75;
bg_warp $bgvgbid2,"bat_b01",311,224;
bg_updatescore "bat_b01",set(.hpto[0],.hpto[0]+3),set(.hpto[1],.hpto[1]-5);
if(.hpto[0]>99){
bg_updatescore "bat_b01",99,.hpto[1];
}
sleep(.hpto[4]);
set .ib2,bg_monster($bgvgbid2,"bat_b01",326,149," ",1956,"batleVg::OnKiillT2");
end;
OnKiillT1:
bg_warp $bgvgbid1,"bat_b01",87,75;
bg_warp $bgvgbid2,"bat_b01",311,224;
bg_updatescore "bat_b01",set(.hpto[0],.hpto[0]-5),set(.hpto[1],.hpto[1]+3);
if(.hpto[1]>99){
bg_updatescore "bat_b01",.hpto[0],99;
}
sleep(.hpto[4]);
set .ib1,bg_monster($bgvgbid1,"bat_b01",61,149," ",1916,"batleVg::OnKiillT1");
end;
//=======================================================================//
//=================================OnDie=================================//
//=======================================================================//
OnGu1Die:
OnGu2Die:
getmapxy(@n$,@n,@b,0);
if((getcharid(4)!=$bgvgbid2&&getcharid(4)!=$bgvgbid1)||@n$!="bat_b01"){
set @n$,"";set @n,0; set @b,0;
end;
}
if(getcharid(4)==$bgvgbid2){
set .hpto[1],.hpto[1]-1;
}else{
set .hpto[0],.hpto[0]-1;
}
if(.hpto[1]>99){
set .hpto[1],99;
}
if(.hpto[1]<0){
set .winn,1;
set .hpto[1],0;
}
if(.hpto[0]>99){
set .hpto[0],99;
}
if(.hpto[0]<0){
set .winn,2;
set .hpto[0],0;
}
bg_updatescore "bat_b01",.hpto[0],.hpto[1];
if(.winn){
announce "[Battle Ground System] Ground "+.winn+" Win !",0;
sleep 1000;
callsub ii;
mapwarp "bat_b01","prontera",150,180;
set .game,3;
}
end;
}
//=======================================================================//
//==================================Heal=================================//
//=======================================================================//
bat_b01,311,224,4 script #bgvg_heal1 139,{
OnTimer2000:
unitwarp .ib2,"bat_b01",326,149;
unitwarp .ib1,"bat_b01",61,149;
if(getvariableofnpc(.game,"batleVg")==2){
unitwarp .ib1,"bat_b01",61,149;
unitwarp .ib2,"bat_b01",326,149;
specialeffect 573;
donpcevent "#bgvg_heal2::OnDo";
areapercentheal "bat_b01",301,214,321,234,1+rand(2),1+rand(2);
areapercentheal "bat_b01",77,65,97,85,1+rand(2),1+rand(2);
sleep(1000);
areapercentheal "bat_b01",301,214,321,234,1+rand(2),1+rand(2);
areapercentheal "bat_b01",77,65,97,85,1+rand(2),1+rand(2);
sleep(1000);
areapercentheal "bat_b01",301,214,321,234,1+rand(2),1+rand(2);
areapercentheal "bat_b01",77,65,97,85,1+rand(2),1+rand(2);
sleep(1000);
areapercentheal "bat_b01",301,214,321,234,1+rand(2),1+rand(2);
areapercentheal "bat_b01",77,65,97,85,1+rand(2),1+rand(2);
sleep(1000);
areapercentheal "bat_b01",301,214,321,234,1+rand(2),1+rand(2);
areapercentheal "bat_b01",77,65,97,85,1+rand(2),1+rand(2);
sleep(1000);
areapercentheal "bat_b01",301,214,321,234,1+rand(2),1+rand(2);
areapercentheal "bat_b01",77,65,97,85,1+rand(2),1+rand(2);
sleep(1000);
initnpctimer;
}else{
stopnpctimer;
}
end;
}
bat_b01,87,75,4 script #bgvg_heal2 139,{
OnDo:
specialeffect 573;
end;
}
//=======================================================================//
//==================================Warp=================================//
//=======================================================================//
bat_b01,338,226,0 warp battleground Vg warp 1 2,2,bat_b01,331,170
bat_b01,286,228,0 warp battleground Vg warp 2 2,2,bat_b01,242,179
bat_b01,61,73,0 warp battleground Vg warp 3 2,2,bat_b01,65,133
bat_b01,114,72,0 warp battleground Vg warp 4 2,2,bat_b01,154,122
bat_b01,199,119,0 script #battleground Vg warp 5 45,2,2,{
if(getcharid(4)!=$bgvgbid1){end;}
warp "bat_b01",87,75;
end;
}
bat_b01,199,181,0 script #battleground Vg warp 6 45,2,2,{
if(getcharid(4)!=$bgvgbid2){end;}
warp "bat_b01",311,224;
end;
}
//=======================================================================//
//================================Mapflag================================//
//=======================================================================//
bat_b01 mapflag battleground 2
bat_b01 mapflag nomemo
bat_b01 mapflag nosave SavePoint
bat_b01 mapflag noteleport
bat_b01 mapflag nowarp
bat_b01 mapflag nowarpto
bat_b01 mapflag noreturn
bat_b01 mapflag nobranch
bat_b01 mapflag nopenalty
bat_b01 mapflag monster_noteleport
pvp_room mapflag loadevent
//=======================================================================//
//===============================Function================================//
//=======================================================================//
function script BattleGroundVgFunction {
getmapxy(@m$,@x,@y,0);
if(getcharid(4)!=$bgvgbid1&&getcharid(4)!=$bgvgbid2&&@m$!="bat_b01"){
dispbottom "[You can't use this item]";
end;
}
bg_warp getcharid(4),@m$,@x,@y;
end;
} |
Viewed 970 times, submitted by Guest.