local config = {
fromPosition = {x = 995, y = 1004, z = 7}, -- top left cornor of the ground
toPosition = {x = 1006, y = 1008, z = 7}, -- bottom right cornor of the ground
}
local fromp, top = config.fromPosition, config.toPosition
function onThink(interval, lastExecution, thinkInterval)
for x = fromp.x, top.x do
for y = fromp.y, top.y do
for z = fromp.z, top.z do
areapos = {x = x, y = y, z = z, stackpos = 253}
getPlayers = getThingfromPos(areapos)
for _, name in ipairs(getOnlinePlayers()) do
local cid = getPlayerByName(name)
if isPlayer(getPlayers.uid) then
if(getPlayerVocation(cid) == 2) then --- Number of vocation
doSendMagicEffect(getPlayerPosition(cid), 63)
doSendMagicEffect(getPlayerPosition(cid), 61)
doSendMagicEffect(getPlayerPosition(cid), 2)
doSendAnimatedText(getPlayerPosition(cid), "Ninja!", TEXTCOLOR_RED)
doChangeSpeed(cid, 1000) --- Speed
end
end
end
end
end
end
return true
end