Results 1 to 3 of 3

Thread: Help Improve an action

  1. #1
    iBot User
    Join Date
    Aug 2013
    Posts
    29
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    4

    Help Improve an action

    I got an Action in waypoints. It works. It does not work how I want it to.

    I am trying to pick up Exactly 400 mana's from a pile on the floor.

    Here is what I have:
    PHP Code:
    local mptopickup = (400-itemcount(268))
    wait(1500,2000)
    if 
    islocation() 
    then
    moveitems
    ("mana potion",ground(33189,32813,7),"all",mptopickup)
    wait(500,1000)
    moveitems("mana potion",ground(33189,32813,7),"all",mptopickup)
    wait(500,1000)
    moveitems("mana potion",ground(33189,32813,7),"all",mptopickup)
    wait(500,1000)
    moveitems("mana potion",ground(33189,32813,7),"all",mptopickup)
    wait(500,1000)
    moveitems("mana potion",ground(33189,32813,7),"all",mptopickup)
    wait(500,1000)
    else    
    gotolabel('Start')
    end 
    All it does is pick up the top 5 piles, for example 23 , 100, 100, 100, 100.
    It should be picking up 23, 100, 100, 100, 77

    Anyone know how I can fix this problem?

  2. #2
    Normal User RafiXWPT's Avatar
    Join Date
    Jun 2012
    Location
    (Poland) http://rafixwptscripts.com
    Posts
    1,602
    Mentioned
    31 Post(s)
    Tagged
    1 Thread(s)
    Quoted
    128 Post(s)
    Reputation
    128
    Rep Power
    9
    try this
    PHP Code:
    local mptopickup 400
    local lastpick 
    0
    wait
    (1500,2000
    if 
    islocation()  
    then 
    while itemcount("mana potion") < (mptopickup 100) do
    moveitems("mana potion",ground(33189,32813,7),"all",100
    wait(500,1000)
    lastpick mptopickup itemcount("mana potion")
    end
    moveitems
    ("mana potion",ground(33189,32813,7),"all",lastpick
    wait(500,1000)
    else     
    gotolabel('Start'
    end 

  3. #3
    iBot User
    Join Date
    Aug 2013
    Posts
    29
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    4
    Thanks RafiXWPT, works perfect!

Posting Permissions

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