Ir para conteúdo

Featured Replies

Postado

Alguém poderia me ajudar. Meu pvp ele esta da seguinte forma. Eu entro na Pvp zona então posso fazer target no pokemon e também no player, porém o player, eu não posso usar ataques que requer target, diz " You don't have any targets. Porém o ataque passivo do pokemon quando esta em target no player e também ataques de área retiram damage do player! O pokemon eu posso atacar mas não retira damage alguma.

 Quando entro em Party no pvp eu posso atacar o pokemon e também retirar damage normalmente até mata-lo, e o player continua podendo tirar damage apenas com ataques de área mas ataques que requer target não podem atacar.

 

Bem se alguém poder me ajudar, eu gostaria de poder atacar o player com meus ataques que requer target, e retirar damage do pokemon sem precisar esta em party.

 

Irei deixar meu exp.lua suponho que deva resolver por aqui. 

 

local expcond = createConditionObject(CONDITION_INFIGHT)


setConditionParam(expcond, CONDITION_PARAM_TICKS, 4500)

-- MUDE AQUI O EFEITO QUE VOCÊ QUER QUE APAREÇA DE ACORDO COM O TIPO DE COMBATE

local efeitos = {
[COMBAT_PHYSICALDAMAGE] = 3,
[ELECTRICDAMAGE] = 3,
[WATERDAMAGE] = 3,
[FIREDAMAGE] = 3,
[GRASSDAMAGE] = 3,
[iCEDAMAGE] = 3,
[ROCKDAMAGE] = 3,
[FLYDAMAGE] = 3,
[FIGHTDAMAGE] = 3,
[POISONDAMAGE] = 3,
[DRAGONDAMAGE] = 3,
[bUGDAMAGE] = 3,
[NORMALDAMAGE] = 3,
[GHOSTDAMAGE] = 3,
[GROUNDDAMAGE] = 3,
[PSYCHICDAMAGE] = 3,
[POISONEDDAMAGE] = 3,
[bURNEDDAMAGE] = 3,
}


function onStatsChange(cid, attacker, enps, combatee, value)
if isPlayer(cid) and #getCreatureSummons(cid) >= 1 then
return false
end

if isMonster(attacker) and getPlayerStorageValue(attacker, 990) == 1 then
if isPlayer(cid) then
return false
end
if isPlayer(getCreatureMaster(cid)) and getPlayerStorageValue(getCreatureMaster(cid), 990) ~= 1 then
return false
end
end
if getPlayerStorageValue(cid, 990) == 1 and isMonster(cid) then
if getPlayerStorageValue(getCreatureMaster(attacker), 990) ~= 1 then
return false
end
end

if combatee == PSYCHICDAMAGE then
cor = COLOR_PSYCHIC
elseif combatee == GRASSDAMAGE then
cor = COLOR_GRASS
elseif combatee == POISONEDDAMAGE then
cor = COLOR_GRASS
elseif combatee == FIREDAMAGE then
cor = COLOR_FIRE2
elseif combatee == BURNEDDAMAGE then
cor = COLOR_FIRE2
elseif combatee == WATERDAMAGE then
cor = COLOR_WATER
elseif combatee == ICEDAMAGE then
cor = COLOR_ICE
elseif combatee == NORMALDAMAGE then
cor = COLOR_NORMAL
elseif combatee == FLYDAMAGE then
cor = COLOR_FLYING
elseif combatee == GHOSTDAMAGE then
cor = COLOR_GHOST
elseif combatee == GROUNDDAMAGE then
cor = COLOR_GROUND
elseif combatee == ELECTRICDAMAGE then
cor = COLOR_ELECTRIC
elseif combatee == ROCKDAMAGE then
cor = COLOR_ROCK
elseif combatee == BUGDAMAGE then
cor = COLOR_BUG
elseif combatee == FIGHTDAMAGE then
cor = COLOR_FIGHTING
elseif combatee == DRAGONDAMAGE then
cor = COLOR_DRAGON
elseif combatee == POISONDAMAGE then
cor = COLOR_POISON
elseif getCreatureName(cid) == "Kakuna" or getCreatureName(cid) == "Metapod" then
cor = COLOR_BUG
elseif getCreatureName(cid) == "Golem" or getCreatureName(cid) == "Graveler" or getCreatureName(cid) == "Geodude" then
cor = COLOR_ROCK
else
cor = NONE
end
local cores = cor
if getPlayerStorageValue(cid, 33) >= 1 then -- funcionamento do self destruction
if isCreature(attacker) then
return false
end
return true
end
if getPlayerStorageValue(cid, 34) >= 1 then -- REFLECT
if combatee ~= COMBAT_PHYSICALDAMAGE then
if isCreature(attacker) then
doSendMagicEffect(getThingPos(cid), 135)
doSendMagicEffect(getThingPos(attacker), 3)
doSendAnimatedText(getThingPos(cid), "REFLECT", 215)
doCreatureAddHealth(attacker, -value, 3, 191) -- 3 = efeito do reflect
setPlayerStorageValue(cid, 34, 0)
return false
end
end
end
if getPlayerStorageValue(cid, 35) >= 1 then -- MAGIAS DE MISS, STRING SHOT, MUD SHOT ETC
if combatee ~= COMBAT_PHYSICALDAMAGE then
if isCreature(attacker) then
doSendAnimatedText(getThingPos(cid), "MISS", 215)
setPlayerStorageValue(cid, 35, 0)
return false
end
end
end
if not isCreature(attacker) then
return true
end
if isPlayer(attacker) then
if isInArray({POISONEDDAMAGE, BURNEDDAMAGE}, combatee) then
doSendAnimatedText(getThingPos(cid), value, cores)
end
return true
end
if enps == STATSCHANGE_HEALTHGAIN then
return true
end
if enps == STATSCHANGE_HEALTHLOSS then
if getCreatureHealth(cid) <= value then
if isPlayer(cid) then
if #getCreatureSummons(cid) == 0 then
doCreatureAddHealth(cid, -getCreatureHealth(cid), 3, 180) -- 3 é o efeito que aparece no player quando ele é atacado e vai morrer
return false
end
return false
end
if isPlayer(getCreatureMaster(attacker)) then
if not isPlayer(getCreatureMaster(cid)) then
doTargetCombatHealth(getCreatureMaster(attacker), cid, combatee, -(getCreatureHealth(cid)), -(getCreatureHealth(cid)), efeitos[combatee])
if isInArray({GROUNDDAMAGE, ELECTRICDAMAGE, ROCKDAMAGE, FLYDAMAGE, BUGDAMAGE, FIGHTINGDAMAGE, DRAGONDAMAGE, POISONDAMAGE}, combatee) then
doSendAnimatedText(getThingPos(cid), value, cores)
end
else
if isInParty(getCreatureMaster(cid)) and isInParty(getCreatureMaster(attacker)) and getPlayerParty(getCreatureMaster(cid)) == getPlayerParty(getCreatureMaster(attacker)) then
doTargetCombatHealth(getCreatureMaster(attacker), cid, combatee, -(getCreatureHealth(cid)), -(getCreatureHealth(cid)), efeitos[combatee])
if isInArray({GROUNDDAMAGE, ELECTRICDAMAGE, ROCKDAMAGE, FLYDAMAGE, BUGDAMAGE, FIGHTINGDAMAGE, DRAGONDAMAGE, POISONDAMAGE}, combatee) then
doSendAnimatedText(getThingPos(cid), value, cores)
end
return false
end
return false
end
end
return true
end
if isPlayer(cid) then
if #getCreatureSummons(cid) >= 1 then
return false
end
doCreatureAddHealth(cid, -value, 3, 180) -- 3 é o efeito que aparece no player quando é atacado
return false
end

if isPlayer(getCreatureMaster(cid)) then
doAddCondition(getCreatureMaster(cid), expcond)
end


if combatee == ELECTRICDAMAGE then
if isInArray(electric2, getCreatureName(cid)) then
x = 2
elseif isInArray(electric1, getCreatureName(cid)) then
x = 0.5
elseif isInArray(electric0, getCreatureName(cid)) then
x = 0
else
x = 1
end
elseif combatee == WATERDAMAGE then
if isInArray(water2, getCreatureName(cid)) then
x = 2
elseif isInArray(water1, getCreatureName(cid)) then
x = 0.5
elseif isInArray(water0, getCreatureName(cid)) then
x = 0
else
x = 1
end
elseif combatee == GRASSDAMAGE then
if isInArray(grass2, getCreatureName(cid)) then
x = 2
elseif isInArray(grass1, getCreatureName(cid)) then
x = 0.5
elseif isInArray(grass0, getCreatureName(cid)) then
x = 0
else
x = 1
end
elseif combatee == FLYDAMAGE then
if isInArray(flying2, getCreatureName(cid)) then
x = 2
elseif isInArray(flying1, getCreatureName(cid)) then
x = 0.5
elseif isInArray(flying0, getCreatureName(cid)) then
x = 0
else
x = 1
end
elseif combatee == FIREDAMAGE then
if isInArray(fire2, getCreatureName(cid)) then
x = 2
elseif isInArray(fire1, getCreatureName(cid)) then
x = 0.5
elseif isInArray(fire0, getCreatureName(cid)) then
x = 0
else
x = 1
end
elseif combatee == ROCKDAMAGE then
if isInArray(rock2, getCreatureName(cid)) then
x = 2
elseif isInArray(rock1, getCreatureName(cid)) then
x = 0.5
elseif isInArray(rock0, getCreatureName(cid)) then
x = 0
else
x = 1
end
elseif combatee == GROUNDDAMAGE then
if isInArray(ground2, getCreatureName(cid)) then
x = 2
elseif isInArray(ground1, getCreatureName(cid)) then
x = 0.5
elseif isInArray(ground0, getCreatureName(cid)) then
x = 0
else
x = 1
end
elseif combatee == GHOSTDAMAGE then
if isInArray(ghost2, getCreatureName(cid)) then
x = 2
elseif isInArray(ghost1, getCreatureName(cid)) then
x = 0.5
elseif isInArray(ghost0, getCreatureName(cid)) then
x = 0
else
x = 1
end
elseif combatee == BUGDAMAGE then
if isInArray(bug2, getCreatureName(cid)) then
x = 2
elseif isInArray(bug1, getCreatureName(cid)) then
x = 0.5
elseif isInArray(bug0, getCreatureName(cid)) then
x = 0
else
x = 1
end
elseif combatee == NORMALDAMAGE then
if isInArray(normal2, getCreatureName(cid)) then
x = 2
elseif isInArray(normal1, getCreatureName(cid)) then
x = 0.5
elseif isInArray(normal0, getCreatureName(cid)) then
x = 0
else
x = 1
end
elseif combatee == FIGHTDAMAGE then
if isInArray(fighting2, getCreatureName(cid)) then
x = 2
elseif isInArray(fighting1, getCreatureName(cid)) then
x = 0.5
elseif isInArray(fighting0, getCreatureName(cid)) then
x = 0
else
x = 1
end
elseif combatee == POISONDAMAGE then
if isInArray(poison2, getCreatureName(cid)) then
x = 2
elseif isInArray(poison1, getCreatureName(cid)) then
x = 0.5
elseif isInArray(poison0, getCreatureName(cid)) then
x = 0
else
x = 1
end
elseif combatee == PSYCHICDAMAGE then
if isInArray(psychic2, getCreatureName(cid)) then
x = 2
elseif isInArray(psychic1, getCreatureName(cid)) then
x = 0.5
elseif isInArray(psychic0, getCreatureName(cid)) then
x = 0
else
x = 1
end
elseif combatee == ICEDAMAGE then
if isInArray(ice2, getCreatureName(cid)) then
x = 2
elseif isInArray(ice1, getCreatureName(cid)) then
x = 0.5
elseif isInArray(ice0, getCreatureName(cid)) then
x = 0
else
x = 1
end
elseif combatee == DRAGONDAMAGE then
if isInArray(dragon2, getCreatureName(cid)) then
x = 2
elseif isInArray(dragon1, getCreatureName(cid)) then
x = 0.5
elseif isInArray(dragon0, getCreatureName(cid)) then
x = 0
else
x = 1
end
else
x = 1
end

local xx = x
if not isSummon(attacker) then
if not isPlayer(cid) and not isPlayer(getCreatureMaster(cid)) then
return false
end
if isSummon(cid) and getCreatureHealth(cid) <= (getCreatureMaxHealth(cid)*0.15) and not exhaustion.get(getCreatureMaster(cid), 88726) then
exhaustion.set(getCreatureMaster(cid), 88726, 6)
doSendMagicEffect(getThingPos(cid), 178)
end
if getPlayerStorageValue(cid, 4) >= 1 then
local damage = value
doCreatureAddHealth(cid, -((math.ceil(damage/2))*xx), 2, cores) -- 2 é o efeito que aparece no pokemon quando tem harden e é atacado
else
local damage = value
if cor == NONE then
return true
end
doCreatureAddHealth(cid, -((math.ceil(damage/1))*xx), efeitos[combatee], cores)
return false
end
return false
end
if isSummon(attacker) then
if isSummon(cid) then
if isInParty(getCreatureMaster(cid)) and isInParty(getCreatureMaster(attacker)) and getPlayerParty(getCreatureMaster(cid)) == getPlayerParty(getCreatureMaster(attacker)) then
else
return false
end
end
if getPlayerStorageValue(cid, 17) == 4 then
setPlayerStorageValue(cid, 17, 5)
if getPlayerStorageValue(cid, 200) == -1 then
setPlayerStorageValue(cid, 200, "!, ")
end
local name = ""..getCreatureName(getCreatureMaster(attacker))..","
if not string.find(getPlayerStorageValue(cid, 200), name) then
setPlayerStorageValue(cid, 200, getPlayerStorageValue(cid, 200)..""..getCreatureName(getCreatureMaster(attacker))..", ")
end
end
local combatx = combatee
local valor = value
if getPlayerStorageValue(cid, 4) >= 1 then
doTargetCombatHealth(getCreatureMaster(attacker), cid, combatx, -((valor / 2)*x), -(((valor / 2)+10)*x), 255)
if isInArray({GROUNDDAMAGE, ELECTRICDAMAGE, ROCKDAMAGE, FLYDAMAGE, BUGDAMAGE, FIGHTINGDAMAGE, DRAGONDAMAGE, POISONDAMAGE, POISONEDDAMAGE, BURNEDDAMAGE}, combatee) then
doSendAnimatedText(getThingPos(cid), (value/2)*xx, cores)
end
return true
end
doTargetCombatHealth(getCreatureMaster(attacker), cid, combatx, -((valor)*x), -((valor+10)*x), 255)
end
if isInArray({GROUNDDAMAGE, ELECTRICDAMAGE, ROCKDAMAGE, FLYDAMAGE, BUGDAMAGE, FIGHTINGDAMAGE, DRAGONDAMAGE, POISONDAMAGE, POISONEDDAMAGE, BURNEDDAMAGE}, combatee) then
doSendAnimatedText(getThingPos(cid), value*xx, cores)
end
end
end

 

playerattack.lua

 

function onTarget(cid, target)



if getPlayerStorageValue(target, 201) ~= -1 then
for a, b in pairs(ginasios) do
if getPlayerStorageValue(target, ginasios[getPlayerStorageValue(target, 201)].storage) == 1 then
if getPlayerStorageValue(cid, ginasios[getPlayerStorageValue(target, 201)].storage) ~= 1 then
doPlayerSendCancel(cid, "You can't attack this pokemon.")
return false
end
end
end
end

if isPassive(target) then
if not isPlayerInAgressiveList(target, cid) then
addPlayerToAgressiveList(target, cid)
end

setAgressive(target)

if #getCreatureSummons(cid) >= 1 then
doMonsterSetTarget(target, getCreatureSummons(cid)[1])
else
doMonsterSetTarget(target, cid)
end
end

return TRUE
end

  • Respostas 6
  • Visualizações 520
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • No PDA é mais facil de Por PVP (Team e Normal) mais vamo la , troca seu Exp.lua por esse:

Postado

No PDA é mais facil de Por PVP (Team e Normal) mais vamo la , troca seu Exp.lua por esse:

local expcond = createConditionObject(CONDITION_INFIGHT)


setConditionParam(expcond, CONDITION_PARAM_TICKS, 4500)

-- MUDE AQUI O EFEITO QUE VOCÊ QUER QUE APAREÇA DE ACORDO COM O TIPO DE COMBATE

local efeitos = {
[COMBAT_PHYSICALDAMAGE] = 3,
[ELECTRICDAMAGE] = 3,
[WATERDAMAGE] = 3,
[FIREDAMAGE] = 3,
[GRASSDAMAGE] = 3,
[iCEDAMAGE] = 3,
[ROCKDAMAGE] = 3,
[FLYDAMAGE] = 3,
[FIGHTDAMAGE] = 3,
[POISONDAMAGE] = 3,
[DRAGONDAMAGE] = 3,
[bUGDAMAGE] = 3,
[NORMALDAMAGE] = 3,
[GHOSTDAMAGE] = 3,
[GROUNDDAMAGE] = 3,
[PSYCHICDAMAGE] = 3,
[POISONEDDAMAGE] = 3,
[bURNEDDAMAGE] = 3,
}


function onStatsChange(cid, attacker, enps, combatee, value)
if isPlayer(cid) and #getCreatureSummons(cid) >= 1 then
return false
end

if isMonster(attacker) and getPlayerStorageValue(attacker, 990) == 1 then
if isPlayer(cid) then
return false
end
if isPlayer(getCreatureMaster(cid)) and getPlayerStorageValue(getCreatureMaster(cid), 990) ~= 1 then
return false
end
end
if getPlayerStorageValue(cid, 990) == 1 and isMonster(cid) then
if getPlayerStorageValue(getCreatureMaster(attacker), 990) ~= 1 then
return false
end
end

if combatee == PSYCHICDAMAGE then
cor = COLOR_PSYCHIC
elseif combatee == GRASSDAMAGE then
cor = COLOR_GRASS
elseif combatee == POISONEDDAMAGE then
cor = COLOR_GRASS
elseif combatee == FIREDAMAGE then
cor = COLOR_FIRE2
elseif combatee == BURNEDDAMAGE then
cor = COLOR_FIRE2
elseif combatee == WATERDAMAGE then
cor = COLOR_WATER
elseif combatee == ICEDAMAGE then
cor = COLOR_ICE
elseif combatee == NORMALDAMAGE then
cor = COLOR_NORMAL
elseif combatee == FLYDAMAGE then
cor = COLOR_FLYING
elseif combatee == GHOSTDAMAGE then
cor = COLOR_GHOST
elseif combatee == GROUNDDAMAGE then
cor = COLOR_GROUND
elseif combatee == ELECTRICDAMAGE then
cor = COLOR_ELECTRIC
elseif combatee == ROCKDAMAGE then
cor = COLOR_ROCK
elseif combatee == BUGDAMAGE then
cor = COLOR_BUG
elseif combatee == FIGHTDAMAGE then
cor = COLOR_FIGHTING
elseif combatee == DRAGONDAMAGE then
cor = COLOR_DRAGON
elseif combatee == POISONDAMAGE then
cor = COLOR_POISON
elseif getCreatureName(cid) == "Kakuna" or getCreatureName(cid) == "Metapod" then
cor = COLOR_BUG
elseif getCreatureName(cid) == "Golem" or getCreatureName(cid) == "Graveler" or getCreatureName(cid) == "Geodude" then
cor = COLOR_ROCK
else
cor = NONE
end
local cores = cor
if getPlayerStorageValue(cid, 33) >= 1 then -- funcionamento do self destruction
if isCreature(attacker) then
return false
end
return true
end
if getPlayerStorageValue(cid, 34) >= 1 then -- REFLECT
if combatee ~= COMBAT_PHYSICALDAMAGE then
if isCreature(attacker) then
doSendMagicEffect(getThingPos(cid), 135)
doSendMagicEffect(getThingPos(attacker), 3)
doSendAnimatedText(getThingPos(cid), "REFLECT", 215)
doCreatureAddHealth(attacker, -value, 3, 191) -- 3 = efeito do reflect
setPlayerStorageValue(cid, 34, 0)
return false
end
end
end
if getPlayerStorageValue(cid, 35) >= 1 then -- MAGIAS DE MISS, STRING SHOT, MUD SHOT ETC
if combatee ~= COMBAT_PHYSICALDAMAGE then
if isCreature(attacker) then
doSendAnimatedText(getThingPos(cid), "MISS", 215)
setPlayerStorageValue(cid, 35, 0)
return false
end
end
end
if not isCreature(attacker) then
return true
end
if isPlayer(attacker) then
if isInArray({POISONEDDAMAGE, BURNEDDAMAGE}, combatee) then
doSendAnimatedText(getThingPos(cid), value, cores)
end
return true
end
if enps == STATSCHANGE_HEALTHGAIN then
return true
end
if enps == STATSCHANGE_HEALTHLOSS then
if getCreatureHealth(cid) <= value then
if isPlayer(cid) then
if #getCreatureSummons(cid) == 0 then
doCreatureAddHealth(cid, -getCreatureHealth(cid), 3, 180) -- 3 é o efeito que aparece no player quando ele é atacado e vai morrer
return false
end
return false
end
if isPlayer(getCreatureMaster(attacker)) then
if isPlayer(getCreatureMaster(cid)) then
doTargetCombatHealth(getCreatureMaster(attacker), cid, combatee, -(getCreatureHealth(cid)), -(getCreatureHealth(cid)), efeitos[combatee])
if isInArray({GROUNDDAMAGE, ELECTRICDAMAGE, ROCKDAMAGE, FLYDAMAGE, BUGDAMAGE, FIGHTINGDAMAGE, DRAGONDAMAGE, POISONDAMAGE}, combatee) then
doSendAnimatedText(getThingPos(cid), value, cores)
end
else
if isInParty(getCreatureMaster(cid)) and isInParty(getCreatureMaster(attacker)) and getPlayerParty(getCreatureMaster(cid)) == getPlayerParty(getCreatureMaster(attacker)) then
doTargetCombatHealth(getCreatureMaster(attacker), cid, combatee, -(getCreatureHealth(cid)), -(getCreatureHealth(cid)), efeitos[combatee])
if isInArray({GROUNDDAMAGE, ELECTRICDAMAGE, ROCKDAMAGE, FLYDAMAGE, BUGDAMAGE, FIGHTINGDAMAGE, DRAGONDAMAGE, POISONDAMAGE}, combatee) then
doSendAnimatedText(getThingPos(cid), value, cores)
end
return false
end
return false
end
end
return true
end
if isPlayer(cid) then
if #getCreatureSummons(cid) >= 1 then
return false
end
doCreatureAddHealth(cid, -value, 3, 180) -- 3 é o efeito que aparece no player quando é atacado
return false
end

if isPlayer(getCreatureMaster(cid)) then
doAddCondition(getCreatureMaster(cid), expcond)
end


if combatee == ELECTRICDAMAGE then
if isInArray(electric2, getCreatureName(cid)) then
x = 2
elseif isInArray(electric1, getCreatureName(cid)) then
x = 0.5
elseif isInArray(electric0, getCreatureName(cid)) then
x = 0
else
x = 1
end
elseif combatee == WATERDAMAGE then
if isInArray(water2, getCreatureName(cid)) then
x = 2
elseif isInArray(water1, getCreatureName(cid)) then
x = 0.5
elseif isInArray(water0, getCreatureName(cid)) then
x = 0
else
x = 1
end
elseif combatee == GRASSDAMAGE then
if isInArray(grass2, getCreatureName(cid)) then
x = 2
elseif isInArray(grass1, getCreatureName(cid)) then
x = 0.5
elseif isInArray(grass0, getCreatureName(cid)) then
x = 0
else
x = 1
end
elseif combatee == FLYDAMAGE then
if isInArray(flying2, getCreatureName(cid)) then
x = 2
elseif isInArray(flying1, getCreatureName(cid)) then
x = 0.5
elseif isInArray(flying0, getCreatureName(cid)) then
x = 0
else
x = 1
end
elseif combatee == FIREDAMAGE then
if isInArray(fire2, getCreatureName(cid)) then
x = 2
elseif isInArray(fire1, getCreatureName(cid)) then
x = 0.5
elseif isInArray(fire0, getCreatureName(cid)) then
x = 0
else
x = 1
end
elseif combatee == ROCKDAMAGE then
if isInArray(rock2, getCreatureName(cid)) then
x = 2
elseif isInArray(rock1, getCreatureName(cid)) then
x = 0.5
elseif isInArray(rock0, getCreatureName(cid)) then
x = 0
else
x = 1
end
elseif combatee == GROUNDDAMAGE then
if isInArray(ground2, getCreatureName(cid)) then
x = 2
elseif isInArray(ground1, getCreatureName(cid)) then
x = 0.5
elseif isInArray(ground0, getCreatureName(cid)) then
x = 0
else
x = 1
end
elseif combatee == GHOSTDAMAGE then
if isInArray(ghost2, getCreatureName(cid)) then
x = 2
elseif isInArray(ghost1, getCreatureName(cid)) then
x = 0.5
elseif isInArray(ghost0, getCreatureName(cid)) then
x = 0
else
x = 1
end
elseif combatee == BUGDAMAGE then
if isInArray(bug2, getCreatureName(cid)) then
x = 2
elseif isInArray(bug1, getCreatureName(cid)) then
x = 0.5
elseif isInArray(bug0, getCreatureName(cid)) then
x = 0
else
x = 1
end
elseif combatee == NORMALDAMAGE then
if isInArray(normal2, getCreatureName(cid)) then
x = 2
elseif isInArray(normal1, getCreatureName(cid)) then
x = 0.5
elseif isInArray(normal0, getCreatureName(cid)) then
x = 0
else
x = 1
end
elseif combatee == FIGHTDAMAGE then
if isInArray(fighting2, getCreatureName(cid)) then
x = 2
elseif isInArray(fighting1, getCreatureName(cid)) then
x = 0.5
elseif isInArray(fighting0, getCreatureName(cid)) then
x = 0
else
x = 1
end
elseif combatee == POISONDAMAGE then
if isInArray(poison2, getCreatureName(cid)) then
x = 2
elseif isInArray(poison1, getCreatureName(cid)) then
x = 0.5
elseif isInArray(poison0, getCreatureName(cid)) then
x = 0
else
x = 1
end
elseif combatee == PSYCHICDAMAGE then
if isInArray(psychic2, getCreatureName(cid)) then
x = 2
elseif isInArray(psychic1, getCreatureName(cid)) then
x = 0.5
elseif isInArray(psychic0, getCreatureName(cid)) then
x = 0
else
x = 1
end
elseif combatee == ICEDAMAGE then
if isInArray(ice2, getCreatureName(cid)) then
x = 2
elseif isInArray(ice1, getCreatureName(cid)) then
x = 0.5
elseif isInArray(ice0, getCreatureName(cid)) then
x = 0
else
x = 1
end
elseif combatee == DRAGONDAMAGE then
if isInArray(dragon2, getCreatureName(cid)) then
x = 2
elseif isInArray(dragon1, getCreatureName(cid)) then
x = 0.5
elseif isInArray(dragon0, getCreatureName(cid)) then
x = 0
else
x = 1
end
else
x = 1
end

local xx = x
if not isSummon(attacker) then
if not isPlayer(cid) and not isPlayer(getCreatureMaster(cid)) then
return false
end
if isSummon(cid) and getCreatureHealth(cid) <= (getCreatureMaxHealth(cid)*0.15) and not exhaustion.get(getCreatureMaster(cid), 88726) then
exhaustion.set(getCreatureMaster(cid), 88726, 6)
doSendMagicEffect(getThingPos(cid), 178)
end
if getPlayerStorageValue(cid, 4) >= 1 then
local damage = value
doCreatureAddHealth(cid, -((math.ceil(damage/2))*xx), 2, cores) -- 2 é o efeito que aparece no pokemon quando tem harden e é atacado
else
local damage = value
if cor == NONE then
return true
end
doCreatureAddHealth(cid, -((math.ceil(damage/1))*xx), efeitos[combatee], cores)
return false
end
return false
end
if isSummon(attacker) then
if isSummon(cid) then
if isInParty(getCreatureMaster(cid)) and isInParty(getCreatureMaster(attacker)) and getPlayerParty(getCreatureMaster(cid)) == getPlayerParty(getCreatureMaster(attacker)) or isPlayer(getCreatureMaster(cid)) and isPlayer(getCreatureMaster(attacker)) then
else
return false
end
end
if getPlayerStorageValue(cid, 17) == 4 then
setPlayerStorageValue(cid, 17, 5)
if getPlayerStorageValue(cid, 200) == -1 then
setPlayerStorageValue(cid, 200, "!, ")
end
local name = ""..getCreatureName(getCreatureMaster(attacker))..","
if not string.find(getPlayerStorageValue(cid, 200), name) then
setPlayerStorageValue(cid, 200, getPlayerStorageValue(cid, 200)..""..getCreatureName(getCreatureMaster(attacker))..", ")
end
end
local combatx = combatee
local valor = value
if getPlayerStorageValue(cid, 4) >= 1 then
doTargetCombatHealth(getCreatureMaster(attacker), cid, combatx, -((valor / 2)*x), -(((valor / 2)+10)*x), 255)
if isInArray({GROUNDDAMAGE, ELECTRICDAMAGE, ROCKDAMAGE, FLYDAMAGE, BUGDAMAGE, FIGHTINGDAMAGE, DRAGONDAMAGE, POISONDAMAGE, POISONEDDAMAGE, BURNEDDAMAGE}, combatee) then
doSendAnimatedText(getThingPos(cid), (value/2)*xx, cores)
end
return true
end
doTargetCombatHealth(getCreatureMaster(attacker), cid, combatx, -((valor)*x), -((valor+10)*x), 255)
end
if isInArray({GROUNDDAMAGE, ELECTRICDAMAGE, ROCKDAMAGE, FLYDAMAGE, BUGDAMAGE, FIGHTINGDAMAGE, DRAGONDAMAGE, POISONDAMAGE, POISONEDDAMAGE, BURNEDDAMAGE}, combatee) then
doSendAnimatedText(getThingPos(cid), value*xx, cores)
end
end
end


 

 

Postado
  • Autor

Nextbr eu vou da +rep para você, melhorou bastante agora posso atacar os pokemons retirando damage sem mesmo esta em party. Mas... [ 16:47 You don't have any targets. os ataques que requer trajeto ainda não posso atacar os outros jogadores com eles. Se puder me ajudar.

 Sou muito grata a você!

Postado

É foda de mexer com statschange se voce alterar algo "errado" talves deixa de funcionar (bugar) alguma coisa dentro dessa funçao pois essa funçao puxa mt coisa (party/vantagem e desvantagem/pvp team e outros)

 

- Antes de fazer a alteraçao abaixo deixa o servidor em modo PVP-Enforced ou PVP com protection level 99999

- Se nao funcionar tenta fazer a alteraçao abaixo \/

 

- Tenta troca essa parte aqui:

local xx = x


if not isSummon(attacker) then
if not isPlayer(cid) and not isPlayer(getCreatureMaster(cid)) then
return false
end

 

- por essa aqui:

local xx = x


if isSummon(attacker) then
if not isPlayer(cid) and not isPlayer(getCreatureMaster(cid)) then
return false
end

Editado por Nextbr (veja o histórico de edições)


 

 

Postado
  • Autor

Bem eu coloquei PVP-Enforce e PVP com protection 999999 Não pude usar meus ataques que requer target no outro jogador. Também usei sem proteção continuou da mesma forma e podendo atacar os pokemons de players fora do pvp.

 

Mudei a parte da script também, não houve modificação alguma. Continua com mesmo problema. Bem testei o script mas sem pvp enforced ou pvp normal.

 

Lembrando que são ataques que requer target que não ataca o jogador adversário.

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