Jump to content
  • 0

Help with item/suit script to change into 2nd job please?


HristDead

Question


  • Group:  Members
  • Topic Count:  66
  • Topics Per Day:  0.02
  • Content Count:  167
  • Reputation:   2
  • Joined:  08/01/12
  • Last Seen:  

Hello rAthena

 

I am using this script and it works perfectly.

But now what I need is another item script that works similar, except instead of a third class, i want it to changes the player's appearance into it's second job. I.e: Lord knight that wear this suit gets the appearance of a knight.

 

Original (working) script for trans to third class appearance:

 

{ if(roclass(eaclass()|EAJL_UPPER)) changebase roclass(eaclass()|EAJL_THIRD); },{},{ if(roclass(eaclass()|EAJL_THIRD)) changebase roclass(eaclass()|EAJL_UPPER); }

 

 

Other (not working) script. It gave me an error of class -1 not exist or something.. : 

 

{ if(roclass(eaclass()|EAJL_UPPER)) changebase roclass(eaclass()|EAJL_2); },{},{ if(roclass(eaclass()|EAJL_2)) changebase roclass(eaclass()|EAJL_UPPER); }

 

__________________

 

What exactly did I do wrong? Thanks a lot :)

Edited by HristDead
Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  176
  • Topics Per Day:  0.14
  • Content Count:  666
  • Reputation:   9
  • Joined:  12/04/20
  • Last Seen:  

On 6/26/2014 at 5:37 AM, Capuche said:

no problem /no1

try checkriding() to check if the player mount a peco peco

ismounting() to check if the player use a cash mount

 

on a side note I'm not sure what you want to check in this condition


if(roclass(eaclass()|EAJL_UPPER))

but be aware that roclass will return -1 if there is no valid class and if(-1) is true

how about if the jobs is from novice and 1st job to 3rd job?  

i alway getting this error if im wearing it while im in novice and 1st jobs 

[Error]: status_set_viewdata (PC): No view data for class -1

Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

try

if(roclass(eaclass()|EAJL_UPPER)) changebase BaseJob;
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  66
  • Topics Per Day:  0.02
  • Content Count:  167
  • Reputation:   2
  • Joined:  08/01/12
  • Last Seen:  

 

try

if(roclass(eaclass()|EAJL_UPPER)) changebase BaseJob;

 

Ah thank you so much Capuche! 

 

On a similar note, do you know by any chance how to block it from using while the character is riding? (Peco or mount)

Currently, if a mounted character uses the suit item, you don't see his mount when he is mounted. I tried something like If(ismounting()) dispbottom "You can't use this item now!";

but that didn't work. xD

 

If that's too much, then disregard what I said. I am already happy with the answer on my first problem! :)

Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

no problem /no1

 

On a similar note, do you know by any chance how to block it from using while the character is riding? (Peco or mount)

try checkriding() to check if the player mount a peco peco

ismounting() to check if the player use a cash mount

 

on a side note I'm not sure what you want to check in this condition

if(roclass(eaclass()|EAJL_UPPER))

but be aware that roclass will return -1 if there is no valid class and if(-1) is true

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