Hi, I need a little help for my PVP warper script. I added couple more maps and they have different room player limits. I would like to have them not able to warp on the map when limit is reached. I have a limit working right now, but it's for ALL of them, I want it to be Map specific please.
Here's the script im using:
- script PVP Warper#01::pvp 946,{
set .@mapcount_1,getmapusers("guild_vs1");
set .@mapcount_2,getmapusers("guild_vs3");
set .@mapcount_3,getmapusers("pvp_n_8-1");
set .@mapcount_4,getmapusers("pvp_y_1-1");
while(1) {
switch(select("Epsilon Arena [ "+.@mapcount_1+" / 15 ]:Square Arena [ "+.@mapcount_2+" / 20 ]:Sandwich Arena [ "+.@mapcount_3+" / 30 ]:Prontera Arena [ "+.@mapcount_4+" / 60 ]")) {
case 1:
callsub S_CheckPVPRoom,@mapcount_1,"guild_vs1";
break;
case 2:
callsub S_CheckPVPRoom,@mapcount_2,"guild_vs3";
break;
case 3:
callsub S_CheckPVPRoom,@mapcount_3,"pvp_n_8-1";
break;
case 4:
callsub S_CheckPVPRoom,@mapcount_4,"pvp_y_1-1";
break;
}
}
S_CheckPVPRoom:
if (getarg(0) >= 25) {
mes "[PVP Warper]";
mes "This map is currently full.";
next;
return;
}
else {
warp getarg(1),0,0;
//if(getarg(1) == pvp_y_1-2) announce ""+strcharinfo(0)+" has Entered Izlude Arena",bc_all,0xFF0000;
//if(getarg(1) == guild_vs3) announce ""+strcharinfo(0)+" has Entered Square Arena",bc_all,0xFF0000;
//announce ""+strcharinfo(0)+" has Entered the PVP Arena",bc_all,0xFF0000;
end;
}
As you can see on the script, I had 1st Map to be 15/15max, 2nd 20/20max, 3rd 30/30max and 4th 60/60max.
But my script only works for 25/25 in general. Thank you in advance!
Question
Yami
Hi, I need a little help for my PVP warper script. I added couple more maps and they have different room player limits. I would like to have them not able to warp on the map when limit is reached. I have a limit working right now, but it's for ALL of them, I want it to be Map specific please.
Here's the script im using:
- script PVP Warper#01::pvp 946,{ set .@mapcount_1,getmapusers("guild_vs1"); set .@mapcount_2,getmapusers("guild_vs3"); set .@mapcount_3,getmapusers("pvp_n_8-1"); set .@mapcount_4,getmapusers("pvp_y_1-1"); while(1) { switch(select("Epsilon Arena [ "+.@mapcount_1+" / 15 ]:Square Arena [ "+.@mapcount_2+" / 20 ]:Sandwich Arena [ "+.@mapcount_3+" / 30 ]:Prontera Arena [ "+.@mapcount_4+" / 60 ]")) { case 1: callsub S_CheckPVPRoom,@mapcount_1,"guild_vs1"; break; case 2: callsub S_CheckPVPRoom,@mapcount_2,"guild_vs3"; break; case 3: callsub S_CheckPVPRoom,@mapcount_3,"pvp_n_8-1"; break; case 4: callsub S_CheckPVPRoom,@mapcount_4,"pvp_y_1-1"; break; } } S_CheckPVPRoom: if (getarg(0) >= 25) { mes "[PVP Warper]"; mes "This map is currently full."; next; return; } else { warp getarg(1),0,0; //if(getarg(1) == pvp_y_1-2) announce ""+strcharinfo(0)+" has Entered Izlude Arena",bc_all,0xFF0000; //if(getarg(1) == guild_vs3) announce ""+strcharinfo(0)+" has Entered Square Arena",bc_all,0xFF0000; //announce ""+strcharinfo(0)+" has Entered the PVP Arena",bc_all,0xFF0000; end; }
As you can see on the script, I had 1st Map to be 15/15max, 2nd 20/20max, 3rd 30/30max and 4th 60/60max.
But my script only works for 25/25 in general. Thank you in advance!
Link to comment
Share on other sites
7 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.