how about here?
//Made Goddameit
//Web http://goo.gl/q9sej
//Vsersion 2012/01/08 - 01:50 AM
prontera,150,180,4 script KOTH#RRnpc 100,{
if(.pid[1]||!getcharid(1))end;
set .pid[.pid[0]?1:0],getcharid(1);
if(.pid[1])
warpparty "koth01",23,7,getcharid(1);
else
warpparty "koth01",23,88,getcharid(1);
if(.pid[1])
{
stopnpctimer;
sleep2 2000;
mapannounce "koth01","[KOTH]:Game Start!!",0;
initnpctimer "KOTH_CheckArea";
initnpctimer "#Kothwaitroom";
initnpctimer "KOTH#AreaT";
}else
initnpctimer;
end;
OnTimer1:
announce "[KOTH]: Party ["+getpartyname(.pid[0])+"] start the koth!!",0;
end;
OnTimer30000:
donpcevent "KOTH#RRnpc::OnEndd";
end;
OnPCDieEvent:
if(getcharid(1)==.pid[1])
{
warp "koth01",23,7;
sleep2 1000;
unitskilluseid set(@z,bg_monster(0,"koth01",23,7,"",1002,"")),54,1,getcharid(3);
}else if(getcharid(1)==.pid[0])
{
warp "koth01",23,88;
sleep2 1000;
unitskilluseid set(@z,bg_monster(0,"koth01",23,88,"",1002,"")),54,1,getcharid(3);
}else
end;
sleep2 7000;
OnPCLogoutEvent:
if(@z)
unitkill @z;
end;
OnInit:
setwall "koth01",47,29,2,4,0,"kothwall11";
setwall "koth01",47,71,2,4,0,"kothwall22";
OnEndd:
stopnpctimer;
stopnpctimer "KOTH_CheckArea";
stopnpctimer "#Kothwaitroom";
stopnpctimer "KOTH#AreaT";
setarray .pid[0],0,0;
set getvariableofnpc(.defhp,"KOTH#AreaT"),25;
set getvariableofnpc(.defghp,"KOTH#AreaT"),180;
set getvariableofnpc(.hp,"KOTH#AreaT"),getvariableofnpc(.defhp,"KOTH#AreaT");
set getvariableofnpc(.rhp,"KOTH#AreaT"),getvariableofnpc(.defghp,"KOTH#AreaT");
set getvariableofnpc(.bhp,"KOTH#AreaT"),getvariableofnpc(.defghp,"KOTH#AreaT");
set getvariableofnpc(.loca,"KOTH#AreaT"),0;
set getvariableofnpc(.area,"KOTH#AreaT"),0;
set getvariableofnpc(.spee,"KOTH#AreaT"),0;
mapwarp "koth01","prontera",150,180;
end;
}
- script KOTH_CheckArea -1,{
function InArea {
getmapxy(.@m$,.@x,.@y,0,getarg(0));
if(.@m$=="koth01"&&.@x>=46&&.@x<=53&&.@y>=46&&.@y<=53)
return 1;
else
return 0;
}
OnTimer1:
setarray .@bo,0,0;
for(set .@i,0;.@i<=1;set .@i,.@i+1)
{
deletearray $@partymemberaid[0],128;
getpartymember getvariableofnpc(.pid[.@i],"KOTH#RRnpc"),2;
copyarray .@paid[0],$@partymemberaid[0],set(.@pnum,$@partymembercount);
for(set .@j,0;.@j<.@pnum;set .@j,.@j+1)
if(isloggedin(.@paid[.@j]))
if(InArea(rid2name(.@paid[.@j])))
set .@bo[.@i],.@bo[.@i]+1;
}
if(!.@bo[0]&&!.@bo[1])
{
set getvariableofnpc(.area,"KOTH#AreaT"),0;
set getvariableofnpc(.spee,"KOTH#AreaT"),0;
}
else if(!.@bo[0]&&.@bo[1])||(.@bo[0]&&!.@bo[1])
{
set getvariableofnpc(.area,"KOTH#AreaT"),.@bo[0]?1:2; //½Ö¥¿¦b¦û»â
set getvariableofnpc(.spee,"KOTH#AreaT"),.@bo[0]?.@bo[0]:.@bo[1]; //¦û»â³t«×
}else
set getvariableofnpc(.area,"KOTH#AreaT"),3;
initnpctimer;
end;
}
koth01,50,50,4 script #Kothwaitroom 1083,{
end;
OnInit:
waitingroom " ",0;
end;
OnTimer500:
delwaitingroom;
waitingroom "["+getvariableofnpc(.hp,"KOTH#AreaT")+"][B"+getvariableofnpc(.bhp,"KOTH#AreaT")+"][R"+getvariableofnpc(.rhp,"KOTH#AreaT")+"]",0;
initnpctimer;
end;
}
- script KOTH#AreaT -1,{
OnFlagD:
if(getarg(0)==2)
set .bhp,(.bhp<=0?0:.bhp-1);
else if(getarg(0)==3)
set .rhp,(.rhp<=0?0:.rhp-1);
else
return;
return;
OnTimer1000:
if(!.loca&&!.area)
{
if(.hp<.defhp)
set .hp,.hp+1;
set .area,0;
set .spee,0;
initnpctimer;
end;
}else if(.loca&&(.loca==.area||!.area))
{
if(.hp<.defhp)
set .hp,.hp+(.spee?.spee:1);
}else if(.area&&.spee&&.area!=3&&.area!=.loca)
{
set .hp,.hp-.spee;
if(.hp<=0)
{
set .loca,.area;
set .hp,.defhp;
set .rhp,(.rhp?.rhp:1);
set .bhp,(.bhp?.bhp:1);
}
}else
{
sleep 1;
}
callsub OnFlagD,.loca+1;
if(.rhp<=0||.bhp<=0)&&(.area==.loca||.area==0)&&(.hp==.defhp)
{
sleep 1000;
announce "["+(.rhp?"Blue":"Red")+".Team Win!!]",0;
donpcevent "KOTH#RRnpc::OnEndd";
end;
}
initnpctimer;
end;
}
koth01,44,26,4 script #koth01_warp_1-1 45,2,2,{
warp "koth01",53,28;
end;
}
koth01,34,72,4 script #koth01_warp_1-2 45,2,2,{
warp "koth01",27,65;
end;
}
koth01,44,80,4 script #koth01_warp_1-3 45,2,2,{
warp "koth01",72,65;
end;
}
koth01,44,73,4 script #koth01_warp_2-1 45,2,2,{
warp "koth01",53,71;
end;
}
koth01,34,26,4 script #koth01_warp_2-2 45,2,2,{
warp "koth01",27,34;
end;
}
koth01,44,17,4 script #koth01_warp_2-3 45,2,2,{
warp "koth01",72,34;
end;
}
koth01,23,7,4 script NPC#koth01 100,{
if(select("Heal","Storage")==1)
percentheal 100,100;
else
openstorage;
close;
}
koth01,23,88,4 duplicate(NPC#koth01) NPC#koth02 100
koth01 mapflag pvp
bum\p bump TT bu,pppp bumoooooppp