XenoBot Forums - Powered by vBulletin

User Tag List

Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 24

Thread: Improved Items Mover ( multi items )

  1. #11
    Senior Member Jontor's Avatar
    Join Date
    Sep 2014
    Posts
    446
    Mentioned
    51 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by kamilqq View Post
    Read it.
    Message me if you learn how to code

  2. #12

    Join Date
    Jan 2014
    Posts
    183
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Jontor View Post
    Message me if you learn how to code
    what's wrong then?
    Why it should have delays? ( after moving an item? about 100 - 300 ms ? I dont really need that, not lagging me or anything like that or its not ignoring items, but its published and if some1 need the delay he can just add a line so i can't really see the problem.

  3. #13
    Senior Member Jontor's Avatar
    Join Date
    Sep 2014
    Posts
    446
    Mentioned
    51 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by kamilqq View Post
    what's wrong then?
    Why it should have delays? ( after moving an item? about 100 - 300 ms ? I dont really need that, not lagging me or anything like that or its not ignoring items, but its published and if some1 need the delay he can just add a line so i can't really see the problem.
    Make a while (true) do loop, it won't be any different from your code
    You're simply spamming Tibia with packets that you wish to move the item, but there's a cooldown anyways

  4. #14

    Join Date
    Jan 2014
    Posts
    183
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Jontor View Post
    Make a while (true) do loop, it won't be any different from your code
    You're simply spamming Tibia with packets that you wish to move the item, but there's a cooldown anyways
    I don't care how people will use this code, the module was just added to make it work if some1 copy-pasted that.
    Also i can't see point of looping that like module/while true do, cause i would only use it on magic shop. So for me the looping that is useless so as i said people will use how they need to.

  5. #15

    Join Date
    Sep 2015
    Posts
    25
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by kamilqq View Post
    I don't care how people will use this code, the module was just added to make it work if some1 copy-pasted that.
    Also i can't see point of looping that like module/while true do, cause i would only use it on magic shop. So for me the looping that is useless so as i said people will use how they need to.
    I just pasted and maked a .lua with it. Working great but is this the right way to use it?

    You guys are saying about loop, spamming Tibia with packets... Are these things detectable or something like that?

  6. #16
    Senior Member Jontor's Avatar
    Join Date
    Sep 2014
    Posts
    446
    Mentioned
    51 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by yoyoa1 View Post
    I just pasted and maked a .lua with it. Working great but is this the right way to use it?

    You guys are saying about loop, spamming Tibia with packets... Are these things detectable or something like that?
    What I tried to point out is that the script is trying to move items too fast
    While its doing great job, imo it's a bit risky without any waits

  7. #17

    Join Date
    Jan 2014
    Posts
    183
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Jontor View Post
    What I tried to point out is that the script is trying to move items too fast
    While its doing great job, imo it's a bit risky without any waits
    You are 100% right. Im not playing rl tibia so im not paying attention on such things. When im home ill make it more Human like.

  8. #18

    Join Date
    Feb 2016
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    its dsn't loop...?

    have to refresh script every time i refill ...

  9. #19

    Join Date
    Apr 2014
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by kamilqq View Post
    Hello, now ive just had a need to make better item mover, so i'd like to share with community

    I did not made optional backpack where pots firstly are because usually people want to sort items after magic shop. So thats why it sorting from first backpack( usually main ).

    Also you don't have to loop this function:
    reason of looping such function is that when you move item, the next indexes are lowered by 1 and for loop just goes ahead.
    There is no such problem cause this is recursive function so if it will move item its looping itself.

    I hope You enjoy

    PHP Code:
     toSort = {
        {
    id Item.GetID('mana potion'), bp 'brocade backpack'},
        {
    id Item.GetID('health potion'), bp 'demon backpack'}
        }
    function 
    moveItems(table)
        
    local fromBP Container.GetFirst()
        for 
    spotitem in fromBP:iItems() do
            for 
    _data in pairs(table) do
                if 
    item.id == data.id then
                    local toBP 
    Container.New(data.bp)
                    
    fromBP:MoveItemToContainer(spottoBP:Index(), 0)
                         
    wait(Self.Ping() + 100Self.Ping() + 300)
                    return 
    moveItems(table)
                
    end
            end
        end
    end
    Module
    .New('ImprovedItemMover', function(this)
        
    moveItems(toSort)
        
    this:Stop()
        
    end
    Anyway Possible to change this for item ID. A lot of open tibia servers have custom names.

    Help on this would be awesome. I'm sure its an easy edit.

  10. #20

    Join Date
    Jan 2014
    Posts
    183
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by ShanMaron View Post
    Anyway Possible to change this for item ID. A lot of open tibia servers have custom names.

    Help on this would be awesome. I'm sure its an easy edit.
    {id = Item.GetID('mana potion'), bp = 'brocade backpack'}, INSTEAD OF THAT LINE USE THIS :
    {id = 50252, bp = 'yourbp'}.

    lol

Posting Permissions

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