Postado Agosto 27, 2017 7 anos tem um scripts de catacombs, porém ta pra tfs 1.1 e não funciona, mas não acusa nenhum erro quando eu executo então nem sei aonde ou como arrumar, sou bem leigo se não tiver um warning ou error no console fica dificil hrhura Create in data folder, file: catacombs.lua, put in: Code (Text): places = { [1] = {placeName = "Zenoya Graveyard", placeStorage = 6661, placepos = {x = 443, y = 527, z = 8}}, [2] = {placeName = "Azshara West Catacomb", placeStorage = 6662, placepos = {x = 246, y = 485, z = 8}}, [3] = {placeName = "Azshara North Catacomb", placeStorage = 6663, placepos = {x = 259, y = 401, z = 7}} } function getCatacombByName(name) for k, v in pairs(places) do if v.placeName:lower() == name:lower() then return k end end return false end function sendCatacombWindow(cid) CatacombWindow = ModalWindow(1900, "Catacombs Teleporter", "Select place:") if CatacombWindow:getId() == 1900 then CatacombWindow:addButton(1, "Teleport") CatacombWindow:setDefaultEnterButton(1) CatacombWindow:addButton(2, "Cancel") CatacombWindow:setDefaultEscapeButton(2) for i = 1, #places do if getCreatureStorage(cid, places.placeStorage) == 1 then CatacombWindow:addChoice(i, places.placeName) end end end CatacombWindow:sendToPlayer(cid) return true end Add in file global.lua on top, this: Spoiler Code (Text): dofile('data/catacombs.lua') Create in creaturescripts\scripts file catacomb_window.lua, put in: Spoiler Code (Text): function onModalWindow(cid, modalWindowId, buttonId, choiceId) local player = Player(cid) local pos = player:getPosition() if modalWindowId ~= 1900 then return false end if buttonId == 1 then -- Teleport if getCreatureStorage(cid, places[choiceId].placeStorage) == 1 then pos:sendMagicEffect(11) player:teleportTo(places[choiceId].placepos) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, 'You have succesfully teleported to ' .. places[choiceId].placeName .. '.') doSendMagicEffect(places[choiceId].placepos, 11) else sendCatacombWindow(cid) end elseif buttonId == 255 then doPlayerPopupFYI(cid,"Please use a button.") sendCatacombWindow(cid) end return true end In data\creaturescripts.xml add this: Spoiler Code (Text): <event type="modalwindow" name="catacombw" script="catacomb_window.lua"/> And declare it in data\creaturescripts\login.lua by paste this: Spoiler Code (Text): player:registerEvent("catacombw") In data\movements.xml add this: Spoiler Code (Text): <movevent event="StepIn" itemid="_ YOUR ITEMID of Teleport Rock on ground _" script="catacombs/teleporter.lua"/> <movevent event="StepIn" uniqueid="6661" script="catacombs/zenoyagraveyard.lua"/> <movevent event="StepIn" uniqueid="6662" script="catacombs/azsharawest.lua"/> <movevent event="StepIn" uniqueid="6663" script="catacombs/azsharanorth.lua"/> Create folder "catacombs" in data\movements\scriptsIn folder data\movements\scripts\catacombs\Create in sequence files: azsharanorth.lua, azsharawest.lua, teleporter.lua, zenoyagraveyard.luaFiles: Spoiler azsharanorth.lua Code (Text): local t = { pos = {x=259, y=400, z=7}, effect = CONST_ME_TUTORIALARROW } function onStepIn(creature, item, position, fromPosition) local player = creature:getPlayer() if not player then return true end if player:getStorageValue(6663) < 1 then player:setStorageValue(6663, 1) player:say('It looks like a teleporter..', TALKTYPE_MONSTER_SAY) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, 'You have unlocked Catacomb Teleporter: Azshara North Catacomb.') doSendMagicEffect(t.pos, t.effect, cid) end return true end azsharawest.lua Code (Text): local t = { pos = {x=246, y=486, z=8}, effect = CONST_ME_TUTORIALARROW } function onStepIn(creature, item, position, fromPosition) local player = creature:getPlayer() if not player then return true end if player:getStorageValue(6662) < 1 then player:setStorageValue(6662, 1) player:say('It looks like a teleporter..', TALKTYPE_MONSTER_SAY) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, 'You have unlocked Catacomb Teleporter: Azshara West Catacomb.') doSendMagicEffect(t.pos, t.effect, cid) end return true end teleporter.lua Code (Text): local choose = {} function onStepIn(cid, item, position, fromPosition) local player = Player(cid) local pos = player:getPosition() if not player then return true end if getPlayerStorageValue(cid, 6661) == 1 then return sendCatacombWindow(cid) end return true end zenoyagraveyard.lua Code (Text): local t = { pos = {x=443, y=526, z=8}, effect = CONST_ME_TUTORIALARROW } function onStepIn(creature, item, position, fromPosition) local player = creature:getPlayer() if not player then return true end if player:getStorageValue(6661) < 1 then player:setStorageValue(6661, 1) player:say('It looks like a teleporter..', TALKTYPE_MONSTER_SAY) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, 'You have unlocked Catacomb Teleporter: Zenoya Graveyard.') doSendMagicEffect(t.pos, t.effect, cid) end return true end Editado Agosto 27, 2017 7 anos por Jobs (veja o histórico de edições)
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.