kubax36
03-05-2013, 04:11 PM
Hello, i have problem with my skinning behemoth script
function skin()
if (Self.ItemCount(5908) >= 1 and Self.TargetID() == 0) then
for x = -7, 7, 1 do
for y = -5, 5, 1 do
local item = Map.GetTopUseItem(Self.Position().x + x, Self.Position().y + y,
Self.Position().z)
if (item.id == 5999) then
delayWalker(3000)
setWalkerEnabled(false)
elseif (item.id == 4112) then
setLooterEnabled(false)
delayWalker(3000)
Self.UseItemWithGround(5908, Self.Position().x + x, Self.Position().y + y, Self.Position().z)
wait(1500,2500)
delayWalker(1000)
setLooterEnabled(true)
setWalkerEnabled(true)
end
end
end
end
wait(400)
end
while (true) do
skin()
end
Everything is working almost perfect, there is just one problem, if body of behemoth is unfortunately under me then bot stay there till this body will rot. I have idea how to fix it but, i was trying to do it for 2h but i gave up cuz there was error all the time in script. My idea is to put to script something like that
elseif ((item.id == 4112) = Self.Position().x and Self.Position().y and Self.Position().z) then
delayWalker(1000)
Self.Step("east")
Can someone help me to write it correctly, please? :D
function skin()
if (Self.ItemCount(5908) >= 1 and Self.TargetID() == 0) then
for x = -7, 7, 1 do
for y = -5, 5, 1 do
local item = Map.GetTopUseItem(Self.Position().x + x, Self.Position().y + y,
Self.Position().z)
if (item.id == 5999) then
delayWalker(3000)
setWalkerEnabled(false)
elseif (item.id == 4112) then
setLooterEnabled(false)
delayWalker(3000)
Self.UseItemWithGround(5908, Self.Position().x + x, Self.Position().y + y, Self.Position().z)
wait(1500,2500)
delayWalker(1000)
setLooterEnabled(true)
setWalkerEnabled(true)
end
end
end
end
wait(400)
end
while (true) do
skin()
end
Everything is working almost perfect, there is just one problem, if body of behemoth is unfortunately under me then bot stay there till this body will rot. I have idea how to fix it but, i was trying to do it for 2h but i gave up cuz there was error all the time in script. My idea is to put to script something like that
elseif ((item.id == 4112) = Self.Position().x and Self.Position().y and Self.Position().z) then
delayWalker(1000)
Self.Step("east")
Can someone help me to write it correctly, please? :D