Subwat 405 Postado Dezembro 13, 2010 Share Postado Dezembro 13, 2010 •••Bom Pessoal Já postei a versão anterior a alguns meses desse script que eu criei.. o vodkart deu uma modificada no script (melhorou o script),e depois trabalhei um pouco no script que ele melhorou e aqui está o resultado "Fight System 0.0.2". •••Vá em talkactions/Scripts/ crie Um arquivo Chamado FIGHTSYSTEM.LUA cole isso dentro: --Fight System by Subwat 0.0.2-- function onSay(cid, words, param) config = { level1= 10, -- level necessario do player 1 pra usar o fight system. level2= 10, -- level necessario do player 2 pra usar o fight system. pid=getPlayerGUID(cid), -- não mecha premium = "yes", -- se precisa ser premium account ("yes" or "no") redskull="yes", -- players com red skull podem usar o fight system? ("yes" or "no"). prot="no", -- players precisam estar em protection zone pra usar o fight system? ("yes" or "no"). bat="no", --players precisam estar sem fight pra huntar? ("yes" or "no"). Posplayer1 = {x=288, y=433, z=6}, -- para onde o jogador que deu fight sera levado Posplayer2 = {x=295, y=433, z=6}, -- para onde o jogador que aceitou fight sera levado RemoveItem = "yes", -- se ira remover o item ("yes" or "no") item = 2160, -- id do item storage = 9696 } if words == '!fight' or param == "/fight" then local player = getPlayerByName(param) local pid = getPlayerByNameWildcard(param) if(not pid or (isPlayerGhost(pid) and getPlayerGhostAccess(pid) > getPlayerGhostAccess(cid))) then doPlayerPopupFYI(cid, "Este Jogador Não está Online Ou Não existe.") return TRUE end if(config.redskull == "no") and (getCreatureSkullType(cid) == 4) then doPlayerPopupFYI(cid,"apenas player sem red skull podem Usar Fight System.") elseif (getPlayerLevel(cid) < config.level1) then doPlayerPopupFYI(cid,"você precisa ter level " .. config.level1 .. " pra usar o fight system.") elseif (getPlayerLevel(player) < config.level2 ) then doPlayerPopupFYI(cid,"o jogador não tem level " .. config.level2 .. " para vc dar fight system.") elseif(config.prot == "yes") and (getTilePzInfo(getCreaturePosition(cid)) == FALSE) then doPlayerPopupFYI(cid,"você precisa estar em protection zone pra usar o fight system.") elseif(config.bat == "yes") and (getCreatureCondition(cid, CONDITION_INFIGHT) == TRUE) then doPlayerPopupFYI(cid,"você precisa estar sem battler pra usar o fight system.") elseif(config.redskull == "no") and (getCreatureSkullType(player) == 4) then doPlayerPopupFYI(cid,"o outro player precisa estar sem red skull usar o fight system.") elseif(config.prot == "yes") and (getTilePzInfo(getCreaturePosition(player)) == FALSE) then doPlayerPopupFYI(cid,"o outro player precisa estar em protection zone pra usar o fight system.") elseif(config.bat == "yes") and (getCreatureCondition(player, CONDITION_INFIGHT) == TRUE) then doPlayerPopupFYI(cid,"o outro player precisa estar sem battler pra usar o fight system.") elseif(config.premium == "yes") and (not isPremium(cid)) then doPlayerPopupFYI(cid, "apenas players com premium account podem dar fight.") elseif(config.RemoveItem == "yes") and (doPlayerRemoveItem(cid, config.item, 1) == FALSE) then doPlayerPopupFYI(cid, "Desculpe,voce não tem 1 " .. getItemNameById(config.item) .. " para dar fight.") doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF) elseif isPlayer(player) then doPlayerPopupFYI(cid,"Voce acaba de Desafiar o Player chamado " .. getPlayerName(player) .." espere ele aceitar.") doPlayerPopupFYI(player,getCreatureName(cid) .. ' Acaba De Dar Fight em Você,o pvp entre os dois não resultará em skulls deseja aceitar? diga !aceitar se não diga !recusar.') setPlayerStorageValue(player, config.storage, 1) doTeleportThing(cid,config.Posplayer1) doCreatureSetSkullType(cid, 2) end return TRUE end if words == '!aceitar' or param == "!accept" then if getPlayerStorageValue(cid,config.storage) >= 1 then doPlayerPopupFYI(cid, "o jogador aceito,começara o DESAFIO!.") setPlayerStorageValue(cid, config.storage, -1) doCreatureSetSkullType(cid, 2) doTeleportThing(cid,config.Posplayer2) doTeleportThing(cid,config.Posplayer1) else doPlayerPopupFYI(cid, "Desculpe,voce não foi envitado para a Luta.") end return TRUE end if words == '!recusar' or param == "!recuse" then if getPlayerStorageValue(cid,config.storage) >= 1 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "você recusou o a Luta.") setPlayerStorageValue(cid, config.storage, -1) end return TRUE end return TRUE end •••Cole está tag em talkactions.xml: <talkaction words="!fight;!aceitar;!recusar;/recuse;/fight" event="script" value="FIGHTSYSTEM.lua"/> •••COMO FUNCIONA? digite !fight Nome do jogador há desafiar. e o jogador desafiado receberá a proposta de luta e deverá digitar !aceitar para aceitar a luta ou !recusar para cancelar a luta. •••OBS: você deverá configurar as posições aonde os players seram teleportados para a luta ache está tag no inicio do script e modifique Posplayer1 = {x=288, y=433, z=6}, -- para onde o jogador que deu fight sera levado Posplayer2 = {x=295, y=433, z=6}, -- para onde o jogador que aceitou fight sera levado . créditos: Subwat Vodkart TESTEM E COMENTEM VLW ATT Link para o comentário https://xtibia.com/forum/topic/147228-fight-system-002/ Compartilhar em outros sites More sharing options...
fsg 230 Postado Dezembro 13, 2010 Share Postado Dezembro 13, 2010 Nossa SubWat, cada vez melhor! Muito legal o script, seria bem legal fazer um evento de luta. Ficaria bem legal, mas é difícil servidores fazer isto agora. Muito bom! Abraços. Link para o comentário https://xtibia.com/forum/topic/147228-fight-system-002/#findComment-974139 Compartilhar em outros sites More sharing options...
Huntre 1 Postado Abril 9, 2011 Share Postado Abril 9, 2011 como eu adpto isso para um server de pokemon??gostei mt do seu script ^^ quero bota para server de pokemon helps '' Link para o comentário https://xtibia.com/forum/topic/147228-fight-system-002/#findComment-1022746 Compartilhar em outros sites More sharing options...
Subwat 405 Postado Abril 9, 2011 Autor Share Postado Abril 9, 2011 bah nem sei como funciona um server de pokemon. =/ Link para o comentário https://xtibia.com/forum/topic/147228-fight-system-002/#findComment-1022972 Compartilhar em outros sites More sharing options...
Huntre 1 Postado Abril 14, 2011 Share Postado Abril 14, 2011 hmm tu nao consegue monta 1 script de duelo?tipow que funcione assim , clica no outro player apareçer duel dai tu clica la e dps tu escolhe quantos pokemons que usa (maximo 6) dai começa? se tiver me manda por PRIVATE vlww ai pelo script qw Link para o comentário https://xtibia.com/forum/topic/147228-fight-system-002/#findComment-1025153 Compartilhar em outros sites More sharing options...
coyotestark 25 Postado Abril 20, 2011 Share Postado Abril 20, 2011 nhaaaa no meu ot nao funfa. Link para o comentário https://xtibia.com/forum/topic/147228-fight-system-002/#findComment-1026590 Compartilhar em outros sites More sharing options...
Demonbholder 420 Postado Abril 20, 2011 Share Postado Abril 20, 2011 Olha cara, pelo que eu vi ai não deve funcionar o script, mas não testei nem nada, da uma olhada ai. Até mais. Link para o comentário https://xtibia.com/forum/topic/147228-fight-system-002/#findComment-1026654 Compartilhar em outros sites More sharing options...
leozinhoac 1 Postado Junho 14, 2011 Share Postado Junho 14, 2011 mano tem como vc fazer o vencedor voltar para o templo depois q acabar o duel? eu fiz 1 arena mais nao qro por teleport pro cara nao fugir ;D Link para o comentário https://xtibia.com/forum/topic/147228-fight-system-002/#findComment-1046360 Compartilhar em outros sites More sharing options...
amoxicilinaaaa 5 Postado Junho 14, 2011 Share Postado Junho 14, 2011 Pelo que eu vi o Script parace ser Bom ^^ Link para o comentário https://xtibia.com/forum/topic/147228-fight-system-002/#findComment-1046524 Compartilhar em outros sites More sharing options...
ninexin 2 Postado Junho 15, 2011 Share Postado Junho 15, 2011 muito bom cara vou testar aqui vlw Link para o comentário https://xtibia.com/forum/topic/147228-fight-system-002/#findComment-1046808 Compartilhar em outros sites More sharing options...
Stigal 585 Postado Junho 20, 2011 Share Postado Junho 20, 2011 #Pergunta É Funcional Em "8.54" e Em Servidores De "Pokemon Online!" Responder Mais Rapido Possivel! :XTibia_smile: Link para o comentário https://xtibia.com/forum/topic/147228-fight-system-002/#findComment-1049651 Compartilhar em outros sites More sharing options...
rino268 0 Postado Julho 6, 2011 Share Postado Julho 6, 2011 Esse fight system n é mt bom não.... testei aqui sabe q bug q eu descobri fale assim !fight SEUNOME !accept e veja o bug '' mas já vale a iniciativa dos caras de criar 1 script assim e também outra coisa q n gostei foi. vc pode ficar !fight >>TOP<< qts vezes vc quiser enchendo o saco do cara... então tem mt coisa a ser melhorada ainda mas fica a seu critério cara.. flw abrass. Link para o comentário https://xtibia.com/forum/topic/147228-fight-system-002/#findComment-1059152 Compartilhar em outros sites More sharing options...
CyberOT 0 Postado Julho 7, 2011 Share Postado Julho 7, 2011 (editado) MT BOM VLW +REP Editado Julho 7, 2011 por CyberOT Link para o comentário https://xtibia.com/forum/topic/147228-fight-system-002/#findComment-1059449 Compartilhar em outros sites More sharing options...
Tiagohells 17 Postado Julho 7, 2011 Share Postado Julho 7, 2011 Consegui adaptalo para um duel sistem de pokemon só falta os ultimos acabamentos.. Rep++ Link para o comentário https://xtibia.com/forum/topic/147228-fight-system-002/#findComment-1060223 Compartilhar em outros sites More sharing options...
gynho 0 Postado Julho 7, 2011 Share Postado Julho 7, 2011 Muito bom o script parabens!!! Link para o comentário https://xtibia.com/forum/topic/147228-fight-system-002/#findComment-1060261 Compartilhar em outros sites More sharing options...
Posts Recomendados