Results 1 to 4 of 4

Thread: Help with script.

  1. #1
    Normal User rejavaki's Avatar
    Join Date
    Apr 2013
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    4

    Help with script.

    What would I change in here to only buy X amount of spears, instead of to the max that leaves me 0 cap?




    "local SpearToBuy = SpearMax - weaponamount

    opentrade()
    buyitemsupto(SpearType, SpearToBuy) wait(1000)
    npcsay("bye") wait(600)"

    Also, I notice that all scripts just clear it once, and then leave, there is no way of making the bot leave once it runs out of ammo?
    Last edited by rejavaki; 04-10-2013 at 03:45 AM.

  2. #2
    iBot User Raph_'s Avatar
    Join Date
    Feb 2013
    Posts
    391
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    59
    Rep Power
    4
    It looks oks, have you determined these variables on Setup?

  3. #3
    Normal User rejavaki's Avatar
    Join Date
    Apr 2013
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    4
    Quote Originally Posted by Raph_ View Post
    It looks oks, have you determined these variables on Setup?
    Yes, but it buys the spears till there is no more cap to carry, I only want it to carry 15, a way of doing that?

  4. #4
    iBot User Raph_'s Avatar
    Join Date
    Feb 2013
    Posts
    391
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    59
    Rep Power
    4
    Declare on setup:
    [ilua]SpearType = "spear"[/ilua]
    [ilua]SpearMax = 15[/ilua]

    Then change on your action to:
    opentrade()
    wait(800,1200)
    buyitemsupto(SpearType, SpearMax, itemcount(SpearType))
    wait(1000, 2000)
    npcsay("bye")
    wait(200, 400)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •