Announce the Player when Entering PVP

single pvp room.

Code:
-	script	FSRS::fsr	-1,{if ( select  ( "warp now!", "nothing." ) == 2 ) close;	if (getmapusers(.map$[0]) >= atoi(.map$[2])) {		mes "[PVP Fight Square Reception Staff]";		mes "This map is currently full.";		close;	}	announce "[ "+strcharinfo(0)+" ] has been join the battle!",0;	warp .map$[0],0,0;	end;OnInit:	setarray .map$[0], "pvp_y_8-2", "Izlude", 128;	waitingroom "PVP TAGISAN NG LAKAS",0;	end;}//Fight Square Reception Staffaldebaran,146,172,4	duplicate(fsr)	PVP#f1	685 // duplicate
 
The Izlude map isn't used at all on that script except when declarating it O.o

 
Code:
-    script    FSRS::fsr    -1,{if ( select  ( "Warp to "+.map$[1]+" [ "+getmapusers(.map$[0])+" / "+.map$[2]+" ]", "nothing." ) == 2 ) close;    if (getmapusers(.map$[0]) >= atoi(.map$[1])) {        mes "[PVP Fight Square Reception Staff]";        mes "This map is currently full.";        close;    }    announce "[ "+strcharinfo(0)+" ] has been join the battle!",0;        while(1) {        set .@x,rand(0,300);        set .@y,rand(0,300);        if( checkcell(.map$[0], .@x, .@y, cell_chkpass)) break;    }    warp .map$[0],.@x,.@y;    end;    OnInit:    setarray .map$[0], "pvp_y_8-2", "Izlude", 128;    waitingroom "PVP TAGISAN NG LAKAS",0;    end;}//Fight Square Reception Staffaldebaran,146,172,4    duplicate(fsr)    PVP#f1    100 // duplicate
 
@quesoph: Maybe you made a little mistake there in line 3? Check will try to compare if the users in pvp_y_8_2 are greater than the int representation of the string "Izlude".

I'd remove the useless Izlude there and fix the mistake, like this:

- script FSRS::fsr -1,{if ( select ( "Warp to "+.map$[1]+" [ "+getmapusers(.map$[0])+" / "+.map$[1]+" ]", "nothing." ) == 2 ) close; if (getmapusers(.map$[0]) >= atoi(.map$[1])) { mes "[PVP Fight Square Reception Staff]"; mes "This map is currently full."; close; } announce "[ "+strcharinfo(0)+" ] has joined the battle!",0; while(1) { set .@x,rand(0,300); set .@y,rand(0,300); if( checkcell(.map$[0], .@x, .@y, cell_chkpass)) break; } warp .map$[0],.@x,.@y; end; OnInit: setarray .map$[0], "pvp_y_8-2", 128; waitingroom "PVP TAGISAN NG LAKAS",0; end;

Pssible add: freeloop to check the loop without infinite loop warnings.

 
Last edited by a moderator:
Back
Top