Postado Setembro 1, 2018 6 anos Diga em poucas palavras a base utilizada (Nome do servidor ou nome do website). OTX 3.0 Qual erro está surgindo/O que você procura? Aqui no servidor, para sumonar o Horestis, precisa quebrar os 5 jarros da tumba. Então, gostaria de mudar isso e fazer com que ele seja sumonado e o portão se abra ao quebrar o primeiro jarro, assim como é no global. Porém, não quero que ninguém modifique o script pra mim. Se não for pedir demais, gostaria mesmo que alguém pudesse me explicar como faço pra deixar isso logo no primeiro jarro quebrado e também indicar no script onde modifico as principais informações do script, como por exemplo: A probabilidade do jarro se quebrar, o tempo para tentar de novo, etc. Você tem o código disponível? Se tiver publique-o aqui: Spoiler local BOSS = "Horestis" local BOSS_POS = {x = 32943, y = 32791, z = 12} local Poswall1 = {x = 32941, y = 32754, z = 12} local Poswall2 = {x = 32942, y = 32754, z = 12} local Poswall3 = {x = 32943, y = 32754, z = 12} local Poswall4 = {x = 32944, y = 32754, z = 12} local config = { randomText = {"Waaaaaah", "You are too afraid to destroy this object"}, } function CriarWalls() --creates walls doCreateItem(3514,1,Poswall1)-- posição da wall doCreateItem(3514,1,Poswall2)-- posição da wall doCreateItem(3514,1,Poswall3)-- posição da wall doCreateItem(3514,1,Poswall4)-- posição da wall end function onUse(cid, item, fromPosition, itemEx, toPosition) local exaustedSeconds = 30 local player = Player(cid) local chances = math.random(10) if item.actionid == 50006 then if(item.itemid == 13500) then if getPlayerStorageValue(cid, 324329) <= os.time() then if chances == 1 then doTransformItem(item.uid, 13495) setGlobalStorageValue(56530, 1) else player:say(config["randomText"][math.random(#config["randomText"])], TALKTYPE_ORANGE_1) player:getPosition():sendMagicEffect(CONST_ME_POFF) setPlayerStorageValue(cid, 324329, os.time()+exaustedSeconds*60) end else doPlayerSendCancel(cid, "You need wait 30 minutes to use again.") end end elseif item.actionid == 50007 then if(item.itemid == 13500) then if(getGlobalStorageValue(56530) == 1) then if getPlayerStorageValue(cid, 324330) <= os.time() then if chances == 1 then doTransformItem(item.uid, 13495) setGlobalStorageValue(56530, 2) else player:say(config["randomText"][math.random(#config["randomText"])], TALKTYPE_ORANGE_1) player:getPosition():sendMagicEffect(CONST_ME_POFF) setPlayerStorageValue(cid, 324330, os.time()+exaustedSeconds*60) end else doPlayerSendCancel(cid, "You need wait 30 minutes to use again.") end else doPlayerSendCancel(cid, "You need to break the first jar.") end end elseif item.actionid == 50008 then if(item.itemid == 13500) then if(getGlobalStorageValue(56530) == 2) then if getPlayerStorageValue(cid, 324331) <= os.time() then if chances == 1 then doTransformItem(item.uid, 13495) setGlobalStorageValue(56530, 3) else player:say(config["randomText"][math.random(#config["randomText"])], TALKTYPE_ORANGE_1) player:getPosition():sendMagicEffect(CONST_ME_POFF) setPlayerStorageValue(cid, 324331, os.time()+exaustedSeconds*60) end else doPlayerSendCancel(cid, "You need wait 30 minutes to use again.") end else doPlayerSendCancel(cid, "You need to break the second jar.") end end elseif item.actionid == 50009 then if(item.itemid == 13500) then if(getGlobalStorageValue(56530) == 3) then if getPlayerStorageValue(cid, 324332) <= os.time() then if chances == 1 then doTransformItem(item.uid, 13495) setGlobalStorageValue(56530, 4) else player:say(config["randomText"][math.random(#config["randomText"])], TALKTYPE_ORANGE_1) player:getPosition():sendMagicEffect(CONST_ME_POFF) setPlayerStorageValue(cid, 324332, os.time()+exaustedSeconds*60) end else doPlayerSendCancel(cid, "You need wait 30 minutes to use again.") end else doPlayerSendCancel(cid, "You need to break the third jar.") end end elseif item.actionid == 50010 then if(item.itemid == 13500) then if(getGlobalStorageValue(56530) == 4) then doTransformItem(item.uid, 13495) -- Remover Barreira e Sumonar Boss doRemoveItem(getTileItemById({x = 32941, y = 32754, z = 12}, 3514).uid, 1) doRemoveItem(getTileItemById({x = 32942, y = 32754, z = 12}, 3514).uid, 1) doRemoveItem(getTileItemById({x = 32943, y = 32754, z = 12}, 3514).uid, 1) doRemoveItem(getTileItemById({x = 32944, y = 32754, z = 12}, 3514).uid, 1) doCreatureSay(cid, "The horestis tomb was broken, the boss of the tomb will be reborn in 45 seconds. The barrier will be built from here 2 minutes.", TALKTYPE_ORANGE_1) Game.createMonster(BOSS, BOSS_POS) --addEvent(doSummonCreature, 45*1000, "Horestis", {x = 32942, y = 32765, z = 12}) addEvent(CriarWalls, 61000+6*20*1800) --addEvent(doCreateItem, 20 * 60 * 1000, 3514, {x = 32941, y = 32754, z = 12}) --addEvent(doCreateItem, 20 * 60 * 1000, 3514, {x = 32942, y = 32754, z = 12}) --addEvent(doCreateItem, 20 * 60 * 1000, 3514, {x = 32943, y = 32754, z = 12}) --addEvent(doCreateItem, 20 * 60 * 1000, 3514, {x = 32944, y = 32754, z = 12}) else doPlayerSendCancel(cid, "You need to break the fourth jar.") end end end return true end Você tem alguma imagem que possa auxiliar no problema? Se sim, coloque-a aqui. Otserver Global - Open Tibia angera.servegame.com
Postado Setembro 1, 2018 6 anos local config = { bossName = 'Horestis', bossPos = Position(32943, 32791, 12), posWall = { [1] = Position(32941, 32754, 12), [2] = Position(32942, 32754, 12), [3] = Position(32943, 32754, 12), [4] = Position(32944, 32757, 12) }, randomText = {'Waaaaaah', 'You are too afraid to destroy this object'}, exaustedSeconds = 30 } local jars = { [50006] = { storage = 324329, }, [50007] = { storage = 324330, needValue = 1, msgBreak = 'You need to break the first jar.' }, [50008] = { storage = 324331, needValue = 2, msgBreak = 'You need to break the second jar.' }, [50009] = { storage = 324332, needValue = 3, msgBreak = 'You need to break the third jar.' }, [50010] = { storage = 324333, needValue = 4, msgBreak = 'You need to break the fourth jar.' } } function onUse(player, item, fromPosition, target, toPosition, isHotkey) local jar = jars[item.actionid] if not jar then return false end if item.itemid ~= 13500 then return false end if item.actionid ~= 50006 then if Game.getStorageValue(56530) ~= jar.needValue then player:sendCancelMessage(jar.msgBreak) return true end end if player:hasExhaustion(jar.storage) then player:sendCancelMessage('You need wait 30 minutes to use again.') return true end local chance = math.random(10) if chance ~= 1 then player:say(config.randomText[math.random(#config.randomText)], TALKTYPE_ORANGE_1) player:getPosition():sendMagicEffect(CONST_ME_POFF) player:setExhaustion(jar.storage, config.exaustedSeconds * 60) return true end item:transform(13495) Game.setStorageGlobal(56530, jar.globalValue) Game.setStorageGlobal(56530, math.max(0, Game.getStorageValue(56530)) + 1) if item.actionid == 50006 then for x = 32941, 32944 do local wall = Tile(Position(x, 32754, 12)):getItemById(3514) if wall then wall:remove() end end player:say('The horestis tomb was broken, the boss of the tomb will be reborn in 45 seconds. The barrier will be built from here 2 minutes.', TALKTYPE_ORANGE_1) addEvent(Game.createMonster, 45 * 1000, config.bossName, config.bossPos) end if item.actionid == 50010 then addEvent(function(itemId) for x = 32941, 32944 do Game.createItem(itemId, 1, Position(x, 32754, 12)) end end, 24 * 60 * 60 * 1000, 3514) end return true end Testa aí, depois me fala se há algum bug haha
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.