[code=lua]local config = {
positions = {
{pos = { x =32345, y =32228, z= 4 }, text = "Yalahar", effects = {CONST_ME_MAGIC_BLUE}},
{pos = {x = 32350,y = 32230,z = 4 }, text = "Trainer"}
},
effects = {CONST_ME_POFF, CONST_ME_TELEPORT, CONST_ME_MAGIC_RED}
}
function onThink(interval)
local people = getPlayersOnline()
if #people == 0 then
return true
end
for _, info in pairs(config.positions) do
doPlayerSay(people[1], info.text, TALKTYPE_MONSTER_SAY, 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