Jump to content
  • 0

about this rental script i'm making.


Question

Posted (edited)

im trying to create a one-click rental npc for all classes. i've been working on this for an hour now, almost everything's working pretty well except for the cart rental for mechanics.

after getting the cart, my char (mechanic) will be stuck, and will not be able to move unless when i use @refresh or @go 0. anyway, here's my code.

prontera,142,186,3 script Universal Rental Npc 418,{
if( (BaseClass == Job_Merchant || BaseJob == Job_SuperNovice) )
{
 if((Class == Job_Mechanic || Class == Job_Mechanic_T) )
 {
  if(checkcart() == 1) goto getMado;
  else
  {
switch(select("Cart","Mado"))
{
 case 1:
 {
  goto getCart;
 }
 break;
 case 2:
 {
  goto getMado;
 }
 break;
}
  }
 }
 goto getCart;
}
if( (BaseJob != Job_Archer && BaseClass == Job_Archer) && checkfalcon() == 0 && getskilllv("HT_FALCON") > 0 )
{
 setfalcon;
 end;
}
if ( (Class == Job_Rune_Knight || Class == Job_Rune_Knight_T || Class == Job_Baby_Rune) && checkriding() == 0 && getskilllv("RK_DRAGONTRAINING") > 0 )
{
 setdragon;
 end;
}
if ( (Class == Job_Knight || Class == Job_Lord_Knight || Class == Job_Baby_Knight || Class == Job_Crusader || Class == Job_Paladin || Job_Baby_Crusader || Class == Job_Royal_Guard || Class == Job_Royal_Guard_T || Class == Job_Baby_Guard) && checkriding() == 0 && getskilllv("KN_RIDING") > 0 )
{
 setriding;
 end;
}

getCart:
{
 if(checkcart() == 0 && getskilllv("MC_PUSHCART") > 0)
 {
  setcart;
  end;
 }
}
getMado:
{
 if(checkriding() == 0 && getskilllv("NC_MADOLICENCE") > 0)
 {
  setmadogear;
  end;
 }
}
}

any hint on how i could fix this would be a great help. thanks.

Edited by Jhedzkie

7 answers to this question

Recommended Posts

Posted

Use checkmadogear instead of checkriding.

mado's working for me no sweat, the cart rental's the one who's messing with me a bit.

Posted (edited)

You can add: atcommand "@refresh"; If the only problem is getting stuck.

And a tip: there's way too many unnecessary curlys in your script :P

did tried adding the @refresh before posting it, but im thinking that there might be another work around for it. and oh, curlys not really a big deal. it makes scripts more readable for me. :P

@kadze, that paste is almost similar from the script from where i extracted mine from. its good but i modded mine for mechanics. to choose whether to have a cart or to have to have a mado.

and as ive said, my script is working pretty well except that the Job_Mechanic and Job_Mechanic_T, whenever they are getting a CART, they get the cart, but gets STUCK (IMMOBILE) as well.

EDIT: hah. fixed it already. thanks guys. :P

end; should have been close;

Edited by Jhedzkie

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