L
LordVissie
Guest
So, I tried to make a script and this is the outcome
If you pull the lever there will spawn 3 terror birds in near you but I had a little trubble between the exhaust you can just pull the lever again after 2 seconds that makes it giving infinite exp. So I tried to add some exhaustion. The exhaustion part is from Limos. but I don't know if I putted it in correctly, probally not because It does nothing when I try to pull the lever the lever doesn't change (from left to right) the script doesn't gives any errors when I use it and when I start the server up. (Also no: Sorry, not possible. on use)
Anyone have an idea what I did wrong?
~~~~ Edit ~~~~
Actions.xml : <action uniqueid="13201" event="script" value="terror bird.lua"/>
Using: 0.3.6
Code:
local exhaustTime, exhaustStorage = 4999, 5000
function onUse(cid, item, frompos, item2, topos)
if exhaustion.check(cid, exhaustStorage) then
local time = exhaustion.get(cid, exhaustStorage)
local hours, minutes, seconds = math.floor (time / 3600), math.floor ((time - ((math.floor (time / 3600)) * 3600))/ 60), time - ((math.floor (time/60)) * 60)
if time >= 3600 then
text = hours.." "..(hours == 1 and "hour" or "hours")..", "..minutes.." "..(minutes == 1 and "minute" or "minutes").." and "..seconds.." "..(seconds == 1 and "second" or "seconds")
elseif time >= 120 then
text = minutes.." "..(minutes == 1 and "minute" or "minutes").." and "..seconds.." "..(seconds == 1 and "second" or "seconds")
else
text = seconds.." "..(seconds == 1 and "second" or "seconds")
end
doSummonCreature("terror bird", {x=588, y=1423, z=3})
doSummonCreature("terror bird", {x=589, y=1425, z=3}) -- fix coordinaten
doSummonCreature("terror bird", {x=590, y=1424, z=3})
exhaustion.set(cid, exhaustStorage, exhaustTime)
end
return true
end
If you pull the lever there will spawn 3 terror birds in near you but I had a little trubble between the exhaust you can just pull the lever again after 2 seconds that makes it giving infinite exp. So I tried to add some exhaustion. The exhaustion part is from Limos. but I don't know if I putted it in correctly, probally not because It does nothing when I try to pull the lever the lever doesn't change (from left to right) the script doesn't gives any errors when I use it and when I start the server up. (Also no: Sorry, not possible. on use)
Anyone have an idea what I did wrong?
~~~~ Edit ~~~~
Actions.xml : <action uniqueid="13201" event="script" value="terror bird.lua"/>
Using: 0.3.6
Last edited by a moderator: