Jump to content
  • 0

getmapusers on warper.


Question

Posted

i modified the warper npc of rathena.and i just add getmapusers on every map you choose.

 

is there any easy way to get map?

 

i insert the getmapusers on menu.

 

"Prontera["+getmapusers("prontera")+"]",T1,

 

 

so this script is very long since every warp has different map. is there any easy way to use getmapusers without using the specific map?

post-1381-0-85090700-1370505918_thumb.jpg

6 answers to this question

Recommended Posts

Posted
they use +getmapusers(.@Maps$[.@i])+ to get the map.

because the .@maps$[.@i] has been defined here..

setarray .@Maps$[0],"pvp_n_8-1","pvp_n_8-2","pvp_n_8-3","pvp_n_8-4","pvp_n_8-5";
setarray .@Maps$[0],"pvp_y_8-1","pvp_y_8-2","pvp_y_8-3","pvp_y_8-4","pvp_y_8-5";

 

 

you can use toastofdoom's warper too ... or annieruru's favourite warper ..or any other from the forum ...else just add the getmapusers yourself..

Posted

hmmm i checked the pvp script of rathena.

 

//Fight square Reception Staff (Locations below)
-	script	FSRS::fsr	-1,{
	if(strnpcinfo(4) == "pvp_y_room") {
		setarray .@Maps$[0],"pvp_y_8-1","pvp_y_8-2","pvp_y_8-3","pvp_y_8-4","pvp_y_8-5";
		setarray .@Name$[0],"Prontera","Izlude","Payon","Alberta","Morroc";
		setarray .@Limit[0],128,128,128,128,128;
	} else {
		setarray .@Maps$[0],"pvp_n_8-1","pvp_n_8-2","pvp_n_8-3","pvp_n_8-4","pvp_n_8-5";
		setarray .@Name$[0],"Sandwich","Lock on","Four Room","Under cross","Compass Room";
		setarray .@Limit[0],64,32,32,32,32;
	}
	for(set .@i,0; .@i<5; set .@i,.@i+1)
		set .@menu$, .@menu$+.@Name$[.@i]+" ["+getmapusers(.@Maps$[.@i])+" / "+.@Limit[.@i]+"]:";
	set .@menu$, .@menu$+"Cancel.";
	set .@i, select(.@menu$)-1;
	if (.@i == 5) close;
	if (getmapusers(.@Maps$[.@i]) >= .@Limit[.@i]) {
		mes "[PVP Fight Square Reception Staff]";
		mes "This map is currently full.";
	}
	else warp .@Maps$[.@i],0,0;
	close;


they use +getmapusers(.@Maps$[.@i])+ to get the map.

Posted

Yeah, you can't do this easily with my script. I decided not to store the main menu.

oh i see.i think i'm gonna use Toasty's Warper. but it seems outdated.

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...