Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Action - Whenever my bp has 100 gold/plat coins in a slot, click on them

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

    Action - Whenever my bp has 100 gold/plat coins in a slot, click on them

    Hey guys, sup.

    I am playing an OTServ but wasn't able to figure out how to do this.

    - Basically what I wanted was an action that whenever my main backpack contains stacks of 100 gold or plat coins, the bot would click on that stack to transform it to a higher value coin.

    Could someone help me on this? =)
    Last edited by Eli; 02-04-2015 at 07:29 AM.

  2. #2
    iBot User eaiblz's Avatar
    Join Date
    Mar 2013
    Posts
    362
    Mentioned
    44 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    104 Post(s)
    Reputation
    50
    Rep Power
    4
    if itemcount("gold coin") >= 100 then useitem("gold coin") end

  3. #3
    Normal User iBot User
    Join Date
    May 2013
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    4
    Hey eaiblz,

    I've already tried this but that's not the right way to do it. For example, if I have 2 stacks of coins in my BP, one containing 42g and another with 100g, it could happen that the script loops on trying to use the 42g stack pile.

    What I really needed was something to analyze all items inside a certain backpack, and if finds 100 gold stacked in one space, then use it.

  4. #4
    iBot User
    Join Date
    May 2013
    Posts
    35
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    9 Post(s)
    Reputation
    10
    Rep Power
    4
    Ive tried that arguement before and it doesnt work.
    Im curious if there is a command to use LAST item. currently im botting on an ot where im changing plats to cc's and its just so messy.

  5. #5
    Moderator Drakke's Avatar
    Join Date
    Jun 2012
    Location
    Sweden
    Posts
    1,898
    Mentioned
    216 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    390 Post(s)
    Reputation
    366
    Rep Power
    10
    I can fix an action for you when I'm not traveling, but if you just wanna make it simple just use two bps and as soon as you have 100+ gps move one stack to other bp and use it

    Or you can try move the 100 stack to front of bp and use it then, if I remember correctly it will try to use the first of selected item in your bp, not 100% if that's correct tho

    Lua Code:
     
    local BpToUse = 'backpack'
     
    if itemcount('gold coin') >= 100 then
    moveitems('gold coin', BpToUse, 100)
    wait(300,400)
    useitem('gold coin', BpToUse)
    updateworld()
    end


    *Note, not tested just wrote it really quick on the train ;p
    If it doesn't work with one bp try use a second one
    Last edited by Drakke; 01-30-2015 at 02:50 PM.

  6. #6
    iBot User
    Join Date
    May 2013
    Posts
    35
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    9 Post(s)
    Reputation
    10
    Rep Power
    4
    Hmm okay im going to try it right now. my biggest issue is im not dealing with gps, yet im dealing with platnums. gets messy if it fucks up.
    il give you results in an hour.
    Thanks for the help!

  7. #7
    iBot User
    Join Date
    May 2013
    Posts
    35
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    9 Post(s)
    Reputation
    10
    Rep Power
    4
    Update - i edited the script to be able to use it with my needs. problem is as follows. instead of moving 100 stack, it moves ALL items.
    if i have 90 plat, bot loots 15, im at 105 plat.
    bot FIRST moves 5 plat stack, then moves 100 stack,
    Bot uses 5 stack because of how items stack through tibia.

    Code:
     local BpToUse = 'grey backpack'
     
    if itemcount('platinum coin') >= 100 then
        moveitems('platinum coin', BpToUse, 100)
    wait(300,400)
    useitem('platinum coin', BpToUse)
    updateworld()
    end

  8. #8
    iBot User
    Join Date
    May 2013
    Posts
    35
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    9 Post(s)
    Reputation
    10
    Rep Power
    4
    My only thought aroudn this issue is useing a backpack and having every sqm filled but having 1 empty item

  9. #9
    Moderator Drakke's Avatar
    Join Date
    Jun 2012
    Location
    Sweden
    Posts
    1,898
    Mentioned
    216 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    390 Post(s)
    Reputation
    366
    Rep Power
    10
    Quote Originally Posted by Boznian View Post
    My only thought aroudn this issue is useing a backpack and having every sqm filled but having 1 empty item
    Think it would be easiest to use a second bp, but don't need to just have one slot empty
    Try using a second backpack with this action

    Lua Code:
     
    local BpToMoveCoin = 'grey backpack'
    local GoldAmount = itemcount('gold coin',BpToMoveCoin)
    local PlatAmount = itemcount('platinum coin',BpToMoveCoin)
     
    if GoldAmount < 100 then
    moveitems('gold coin',BpToMoveCoin,(100-GoldAmount))
    wait(400,600)
    useitem('gold coin',BpToMoveCoin)
    wait(400,600)
    updateworld()
    end
     
    if PlatAmount < 100 then
    moveitems('platinum coin',BpToMoveCoin,(100-PlatAmount)
    wait(400,600)
    useitem('platinum coin',BpToMoveCoin)
    wait(400,600
    updateworld()
    end

  10. #10
    iBot User
    Join Date
    May 2013
    Posts
    35
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    9 Post(s)
    Reputation
    10
    Rep Power
    4
    im figureing for wastedcap. i can use something thats light weight to compensate, less then 10 cap

Posting Permissions

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