Jump to content

Question

Posted (edited)

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

2 answers to this question

Recommended Posts

Posted (edited)

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

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