Jump to content

Question

Posted

Hello,

Can someone tell me whats wrong with my script?its not working.

- script Job level Changer -1,{
OnPCLoginEvent:
if(getgmlevel() <= 90){ //GM Excemption
 readparam(JobLevel);
if ((class >= 4054 && class <= 4079) || (class >= 4023 && class <= 4045) || (class >= 4096 && class <= 4108)){ //3rd Job Class
 if (readparam(JobLevel) > 50){
 mes "[^FF0000MomoeRO Renewal Job Level Changer^000000]";
 mes "Welcome "+strcharinfo(0)+"";
 mes "We already changed our job level from 120 to 50";
 mes "Any problems please report our GM Team";
 atcommand "@joblvl "+strcharinfo(0)+" -70";
 specialeffect2 338;
 end;
}}
}}

6 answers to this question

Recommended Posts

Posted

Well

readparam(JobLevel)

joblevel is already defined as parameter, no need readparam

if ((class >= 4054 && class <= 4079) || (class >= 4023 && class <= 4045) || (class >= 4096 && class <= 4108)){ //3rd Job Class

You can use Eaclass

atcommand "@joblvl "+strcharinfo(0)+" -70";

That must be your error : no need strcharinfo here (example with your GM, to change your joblevel you write @joblvl -70)

end;

Must be close; otherwise player would be freeze

-    script    Job level Changer    -1,{
OnPCLoginEvent:
   if( getgmlevel() <= 90 ) { //GM Excemption
       if ( eaclass() & EAJL_THIRD && JobLevel > 50 ) { //3rd Job Class
           mes "[^FF0000MomoeRO Renewal Job Level Changer^000000]";
           mes "Welcome "+strcharinfo(0)+"";
           mes "We already changed our job level from 120 to 50";
           mes "Any problems please report our GM Team";
           set .@decrease, JobLevel - 50;
           atcommand "@joblvl -"+ .@decrease;
           specialeffect2 338;
           close;
       }
   }
   end;
}

  • Upvote 1
Posted (edited)

You're welcome

@Emistry

eaclass()&EAJ_THIRDMASK

EAJ_THIRDMASK:

This mask strips 3rd class attributes. It will give the "normal" class of a third job, regardless of rebirth/adopted status. When used on non-third class characters, it will return the second job, or, if that also doesn't exist, the first.

So it would be true if second class too *or other

Also you forgot to close the mes

Edit:

Also JobLevel = 50; doesn't change skills points and skill placed (lol)

Edited by Capuche
  • Upvote 1

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