NPC
<?xml version="1.0" encoding="UTF-8"?>
<npc name="Nick" script="tournament1.lua" walkinterval="999000" floorchange="0">
<health now="150" max="150"/>
<look type="150" head="20" body="100" legs="50" feet="99" corpse="2212"/>
<parameters>
<parameter key="message_greet" value="Ola |PLAYERNAME|. Sou o NIKE, Encarregado pelo Torneio diario caso queira entrar diga: {torneio}."/>
</parameters>
</npc>
lib torneio
torneio = {
awardTournament = 2160,
awardAmount = 1000,
playerTemple = {x = 1044, y = 883, z = 7},
tournamentFight = {x = 894, y = 538, z = 15},
area = {fromx = 1240, fromy = 1782, fromz = 7, tox = 922, toy = 572, toz= 15},
waitPlace = {x = 1219, y = 1805, z = 7},
waitArea = {fromx = 957, fromy = 536, fromz = 15, tox = 983, toy = 552, toz= 15},
startHour1 = "07:50:00",
endHour1 = "08:00:00",
startHour2 = "11:50:00",
endHour2 = "12:00:00",
startHour3 = "17:50:00",
endHour3 = "18:00:00",
startHour4 = "22:50:00",
endHour4 = "23:00:00",
price = 500,
revivePoke = 12344,
}
function getPlayersInArea(area)
local players = {}
for x = area.fromx,area.tox do
for y = area.fromy,area.toy do
for z = area.fromz,area.toz do
local m = getTopCreature({x=x, y=y, z=z}).uid
if m ~= 1 and isPlayer(m) then
table.insert(players, m)
end
end
end
end
return players
end