XenoBot Forums - Powered by vBulletin

User Tag List

Results 1 to 7 of 7

Thread: Drop Items on ground or Stop Looter

  1. #1

    Join Date
    Apr 2016
    Posts
    2
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Drop Items on ground or Stop Looter

    Hello guys. I am playing on OT Server and need simply script to drop item on ground or stop looter when cap is below than X. I got many situations when my character stay near dead body and try to take item when i dont have cap for it. If possible to do simply lua script to repair it. I think It should look like below than X cap - stoop looter or if "This item it is too heavy" drop "ID, ID, ID..." on ground.

    Peace!

  2. #2
    Lifetime Subscriber
    Join Date
    Aug 2012
    Location
    Stockholm, Sweden
    Posts
    428
    Mentioned
    15 Post(s)
    Tagged
    0 Thread(s)
    lua code:

    local MinCap = 200
    local drop = {"royal helmet", "dragon scale mail", "tower shield"}
    Module.New("loot dropper", function(mod)
    local pos = Self.Position()
    for i = 1, #drop do
    if (Self.Cap() < MinCap) then
    Self.DropItem(pos.x, pos.y, pos.z, drop[i], 1)
    end
    end
    mod:Delay(math.random(1500,3000))
    end)
    Belden's Free Scripts
    Belden's Quest Scripts

    Bought Lifetime Subscription from Fractal
    Bought TeamSpeak 3 Service from Sikkness
    Bought Leveling Service from Y2Quakepc2

  3. #3

    Join Date
    Jul 2013
    Posts
    46
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by krille09 View Post
    lua code:

    local MinCap = 200
    local drop = {"royal helmet", "dragon scale mail", "tower shield"}
    Module.New("loot dropper", function(mod)
    local pos = Self.Position()
    for i = 1, #drop do
    if (Self.Cap() < MinCap) then
    Self.DropItem(pos.x, pos.y, pos.z, drop[i], 1)
    end
    end
    mod:Delay(math.random(1500,3000))
    end)
    This scripted worked somehow but not as intended, I had cap limit = 120 cap, once it reach or passes that cap it throws the items in your backpack to the ground, in this case local drop = {"royal helmet", "dragon scale mail", "tower shield"}


    He wanted a script that once he reach "x" cap, it stops looting.

  4. #4
    Oscagi's Avatar
    Join Date
    Aug 2014
    Location
    Spain
    Posts
    237
    Mentioned
    27 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by smoq View Post
    Hello guys. I am playing on OT Server and need simply script to drop item on ground or stop looter when cap is below than X. I got many situations when my character stay near dead body and try to take item when i dont have cap for it. If possible to do simply lua script to repair it. I think It should look like below than X cap - stoop looter or if "This item it is too heavy" drop "ID, ID, ID..." on ground.

    Peace!
    Quote Originally Posted by Mvm1 View Post
    This scripted worked somehow but not as intended, I had cap limit = 120 cap, once it reach or passes that cap it throws the items in your backpack to the ground, in this case local drop = {"royal helmet", "dragon scale mail", "tower shield"}


    He wanted a script that once he reach "x" cap, it stops looting.
    lua code:

    local MinCap = 200
    Module.New("loot dropper", function(mod)
    if (Self.Cap() < MinCap) then
    Looter.Stop()
    else
    Looter.Start()
    end
    end
    mod:Delay(math.random(1500,3000))
    end)


    :>


    REMEMBER TO SAY THANKS.

  5. #5

    Join Date
    Jul 2013
    Posts
    46
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Oscagi View Post
    lua code:

    local MinCap = 200
    Module.New("loot dropper", function(mod)
    if (Self.Cap() < MinCap) then
    Looter.Stop()
    else
    Looter.Start()
    end
    end
    mod:Delay(math.random(1500,3000))
    end)


    :>

    23:28 XenoScript Error:
    Script: Mincap.lua
    Line #: 9
    Error: ')' expected (to close '(' at line 2) near 'mod'
    This is an error with user-input and should not be reported as a bug with XenoBot.


  6. #6
    Oscagi's Avatar
    Join Date
    Aug 2014
    Location
    Spain
    Posts
    237
    Mentioned
    27 Post(s)
    Tagged
    0 Thread(s)
    lua code:

    local MinCap = 200
    Module.New("loot dropper", function(mod)
    if (Self.Cap() < MinCap) then
    Looter.Stop()
    else
    Looter.Start()
    end
    mod:Delay(math.random(1500,3000))
    end)


    Try it now.


    REMEMBER TO SAY THANKS.

  7. #7

    Join Date
    Jul 2013
    Posts
    46
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Works now. Thanks for sharing!

Posting Permissions

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