PDA

View Full Version : Exani hur up/down



szenko
01-31-2014, 09:37 PM
Hi How I can use this lua



elseif (labelName == "levitateUp") then

delayWalker(3000)
Self.Turn('west')
sleep(math.random(600, 1100))
Self.Say("exani hur up")
wait(2500)

elseif (labelName == "levitateDown") then

delayWalker(3000)
Self.Turn('east')
sleep(math.random(600, 1100))
Self.Say("exani hur down")
wait(2500)

Mode99
02-08-2014, 07:39 AM
see this function in a STS script and use it in all the script i make:


function exaniHur(dir, way, posZ, lb)
wait(400, 600)
Self.Turn(dir)
wait(400, 600)
Self.Step(dir)
wait(800, 1000)
if ( Self.Position().z == posZ ) then
wait(400, 600)
Self.Say('exani hur '..way)
wait(800, 1000)
end
if ( Self.Position().z == posZ ) then
wait(1300, 1600)
gotoLabel(lb)
wait(800, 1000)
end
wait(400, 600)
end

just put lvl before going up and one after
then you just make a lvl and in the function put the data yo need (direction, up or down, wat "z" cord pos is after doing spell, the label after going up)


elseif labelName == 'Lev1' then
exaniHur('west', 'down', 8, 'Levitate1')