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, config.effects[math.random(1, #config.effects)])
doSendAnimatedText(pos, text, math.random(1, 255))
end
return TRUE
end
@up
Mistake from Rudolftry this:
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, config.effects[math.random(1, #config.effects)]) doSendAnimatedText(pos, text, math.random(1, 255)) end return TRUE end
How i do multieffect? Like 2 effects at same time.