local timespeed = 2000 -- 2000 = 2 seconds
local color = TEXTCOLOR_LIGHTGREEN
function loop(valores)
doSendAnimatedText({x=496, y=506, z=7},"Annhilator 2",color)
addEvent(loop, timespeed, valore) --
end
function onSay(cid, words, param)
valore = {cid = cid, topos = topos}
addEvent(loop, velocidade, valore)
end
<talkaction words="!anim" script="anim.lua" />
--Script by Pitufo!
local pos = {
{x = 98, y = 132, z = 7}
}
function onThink(cid, interval, lastExecution)
doSendMagicEffect(pos[1], 12)
doSendAnimatedText(pos[1], "PoI", 18)
return TRUE
end
<globalevent name="EffectTile" interval="3" script="effectile.lua"/>
Better make a globalevent script
data/globalevents/scripts/ and create a file and name it "effectile.lua" and insert this into the file:
PHP:--Script by Pitufo! local pos = { {x = 98, y = 132, z = 7} } function onThink(cid, interval, lastExecution) doSendMagicEffect(pos[1], 12) doSendAnimatedText(pos[1], "PoI", 18) return TRUE end
In data/globalevents/ open "globalevents.xml" and insert this:
PHP:<globalevent name="EffectTile" interval="3" script="effectile.lua"/>
To change the delay is in globalevents and change the "interval"
Any questions post here![]()
local config = {
positions = {
["PoI"] = { x = 98, y = 132, z = 7 },
["War"] = { x = 97, y = 141, z = 7 }
},
effects = {
CONST_ME_MORTAREA,
CONST_ME_HITBYFIRE,
CONST_ME_GIFTWRAPS,
CONST_ME_STUN
}
}
function onThink(cid, interval, lastExecution)
for text, pos in pairs(config.positions) do
doSendMagicEffect(pos, math.random(1, #config.effects))
doSendAnimatedText(pos, text, math.random(1, 255))
end
return TRUE
end
Just some more random stuff...
PHP:local config = { positions = { ["PoI"] = { x = 98, y = 132, z = 7 }, ["War"] = { x = 97, y = 141, z = 7 } }, effects = { CONST_ME_MORTAREA, CONST_ME_HITBYFIRE, CONST_ME_GIFTWRAPS, CONST_ME_STUN } } function onThink(cid, interval, lastExecution) for text, pos in pairs(config.positions) do doSendMagicEffect(pos, math.random(1, #config.effects)) doSendAnimatedText(pos, text, math.random(1, 255)) end return TRUE end
local config = {
positions = {
["PoI"] = { x = 98, y = 132, z = 7 },
["War"] = { x = 97, y = 141, z = 7 }
}
}
function onThink(cid, interval, lastExecution)
for text, pos in pairs(config.positions) do
doSendAnimatedText(pos, text, math.random(1, 255))
end
return TRUE
end
Just some more random stuff...
PHP:local config = { positions = { ["PoI"] = { x = 98, y = 132, z = 7 }, ["War"] = { x = 97, y = 141, z = 7 } }, effects = { CONST_ME_MORTAREA, CONST_ME_HITBYFIRE, CONST_ME_GIFTWRAPS, CONST_ME_STUN } } function onThink(cid, interval, lastExecution) for text, pos in pairs(config.positions) do doSendMagicEffect(pos, math.random(1, #config.effects)) doSendAnimatedText(pos, text, math.random(1, 255)) end return TRUE end
i think it doesn't work with 0.2 because "onThink" function only for TFS 0.3+
true?
local timespeed = 2000 -- 2000 = 2 seconds
local color = TEXTCOLOR_LIGHTGREEN
function loop(valores)
doSendAnimatedText({x=496, y=506, z=7},"Annhilator 2",color)
addEvent(loop, timespeed, valore) --
end
function onSay(cid, words, param)
valore = {cid = cid, topos = topos}
addEvent(loop, velocidade, valore)
end
TyRudolf Czarodziej's script got pretty lame effect ;( I want nice effects, how to make it?