Jump to content
  • 0

mvp arena


I Cant Stop x3

Question


  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  14
  • Reputation:   0
  • Joined:  10/31/12
  • Last Seen:  

hello guys i see this npc on npc/custom/etc, i have a question: 

// Keepers
function	script	Keeper	{
	set .@arg, getarg(0);
	mes "[ ^0065DF"+strnpcinfo(1)+"^000000 ]";
	mes "Which arena would you";
	mes "like to enter?";
	for(set .@i,1; .@i<9; set .@i,.@i+1)
		set .@menu$, .@menu$+"Arena "+.@i+" ["+getmapusers("pvp_n_"+.@i+"-"+.@arg)+"/20]:";
	set .@i, select(.@menu$);
	if (getmapusers("pvp_n_"+.@i+"-"+ .@arg)>19) {
		mes "[ ^0065DF"+strnpcinfo(1)+"^000000 ]";
		mes "Sorry, this arena is full!";
		close;
	}
	warp "pvp_n_"+.@i+"-"+ .@arg,102,102;
	close;
}
quiz_00,56,31,4	script	Alpha MVP	770,{ callfunc "Keeper",2; }
quiz_00,58,31,4	script	Beta MVP	773,{ callfunc "Keeper",3; }
quiz_00,60,31,4	script	Theta MVP	774,{ callfunc "Keeper",4; }
quiz_00,62,31,4	script	Epsilon MVP	776,{ callfunc "Keeper",5; }

// Protectors
function	script	Protector	{
	switch(select(""+((getarg(0)=="")?"":"Harder Monsters")+":Heal:Exit")) {
	case 1:
		warp getarg(0),102,102;
		end;
	case 2:
		specialeffect2 EF_HEAL2;
		percentheal 100,100;
		end;
	case 3:
		warp "prontera",156,179;
		end;
	}
}

how to put the keeper menu on protector , example : when you click on protector , you automatic teleported to another map, but i need the menu show again instead of automatic teleport, if the player is on pvp_n_1-2 show the pvp_n_2 and 3 and 4 but not the 1

Edited by I Cant Stop x3
Link to comment
Share on other sites

2 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  54
  • Topics Per Day:  0.01
  • Content Count:  513
  • Reputation:   83
  • Joined:  08/11/12
  • Last Seen:  

Edit the select menu.

switch(select(""+((getarg(0)=="")?"":"Harder Monsters")+":Heal:Exit:Talk to the Keeper"))
 

add another case.

case 4:
	set .@arg, getarg(0);
	mes "[ ^0065DF"+strnpcinfo(1)+"^000000 ]";
	mes "Which arena would you";
	mes "like to enter?";
	for(set .@i,1; .@i<9; set .@i,.@i+1)
		set .@menu$, .@menu$+"Arena "+.@i+" ["+getmapusers("pvp_n_"+.@i+"-"+.@arg)+"/20]:";
	set .@i, select(.@menu$);
	if (getmapusers("pvp_n_"+.@i+"-"+ .@arg)>19) {
		mes "[ ^0065DF"+strnpcinfo(1)+"^000000 ]";
		mes "Sorry, this arena is full!";
		close;
	}
	warp "pvp_n_"+.@i+"-"+ .@arg,102,102;
        break;
Edited by jezznar
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  14
  • Reputation:   0
  • Joined:  10/31/12
  • Last Seen:  

@EDIT 

 

Solved with https://rathena.org/wiki/Tips_and_Tricks_(Scripting)--  Dynamic Menu

Edited by I Cant Stop x3
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...