colex 8 Postado Outubro 3, 2007 Share Postado Outubro 3, 2007 (editado) O que é o "Teleport Panel"? Teleport Panel é um sistema de teleporte que interage com um sistema de base de dados (elaborado tambem por mim). Com este sistema os Gamemasters (jogadores com o acesso permitido) podem adicionar, remover e utilizar pontos de teleporte. A sintaxe do comando é: teleport "[command]. Mais a frente você poderá saber como funciona melhor através de umas screenshots! Quais são os comandos existentes? Os comandos que este sistema oferece são: teleport - oferece uma lista de todos os comandos teleport "list - lista todos os pontos de teleporte existentes teleport "add [nome] - adiciona um ponto de teleporte com um determinado nome teleport "remove [nome] - remove um determinado ponto de teleporte teleport "to [nome] - teleport o char. para um certo ponto de teleporte (A maioria dos comandos estarão a seguir ilustrados) Imagens do Sistema: Lista dos comandos disponíveis: (comando teleport) Lista dos Pontos de Teleporte adicionados: (comando teleport "list) Mensagem de sucesso seguida de uma adição: (comando teleport "add) Mensagem de sucesso depois de remover um Ponto de Teleporte: (comando teleport "remove) Como instalar este sistema? 1º Passo: Você deverá instalar o meu sistema de base de dados na lib das talkactions, ou seja, no arquivo data\talkactions\lib\talkactions.lua...Você pode encontrar o sistema no seguinte link: http://www.xtibia.com/forum/index.php?showtopic=64485 2º Passo: No directório data\talkactions\scripts crie um arquivo com o nome teleport.lua e dentro dele guarde o seguinte script: -----Teleport Panel by Colex------- local ACCESS_MIN = 3 --Mude o "3" para o access minimo desejado local DATABASE = "teleports.ini" local HELP_TEXT = "Teleport Commands:\nteleport \"list\nteleport \"add [name]\nteleport \"remove [name]\nteleport \"to [name]\n\nSystem by Colex" function FileExists(filename) local file = io.open(filename, "r") if (file == nil) then return false end io.close(file) return true end function splitWords(str) local t = {} local function helper(word) table.insert(t, word) return "" end if not str:gsub("%w+", helper):find"%S" then return t end end function onSay(cid, words, param) if (getPlayerAccess(cid) >= ACCESS_MIN) then if (FileExists(DATABASE) == false) then createDatabase(DATABASE,{},{}) end words = splitWords(param) i = 2 place = "" while words ~= nil do place = place..words.." " i = i + 1 end if (i ~= 2) then place = string.sub(place, 1, string.len(place)-1) end if (words[1] == "list") then values = {} values = getAllFieldsValues(DATABASE) found = 0 text = "Teleport Point's List:\n" for i in ipairs(values) do text = text.."- "..values.field.."\n" found = 1 end if (found == 0) then text = "--Empty List--\n\nUse:\nteleport \"add [name]\nto add a new teleport point!" end doShowTextDialog(cid, 100, text) elseif ((words[1] == "add") and (words[2] ~= nil)) then pos = getPlayerPosition(cid) result = addField(DATABASE,place,pos.x.." "..pos.y.." "..pos.z) if (result == false) then doShowTextDialog(cid, 100, "Couldn't add the new teleport point...\nPlace's name has already been taken!") else doShowTextDialog(cid, 100, "Teleport Point ("..place..") successfully added!\nX:"..pos.x.." Y:"..pos.y.." Z:"..pos.z) end elseif ((words[1] == "remove") and (words[2] ~= nil)) then result = removeField(DATABASE,place) if (result == false) then doShowTextDialog(cid, 100, "Couldn't remove the teleport point...\nPlace's name does not exist!") else doShowTextDialog(cid, 100, "Teleport Point ("..place..") was successfully removed!") end elseif ((words[1] == "to") and (words[2] ~= nil)) then result = getFieldValue(DATABASE,place,false) if (result == false) then doShowTextDialog(cid, 100, "The place's name typed does not exist!") else pos = splitWords(result) position = {x=tonumber(pos[1]), y=tonumber(pos[2]), z=tonumber(pos[3])} doTeleportThing(cid,position) doPlayerSendTextMessage(cid, 22, "You were teleported to "..place.."!") end else doShowTextDialog(cid, 100, HELP_TEXT) end end return 0 end 3º Passo: Agora, por último, adicione no arquivo data\talkactions\talkactions.xml a seguinte linha: <talkaction words="teleport" script="teleport.lua" /> Se você fez tudo certo, o sistema deverá estar funcionado... Se você achar algum bug, ou tiver alguma dúvida, poste aqui. Colex Editado Outubro 4, 2007 por colex Link para o comentário https://xtibia.com/forum/topic/64654-teleport-panel/ Compartilhar em outros sites More sharing options...
Nottinghster 16 Postado Outubro 3, 2007 Share Postado Outubro 3, 2007 Colex, como sempre fazendo ótimas Actions, sou um admirador do seu trabalho... Boa sorte lá no Empire Server Abração!!! Link para o comentário https://xtibia.com/forum/topic/64654-teleport-panel/#findComment-396218 Compartilhar em outros sites More sharing options...
Sound Of Kill 0 Postado Outubro 4, 2007 Share Postado Outubro 4, 2007 Voce é ninja ne ! MUiTO BOM!!!!!!! Link para o comentário https://xtibia.com/forum/topic/64654-teleport-panel/#findComment-396249 Compartilhar em outros sites More sharing options...
vita1 0 Postado Janeiro 2, 2008 Share Postado Janeiro 2, 2008 :confused: n deu certo tipo eu flo o negocio lah[teleport ou os otros comandos] e ele fika mudo ajuda aew Link para o comentário https://xtibia.com/forum/topic/64654-teleport-panel/#findComment-454076 Compartilhar em outros sites More sharing options...
tibiaa4e 86 Postado Janeiro 2, 2008 Share Postado Janeiro 2, 2008 Colex never die Sempre quando pensamos q ele sumiu Ele volta ahuhauuhahu Boa super action... Qdo arrumarem os bugs da 8.1 eu testo Link para o comentário https://xtibia.com/forum/topic/64654-teleport-panel/#findComment-454160 Compartilhar em outros sites More sharing options...
thi 2 Postado Janeiro 4, 2008 Share Postado Janeiro 4, 2008 Cara, se eu tirar o comando de Adiciona um ponto de teleport do code e fazer alguns npcs pelo mapa e o NPC adiciona os pontos de teleport funciona? Link para o comentário https://xtibia.com/forum/topic/64654-teleport-panel/#findComment-455307 Compartilhar em outros sites More sharing options...
h3online 1 Postado Janeiro 4, 2008 Share Postado Janeiro 4, 2008 pow mt complicada mais ta bem explicada Link para o comentário https://xtibia.com/forum/topic/64654-teleport-panel/#findComment-455357 Compartilhar em outros sites More sharing options...
Icepotter 0 Postado Janeiro 5, 2008 Share Postado Janeiro 5, 2008 Deu isso O_o Link para o comentário https://xtibia.com/forum/topic/64654-teleport-panel/#findComment-455769 Compartilhar em outros sites More sharing options...
Aquac 0 Postado Janeiro 5, 2008 Share Postado Janeiro 5, 2008 colez me add no msn plz tatianny_f_18@hotmail.com Link para o comentário https://xtibia.com/forum/topic/64654-teleport-panel/#findComment-455881 Compartilhar em outros sites More sharing options...
tttt 0 Postado Janeiro 11, 2008 Share Postado Janeiro 11, 2008 Deu isso O_o Ajuda ae Tbm deu isso aqui.. Help pls! Link para o comentário https://xtibia.com/forum/topic/64654-teleport-panel/#findComment-459582 Compartilhar em outros sites More sharing options...
Maxi'mus 0 Postado Janeiro 11, 2008 Share Postado Janeiro 11, 2008 Quando agente qué alguma coisa kem aparece COLEX nun era bem isso ke keria ( o seu é melhor ) mais ta PERFEITO MANOO adoreiii vlww Atenciosamente // Maxi'mus Wizzard Link para o comentário https://xtibia.com/forum/topic/64654-teleport-panel/#findComment-459786 Compartilhar em outros sites More sharing options...
ph_188 0 Postado Janeiro 16, 2008 Share Postado Janeiro 16, 2008 (editado) Colex você consertesa é ninja muito show a action... Testado e aprovado Editado Janeiro 16, 2008 por katsumotoxD Link para o comentário https://xtibia.com/forum/topic/64654-teleport-panel/#findComment-462546 Compartilhar em outros sites More sharing options...
ropic 0 Postado Janeiro 17, 2008 Share Postado Janeiro 17, 2008 eeei tem como faze um treko desse pra 7.6 n? :smile_positivo: Link para o comentário https://xtibia.com/forum/topic/64654-teleport-panel/#findComment-462699 Compartilhar em outros sites More sharing options...
gabrielbr 1 Postado Janeiro 17, 2008 Share Postado Janeiro 17, 2008 nota 10 adorei,sor que nao conseguir instalar Link para o comentário https://xtibia.com/forum/topic/64654-teleport-panel/#findComment-462905 Compartilhar em outros sites More sharing options...
DaNDaNrOxX 15 Postado Janeiro 26, 2008 Share Postado Janeiro 26, 2008 MANO TU É FOD.@ D+ PQ.P Q ACTION LOCA JA TA NU MEU SERVER CONSERTEZA!!! VLW! Link para o comentário https://xtibia.com/forum/topic/64654-teleport-panel/#findComment-468306 Compartilhar em outros sites More sharing options...
Posts Recomendados