Ir para conteúdo

Featured Replies

Postado

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.

 

 

Spoiler

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
  • Autor
33 minutos atrás, 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
1 hora atrás, 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

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:

Spoiler

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

 

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.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.7k

Informação Importante

Confirmação de Termo