Results 1 to 6 of 6

Thread: Would appreciate help with an action

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

    Would appreciate help with an action

    Gold converter for OT's. I have searched the forum for days and I came up with 3 actions supposed to work, none of them does. I will list them incase they just contain minor errors:

    Suggested by Fanta91:

    PHP Code:
    local gold "gold coin"
    local plat "platinum coin"

    if itemcount(gold) => 100 then useitem(gold
    elseif 
    itemcount(plat) => 100 then useitem(plat

    end 
    ^ Doesn't work at all, it doesn't use to coins for some reason, it stays in 100 stacks.

    Suggested by: pink_panther

    PHP Code:
    if itemcount("gold coin") => 100 then useitem("gold coin"
    elseif 
    itemcount("platinum coin") => 100 then useitem("platinum coin"end 
    ^ Doesn't work either as you loot an odd number of gold coins (for example 1x 100 stack + 1x 33 stack) it ignores the 100 stack and (I think?) tried to use the 33 stack.

    By: Dehan


    PHP Code:
    --You need 2 backpacks
    local ConvertBP 
    "brocade backpack"
    local GoldBP "blue backpack"

    --[Gold to Platinum]--

    if 
    itemcount("gold coin"GoldBP) >= 100 and itemcount("gold coin"ConvertBP) == 0 then
        moveitems
    ("gold coin"GoldBPConvertBP100)
        
    wait(1000,2000)
            if 
    itemcount("gold coin"ConvertBP) == 100 then
                useitem
    ("gold coin"ConvertBP)
                while 
    itemcount("platinum coin"ConvertBP) > and itemcount("platinum coin"ConvertBP) < 100 do
                
    moveitems("platinum coin"ConvertBPGoldBP100)
                
    updateworld()
                
    wait(1000,2000)
                
    end
            end
    elseif (itemcount("gold coin"ConvertBP) > and itemcount("gold coin"ConvertBP) < 100) or itemcount("gold coin"ConvertBP) > 100 then
        moveitems
    ("gold coin"ConvertBPGoldBP100)
    end

    --[Platinum to Crystal]--

    if 
    itemcount("platinum coin"GoldBP) >= 100 and itemcount("platinum coin"ConvertBP) == 0 then
        moveitems
    ("platinum coin"GoldBPConvertBP100)
        
    wait(1000,2000)
            if 
    itemcount("platinum coin"ConvertBP) == 100 then
                useitem
    ("platinum coin"ConvertBP)
            
    end
    elseif (itemcount("platinum coin"ConvertBP) > and itemcount("platinum coin"ConvertBP) < 100) or itemcount("platinum coin"ConvertBP) > 100 then
        moveitems
    ("platinum coin"ConvertBPGoldBP100)
    end 
    ^ Didn't do ANYTHING AT ALL -.-
    (EDIT) I managed to get it to move the looted gold from backpack A to backpack B and convert it, however, if you have more than 1 stack of the same type of money (which happens all the time like 100 gold coins + 12 gold coins in the same backpack) it keeps moving the wrong stack into backpack B to convert it, in other words it ends up throwing the wrong stack from backpack A to B to A to B to A to B etc.

    Please someone provide an action that works..
    Last edited by Dehan; 11-20-2013 at 04:19 AM.

  2. #2
    iBot User
    Join Date
    Sep 2013
    Posts
    17
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    4
    Bump

  3. #3
    iBot User Dehan's Avatar
    Join Date
    May 2012
    Location
    www.ssocialscripts.com
    Posts
    910
    Mentioned
    2 Post(s)
    Tagged
    1 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    114
    Rep Power
    7
    I wrote the last one.
    I will give a look on it again and see what is wrong with it, I just can't test it because I don't play OT's

    would help if you could copy any debug errors it is causing and paste here.
    Last edited by Dehan; 11-20-2013 at 04:17 AM.
    Check out - Dehan Accounts Service!

    Proud Scripter of BUgWT STAFF

  4. #4
    iBot User Dehan's Avatar
    Join Date
    May 2012
    Location
    www.ssocialscripts.com
    Posts
    910
    Mentioned
    2 Post(s)
    Tagged
    1 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    114
    Rep Power
    7
    Please test this new version and write me a feedback (if possible send me a PM to it), I don't play OT's so I couldn't test it.
    Lua Code:
    --You need 2 backpacks
    local ConvertBP = "brocade backpack"
    local GoldBP = "blue backpack"
     
    local GoldToMove = (100 - itemcount("gold coin", ConvertBP))
    local PlatinumToMove = (100 - itemcount("platinum coin", ConvertBP))
     
    --[Gold to Platinum]--
     
    if itemcount("gold coin", GoldBP) >= 100 and itemcount("gold coin", ConvertBP) < 100 then
        moveitems("gold coin", GoldBP, ConvertBP, GoldToMove)
        wait(1000,2000)
            if itemcount("gold coin", ConvertBP) == 100 then
                useitem("gold coin", ConvertBP)
                while itemcount("platinum coin", ConvertBP) > 0 and itemcount("platinum coin", ConvertBP) < 100 do
                moveitems("platinum coin", ConvertBP, GoldBP, 100)
                updateworld()
                wait(1000,2000)
                end
            end
    elseif itemcount("gold coin", ConvertBP) > 100 then
        moveitems("gold coin", ConvertBP, GoldBP, 100)
    end
     
    --[Platinum to Crystal]--
     
    if itemcount("platinum coin", GoldBP) >= 100 and itemcount("platinum coin", ConvertBP) < 100 then
        moveitems("platinum coin", GoldBP, ConvertBP, PlatinumToMove)
        wait(1000,2000)
            if itemcount("platinum coin", ConvertBP) == 100 then
                useitem("platinum coin", ConvertBP)
                while itemcount("crystal coin", ConvertBP) > 0 do
                moveitems("crystal coin", ConvertBP, GoldBP, 100)
                updateworld()
                wait(1000,2000)
                end
            end
    elseif itemcount("platinum coin", ConvertBP) > 100 then
        moveitems("platinum coin", ConvertBP, GoldBP, 100)
    end
    Check out - Dehan Accounts Service!

    Proud Scripter of BUgWT STAFF

  5. #5
    iBot User
    Join Date
    Sep 2013
    Posts
    17
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    4
    Quote Originally Posted by Dehan View Post
    Please test this new version and write me a feedback (if possible send me a PM to it), I don't play OT's so I couldn't test it.
    Lua Code:
    --You need 2 backpacks
    local ConvertBP = "brocade backpack"
    local GoldBP = "blue backpack"
     
    local GoldToMove = (100 - itemcount("gold coin", ConvertBP))
    local PlatinumToMove = (100 - itemcount("platinum coin", ConvertBP))
     
    --[Gold to Platinum]--
     
    if itemcount("gold coin", GoldBP) >= 100 and itemcount("gold coin", ConvertBP) < 100 then
        moveitems("gold coin", GoldBP, ConvertBP, GoldToMove)
        wait(1000,2000)
            if itemcount("gold coin", ConvertBP) == 100 then
                useitem("gold coin", ConvertBP)
                while itemcount("platinum coin", ConvertBP) > 0 and itemcount("platinum coin", ConvertBP) < 100 do
                moveitems("platinum coin", ConvertBP, GoldBP, 100)
                updateworld()
                wait(1000,2000)
                end
            end
    elseif itemcount("gold coin", ConvertBP) > 100 then
        moveitems("gold coin", ConvertBP, GoldBP, 100)
    end
     
    --[Platinum to Crystal]--
     
    if itemcount("platinum coin", GoldBP) >= 100 and itemcount("platinum coin", ConvertBP) < 100 then
        moveitems("platinum coin", GoldBP, ConvertBP, PlatinumToMove)
        wait(1000,2000)
            if itemcount("platinum coin", ConvertBP) == 100 then
                useitem("platinum coin", ConvertBP)
                while itemcount("crystal coin", ConvertBP) > 0 do
                moveitems("crystal coin", ConvertBP, GoldBP, 100)
                updateworld()
                wait(1000,2000)
                end
            end
    elseif itemcount("platinum coin", ConvertBP) > 100 then
        moveitems("platinum coin", ConvertBP, GoldBP, 100)
    end
    I tried it and it works, it's a bit slow since it has to move the exact amount of gold while the bot keeps trying to walk while moving the stacks (for example, 17 gold to convert backpack then 83 gold from a 100 stack in the gold backpack to the 17 gold stack in the convert backpack) HOWEVER, great job man it still works even though it isn't perfect. I appreciate this a lot seeing as you (and most people here) don't play OT's yet you took the time to actually help me with the action, +1 rep and again, thank you very much.

  6. #6
    iBot User Dehan's Avatar
    Join Date
    May 2012
    Location
    www.ssocialscripts.com
    Posts
    910
    Mentioned
    2 Post(s)
    Tagged
    1 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    114
    Rep Power
    7
    Updated Version.
    Lua Code:
     
    --You need 2 backpacks
    local ConvertBP = "brocade backpack"
    local GoldBP = "blue backpack"
     
    local GoldToMove = (100 - itemcount("gold coin", ConvertBP))
    local PlatinumToMove = (100 - itemcount("platinum coin", ConvertBP))
     
    --[Gold to Platinum]--
     
    if itemcount("gold coin", GoldBP) >= 100 and itemcount("gold coin", ConvertBP) < 100 then
        moveitems("gold coin", GoldBP, ConvertBP, GoldToMove)
        wait(1000,2000)
            if itemcount("gold coin", ConvertBP) == 100 then
                while itemcount("gold coin", ConvertBP) == 100 do
                useitem("gold coin", ConvertBP)
                wait(500,800)
                end
                while itemcount("platinum coin", ConvertBP) > 0 and itemcount("platinum coin", ConvertBP) < 100 do
                moveitems("platinum coin", ConvertBP, GoldBP, 100)
                updateworld()
                wait(1000,2000)
                end
            end
    elseif itemcount("gold coin", ConvertBP) > 100 then
        moveitems("gold coin", ConvertBP, GoldBP, 100)
    end
     
    --[Platinum to Crystal]--
     
    if itemcount("platinum coin", GoldBP) >= 100 and itemcount("platinum coin", ConvertBP) < 100 then
        moveitems("platinum coin", GoldBP, ConvertBP, PlatinumToMove)
        wait(1000,2000)
            if itemcount("platinum coin", ConvertBP) == 100 then
                while itemcount("platinum coin", ConvertBP) == 100 do
                useitem("platinum coin", ConvertBP)
                wait(500,800)
                end
                while itemcount("crystal coin", ConvertBP) > 0 do
                moveitems("crystal coin", ConvertBP, GoldBP, 100)
                updateworld()
                wait(1000,2000)
                end
            end
    elseif itemcount("platinum coin", ConvertBP) > 100 then
        moveitems("platinum coin", ConvertBP, GoldBP, 100)
    end
    Check out - Dehan Accounts Service!

    Proud Scripter of BUgWT STAFF

Posting Permissions

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