Jump to content
  • 0

about this rental script i'm making.


Jhedzkie

Question


  • Group:  Members
  • Topic Count:  42
  • Topics Per Day:  0.01
  • Content Count:  297
  • Reputation:   15
  • Joined:  11/17/11
  • Last Seen:  

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
Link to comment
Share on other sites

7 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  341
  • Reputation:   43
  • Joined:  01/10/12
  • Last Seen:  

Use checkmadogear instead of checkriding.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  42
  • Topics Per Day:  0.01
  • Content Count:  297
  • Reputation:   15
  • Joined:  11/17/11
  • Last Seen:  

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.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  224
  • Reputation:   22
  • Joined:  03/23/12
  • Last Seen:  

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

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  14
  • Topics Per Day:  0.00
  • Content Count:  351
  • Reputation:   52
  • Joined:  11/15/11
  • Last Seen:  

forgot an end;

modified it for you & added 1 paste to your account

Edited by Nameless2you
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  42
  • Topics Per Day:  0.01
  • Content Count:  297
  • Reputation:   15
  • Joined:  11/17/11
  • Last Seen:  

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
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  17
  • Topics Per Day:  0.00
  • Content Count:  754
  • Reputation:   186
  • Joined:  05/22/12
  • Last Seen:  

maybe add a close;?

bot in getCart and get mado

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