Jump to content
  • 0

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


Question

Posted (edited)

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

4 answers to this question

Recommended Posts

  • 0
Posted
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

Posted

 

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! :)

Posted

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

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