Postado Setembro 1, 2014 10 anos Oi pessoal queria um sistema !debug ele funciona assim, quando a pessoa ta bugada e quando o BATTLE DELA ESTA SEM SER ATACADA ela dando !debug volta para sua cidade inicial. Mais Porfavor fazem um que só tem como voltar para a cidade se ela nao estiver sendo atacada, Caso Ela esteja sendo atacada vai aparecer uma mensagem [Voce nao pode desbugar enquanto estiver sendo atacado(a)] E quando ela nao tiver sendo atacada e de !debug e voltar para sua city inicial vai aparecer uma mensagem "Voce foi desbugado(a)
Postado Setembro 1, 2014 10 anos Vai em talkaction.xml e criei a tag: <talkaction words="!debug" access="1" script="debug"/> Vai em talkaction > scripts e criei debug.lua: function onSay(cid, words, param) if getCreatureCondition(cid, CONDITION_INFIGHT) then doPlayerSendCancel(cid, 'Voce nao pode voltar para o templo se estiver com battle.') else pos = getTownTemplePosition(getPlayerTown(cid)) doSendMagicEffect(getPlayerPosition(cid),53) doPlayerSendCancel(cid,"Teleportado!") doTeleportThing(cid,pos) end Não testei, mas quase certo que funciona. Abraço.
Postado Setembro 1, 2014 10 anos Data, talkactions: talkactions.xml pesquise por players ( http://prntscr.com/4iqy7a ) e vá na ultima linha que tem coisa escrita [http://prntscr.com/4iqyzv(players)] e coloque <talkaction log="yes" words="/t" access="1" event="script" value="teleportmaster.lua"/> dps va na pasta scripts e adicione o arquivo teleportmaster.lua function onSay(cid, words, param, channel) local tid = cid if(param ~= '') then tid = getPlayerByNameWildcard(param) if(not tid or (isPlayerGhost(tid) and getPlayerGhostAccess(tid) > getPlayerGhostAccess(cid))) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player " .. param .. " not found.") return true end end local pos = getPlayerTown(tid) local tmp = getTownName(pos) if(not tmp) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Home town does not exists.") return true end pos = getTownTemplePosition(pos) if(not pos or isInArray({pos.x, pos.y}, 0)) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Wrong temple position for town " .. tmp .. ".") return true end pos = getClosestFreeTile(tid, pos) if(not pos or isInArray({pos.x, pos.y}, 0)) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Destination not reachable.") return true end tmp = getCreaturePosition(tid) if(doTeleportThing(tid, pos, true) and not isPlayerGhost(tid)) then doSendMagicEffect(tmp, CONST_ME_POFF) doSendMagicEffect(pos, CONST_ME_TELEPORT) end return true end Editado Setembro 1, 2014 10 anos por oiuhygwueuho (veja o histórico de edições) Gente, não dou suporte via mp, caso queira ajuda crie um tópico no fórum!!! Ajudei? Clicar em gostar não vai te matar
Postado Setembro 2, 2014 10 anos Autor Vai em talkaction.xml e criei a tag: <talkaction words="!debug" access="1" script="debug"/> Vai em talkaction > scripts e criei debug.lua: function onSay(cid, words, param) if getCreatureCondition(cid, CONDITION_INFIGHT) then doPlayerSendCancel(cid, 'Voce nao pode voltar para o templo se estiver com battle.') else pos = getTownTemplePosition(getPlayerTown(cid)) doSendMagicEffect(getPlayerPosition(cid),53) doPlayerSendCancel(cid,"Teleportado!") doTeleportThing(cid,pos) end Não testei, mas quase certo que funciona. Abraço. Man o seu não funfo.. [02/09/2014 20:36:07] [Error - LuaScriptInterface::loadFile] data/talkactions/scripts/debug.lua:10: 'end' expected (to close 'function' at line 1) near '<eof>' [02/09/2014 20:36:07] [Warning - Event::loadScript] Cannot load script (data/talkactions/scripts/debug.lua) [02/09/2014 20:36:07] data/talkactions/scripts/debug.lua:10: 'end' expected (to close 'function' at line 1) near '<eof>' Data, talkactions: talkactions.xml pesquise por players ( http://prntscr.com/4iqy7a ) e vá na ultima linha que tem coisa escrita [http://prntscr.com/4iqyzv(players)] e coloque <talkaction log="yes" words="/t" access="1" event="script" value="teleportmaster.lua"/> dps va na pasta scripts e adicione o arquivo teleportmaster.lua function onSay(cid, words, param, channel) local tid = cid if(param ~= '') then tid = getPlayerByNameWildcard(param) if(not tid or (isPlayerGhost(tid) and getPlayerGhostAccess(tid) > getPlayerGhostAccess(cid))) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player " .. param .. " not found.") return true end end local pos = getPlayerTown(tid) local tmp = getTownName(pos) if(not tmp) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Home town does not exists.") return true end pos = getTownTemplePosition(pos) if(not pos or isInArray({pos.x, pos.y}, 0)) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Wrong temple position for town " .. tmp .. ".") return true end pos = getClosestFreeTile(tid, pos) if(not pos or isInArray({pos.x, pos.y}, 0)) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Destination not reachable.") return true end tmp = getCreaturePosition(tid) if(doTeleportThing(tid, pos, true) and not isPlayerGhost(tid)) then doSendMagicEffect(tmp, CONST_ME_POFF) doSendMagicEffect(pos, CONST_ME_TELEPORT) end return true end Data, talkactions: talkactions.xml pesquise por players ( http://prntscr.com/4iqy7a ) e vá na ultima linha que tem coisa escrita [http://prntscr.com/4iqyzv(players)] e coloque <talkaction log="yes" words="/t" access="1" event="script" value="teleportmaster.lua"/> dps va na pasta scripts e adicione o arquivo teleportmaster.lua function onSay(cid, words, param, channel) local tid = cid if(param ~= '') then tid = getPlayerByNameWildcard(param) if(not tid or (isPlayerGhost(tid) and getPlayerGhostAccess(tid) > getPlayerGhostAccess(cid))) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player " .. param .. " not found.") return true end end local pos = getPlayerTown(tid) local tmp = getTownName(pos) if(not tmp) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Home town does not exists.") return true end pos = getTownTemplePosition(pos) if(not pos or isInArray({pos.x, pos.y}, 0)) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Wrong temple position for town " .. tmp .. ".") return true end pos = getClosestFreeTile(tid, pos) if(not pos or isInArray({pos.x, pos.y}, 0)) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Destination not reachable.") return true end tmp = getCreaturePosition(tid) if(doTeleportThing(tid, pos, true) and not isPlayerGhost(tid)) then doSendMagicEffect(tmp, CONST_ME_POFF) doSendMagicEffect(pos, CONST_ME_TELEPORT) end return true end Lek o seu funfo mais ele ta desbugando até mesmo sendo atacado e não quero assim.. se o player tiver com battle [alguem atacando ele] ele não vai poder desbugar só quando ele tiver sem o battle ativo
Postado Setembro 2, 2014 10 anos Solução function onSay(cid, words, param) if getCreatureCondition(cid, CONDITION_INFIGHT) then doPlayerSendCancel(cid, 'Voce nao pode voltar para o templo se estiver com battle.') else pos = getTownTemplePosition(getPlayerTown(cid)) doSendMagicEffect(getPlayerPosition(cid),53) doPlayerSendCancel(cid,"Teleportado!") doTeleportThing(cid,pos) end end Ajudei? De nada \o/ Att Rusherzin
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.