local config = {
positions = {
{pos = {x = 1000, y = 1000, z = 7}, text = "Dragons", effects = {CONST_ME_MAGIC_BLUE}},
{pos = {x = 101, y = 120, z = 7}, text = "Trainer"}
},
effects = {CONST_ME_POFF, CONST_ME_TELEPORT, CONST_ME_MAGIC_RED}
}
function onThink(interval)
LOCAL PEOPLE = getOnlinePlayers()
if #people == 0 then
return true
end
for _, info in pairs(config.positions) do
doCreatureSay(getPlayerByName(people[1]), info.text, TALKTYPE_ORANGE_1, false, 0, info.pos)
if info.effects and #info.effects > 0 then
doSendMagicEffect(info.pos, info.effects[math.random(#info.effects)])
elseif config.effects and #config.effects > 0 then
doSendMagicEffect(info.pos, config.effects[math.random(#config.effects)])
end
end
return true
end