Jump to content
  • 0

script only third class & base level 175


Question

Posted

hi, could you tell me how to insert in this npc that can only be used by third and base level 175?
maybe with a message: "Sorry, you have to have a third class and base level 175."

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------

prontera,198,148,3    script    Test    860,{
mes ( "restertstat") ;
atcommand "+resetstat";
next;
mes ( "remove stpoint");
StatusPoint = 0;
next;
mes ( "apply st point");
StatusPoint += 25000;
mes ( "done");
mes ("congratulations! now you're at max! ");
close;
}
 

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

 

tnx for all!

12 answers to this question

Recommended Posts

  • 0
Posted
prontera,198,148,3    script    Test    860,{
  if( Class >= 4054 && Class <= 4218 ){
      if(BaseLevel < 175){
          mes "[npc]";
          mes "Sorry , you have to be minimum base level 175";
          close;
      }
      mes ( "restertstat") ;
      atcommand "+resetstat";
      next;
      mes ( "remove stpoint");
      StatusPoint = 0;
      next;
      mes ( "apply st point");
      StatusPoint += 25000;
      mes ( "done");
      mes ("congratulations! now you're at max! ");
      close;
  } else {
      mes "[npc]";
      mes "Sorry, you have to have a third class.";                                
      close;
  }
}

Hope it helps!

  • 0
Posted (edited)
prontera,198,148,3    script    Test    860,{
	.@eac = eaclass();
	if (!(.@eac&EAJL_THIRD) || BaseLevel < 175) {
		mes "[npc]";
		mes "Sorry, you have to have a third class and base level 175.";
		close;
	}
	mes ( "restertstat") ;
	atcommand "+resetstat";
	next;
	mes ( "remove stpoint");
	StatusPoint = 0;
	next;
	mes ( "apply st point");
	StatusPoint += 25000;
	mes ( "done");
	mes ("congratulations! now you're at max! ");
	close;
}

This also works...

Edited by rongmauhong
Fix condition
  • 0
Posted
On 2/20/2019 at 12:25 AM, rongmauhong said:

prontera,198,148,3    script    Test    860,{
	.@eac = eaclass();
	if (!(.@eac&EAJL_THIRD) && BaseLevel < 175) {
		mes "[npc]";
		mes "Sorry, you have to have a third class and base level 175.";
		close;
	}
	mes ( "restertstat") ;
	atcommand "+resetstat";
	next;
	mes ( "remove stpoint");
	StatusPoint = 0;
	next;
	mes ( "apply st point");
	StatusPoint += 25000;
	mes ( "done");
	mes ("congratulations! now you're at max! ");
	close;
}

This also works...

error in line:

if (!(.@eac&EAJL_THIRD) && BaseLevel < 175) {
  • 0
Posted (edited)
6 hours ago, domez86 said:

error in line:


if (!(.@eac&EAJL_THIRD) && BaseLevel < 175) {

Oops! Sorry. I fixed it
Change to

if (!(.@eac&EAJL_THIRD) || BaseLevel < 175) {

 

Edited by rongmauhong
  • 0
Posted
46 minutes ago, rongmauhong said:

Oops! Sorry. I fixed it

not work....not error but not work....but if instead of that I would like only the limitation to the third class?

.@eac = eaclass();
	if (!(.@eac&EAJL_THIRD) || BaseLevel < 175) {
  • 0
Posted
prontera,198,148,3    script    Test    860,{
  if( Class >= 4054 && Class <= 4218 ){
      mes ( "restertstat") ;
      atcommand "+resetstat";
      next;
      mes ( "remove stpoint");
      StatusPoint = 0;
      next;
      mes ( "apply st point");
      StatusPoint += 25000;
      mes ( "done");
      mes ("congratulations! now you're at max! ");
      close;
  } else {
      mes "[npc]";
      mes "Sorry, you have to have a third class.";                                
      close;
  }
}

If you want only third job then just remove the condition for level 175, you can use the code that i gave you or just edit the one that rongmauhong

if (!(.@eac&EAJL_THIRD)) {
  • 0
Posted (edited)
1 hour ago, domez86 said:

unmatched ")"


if (!(.@eac&EAJL_THIRD)) {

Don't copy and paste because it may be due to UTF-8 error. Just type it in your editor.

Edited by rongmauhong
  • 0
Posted (edited)
19 minutes ago, rongmauhong said:

Non copiare e incollare perché potrebbe essere dovuto all'errore UTF-8. Basta scriverlo nel tuo editor.

but only this? or with 

@eac = eaclass();
if (!(.@eac&EAJL_THIRD) || BaseLevel < 175) {
Edited by domez86
  • 0
Posted (edited)
56 minutes ago, rongmauhong said:

Usa questo perché soddisfa i tuoi requisiti
Ho anche modificato il mio primo commento.

test.txt

thanks, can you give me npc, without the bale level 175 restriction?

Edited by domez86

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