Descreva em algumas palavras a base utilizada. (Nome do servidor / Nome do cliente / Nome do website / etc.).
versão do TFS: TFS 0.3.6
protocolo: 8.54
Base: Pokémon
Qual é a sua pergunta?
Olá pessoal boa noite, gostaria de pedir uma ajuda com um problema em statsChange, pois a minha visão, está configurada normal, mas os pokémons selvagens não está dando "dano" nas skills deles, nem no "melee" que é considerada uma spell, chamada "Attack".
O summon está soltando e tirando dano normalmente, mas infelizmente estou nesse impar-se dos selvagens.
Você tem o código disponível? Se tiver poste-o na caixa de código que está dentro do spoiler abaixo:
Spoiler
function onStatsChange(cid, attacker, type, combat, value)
local hit = 1
--// Edited pvp system
if not canAttackOther(attacker, cid) and (isSummon(cid) or isPlayer(cid)) then -- parte do duel e qualquer outra coisa q tenha pvp
return false -- aqui acho q vou ter q rever
end
--// Edited pvp system
if isCreature(cid) then
if (isSummon(cid) and isPlayer(getCreatureMaster(cid)) and isWild(attacker)) or (isSummon(attacker) and isPlayer(getCreatureMaster(attacker)) and isWild(cid)) or (isPlayer(cid) and isWild(attacker)) then
if(getPlayerStorageValue(attacker, storages.GRRRRSto) <= 0) and isPlayer(cid) then return false end
--// Edited pvp system
if not canAttackOther(attacker, cid) and isSummon(attacker) and (isSummon(cid) or isPlayer(cid)) then -- parte do duel e qualquer outra coisa q tenha pvp
return false
end
--// Edited pvp system
if combat == STATUS_SLEEP then
setPokemonStatus(cid, "sleep", value, 0, true, attacker)
return false
elseif combat == STATUS_STUN then
setPokemonStatus(cid, "stun", value, 0, true, attacker)
return false
elseif combat == STATUS_STRING then
setPokemonStatus(cid, "string", value, 0, true, attacker)
return false
elseif combat == STATUS_BLIND then
setPokemonStatus(cid, "blind", value, 0, true, attacker)
return false
elseif combat == STATUS_CONFUSION10 or combat == STATUS_CONFUSION7 then
setPokemonStatus(cid, "confusion", (combat == STATUS_CONFUSION10 and 10 or 7), value, true, attacker)
return false
elseif combat == STATUS_POISON20 or combat == STATUS_POISON10 or combat == STATUS_POISON5 then
setPokemonStatus(cid, "poison", (combat == STATUS_POISON5 and 5 or combat == STATUS_POISON10 and 10 or 20), value, true, attacker)
return false
elseif combat == STATUS_BURN5 or combat == STATUS_BURN10 then
setPokemonStatus(cid, "burn", (combat == STATUS_BURN5 and 5 or 10), value, true, attacker)
return false
elseif combat == STATUS_LEECHSEED then
setPokemonStatus(cid, "leechSeed", 20, value, true, attacker)
return false
elseif combat == STATUS_FEAR then
setPokemonStatus(cid, "fear", value, 0, true, attacker)
return false
elseif combat == STATUS_SLOW then
setPokemonStatus(cid, "speedDown", value, 0, true, attacker)
return false
elseif combat == STATUS_SILENCE then
setPokemonStatus(cid, "silence", 8, value, true, attacker)
return false
end
end
if ((isSummon(cid) or isPlayer(cid))) or (isWild(cid) and isWild(attacker)) then
if combat == COMBAT_HEAL then
local heal = value
if getCreatureHealth(cid) + value > getCreatureMaxHealth(cid) then
heal = getCreatureMaxHealth(cid) - getCreatureHealth(cid)
end
if heal > 0 then
doSendAnimatedText(getThingPos(cid), "+"..heal, 35)
doCreatureAddHealth(cid, heal)
end
if isSummon(cid) then
doOTCSendPokemonHealth(getCreatureMaster(cid))
end
return false
end
end
end
if (isWild(attacker) and isSummon(cid)) then --- Wild ataca Summon
-- local master = getCreatureMaster(attacker)
for i = 1, #silenceStatus do
if getPokemonStatus(attacker, silenceStatus[i]) then return false end
end
if getCreatureCondition(cid, CONDITION_INVISIBLE) then return false end
local modifier = getMultiplier(COMBAT_NAMES[combat], cid)
local def = 1 - (getPokemonDefense(getCreatureName(cid))/255)
hit = math.ceil((value * def) * modifier)
if getPokemonStatus(cid, "harden") then
hit = math.ceil(hit * 0.75)
end
if isCreature(cid) and tonumber(getCreatureHealth(cid)) - hit <= 0 then
hit = getCreatureHealth(cid)
end
doSendMagicEffect(getThingPos(cid), COMBAT_EFFECTS[combat])
if combat == ABSORB_GRASS or combat == ABSORB_POISON or combat == ABSORB_NORMAL or combat == ABSORB_BUG then
doSendAnimatedText(getThingPos(cid), "-"..hit, 180)
doSendAnimatedText(getThingPos(attacker), "+"..hit, 35)
doCreatureAddHealth(cid, -hit, 255, 255, attacker)
doCreatureAddHealth(attacker, hit)
-- doOTCSendPokemonHealth(master)
else
doCreatureAddHealth(cid, -hit, 2, COMBAT_COLORS[combat], attacker)
end
return false
end
if (isSummon(attacker) and isWild(cid)) then --- Summon ataca Wild
local master = getCreatureMaster(attacker)
for i = 1, #silenceStatus do
if getPokemonStatus(attacker, silenceStatus[i]) then return false end
end
if getCreatureCondition(cid, CONDITION_INVISIBLE) then return false end
local modifier = tableFome[getFeedStatus(attacker)].hitMultiplier * getMultiplier(COMBAT_NAMES[combat], cid) * getPlayerFightModeOffense(master)
local def = 1 - (getPokemonDefense(getCreatureName(cid))/255)
hit = math.ceil((value * def) * modifier)
if getPokemonStatus(cid, "harden") then
hit = math.ceil(hit * 0.75)
end
if isCreature(cid) and tonumber(getCreatureHealth(cid)) - hit <= 0 then
hit = getCreatureHealth(cid)
end
doSendMagicEffect(getThingPos(cid), COMBAT_EFFECTS[combat])
if combat == ABSORB_GRASS or combat == ABSORB_POISON or combat == ABSORB_NORMAL or combat == ABSORB_BUG then
doSendAnimatedText(getThingPos(cid), "-"..hit, 180)
doSendAnimatedText(getThingPos(attacker), "+"..hit, 35)
doCreatureAddHealth(cid, -hit, 255, 255, attacker)
doCreatureAddHealth(attacker, hit)
doOTCSendPokemonHealth(master)
else
doCreatureAddHealth(cid, -hit, 2, COMBAT_COLORS[combat], attacker)
end
return false
end
if isPlayer(cid) then
if getPlayerStorageValue(attacker, storages.GRRRRSto) <= 0 then return false end
for i = 1, #silenceStatus do
if getPokemonStatus(attacker, silenceStatus[i]) then return false end
end
if getCreatureCondition(cid, CONDITION_INVISIBLE) then return false end
hit = math.ceil((value/2) * 1.2)
if isCreature(cid) and tonumber(getCreatureHealth(cid)) - hit <= 0 then
hit = getCreatureHealth(cid)
end
doSendMagicEffect(getThingPos(cid), COMBAT_EFFECTS[combat])
if combat == ABSORB_GRASS or combat == ABSORB_POISON or combat == ABSORB_NORMAL or combat == ABSORB_BUG then
doSendAnimatedText(getThingPos(cid), "-"..hit, 180)
doSendAnimatedText(getThingPos(attacker), "+"..hit, 35)
doCreatureAddHealth(cid, -hit, 255, 255, attacker)
doCreatureAddHealth(attacker, hit)
else
doCreatureAddHealth(cid, -hit, 2, COMBAT_COLORS[combat], attacker)
end
return false
end
return true
end
Você tem alguma imagem que possa auxiliar no problema? Se sim, anexe-a dentro do spoiler abaixo:
Descreva em algumas palavras a base utilizada. (Nome do servidor / Nome do cliente / Nome do website / etc.).
versão do TFS: TFS 0.3.6
protocolo: 8.54
Base: Pokémon
Qual é a sua pergunta?
Olá pessoal boa noite, gostaria de pedir uma ajuda com um problema em statsChange, pois a minha visão, está configurada normal, mas os pokémons selvagens não está dando "dano" nas skills deles, nem no "melee" que é considerada uma spell, chamada "Attack".
O summon está soltando e tirando dano normalmente, mas infelizmente estou nesse impar-se dos selvagens.
Você tem o código disponível? Se tiver poste-o na caixa de código que está dentro do spoiler abaixo:
function onStatsChange(cid, attacker, type, combat, value) local hit = 1 --// Edited pvp system if not canAttackOther(attacker, cid) and (isSummon(cid) or isPlayer(cid)) then -- parte do duel e qualquer outra coisa q tenha pvp return false -- aqui acho q vou ter q rever end --// Edited pvp system if isCreature(cid) then if (isSummon(cid) and isPlayer(getCreatureMaster(cid)) and isWild(attacker)) or (isSummon(attacker) and isPlayer(getCreatureMaster(attacker)) and isWild(cid)) or (isPlayer(cid) and isWild(attacker)) then if(getPlayerStorageValue(attacker, storages.GRRRRSto) <= 0) and isPlayer(cid) then return false end --// Edited pvp system if not canAttackOther(attacker, cid) and isSummon(attacker) and (isSummon(cid) or isPlayer(cid)) then -- parte do duel e qualquer outra coisa q tenha pvp return false end --// Edited pvp system if combat == STATUS_SLEEP then setPokemonStatus(cid, "sleep", value, 0, true, attacker) return false elseif combat == STATUS_STUN then setPokemonStatus(cid, "stun", value, 0, true, attacker) return false elseif combat == STATUS_STRING then setPokemonStatus(cid, "string", value, 0, true, attacker) return false elseif combat == STATUS_BLIND then setPokemonStatus(cid, "blind", value, 0, true, attacker) return false elseif combat == STATUS_CONFUSION10 or combat == STATUS_CONFUSION7 then setPokemonStatus(cid, "confusion", (combat == STATUS_CONFUSION10 and 10 or 7), value, true, attacker) return false elseif combat == STATUS_POISON20 or combat == STATUS_POISON10 or combat == STATUS_POISON5 then setPokemonStatus(cid, "poison", (combat == STATUS_POISON5 and 5 or combat == STATUS_POISON10 and 10 or 20), value, true, attacker) return false elseif combat == STATUS_BURN5 or combat == STATUS_BURN10 then setPokemonStatus(cid, "burn", (combat == STATUS_BURN5 and 5 or 10), value, true, attacker) return false elseif combat == STATUS_LEECHSEED then setPokemonStatus(cid, "leechSeed", 20, value, true, attacker) return false elseif combat == STATUS_FEAR then setPokemonStatus(cid, "fear", value, 0, true, attacker) return false elseif combat == STATUS_SLOW then setPokemonStatus(cid, "speedDown", value, 0, true, attacker) return false elseif combat == STATUS_SILENCE then setPokemonStatus(cid, "silence", 8, value, true, attacker) return false end end if ((isSummon(cid) or isPlayer(cid))) or (isWild(cid) and isWild(attacker)) then if combat == COMBAT_HEAL then local heal = value if getCreatureHealth(cid) + value > getCreatureMaxHealth(cid) then heal = getCreatureMaxHealth(cid) - getCreatureHealth(cid) end if heal > 0 then doSendAnimatedText(getThingPos(cid), "+"..heal, 35) doCreatureAddHealth(cid, heal) end if isSummon(cid) then doOTCSendPokemonHealth(getCreatureMaster(cid)) end return false end end end if (isWild(attacker) and isSummon(cid)) then --- Wild ataca Summon -- local master = getCreatureMaster(attacker) for i = 1, #silenceStatus do if getPokemonStatus(attacker, silenceStatus[i]) then return false end end if getCreatureCondition(cid, CONDITION_INVISIBLE) then return false end local modifier = getMultiplier(COMBAT_NAMES[combat], cid) local def = 1 - (getPokemonDefense(getCreatureName(cid))/255) hit = math.ceil((value * def) * modifier) if getPokemonStatus(cid, "harden") then hit = math.ceil(hit * 0.75) end if isCreature(cid) and tonumber(getCreatureHealth(cid)) - hit <= 0 then hit = getCreatureHealth(cid) end doSendMagicEffect(getThingPos(cid), COMBAT_EFFECTS[combat]) if combat == ABSORB_GRASS or combat == ABSORB_POISON or combat == ABSORB_NORMAL or combat == ABSORB_BUG then doSendAnimatedText(getThingPos(cid), "-"..hit, 180) doSendAnimatedText(getThingPos(attacker), "+"..hit, 35) doCreatureAddHealth(cid, -hit, 255, 255, attacker) doCreatureAddHealth(attacker, hit) -- doOTCSendPokemonHealth(master) else doCreatureAddHealth(cid, -hit, 2, COMBAT_COLORS[combat], attacker) end return false end if (isSummon(attacker) and isWild(cid)) then --- Summon ataca Wild local master = getCreatureMaster(attacker) for i = 1, #silenceStatus do if getPokemonStatus(attacker, silenceStatus[i]) then return false end end if getCreatureCondition(cid, CONDITION_INVISIBLE) then return false end local modifier = tableFome[getFeedStatus(attacker)].hitMultiplier * getMultiplier(COMBAT_NAMES[combat], cid) * getPlayerFightModeOffense(master) local def = 1 - (getPokemonDefense(getCreatureName(cid))/255) hit = math.ceil((value * def) * modifier) if getPokemonStatus(cid, "harden") then hit = math.ceil(hit * 0.75) end if isCreature(cid) and tonumber(getCreatureHealth(cid)) - hit <= 0 then hit = getCreatureHealth(cid) end doSendMagicEffect(getThingPos(cid), COMBAT_EFFECTS[combat]) if combat == ABSORB_GRASS or combat == ABSORB_POISON or combat == ABSORB_NORMAL or combat == ABSORB_BUG then doSendAnimatedText(getThingPos(cid), "-"..hit, 180) doSendAnimatedText(getThingPos(attacker), "+"..hit, 35) doCreatureAddHealth(cid, -hit, 255, 255, attacker) doCreatureAddHealth(attacker, hit) doOTCSendPokemonHealth(master) else doCreatureAddHealth(cid, -hit, 2, COMBAT_COLORS[combat], attacker) end return false end if isPlayer(cid) then if getPlayerStorageValue(attacker, storages.GRRRRSto) <= 0 then return false end for i = 1, #silenceStatus do if getPokemonStatus(attacker, silenceStatus[i]) then return false end end if getCreatureCondition(cid, CONDITION_INVISIBLE) then return false end hit = math.ceil((value/2) * 1.2) if isCreature(cid) and tonumber(getCreatureHealth(cid)) - hit <= 0 then hit = getCreatureHealth(cid) end doSendMagicEffect(getThingPos(cid), COMBAT_EFFECTS[combat]) if combat == ABSORB_GRASS or combat == ABSORB_POISON or combat == ABSORB_NORMAL or combat == ABSORB_BUG then doSendAnimatedText(getThingPos(cid), "-"..hit, 180) doSendAnimatedText(getThingPos(attacker), "+"..hit, 35) doCreatureAddHealth(cid, -hit, 255, 255, attacker) doCreatureAddHealth(attacker, hit) else doCreatureAddHealth(cid, -hit, 2, COMBAT_COLORS[combat], attacker) end return false end return true end
Você tem alguma imagem que possa auxiliar no problema? Se sim, anexe-a dentro do spoiler abaixo:
https://imgur.com/a/S9MCFRR
Compartilhar este post
Link para o post