Hyagosrs
Member
- Joined
- Mar 10, 2018
- Messages
- 94
- Solutions
- 1
- Reaction score
- 12
How to set a specific storage "8091" in this script, and a cooldown of 3 hours for this storage:
Please heeeeeeeeeeeelp me <3
LUA:
if item:getActionId() == 5500 then -- Essence of Malice
if player:getPosition() == Position(33095, 31943, 15) and item:getId() == 9826 then
local teleport = 0
for i = 31943, 31947, 1 do
local newpos = Position(33095, i, 15)
local nplayer = Tile(newpos):getTopCreature()
if nplayer and nplayer:isPlayer() then
teleport = teleport + 1
end
end
local frompos = Position(33084, 31907, 15) -- Checagem
local topos = Position(33114, 31933, 15) -- Checagem
if(isPlayerInArea(frompos, topos)) then
player:sendCancelMessage('It looks like there is someone inside.')
return true
end
for _x= frompos.x, topos.x, 1 do
for _y= frompos.y, topos.y, 1 do
for _z= frompos.z, topos.z, 1 do
local tile = Tile(Position(_x, _y, _z))
if tile and tile:getTopCreature() and tile:getTopCreature():isMonster() then
tile:getTopCreature():remove()
end
end
end
end
for i = 31943, 31947, 1 do
local newpos = Position(33095, i, 15)
local nplayer = Tile(newpos):getTopCreature()
if nplayer and nplayer:isPlayer() then
nplayer:setStorageValue(Storage.CultsOfTibia.Humans.bossTimer, os.time() + 20 * 60 * 60 * 1 * 1000)
nplayer:teleportTo(Position(33098, 31921, 15),true)
convertTable[#convertTable + 1] = nplayer:getId()
player:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
end
end
kickerPlayerRoomAfferMin(convertTable, frompos, topos, Position(33091, 31963, 15), "You were kicked for exceeding the time limit within the boss room.", '', 60, true, ittable, blockmonsters)
Game.createMonster("Pillar of Summoning", Position(33093, 31919, 15))
Game.createMonster("Pillar of Death", Position(33098, 31915, 15))
Game.createMonster("Pillar of Protection", Position(33103, 31919, 15))
Game.createMonster("Pillar of Healing", Position(33101, 31925, 15))
Game.createMonster("Pillar of Draining", Position(33095, 31925, 15))
Game.createMonster("Dorokoll The Mystic STOP", Position(33095, 31924, 15)):registerEvent("pilaresHealth")
Game.createMonster("Eshtaba The Conjurer STOP", Position(33094, 31919, 15)):registerEvent("pilaresHealth")
Game.createMonster("Eliz The Unyielding STOP", Position(33102, 31919, 15)):registerEvent("pilaresHealth")
Game.createMonster("Mezlon The Defiler STOP", Position(33101, 31924, 15)):registerEvent("pilaresHealth")
Game.createMonster("Malkhar Deathbringer STOP", Position(33098, 31916, 15)):registerEvent("pilaresHealth")
end
end