local places = { ["Temple!"] = {pos = {x = 93, y= 125,z= 7},effect = 23},
["depot!"] = {pos = {x = 93, y= 126,z= 7}, effect = 4}
}
function onThink(cid,interval)
for k, v in pairs(places) do
doSendAnimatedText(v.pos, k, math.random(1,255))
doSendMagicEffect(v.pos,v.effect)
end
return true
end
I cant get it to work i make a lua file in creaturescripts/scripts/animatedtext.lua
Code:local places = { ["Temple!"] = {pos = {x = 93, y= 125,z= 7},effect = 23}, ["depot!"] = {pos = {x = 93, y= 126,z= 7}, effect = 4} } function onThink(cid,interval) for k, v in pairs(places) do doSendAnimatedText(v.pos, k, math.random(1,255)) doSendMagicEffect(v.pos,v.effect) end return true end
and then i add
in creaturescripts/creaturescripts.xmlCode:<event type="anitext" name="Animatedtext" script="animatedtext.lua"/>
[./CODE] :)
delete the script :)
i dont understand, what should stand in " <event type="<-->"", and should i place the script (creaturescripts/scripts/animatedtext.lua) in the login.lua?
<event type="think" name="t" event="script" value="xxxxx.lua"/>
registerCreatureEvent(cid, "t")