Postado Setembro 12, 2019 5 anos -- Town Portal Scroll System based in Dota 2 -- by Nazo (tibiaking.com) local config = { portalId = 11796, -- change to portal item id portalTime = 30, -- portal duration in seconds scrollId = 14324, -- change to scroll item id effect = CONST_ME_POFF -- effect id or CONST that appears at the end of time } local function removePortal(portal) if(portal) portal:remove() portal:getPosition():sendMagicEffect(config.effect) else print("The portal has been undone.") end end function onUse(player, item, fromPosition, target, toPosition, isHotkey) if(item:getId()==config.scrollId) then portal = Game.createItem(config.portalId, 1, player:getPosition()) if(player:getParty()) then portal:setCustomAttribute("party", player:getParty()) else portal:setCustomAttribute("owner", player:getName()) end addEvent(removePortal, config.portalTime * 1000, portal) item:remove() else if(not player:isPzLocked() and not player:getCondition(CONDITION_INFIGHT, CONDITIONID_DEFAULT)) then if(item:getCustomAttribute("party")) then if(player:getParty()==item:getCustomAttribute("party")) then player:teleportTo(player:getTown():getTemplePosition(), true) else player:popupFYI("You do not participate in the portal creator's party.") end elseif(item:getCustomAttribute("name") and player:getName() == item:getCustomAttribute("name")) then player:teleportTo(player:getTown():getTemplePosition(), true) else player:popupFYI("You isn't the owner.") end else player:popupFYI("You are PZ locked or in battle.") end end return true end <action itemid="11796" script="other/townportalsystem.lua"/> <action itemid="14324" script="other/townportalsystem.lua"/> Editado Setembro 12, 2019 5 anos por Trayron1 (veja o histórico de edições)
Postado Setembro 12, 2019 5 anos -- Town Portal Scroll System based in Dota 2 -- by Nazo (tibiaking.com) local config = { portalId = 11796, -- change to portal item id portalTime = 30, -- portal duration in seconds scrollId = 14324, -- change to scroll item id effect = CONST_ME_POFF -- effect id or CONST that appears at the end of time } local function removePortal(portal) if portal then portal:remove() portal:getPosition():sendMagicEffect(config.effect) else print("The portal has been undone.") end end function onUse(player, item, fromPosition, target, toPosition, isHotkey) if item:getId() == config.scrollId then local portal = Game.createItem(config.portalId, 1, player:getPosition()) if player:getParty() then portal:setCustomAttribute("party", player:getParty()) else portal:setCustomAttribute("owner", player:getName()) end addEvent(removePortal, config.portalTime * 1000, portal) item:remove() else if (not player:isPzLocked() and not player:getCondition(CONDITION_INFIGHT, CONDITIONID_DEFAULT)) then if item:getCustomAttribute("party") then if player:getParty() == item:getCustomAttribute("party") then player:teleportTo(player:getTown():getTemplePosition(), true) else player:popupFYI("You do not participate in the portal creator's party.") end elseif item:getCustomAttribute("name") and player:getName() == item:getCustomAttribute("name")) then player:teleportTo(player:getTown():getTemplePosition(), true) else player:popupFYI("You isn't the owner.") end else player:popupFYI("You are PZ locked or in battle.") end end return true end STYLLER OT 2022
Postado Setembro 12, 2019 5 anos 2 horas atrás, luanluciano93 disse: -- Town Portal Scroll System based in Dota 2 -- by Nazo (tibiaking.com) local config = { portalId = 11796, -- change to portal item id portalTime = 30, -- portal duration in seconds scrollId = 14324, -- change to scroll item id effect = CONST_ME_POFF -- effect id or CONST that appears at the end of time } local function removePortal(portal) if portal then portal:remove() portal:getPosition():sendMagicEffect(config.effect) else print("The portal has been undone.") end end function onUse(player, item, fromPosition, target, toPosition, isHotkey) if item:getId() == config.scrollId then local portal = Game.createItem(config.portalId, 1, player:getPosition()) if player:getParty() then portal:setCustomAttribute("party", player:getParty()) else portal:setCustomAttribute("owner", player:getName()) end addEvent(removePortal, config.portalTime * 1000, portal) item:remove() else if (not player:isPzLocked() and not player:getCondition(CONDITION_INFIGHT, CONDITIONID_DEFAULT)) then if item:getCustomAttribute("party") then if player:getParty() == item:getCustomAttribute("party") then player:teleportTo(player:getTown():getTemplePosition(), true) else player:popupFYI("You do not participate in the portal creator's party.") end elseif item:getCustomAttribute("name") and player:getName() == item:getCustomAttribute("name")) then player:teleportTo(player:getTown():getTemplePosition(), true) else player:popupFYI("You isn't the owner.") end else player:popupFYI("You are PZ locked or in battle.") end end return true end Copiei e colei a sua, mas no console deu este erro agora:
Postado Setembro 13, 2019 5 anos -- Town Portal Scroll System based in Dota 2 -- by Nazo (tibiaking.com) local config = { portalId = 11796, -- change to portal item id portalTime = 30, -- portal duration in seconds scrollId = 14324, -- change to scroll item id effect = CONST_ME_POFF -- effect id or CONST that appears at the end of time } local function removePortal(portal) if portal then portal:remove() portal:getPosition():sendMagicEffect(config.effect) else print("The portal has been undone.") end end function onUse(player, item, fromPosition, target, toPosition, isHotkey) if item:getId() == config.scrollId then local portal = Game.createItem(config.portalId, 1, player:getPosition()) if player:getParty() then portal:setCustomAttribute("party", player:getParty()) else portal:setCustomAttribute("owner", player:getName()) end addEvent(removePortal, config.portalTime * 1000, portal) item:remove() else if not player:isPzLocked() and not player:getCondition(CONDITION_INFIGHT, CONDITIONID_DEFAULT) then if item:getCustomAttribute("party") then if player:getParty() == item:getCustomAttribute("party") then player:teleportTo(player:getTown():getTemplePosition(), true) else player:popupFYI("You do not participate in the portal creator's party.") end elseif item:getCustomAttribute("name") and player:getName() == item:getCustomAttribute("name") then player:teleportTo(player:getTown():getTemplePosition(), true) else player:popupFYI("You isn't the owner.") end else player:popupFYI("You are PZ locked or in battle.") end end return true end STYLLER OT 2022
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.