Postado Maio 1, 2018 7 anos Autor 7 minutos atrás, Luis360 disse: Opa desculpa falha minha tem uma parte que ta escrito assim if ( getCreatureMaster(creature) ) then doCreatureAddHealth(getCreatureMaster(creature), 100) return doCombat(cid, combat, var) end Mas o correto é : if ( getCreatureMaster(cid) ) then doCreatureAddHealth(getCreatureMaster(cid), 100) return doCombat(cid, combat, var) end Sacou a diferença entre os parenteses da função estava com creature, mas na verdade é cid Agora funciona mas, ele esta curando os monstros em vez de curar o player.
Postado Maio 1, 2018 7 anos Agora, peterson18 disse: Agora funciona mas, ele esta curando os monstros em vez de curar o player. Certeza? pq eu testei aqui e ele esta healando o player, pq até então essa função aqui : doCreatureAddHealth(getCreatureMaster(cid), 100) -- Heala o player
Postado Maio 1, 2018 7 anos Autor 1 hora atrás, Luis360 disse: Certeza? pq eu testei aqui e ele esta healando o player, pq até então essa função aqui : doCreatureAddHealth(getCreatureMaster(cid), 100) -- Heala o player Poderia dar uma olhada então? Vou mandar as scripts:Magia de Sumonar local max = 1 local item = 12621 function onCastSpell(cid, var) local dir = getPlayerLookDir(cid) local ppos = getPlayerPosition(cid) if(dir==1)then ppos.x = ppos.x + 1 end local count, pos = #getCreatureSummons(cid), getThingPos(cid) if count == max then doPlayerSendCancel(cid, 'Voce nao pode sumonar mais criaturas.') doSendMagicEffect(pos, CONST_ME_POFF) return false end local summon = getCreatureSummons(cid) local MaximoSummon = 1 if doPlayerRemoveItem(cid, item, 1) then if (table.maxn(summon) < MaximoSummon) then local Gnomo = doConvinceCreature(cid, doCreateMonster("Gnomo", ppos)) doPlayerSendTextMessage(cid, 22, "Voce convocou a Gnomo!") end else doPlayerSendCancel(cid, "Voce precisa de um Fragmento de Gnomo.") end end Summon: <?xml version="1.0" encoding="UTF-8"?> <monster name="Gnomo" nameDescription="o Gnomo" race="undead" experience="0" speed="150" manacost="0"> <health now="25" max="50"/> <look type="66" corpse="6015"/> <targetchange interval="2000" chance="0"/> <strategy attack="100" defense="0"/> <flags> <flag summonable="1"/> <flag attackable="1"/> <flag hostile="1"/> <flag illusionable="1"/> <flag convinceable="1"/> <flag pushable="1"/> <flag canpushitems="0"/> <flag canpushcreatures="0"/> <flag targetdistance="1"/> <flag staticattack="90"/> <flag runonhealth="1"/> </flags> <attacks> <attacks> <attack name="cura" interval="100" chance="100" range="7" target="1"/> </attacks> </attacks> <elements> <element energyPercent="40"/> <element earthPercent="90"/> <element physicalPercent="60"/> </elements> <immunities> <immunity death="1"/> <immunity paralyze="1"/> </immunities> <voices interval="2000" chance="5"> <voice sentence="?!"/> <voice sentence="Tsshh"/> </voices> <loot> <item id="10521" chance="600" /><!-- moon backpack --> </loot> </monster> Magia de Curar: local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_HEALING) setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false) setCombatParam(combat, COMBAT_PARAM_DISPEL, CONDITION_PARALYZE) setHealingFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 5, 5, 1.5, 2) function onCastSpell(cid,var) if ( getCreatureMaster(cid) ) then doCreatureAddHealth(getCreatureMaster(cid), 100) return doCombat(cid, combat, var) end end Spell.XML <!-- Monstros --> <instant name="cura" words="cura" lvl="1" mana="0" prem="0" range="3" casterTargetOrDirection="1" blockwalls="1" aggressive="0" exhaustion="2000" needlearn="0" event="script" value="monstros/cura.lua"> </instant> <instant name="gnomo" words="gnomo" lvl="1" mana="0" prem="0" exhaustion="2000" needlearn="0" event="script" value="summon/fada.lua"> <vocation id="4"/> </instant> Não tenho muita experiencia em .lua mas não consigo notar se tem alguma coisa errada, se conseguir me avise. Desde já grato pela ajuda.
Postado Maio 1, 2018 7 anos Melhor eu vou te passar os meus arquivos e você verifica. Na magia utilizei o utevo res funcionou bem. Utilizei o rat.xml: Spoiler <?xml version="1.0" encoding="UTF-8"?> <monster name="Rat" nameDescription="a rat" race="blood" experience="5" speed="135" manacost="200"> <health now="20" max="20"/> <look type="21" corpse="5964"/> <targetchange interval="4000" chance="0"/> <flags> <flag summonable="1"/> <flag attackable="1"/> <flag hostile="1"/> <flag illusionable="1"/> <flag convinceable="1"/> <flag pushable="1"/> <flag canpushitems="0"/> <flag canpushcreatures="0"/> <flag targetdistance="1"/> <flag staticattack="90"/> <flag runonhealth="5"/> </flags> <attacks> <attack name="melee" interval="2000" skill="10" attack="10"/> <attack name="Exura Play" interval="1000" chance="75" range="7" target="1"/> </attacks> <defenses armor="5" defense="5"/> <elements> <element earthPercent="25"/> <element holyPercent="20"/> <element icePercent="-10"/> <element deathPercent="-10"/> </elements> <voices interval="5000" chance="10"> <voice sentence="Meep!"/> </voices> <loot> <item id="2148" countmax="4" chance="100000"/><!-- gold coin --> <item id="2696" chance="39410"/><!-- cheese --> </loot> </monster> Sepll heala_player.lua: Spoiler local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_HEALING) setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false) setCombatParam(combat, COMBAT_PARAM_DISPEL, CONDITION_PARALYZE) setHealingFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 5, 5, 1.5, 2) function onCastSpell(cid,var) if ( getCreatureMaster(cid) ) then doCreatureAddHealth(getCreatureMaster(cid), 100) return doCombat(cid, combat, var) end end Registrei com a seguinte tag: Spoiler <instant group="healing" spellid="84" name="Exura Play" words="exura player" mana="40" prem="0" aggressive="0" blockwalls="1" needtarget="1" playernameparam="1" params="1" exhaustion="1000" groupcooldown="1000" needlearn="0" script="healing/heala_player.lua"> <vocation name="Druid" /> <vocation name="Elder Druid" /> </instant>
Postado Maio 1, 2018 7 anos tenta local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_HEALING) setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false) setCombatParam(combat, COMBAT_PARAM_DISPEL, CONDITION_PARALYZE) setHealingFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 5, 5, 1.5, 2) function onCastSpell(cid,var) if isCreature(target) or isPlayer(target) then doCreatureAddHealth(target, -100) doCreatureAddHealth(getCreatureMaster(cid), combat) return doCombat(cid, combat, var) end end ai se quiser valor em formula faz outro local 2 com a função de dano , ai ele tira dano do bicho e volta pro player Meus topicos.[Gesior]Layout pokemon vrs1.0[854]OtServer Digimon Vrs.1.1 Spoiler http://free.timeanddate.com/countdown/i48ub0vi/n213/cf11/cm0/cu4/ct0/cs0/ca0/cr0/ss0/cac009/cpc000/pcf90/tcfff/fs100/szw448/szh189/tatTempo%20Para%20Resetar/tac000/tptDigimon%20World%20Cerberus%20Online/tpc000/matDigimon%20World%20Cerberus%20Online/mac000/mptEstá%20Online%20à/mpc000/iso2014-07-19T00:01:00/bas3/bat8/bac00f/pa3 Meu Servidor Digimon World Cerberus OnlineDigimon World Cerberus Online Agradecer sempre a todos que ajudaram, o server a ficar pronto deis de Sprites que não conheço,scripts, etc....como o jogo esta na internet e para todos usarem vlw a todos bjus...
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.