- 0
Scripting Revscript Lever Boss Con Timer y Storage
Perguntado por
lepiigor
-
Quem Está Navegando 0 membros estão online
Nenhum usuário registrado visualizando esta página.
Perguntado por
lepiigor
Nenhum usuário registrado visualizando esta página.
Antes de fazer a sua pergunta, tenha certeza de ter lido as regras da seção e o guia abaixo:
https://forums.otserv.com.br/index.php?/forums/topic/168583-regras-da-seção/
https://forums.otserv.com.br/index.php?/forums/topic/165121-como-fazer-uma-pergunta-ou-o-grande-guia-do-usuário-com-dúvidas/
Obs: não delete esse formulário pré-definido, preencha-o corretamente para postar o seu tópico!
Descreva em algumas palavras a base utilizada. (Nome do servidor / Nome do cliente / Nome do website / etc.).
Base:
OTServBR-Global
Qual é a sua pergunta?
Olá Tentei adicionar Storage para adicionar por exemplo 4 horas entre cada alavanca, mas não funciona, estou tentando aprender usando as funções dos scripts de antes, mas não consigo, alguém poderia me dizer como eu pode adicionar tempo e armazenamento a ele, por favor?
function: daily nao funciona true / false .
Obrigado
Você tem o código disponível? Se tiver poste-o na caixa de código que está dentro do spoiler abaixo:
local setting = { -- At what level can do the quest? requiredLevel = 100, -- Can it be done daily? true = yes, false = no daily = false, -- Do not change from here down centerDemonRoomPosition = {x = 31272, y = 32360, z = 9}, demonsPositions = { {x = 31272, y = 32361, z = 9}, }, playersPositions = { {fromPos = {x = 31290, y = 32351, z = 6}, toPos = {x = 31272, y = 32364, z = 9}}, {fromPos = {x = 31290, y = 32350, z = 6}, toPos = {x = 31272, y = 32365, z = 9}}, {fromPos = {x = 31290, y = 32349, z = 6}, toPos = {x = 31272, y = 32366, z = 9}}, {fromPos = {x = 31290, y = 32348, z = 6}, toPos = {x = 31272, y = 32367, z = 9}}, } } local lever = Action() function lever.onUse(player, item, fromPosition, target, toPosition, isHotkey) if item.itemid == 1945 then -- Checks if there are still players inside the room, if so, return true if Position.hasPlayer(setting.centerDemonRoomPosition, 4, 4) then player:sendTextMessage(MESSAGE_STATUS_SMALL, "A team is already inside the quest room.") return true end -- Create monsters for i = 1, #setting.demonsPositions do Game.createMonster("Horror Sight", setting.demonsPositions[i]) end -- Get players from the tiles "playersPositions" and teleport to the demons room if all of the above requirements are met for i = 1, #setting.playersPositions do local creature = Tile(setting.playersPositions[i].fromPos):getTopCreature() if creature and creature:isPlayer() then creature:teleportTo(setting.playersPositions[i].toPos) creature:getPosition():sendMagicEffect(CONST_ME_TELEPORT) else return false end end item:transform(1946) elseif item.itemid == 1946 then -- If it has "daily = true" then it will execute this function if setting.daily then player:sendCancelMessage(RETURNVALUE_NOTPOSSIBLE) return true end -- Not be able to push the lever back if someone is still inside the monsters room if Position.hasPlayer(setting.centerDemonRoomPosition, 4, 4) then player:sendTextMessage(MESSAGE_STATUS_SMALL, "A team is already inside the quest room.") return true end -- Removes all monsters so that the next team can enter if Position.removeMonster(setting.centerDemonRoomPosition, 4, 4) then return true end item:transform(1945) end return true end lever:uid(42505) lever:register()
Você tem alguma imagem que possa auxiliar no problema? Se sim, anexe-a dentro do spoiler abaixo:
Compartilhar este post
Link para o post
Compartilhar em outros sites