local function onLoadPVPRoom(cid) local player = Player(cid) if player then local A = Game.getStorageValue(_PVP_ROOM[01].CONTAGEM_PLAYER) or 0 local B = Game.getStorageValue(_PVP_ROOM[02].CONTAGEM_PLAYER) or 0 local C = Game.getStorageValue(_PVP_ROOM[03].CONTAGEM_PLAYER) or 0 local D = Game.getStorageValue(_PVP_ROOM[04].CONTAGEM_PLAYER) or 0 local E = Game.getStorageValue(_PVP_ROOM[05].CONTAGEM_PLAYER) or 0 local F = Game.getStorageValue(_PVP_ROOM[06].CONTAGEM_PLAYER) or 0 local players = Game.getPlayers() for _, targetPlayer in ipairs(players) do targetPlayer:sendCancelMessage("@LoadPVP 01 " ..A.. " " ..B.. " " ..C.. " " ..D.. " " ..E.. " " ..F) end end return false end function onStepIn(creature, item, position, fromPosition) if creature:isPlayer() then local PVP_ROOM = creature:getStorageValue(_PVP_ROOM[00].PVP_SALA_ID) local COUNT_PLAYER = Game.getStorageValue(_PVP_ROOM[PVP_ROOM].CONTAGEM_PLAYER) or 00 if COUNT_PLAYER < 00 then COUNT_PLAYER = 00 end creature:setTown(Town(01)) creature:sendCancelMessage("@NoTeleport 00") creature:sendCancelMessage("@CronOff") Game.setStorageValue(_PVP_ROOM[PVP_ROOM].CONTAGEM_PLAYER, (COUNT_PLAYER - 01)) creature:setStorageValue(_PVP_ROOM[00].PVP_SALA_ID, nil) creature:setStorageValue(_PVP_ROOM[00].TIME_ID, nil) creature:teleportTo({x=3999, y=991, z=7}) creature:getPosition():sendMagicEffect(11) onLoadPVPRoom(creature) end return true end