View Full Version : 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! :)
krille09
04-04-2016, 06:14 PM
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)
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.
Oscagi
04-05-2016, 06:48 AM
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! :)
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.
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)
:>
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.
:(
Oscagi
04-06-2016, 05:32 AM
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.
Works now. Thanks for sharing!
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.