Jump to content
  • 0

[Solved]Battleground Vg show error at map server @@?


manabeast

Question


  • Group:  Members
  • Topic Count:  138
  • Topics Per Day:  0.03
  • Content Count:  835
  • Reputation:   25
  • Joined:  11/22/11
  • Last Seen:  

Solved: forgot add .gat map for this script

vtlJI.png

//=========================================
//By : goddameit
//Ver : 3
//=========================================
prontera,157,185,4 script Warp Battle Ground Vg 100,{
warp "bat_room",154,150;
end;
}
//=======================================================================//
//===============================Register================================//
//=======================================================================//
bat_room,177,157,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 "bat_room","[battle Ground System] Wait for game over completely.",0;
 end;
}
set .k,0;
set $bgvgbid1,waitingroom2bg("bat_b06",87,75,"","batleVg::OnGu1Die");
warpwaitingpc "bat_b06",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;
}
bat_room,177,142,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 "bat_room","[battle Ground System] Wait for game over completely.",0;
 end;
}
set .k,0;
set $bgvgbid2,waitingroom2bg("bat_b06",311,224,"","batleVg::OnGu2Die");
warpwaitingpc "bat_b06",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_b06";
mapwarp "bat_b06","prontera",150,180;
return;
OnInit:
set .gameplayeramount,1;
callsub ii;
//=======================================================================//
//===============================SetWall=================================//
//=======================================================================//
setwall "bat_b06",327,173,5,6,1,"battleground Vg wall 1";
setwall "bat_b06",332,172,2,6,1,"battleground Vg wall 2";
setwall "bat_b06",244,185,3,4,1,"battleground Vg wall 3";
setwall "bat_b06",244,182,4,6,1,"battleground Vg wall 4";
setwall "bat_b06",67,128,10,1,1,"battleground Vg wall 5";
setwall "bat_b06",152,118,4,6,1,"battleground Vg wall 6";
setwall "bat_b06",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_b06",.hpto[0],.hpto[1];
mapwarp "bat_b06","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_b06",326,149," ",1956,"batleVg::OnKiillT2");
set .ib1,bg_monster($bgvgbid1,"bat_b06",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_b06",87,75;
bg_warp $bgvgbid2,"bat_b06",311,224;
bg_updatescore "bat_b06",set(.hpto[0],.hpto[0]+3),set(.hpto[1],.hpto[1]-5);
if(.hpto[0]>99){
 bg_updatescore "bat_b06",99,.hpto[1];
}
sleep(.hpto[4]);
set .ib2,bg_monster($bgvgbid2,"bat_b06",326,149," ",1956,"batleVg::OnKiillT2");
end;
OnKiillT1:
bg_warp $bgvgbid1,"bat_b06",87,75;
bg_warp $bgvgbid2,"bat_b06",311,224;
bg_updatescore "bat_b06",set(.hpto[0],.hpto[0]-5),set(.hpto[1],.hpto[1]+3);
if(.hpto[1]>99){
 bg_updatescore "bat_b06",.hpto[0],99;
}
sleep(.hpto[4]);
set .ib1,bg_monster($bgvgbid1,"bat_b06",61,149," ",1916,"batleVg::OnKiillT1");
end;
//=======================================================================//
//=================================OnDie=================================//
//=======================================================================//
OnGu1Die:
OnGu2Die:
getmapxy(@n$,@n,@b,0);
if((getcharid(4)!=$bgvgbid2&&getcharid(4)!=$bgvgbid1)||@n$!="bat_b06"){
 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_b06",.hpto[0],.hpto[1];
if(.winn){
 announce "[battle Ground System] Ground "+.winn+" Win !",0;
 sleep 1000;
 callsub ii;
 mapwarp "bat_b06","prontera",150,180;
 set .game,3;
}
end;
}
//=======================================================================//
//==================================Heal=================================//
//=======================================================================//
bat_b06,311,224,4 script #bgvg_heal1 139,{
OnTimer2000:
unitwarp .ib2,"bat_b06",326,149;
unitwarp .ib1,"bat_b06",61,149;
if(getvariableofnpc(.game,"batleVg")==2){
 unitwarp .ib1,"bat_b06",61,149;
 unitwarp .ib2,"bat_b06",326,149;
 specialeffect 573;
 donpcevent "#bgvg_heal2::OnDo";
 areapercentheal "bat_b06",301,214,321,234,1+rand(2),1+rand(2);
 areapercentheal "bat_b06",77,65,97,85,1+rand(2),1+rand(2);
 sleep(1000);
 areapercentheal "bat_b06",301,214,321,234,1+rand(2),1+rand(2);
 areapercentheal "bat_b06",77,65,97,85,1+rand(2),1+rand(2);
 sleep(1000);
 areapercentheal "bat_b06",301,214,321,234,1+rand(2),1+rand(2);
 areapercentheal "bat_b06",77,65,97,85,1+rand(2),1+rand(2);
 sleep(1000);
 areapercentheal "bat_b06",301,214,321,234,1+rand(2),1+rand(2);
 areapercentheal "bat_b06",77,65,97,85,1+rand(2),1+rand(2);
 sleep(1000);
 areapercentheal "bat_b06",301,214,321,234,1+rand(2),1+rand(2);
 areapercentheal "bat_b06",77,65,97,85,1+rand(2),1+rand(2);
 sleep(1000);
 areapercentheal "bat_b06",301,214,321,234,1+rand(2),1+rand(2);
 areapercentheal "bat_b06",77,65,97,85,1+rand(2),1+rand(2);
 sleep(1000);
 initnpctimer;
}else{
 stopnpctimer;
}
end;
}
bat_b06,87,75,4 script #bgvg_heal2 139,{
OnDo:
specialeffect 573;
end;
}
//=======================================================================//
//==================================Warp=================================//
//=======================================================================//
bat_b06,338,226,0 warp battleground Vg warp 1 2,2,bat_b06,331,170
bat_b06,286,228,0 warp battleground Vg warp 2 2,2,bat_b06,242,179
bat_b06,61,73,0 warp battleground Vg warp 3 2,2,bat_b06,65,133
bat_b06,114,72,0 warp battleground Vg warp 4 2,2,bat_b06,154,122
bat_b06,199,119,0 script #battleground Vg warp 5 45,2,2,{
if(getcharid(4)!=$bgvgbid1){end;}
warp "bat_b06",87,75;
end;
}
bat_b06,199,181,0 script #battleground Vg warp 6 45,2,2,{
if(getcharid(4)!=$bgvgbid2){end;}
warp "bat_b06",311,224;
end;
}
//=======================================================================//
//================================Mapflag================================//
//=======================================================================//
bat_b06 mapflag battleground 2
bat_b06 mapflag nomemo
bat_b06 mapflag nosave SavePoint
bat_b06 mapflag noteleport
bat_b06 mapflag nowarp
bat_b06 mapflag nowarpto
bat_b06 mapflag noreturn
bat_b06 mapflag nobranch
bat_b06 mapflag nopenalty
bat_b06 mapflag monster_noteleport
bat_room mapflag loadevent
//=======================================================================//
//===============================Function================================//
//=======================================================================//
function script BattleGroundVgFunction {
getmapxy(@m$,@x,@y,0);
if(getcharid(4)!=$bgvgbid1&&getcharid(4)!=$bgvgbid2&&@m$!="bat_b06"){
 dispbottom "[You can't use this item]";
 end;
}
bg_warp getcharid(4),@m$,@x,@y;
end;
}

Edited by manabeast
Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...