Postado Maio 31, 2016 10 anos Alguem poderia me ajudar a resolver esse erro? Print do Erro Script local voc = {1, 2, 3, 4, 5, 6, 7, 8} arr = { {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1}, {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, } local area = createCombatArea(arr) local combat = createCombatObject() setCombatArea(combat, area) function onTargetTile(cid, pos) local creatureTable = {} local n, i = getTileInfo({x=pos.x, y=pos.y, z=pos.z}).creatures, 1 if n ~= 0 then local v = getThingfromPos({x=pos.x, y=pos.y, z=pos.z, stackpos=i}).uid while v ~= 0 do if isCreature(v) == true then table.insert(creatureTable, v) if n == #creatureTable then break end end i = i + 1 v = getThingfromPos({x=pos.x, y=pos.y, z=pos.z, stackpos=i}).uid end end if #creatureTable ~= nil and #creatureTable > 0 then for r = 1, #creatureTable do if creatureTable[r] ~= cid then local min = 30000 local max = 30000 if isPlayer(creatureTable[r]) == true and isInArray(voc, getPlayerVocation(creatureTable[r])) == true then doTargetCombatHealth(cid, creatureTable[r], COMBAT_ENERGYDAMAGE, -min, -max, CONST_ME_NONE) elseif isMonster(creatureTable[r]) == true then doTargetCombatHealth(cid, creatureTable[r], COMBAT_ENERGYDAMAGE, -min, -max, CONST_ME_NONE) end end end end doSendMagicEffect(pos, CONST_ME_PURPLEENERGY) return true end setCombatCallback(combat, CALLBACK_PARAM_TARGETTILE, "onTargetTile") local function delayedCastSpell(cid, var) if isCreature(cid) == true then doCombat(cid, combat, positionToVariant(getCreaturePosition(cid))) doCreatureSay(cid, "Gaz'haragoth calls down: DEATH AND DOOM!", TALKTYPE_ORANGE_2) end end function onCastSpell(cid, var) doCreatureSay(cid, "Gaz'haragoth begins to channel DEATH AND DOOM into the area! RUN!", TALKTYPE_ORANGE_2) addEvent(delayedCastSpell, 5000, cid, var) return true end
Postado Maio 31, 2016 10 anos Solução local voc = {1, 2, 3, 4, 5, 6, 7, 8} arr = { {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1}, {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, } local area = createCombatArea(arr) local combat = createCombatObject() setCombatArea(combat, area) function onTargetTile(cid, pos) local creatureTable = {} local n, i = getTileInfo({x=pos.x, y=pos.y, z=pos.z}).creatures, 1 if n ~= 0 then local v = getThingfromPos({x=pos.x, y=pos.y, z=pos.z, stackpos=i}).uid while v ~= 0 do if isCreature(v) == true then table.insert(creatureTable, v) if n == #creatureTable then break end end i = i + 1 v = getThingfromPos({x=pos.x, y=pos.y, z=pos.z, stackpos=i}).uid end end if #creatureTable ~= nil and #creatureTable > 0 then for r = 1, #creatureTable do if creatureTable[r] ~= cid then local min = 30000 local max = 30000 if isPlayer(creatureTable[r]) == true and isInArray(voc, getPlayerVocation(creatureTable[r])) == true then doTargetCombatHealth(cid, creatureTable[r], COMBAT_ENERGYDAMAGE, -min, -max, CONST_ME_NONE) elseif isMonster(creatureTable[r]) == true then doTargetCombatHealth(cid, creatureTable[r], COMBAT_ENERGYDAMAGE, -min, -max, CONST_ME_NONE) end end end end doSendMagicEffect(pos, CONST_ME_PURPLEENERGY) return true end setCombatCallback(combat, CALLBACK_PARAM_TARGETTILE, "onTargetTile") local function delayedCastSpell(cid) if isCreature(cid) == true then doCombat(cid, combat, positionToVariant(getCreaturePosition(cid))) doCreatureSay(cid, "Gaz'haragoth calls down: DEATH AND DOOM!", TALKTYPE_ORANGE_2) end end function onCastSpell(cid, var) doCreatureSay(cid, "Gaz'haragoth begins to channel DEATH AND DOOM into the area! RUN!", TALKTYPE_ORANGE_2) addEvent(delayedCastSpell, 5000, cid) return true end Não dou suporte via PM, crie um tópico caso tenha dúvidas. Isso previne que outras pessoas com a mesma dúvida criem tópicos desnecessários.
Postado Junho 1, 2016 10 anos Autor Obrigado cara, me ajudou muito! Ainda esta dando um errinho, mais esse erro só dá depois de algum tempo! Da uma olhadinha nesse, é do Heal do gaz, tbm ta dando erro na linha 7 addEvent, mesma coisa do de cima! Poderia me ajudar com esses? local running = false function onThink(cid) local hp = (getCreatureHealth(cid)/getCreatureMaxHealth(cid))*100 if (hp < 5.5 and not running) then doCreatureSay(cid, "Gaz'haragoth begins to draw on the nightmares to HEAL himself!", TALKTYPE_ORANGE_2) running = true addEvent(Uheal, 7000, cid) end end function Uheal(cid) running = false doCreatureAddHealth(cid, 300000) doSendMagicEffect(getCreaturePosition(cid), CONST_ME_MAGIC_BLUE) doCreatureSay(cid, "Gaz'haragoth HEALS himself!", TALKTYPE_ORANGE_2) return true end Editado Junho 1, 2016 10 anos por Droox (veja o histórico de edições)
Postado Junho 1, 2016 10 anos local running = false function Uheal(cid) running = false doCreatureAddHealth(cid, 300000) doSendMagicEffect(getCreaturePosition(cid), CONST_ME_MAGIC_BLUE) doCreatureSay(cid, "Gaz'haragoth HEALS himself!", TALKTYPE_ORANGE_2) return true end function onThink(cid) local hp = (getCreatureHealth(cid)/getCreatureMaxHealth(cid))*100 if (hp < 5.5 and not running) then doCreatureSay(cid, "Gaz'haragoth begins to draw on the nightmares to HEAL himself!", TALKTYPE_ORANGE_2) running = true addEvent(Uheal, 7000, cid) end return true end Não dou suporte via PM, crie um tópico caso tenha dúvidas. Isso previne que outras pessoas com a mesma dúvida criem tópicos desnecessários.
Postado Outubro 10, 2016 9 anos Seria possivel alguém postar o xml do Gaz'? Pois o meu nao tem essas magias
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.