Hi guys!
I am playing on OT Server and i need simply script to drop assassin stars when got more than X.
(I go hunt with 100 stars, when i got more than 120 stars bot should drop 20)
If possible to do something like that?
dinmamma
04-24-2016, 08:10 PM
smoq
itemId = 3578 -- Item Id that you want to drop
dropMin = 9 -- Which ammount (minimum) do you want to drop?
dropMax = 15 -- Which ammount (maximum) do you want to drop?
function dropItem(id, cnt)
local cont = Container.GetFirst()
while (cont:isOpen()) do
for spot = 0, cont:ItemCount() do
local item = cont:GetItemData(spot)
if (item.id == id and item.count >= cnt) then
cont:MoveItemToGround(spot, Self.Position().x, Self.Position().y, Self.Position().z)
return true
end
end
cont = cont:GetNext()
end
return false
end
while (true) do
if (dropItem(itemId,math.random(dropMin,dropMax))) then
wait(30000, 45000)
else
wait(2000)
end
I'm using this, it randomizes the count for more randomness, you can just set both values to 20 if you play OT.
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.