gabrielzika 29 Posted January 9, 2016 Share Posted January 9, 2016 Espero Que Alguem Me Ajude , Observe o Clefable com essa Spell Heala Fora do Pvp mas no PVP não heala Alguem Poderia me Ajudar? Aqui a Spell elseif spell == "Healarea" then local min = (getCreatureMaxHealth(cid) * 30) / 100 local max = (getCreatureMaxHealth(cid) * 50) / 100 local function doHealArea(cid, min, max) local amount = math.random(min, max) if (getCreatureHealth(cid) + amount) >= getCreatureMaxHealth(cid) then amount = -(getCreatureHealth(cid)-getCreatureMaxHealth(cid)) end if getCreatureHealth(cid) ~= getCreatureMaxHealth(cid) then doCreatureAddHealth(cid, amount) doSendAnimatedText(getThingPosWithDebug(cid), "+"..amount.."", 65) end end local pos = getPosfromArea(cid, heal) local n = 0 doHealArea(cid, min, max) while n < #pos do n = n+1 thing = {x=pos[n].x,y=pos[n].y,z=pos[n].z,stackpos=253} local pid = getThingFromPosWithProtect(thing) doSendMagicEffect(pos[n], 12) if isCreature(pid) then if isSummon(cid) and (isSummon(pid) or isPlayer(pid)) then if canAttackOther(cid, pid) == "Cant" then doHealArea(pid, min, max) end elseif ehMonstro(cid) and ehMonstro(pid) then doHealArea(pid, min, max) end end end @Up Link to comment Share on other sites More sharing options...
0 Caronte 444 Posted January 9, 2016 Share Posted January 9, 2016 (edited) esse script está incompleto. o elseif só vem depois de um if, que não estou achando. elseif spell == "Healarea" then por acaso você tem essas funções? ehMonstro() getPosfromArea Edited January 9, 2016 by Caronte Link to comment Share on other sites More sharing options...
0 samlecter 133 Posted January 9, 2016 Share Posted January 9, 2016 Tente assim e me diga se funcionou: elseif spell == "Healarea" then local min = (getCreatureMaxHealth(cid) * 50) / 100 local max = (getCreatureMaxHealth(cid) * 60) / 100 local function doHealArea(cid, min, max) local amount = math.random(min, max) if (getCreatureHealth(cid) + amount) >= getCreatureMaxHealth(cid) then amount = -(getCreatureHealth(cid)-getCreatureMaxHealth(cid)) end if getCreatureHealth(cid) ~= getCreatureMaxHealth(cid) then doCreatureAddHealth(cid, amount) doSendAnimatedText(getThingPosWithDebug(cid), "+"..amount.."", 65) end end local pos = getPosfromArea(cid, heal) local n = 0 doHealArea(cid, min, max) while n < #pos do n = n+1 thing = {x=pos[n].x,y=pos[n].y,z=pos[n].z,stackpos=253} local pid = getThingFromPosWithProtect(thing) doSendMagicEffect(pos[n], 12) if isCreature(pid) then if isSummon(cid) and (isSummon(pid) or isPlayer(pid)) then if canAttackOther(cid, pid) == "Cant" then doHealArea(pid, min, max) end elseif ehMonstro(cid) and ehMonstro(pid) then doHealArea(pid, min, max) end end end Link to comment Share on other sites More sharing options...
0 gabrielzika 29 Posted January 9, 2016 Author Share Posted January 9, 2016 @@Caronte o Script Está Completo Sim ele fica no Arquivo Pokemon Moves.lua junto com Muitas outras Spell , Essa Spell Heala os Players eos Pokemons em qualquer Lugar Menos na Area de PVP @@samlecter Irei Testar, Mas poderia dizer oq tu mudou nele? Link to comment Share on other sites More sharing options...
0 samlecter 133 Posted January 9, 2016 Share Posted January 9, 2016 @@Caronte o Script Está Completo Sim ele fica no Arquivo Pokemon Moves.lua junto com Muitas outras Spell , Essa Spell Heala os Players eos Pokemons em qualquer Lugar Menos na Area de PVP @@samlecter Irei Testar, Mas poderia dizer oq tu mudou nele? Praticamente tudo '-' , mas vai funcionar igual o seu só que sem bugs, se quiseer alterar a quantidade que cura, aconselho pelo configuration na propia spell, mas da pra mudar aqui também: local min = (getCreatureMaxHealth(cid) * 50) / 100 local max = (getCreatureMaxHealth(cid) * 60) / 100 Link to comment Share on other sites More sharing options...
0 gabrielzika 29 Posted January 16, 2016 Author Share Posted January 16, 2016 @@samlecter Desculpa a Demora , Bom Testei aqui e continua do msm jeito Tipo heala numa hunt normal ... ai quando entro na area PVP ele Não heala quem está em volta @UP @Up @UP @Up @Up Link to comment Share on other sites More sharing options...
0 nociam 90 Posted January 16, 2016 Share Posted January 16, 2016 Se reala seu pokemon e nao reala os outros entao verifique a funçao canAttackOther(cid, pid) porque ali tem uma checagem pra isso procure a sua e arrume. função que achei? function canAttackOther(cid, pid) --Function q verifica se um poke/player pode atacar outro poke/playerif not isCreature(cid) or not isCreature(pid) then return "Cant" endlocal master1 = isSummon(cid) and getCreatureMaster(cid) or cidlocal master2 = isSummon(pid) and getCreatureMaster(pid) or pid----if getPlayerStorageValue(master1, 6598754) >= 5 and getPlayerStorageValue(master2, 6598754) >= 5 thenif getPlayerStorageValue(master1, 6598754) ~= getPlayerStorageValue(master2, 6598754) thenif isDuelingAgainst(master1, master2) then --alterado v1.8if isSummon(cid) and isPlayer(pid) thenreturn "Cant"elsereturn "Can"endendendend---- pvp systemif getPlayerStorageValue(master1, 6598754) >= 1 and getPlayerStorageValue(master2, 6598755) >= 1 thenreturn "Can"endif getPlayerStorageValue(master1, 6598755) >= 1 and getPlayerStorageValue(master2, 6598754) >= 1 then ---estar em times diferentesreturn "Can"end----if ehMonstro(cid) and ehMonstro(pid) thenreturn "Can"endreturn "Cant"end Link to comment Share on other sites More sharing options...
0 gabrielzika 29 Posted January 16, 2016 Author Share Posted January 16, 2016 (edited) @@nociam Vamos se por se eu tiver em qualquer lugar do Mapa Exceto Pvp o Healarea Funciona Normal heala de boa agr se eu tiver no pvp e usar pra me curar Não Cura tem como me Ajudar ? no Meu tá assim: function canAttackOther(cid, pid) --Function q verifica se um poke/player pode atacar outro poke/player if not isCreature(cid) or not isCreature(pid) then return "Cant" end local master1 = isSummon(cid) and getCreatureMaster(cid) or cid local master2 = isSummon(pid) and getCreatureMaster(pid) or pid ---- if getPlayerStorageValue(master1, 6598754) >= 5 and getPlayerStorageValue(master2, 6598754) >= 5 then if getPlayerStorageValue(master1, 6598754) ~= getPlayerStorageValue(master2, 6598754) then if isDuelingAgainst(master1, master2) then --alterado v1.8 if isSummon(cid) and isPlayer(pid) then return "Cant" else return "Can" end end end end ---- pvp system if getPlayerStorageValue(master1, 6598754) >= 1 and getPlayerStorageValue(master2, 6598755) >= 1 then return "Can" end if getPlayerStorageValue(master1, 6598755) >= 1 and getPlayerStorageValue(master2, 6598754) >= 1 then ---estar em times diferentes return "Can" end ---- if getTileInfo(getThingPos(cid)).pvp then return "Can" end if ehMonstro(cid) and ehMonstro(pid) then return "Can" end return "Cant" end Edited January 16, 2016 by gabrielzika Link to comment Share on other sites More sharing options...
0 nociam 90 Posted January 16, 2016 Share Posted January 16, 2016 ache essa função e poste aqui function canAttackOther(cid, pid) Link to comment Share on other sites More sharing options...
0 gabrielzika 29 Posted January 16, 2016 Author Share Posted January 16, 2016 (edited) function canAttackOther(cid, pid) --Function q verifica se um poke/player pode atacar outro poke/player if not isCreature(cid) or not isCreature(pid) then return "Cant" end local master1 = isSummon(cid) and getCreatureMaster(cid) or cid local master2 = isSummon(pid) and getCreatureMaster(pid) or pid ---- if getPlayerStorageValue(master1, 6598754) >= 5 and getPlayerStorageValue(master2, 6598754) >= 5 then if getPlayerStorageValue(master1, 6598754) ~= getPlayerStorageValue(master2, 6598754) then if isDuelingAgainst(master1, master2) then --alterado v1.8 if isSummon(cid) and isPlayer(pid) then return "Cant" else return "Can" end end end end ---- pvp system if getPlayerStorageValue(master1, 6598754) >= 1 and getPlayerStorageValue(master2, 6598755) >= 1 then return "Can" end if getPlayerStorageValue(master1, 6598755) >= 1 and getPlayerStorageValue(master2, 6598754) >= 1 then ---estar em times diferentes return "Can" end ---- if getTileInfo(getThingPos(cid)).pvp then return "Can" end if ehMonstro(cid) and ehMonstro(pid) then return "Can" end return "Cant" end Edited January 16, 2016 by gabrielzika Link to comment Share on other sites More sharing options...
0 nociam 90 Posted January 17, 2016 Share Posted January 17, 2016 retira essa parte e testa if getTileInfo(getThingPos(cid)).pvp then return "Can" end Link to comment Share on other sites More sharing options...
0 gabrielzika 29 Posted January 19, 2016 Author Share Posted January 19, 2016 @nociam Eu Já retirei e Funfo , mas ai o Pvp Não Funciona mais n da pra atacar ngm @UP @Up Link to comment Share on other sites More sharing options...
0 gabrielzika 29 Posted January 22, 2016 Author Share Posted January 22, 2016 @Up Link to comment Share on other sites More sharing options...
0 gabrielzika 29 Posted January 27, 2016 Author Share Posted January 27, 2016 @Up @Up Link to comment Share on other sites More sharing options...
0 gabrielzika 29 Posted February 2, 2016 Author Share Posted February 2, 2016 @UP Link to comment Share on other sites More sharing options...
0 klausMa 0 Posted April 10, 2019 Share Posted April 10, 2019 eu queria resolve problema dos ataques esta healando em vez de ta dando dano alguem me ajuda por favor Link to comment Share on other sites More sharing options...
Question
gabrielzika 29
Espero Que Alguem Me Ajude , Observe o Clefable com essa Spell Heala Fora do Pvp mas no PVP não heala Alguem Poderia me Ajudar?
Aqui a Spell
@Up
Link to comment
Share on other sites
15 answers to this question
Recommended Posts