Jump to content
  • 0

pvp room (adding map)


NANORAY

Question


  • Group:  Members
  • Topic Count:  95
  • Topics Per Day:  0.02
  • Content Count:  210
  • Reputation:   3
  • Joined:  12/20/11
  • Last Seen:  

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

Link to comment
Share on other sites

5 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  72
  • Topics Per Day:  0.02
  • Content Count:  2997
  • Reputation:   1132
  • Joined:  05/27/12
  • Last Seen:  

Add more options, then a switch(select()).

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  95
  • Topics Per Day:  0.02
  • Content Count:  210
  • Reputation:   3
  • Joined:  12/20/11
  • Last Seen:  

but how? where will i put it? i don't know how. can you give me a sample script that select more maps? :D thanks in advance sir euphy :D

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

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
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  95
  • Topics Per Day:  0.02
  • Content Count:  210
  • Reputation:   3
  • Joined:  12/20/11
  • Last Seen:  

super thanks AnnieRuru and euphy!

how about the mapflag? i'll just put it under the script? :D

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

setmapflag .pvpmap$[.@i], mf_pvp;

I thought I already did it also /swt

Link to comment
Share on other sites

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.

×
×
  • Create New...