Jump to content
  • 0

pvp room (adding map)


Question

Posted

prontera,155,181,5 script Sample 757,{

if( select("PVP Room [ "+getmapusers("prontera")+"/50 ]:Cancel") == 1 )

if( getmapusers("prontera") < 50 )

warp "prontera",0,0;

close;

}

question guys. how to add more maps in this script? :D

5 answers to this question

Recommended Posts

Posted

hmm ... the npc in prontera, and ask to warp into prontera map to pvp ... ? /hmm sounds weird

prontera,157,178,5	script	Sample	757,{
mes "select a pvp room";
next;
for ( .@i = 0; .@i < .size; .@i++ )
	.@menu$ = .@menu$ +"Room "+( .@i +1 )+". ["+ getmapusers(.pvpmap$[.@i]) +"/50]:";
.@menu$ = .@menu$ + "Cancel";
.@room = select( .@menu$ ) -1;
if ( .@room == .size ) {
	mes "ok, come back anytime";
	close;
}
if ( getmapusers( .pvpmap$[ .@room ] ) >= 50 ) {
	mes "this room is full";
	close;
}
warp .pvpmap$[ .@room ], 0,0;
end;

OnInit:
setarray .pvpmap$,
	"pvp_y_1-1", "pvp_y_1-2", "pvp_y_1-3"; // add more maps here

.size = getarraysize( .pvpmap$ );
for ( .@i = 0; .@i < .size; .@i++ )
	setmapflag .pvpmap$[.@i], mf_pvp;
end;
}

  • Upvote 1

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...