Results 1 to 7 of 7

Thread: if itemcount... action problem

  1. #1
    iBot User
    Join Date
    May 2013
    Location
    Poland
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    4

    if itemcount... action problem

    Hello.

    I want my char to back to town when he hasn't enough arrows in ALL BPs.
    My problem is that he is backing after first "wait" action. That means, he doesnt see arrows, even when he using it.
    I wonder what should I change there to repair it.

    Code:
    if itemcount("Shiver Arrow") < 700 then 
    
    setsettings("Settings\\Targeting\\Enabled", "no")    
    gotolabel("Leave")
        else
           
            gotolabel("nakurwiamy")
       
    end
    in label "nakurwiamy" I have just wait action and after that, there is this checker.

    Also in in Bank my char always taking money for all arrows, even when he has from last repack like 500-600.

    for Bank action I have something like that:
    Code:
    local Mana = positive(AmmoToBuy - itemcount("Shiver Arrow"))*5
    local Total = Mana
    
    say("hi")
    wait(1500,2500)
    npcsay("deposit all")
    wait(200,300)
    npcsay("yes")
    wait(200,300)
    
    if Total > 0 then
       npcsay("withdraw "..Total)
       wait(200,300)
       npcsay("yes")
       wait(200,300)
       npcsay("balance")
       wait(200,400)
    end
    Can anyone help me to resolve this problem?
    Last edited by KeroN; 03-02-2014 at 12:11 PM.

  2. #2
    Normal User blakw's Avatar
    Join Date
    Mar 2012
    Location
    www.blakw.com
    Posts
    815
    Mentioned
    221 Post(s)
    Tagged
    2 Thread(s)
    Quoted
    344 Post(s)
    Reputation
    462
    Rep Power
    10
    The backpack with arrows its open when action is checking them?


    ------------------------------------Latest Releases:------------------------------------
    Vocations:
    Darashia Lions Rock
    Oramond Seacrest Serpents X1

    For a better iBot!

    (◣_◢)

  3. #3
    iBot User
    Join Date
    May 2013
    Location
    Poland
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    4
    Yes, All the BPs are open. If they woudnt, my bot coudnt refill arrows so.

    Click image for larger version. 

Name:	tb-jhrisdpxgzgqmfwfqydc.jpg 
Views:	25 
Size:	23.5 KB 
ID:	19179

    ^
    He see something like that
    Last edited by KeroN; 03-02-2014 at 02:05 PM.

  4. #4
    iBot User walukasz's Avatar
    Join Date
    Feb 2012
    Location
    Poland
    Posts
    312
    Mentioned
    39 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    25 Post(s)
    Reputation
    67
    Rep Power
    5
    try to
    print(itemcount("Shiver Arrow"))
    and see in debug log if it shows correct value, if not try to get its' id and then check if it works for id.

  5. #5
    iBot User
    Join Date
    May 2013
    Location
    Poland
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    4
    Attachment 19193

    It shows something like that in debug log.
    So should I instead "Shiver Arrow" just write id of it?

  6. #6
    iScripter Eli's Avatar
    Join Date
    Mar 2012
    Posts
    3,764
    Mentioned
    492 Post(s)
    Tagged
    2 Thread(s)
    Quoted
    955 Post(s)
    Reputation
    586
    Rep Power
    10
    Quote Originally Posted by KeroN View Post
    Attachment 19193

    It shows something like that in debug log.
    So should I instead "Shiver Arrow" just write id of it?
    Yes, try with ID

  7. #7
    iBot User
    Join Date
    May 2013
    Location
    Poland
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    4
    http://screenshooter.net/3196979/sajpbsm

    http://screenshooter.net/3196979/mkgttli

    http://screenshooter.net/3196979/vfaphoe


    So I changed it, like you can see on screens. I have no idea, if I did it right, so please correct me, if I'm wrong. It's still not working properly.

Tags for this Thread

Posting Permissions

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