Postado Março 19, 2017 8 anos Fala galera, Então eu tenho essa creaturescript que é de pvp "on e off" mas tem um pequeno bug, o player se estiver com mana shield, pode atacar e assim bugando a script e fazendo outros pegarem red, gostaria da ajuda de vocês mais uma vez, para adicionar uma linha que faça nao acertar os hits na mana tambem, Exemplo o ataque nao da nenhum hit na vida, porem se a pessoa estiver de mana shield ela hita e assim bugando as spells de area. Mostrar conteúdo oculto function onTarget(cid, target) if isPlayer(target) and isPlayer(cid) then if getPlayerStorageValue(cid, 91821) < 1 then doPlayerSendCancel(cid, "Você esta com o modo PvP desligado. Se quiser atacar outros jogadores, ative-o.") return false end end return true end function onStatsChange(cid, attacker, type, combat, value) if isPlayer(cid) and isPlayer(attacker) and type == STATSCHANGE_HEALTHLOSS then if getPlayerStorageValue(attacker, 91821) < 1 then doPlayerSendCancel(attacker, "Você esta com o modo PvP desligado. Se quiser atacar outros jogadores, ative-o.") return false end end return true end function onLogin(cid) registerCreatureEvent(cid, "PvPTarget") registerCreatureEvent(cid, "PvPStats") return true end
Postado Março 19, 2017 8 anos Autor Em 19/03/2017 em 17:08, luanluciano93 disse: Qual versão do TFS? Poste o script ... Ja postei o script, esta em spoiler, e é 8.60 tfs 0.40 function onTarget(cid, target) if isPlayer(target) and isPlayer(cid) then if getPlayerStorageValue(cid, 91821) < 1 then doPlayerSendCancel(cid, "Você esta com o modo PvP desligado. Se quiser atacar outros jogadores, ative-o.") return false end end return true end function onStatsChange(cid, attacker, type, combat, value) if isPlayer(cid) and isPlayer(attacker) and type == STATSCHANGE_HEALTHLOSS then if getPlayerStorageValue(attacker, 91821) < 1 then doPlayerSendCancel(attacker, "Você esta com o modo PvP desligado. Se quiser atacar outros jogadores, ative-o.") return false end end return true end function onLogin(cid) registerCreatureEvent(cid, "PvPTarget") registerCreatureEvent(cid, "PvPStats") return true end
Postado Março 19, 2017 8 anos Em 19/03/2017 em 16:17, gutalo disse: Fala galera, Então eu tenho essa creaturescript que é de pvp "on e off" mas tem um pequeno bug, o player se estiver com mana shield, pode atacar e assim bugando a script e fazendo outros pegarem red, gostaria da ajuda de vocês mais uma vez, para adicionar uma linha que faça nao acertar os hits na mana tambem, Exemplo o ataque nao da nenhum hit na vida, porem se a pessoa estiver de mana shield ela hita e assim bugando as spells de area. Mostrar conteúdo oculto Mostrar conteúdo oculto function onTarget(cid, target) if isPlayer(target) and isPlayer(cid) then if getPlayerStorageValue(cid, 91821) < 1 then doPlayerSendCancel(cid, "Você esta com o modo PvP desligado. Se quiser atacar outros jogadores, ative-o.") return false end end return true end function onStatsChange(cid, attacker, type, combat, value) if isPlayer(cid) and isPlayer(attacker) and type == STATSCHANGE_HEALTHLOSS then if getPlayerStorageValue(attacker, 91821) < 1 then doPlayerSendCancel(attacker, "Você esta com o modo PvP desligado. Se quiser atacar outros jogadores, ative-o.") return false end end return true end function onLogin(cid) registerCreatureEvent(cid, "PvPTarget") registerCreatureEvent(cid, "PvPStats") return true end Olá amigo, eu tenho esse script no meu server e desconhecia esse error nele, acabei de editar ele aki e aparentemente fico funcionando de boa, teste ae no seu: Mostrar conteúdo oculto function onTarget(cid, target) if isPlayer(target) and isPlayer(cid) then if getPlayerStorageValue(cid, 91821) < 1 then doPlayerSendCancel(cid, "Você está com o modo PvP desligado. Se quiser atacar outros jogadores, ative-o falando !pvp on.") return false end end return true end function onStatsChange(cid, attacker, type, combat, value) if isPlayer(cid) and isPlayer(attacker) and type == STATSCHANGE_HEALTHLOSS then if getPlayerStorageValue(attacker, 91821) < 1 then doPlayerSendCancel(attacker, "Você está com o modo PvP desligado. Se quiser atacar outros jogadores, ative-o.") return false end end if isPlayer(cid) and isPlayer(attacker) and type == STATSCHANGE_MANALOSS then if getPlayerStorageValue(attacker, 91821) < 1 then doPlayerSendCancel(attacker, "Você está com o modo PvP desligado. Se quiser atacar outros jogadores, ative-o.") return false end end return true end function onLogin(cid) registerCreatureEvent(cid, "pvptarget") registerCreatureEvent(cid, "pvpstats") return true end
Postado Março 19, 2017 8 anos Em 19/03/2017 em 17:42, gutalo disse: if isPlayer(cid) and isPlayer(attacker) and type == STATSCHANGE_HEALTHLOSS then Muda essa linha por isso: if isPlayer(cid) and isPlayer(attacker) and (type == STATSCHANGE_HEALTHLOSS or type == STATSCHANGE_MANALOSS) then deve dar certo 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.