Jump to content
  • 0

script only third class & base level 175


domez86

Question


  • Group:  Members
  • Topic Count:  85
  • Topics Per Day:  0.02
  • Content Count:  207
  • Reputation:   0
  • Joined:  06/11/13
  • Last Seen:  

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!

Link to comment
Share on other sites

12 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  11
  • Topics Per Day:  0.00
  • Content Count:  81
  • Reputation:   14
  • Joined:  11/17/17
  • Last Seen:  

7 hours ago, domez86 said:

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

Okay ?

test.txt

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  22
  • Reputation:   5
  • Joined:  06/19/18
  • Last Seen:  

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!

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  11
  • Topics Per Day:  0.00
  • Content Count:  81
  • Reputation:   14
  • Joined:  11/17/17
  • Last Seen:  

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

  • 0

  • Group:  Members
  • Topic Count:  85
  • Topics Per Day:  0.02
  • Content Count:  207
  • Reputation:   0
  • Joined:  06/11/13
  • Last Seen:  

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

  • 0

  • Group:  Members
  • Topic Count:  11
  • Topics Per Day:  0.00
  • Content Count:  81
  • Reputation:   14
  • Joined:  11/17/17
  • Last Seen:  

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

  • 0

  • Group:  Members
  • Topic Count:  85
  • Topics Per Day:  0.02
  • Content Count:  207
  • Reputation:   0
  • Joined:  06/11/13
  • Last Seen:  

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

  • 0

  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  22
  • Reputation:   5
  • Joined:  06/19/18
  • Last Seen:  

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

  • 0

  • Group:  Members
  • Topic Count:  85
  • Topics Per Day:  0.02
  • Content Count:  207
  • Reputation:   0
  • Joined:  06/11/13
  • Last Seen:  

unmatched ")"

if (!(.@eac&EAJL_THIRD)) {
Edited by domez86
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  11
  • Topics Per Day:  0.00
  • Content Count:  81
  • Reputation:   14
  • Joined:  11/17/17
  • Last Seen:  

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

  • 0

  • Group:  Members
  • Topic Count:  85
  • Topics Per Day:  0.02
  • Content Count:  207
  • Reputation:   0
  • Joined:  06/11/13
  • Last Seen:  

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

  • 0

  • Group:  Members
  • Topic Count:  11
  • Topics Per Day:  0.00
  • Content Count:  81
  • Reputation:   14
  • Joined:  11/17/17
  • Last Seen:  

24 minutes ago, domez86 said:

but only this? or with 


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

Use this because it meets your requirements
I also edited my first comment.

test.txt

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  85
  • Topics Per Day:  0.02
  • Content Count:  207
  • Reputation:   0
  • Joined:  06/11/13
  • Last Seen:  

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