Jump to content
  • 0
Sign in to follow this  
Hideki

Ayuda con restricciones en NPC

Question

Estoy trabajando con un npc y quiero que tenga ciertas restricciones pero aun no logro hacer que funcione de todo bien.

El pj que pueda acceder a cierto npc son pj nivel 99 hacia arriba y Advance job.

 

Aqui el ejemplo del script.

 

 


mes "Hola " + strcharinfo(0) + ", estas listo para la batalla?";
next;
switch( select("Claro que si!:Que es esto?:Fin de la conversacion") )
{
case 1:
mes "[Warp Especial]";
if((baselevel < 99) && (Job == 0 || Job == 1 || Job == 2 || Job == 3 || Job == 4 || Job == 5 || 
Job == 6 || Job == 7 || Job == 8 || Job == 9 || Job == 10 || Job == 11 || Job == 12 || 
Job == 14 || Job == 15 || Job == 16 || Job == 17 || Job == 18 || Job == 19 || Job == 20 ||
Job == 4001 || Job == 4002 || Job == 4003 || Job == 4004 || Job == 4005 || Job == 4006 || Job == 4007 || 
Job == 4023 || Job == 4024 || Job == 4025 || Job == 4026 || Job == 4027 || Job == 4028 || Job == 4029 || 
Job == 4030 || Job == 4031 || Job == 4032 || Job == 4033 || Job == 4034 || Job == 4035 || Job == 4037 || 
Job == 4038 || Job == 4039 || Job == 4040 || Job == 4041 || Job == 4042 || Job == 4043 || Job == 4045 ))
{
mes "Lo siento no cumples con los requisitos. Solo Advans Class pueden entrar y nivel base 99 hacia arriba.";
close;
}
mes "Buena suerte!";
close2;
warp "tontera",666,666;
end;

 

El problema es que si eres 99 y job novice si te deja entrar y yo no quiero que entren novices D:

Edited by Hideki

Share this post


Link to post
Share on other sites

2 answers to this question

Recommended Posts

  • 0

Prueba este: 

	mes "["+strnpcinfo(1)+"]";	mes "Olá "+strcharinfo(0)+", estás indo para batalha?";	select ("Claro que si!:Que es esto?:Fin de la conversacion");	next;	mes "["+strnpcinfo(1)+"]";	if (@menu == 1) {		setarray .jobs, 0, 0, 0, 0, 0; // Jobs prohibido.		set .level, 99; // Level necesario.		for (set @i, 0; @i < getarraysize(.jobs); set @i, @i+1) {			if (Class == .jobs[@i]) {				mes "Usted no tiene Job requisitado.";				close;			}			else {				if (BaseLevel != .level) {					mes "Usted no tiene level suficiente.";					close;				}				mes "¡Buena suerte!";				close2;				warp "tontera",666,666;				end;			}		}	}	if (@menu == 2) {		mes "Es una arena de batalha!";		close;	}	if (@menu == 3) close;

 

Creado por mí, configurar:

		setarray .jobs, 0, 0, 0, 0, 0; // Jobs prohibido.		set .level, 99; // Level necesario.

 

;)

Share this post


Link to post
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.   Restore formatting

  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.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.