Jump to content
  • 0

Help with BaseJob == syntax please!


insarius

Question


  • Group:  Members
  • Topic Count:  35
  • Topics Per Day:  0.01
  • Content Count:  106
  • Reputation:   3
  • Joined:  09/21/12
  • Last Seen:  

if(BaseJob == Job_Ninja)

How do I add Kagerou and Oboro to that syntax?

Link to comment
Share on other sites

8 answers to this question

Recommended Posts


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2350
  • Joined:  10/28/11
  • Last Seen:  

you mean these ?

trunk/db/const.txt

Job_Kagerou 4211
Job_Oboro 4212

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  19
  • Topics Per Day:  0.00
  • Content Count:  713
  • Reputation:   70
  • Joined:  11/08/11
  • Last Seen:  

if(BaseJob == Job_Ninja || BaseJob == Job_Kagerou || BaseJob == Job_Oboro)

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  35
  • Topics Per Day:  0.01
  • Content Count:  106
  • Reputation:   3
  • Joined:  09/21/12
  • Last Seen:  

That's what I was looking for, thanks!

EDIT : It worked for the kunai seller, but not for the other Ninja NPC's.

que_ng,28,50,3 script Boshuu 709,{

if (BaseJob != Job_Ninja || BaseJob != Job_Kagerou){

If I change the !'s into ='s the script doesnt respond at all.

Edited by insarius
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  21
  • Topics Per Day:  0.00
  • Content Count:  326
  • Reputation:   19
  • Joined:  09/27/12
  • Last Seen:  

It won't work with != because you will be checking if it does not equal multiple jobs at once causing the statement to always succeed. Use "&&" instead of "||".

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2350
  • Joined:  10/28/11
  • Last Seen:  

if ( Class != Job_Ninja && Class != Job_Kagerou){

or

if ( Class == Job_Ninja || Class == Job_Kagerou){

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  21
  • Topics Per Day:  0.00
  • Content Count:  326
  • Reputation:   19
  • Joined:  09/27/12
  • Last Seen:  

if ( Class != Job_Ninja && Class != Job_Kagerou){

or

if ( Class == Job_Ninja || Class == Job_Kagerou){

Woot! That's way better. I should have been more specific.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  35
  • Topics Per Day:  0.01
  • Content Count:  106
  • Reputation:   3
  • Joined:  09/21/12
  • Last Seen:  

Thanks guys, work perfectly now!

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  72
  • Topics Per Day:  0.02
  • Content Count:  2997
  • Reputation:   1131
  • Joined:  05/27/12
  • Last Seen:  

BaseClass should be used for checking Ninja/Kagerou/Oboro:

if (BaseClass == Job_Ninja) {}

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