Lanibox
Brutal1ty.com
- Joined
- Sep 21, 2010
- Messages
- 179
- Reaction score
- 4
Hey, im trying to make stone which removes every 60 seconds for 5 seconds.
Im getting this
Been long time since last time scripted anything
Im getting this
Code:
<luaAddEvent> Callback parameter should be a function.
Code:
local stoneId = 1304
local stonePos = {x = 1004, y = 990, z = 7, stackpos = 1}
local textPos = {x = 1004, y = 990, z = 7}
local seconds = 60
local seconds2 = 5
function contDown()
doSendAnimatedText(textpos, seconds, TEXTCOLOR_RED)
if seconds == 0 then
doRemoveItem(getThingfromPos(stonePos), 1)
addEvent(countUp, 1000)
else
seconds = seconds - 1
addEvent(countDown, 1000)
end
end
function countUp()
doSendAnimatedText(textpos, seconds2, TEXTCOLOR_GREEN)
if seconds2 == 0 then
doCreateItem(stoneID, 1, stonePos)
else
seconds2 = seconds2 - 1
addEvent(countUp, 1000)
end
end
function onStartup()
addEvent(countDown, 1000)
end
Been long time since last time scripted anything
Last edited: