Ir para conteúdo

atcampos

Membro
  • Registro em

  • Última visita

  1. Consegui. Valewsss Mais um. esse aqui não consegui resolver local tarmonster = true -- Can we cast this spell on monsters. Default is true local ptime = 8000 -- This is how long the spell will last on a Player. Default is 8 seconds = 8000 local mtime = 10000 -- This is how long the spell will last on a Monster. Default is 10 seconds = 10000 local combat = Combat() combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_GREEN) combat:setParameter(COMBAT_PARAM_AGGRESSIVE, true) local mute = Condition(CONDITION_MUTED) function onCastSpell(creature, var) local tar = creature:getTarget() if tar:getCondition(CONDITION_MUTED) then return creature:sendTextMessage(MESSAGE_STATUS_SMALL, "This creature is already muted") end if tar:isPlayer() then tar:say("^SILENCED^",TALKTYPE_MONSTER_SAY) mute:setParameter(CONDITION_PARAM_TICKS, ptime) combat:addCondition(mute) return combat:execute(creature, tar) end if tar:isMonster() and tarmonster then tar:say("^SILENCED^",TALKTYPE_MONSTER_SAY) mute:setParameter(CONDITION_PARAM_TICKS, mtime) combat:addCondition(mute) return combat:execute(creature, tar) else return creature:sendTextMessage(MESSAGE_STATUS_SMALL, "You can only use this spell on Players.") end end erro quando uso a magia: Lua Script Error: [Spell Interface] data/spells/scripts/silence.lua:onCastSpell attempt to index a nil value stack traceback: [C]: at 0x7ff7eac1f160 [C]: at 0x7ff7eabd5590 up. outro erro
  2. código da spell: local combat = Combat() combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE) combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SMALLCLOUDS) combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_DEATH) local condition2 = Condition(CONDITION_REGENERATION) condition2:setParameter(CONDITION_PARAM_SUBID, 88888) condition2:setParameter(CONDITION_PARAM_TICKS, 15 * 60 * 1000) condition2:setParameter(CONDITION_PARAM_HEALTHGAIN, 0.01) condition2:setParameter(CONDITION_PARAM_HEALTHTICKS, 15 * 60 * 1000) local condition = Condition(CONDITION_CURSED) condition:setParameter(CONDITION_PARAM_DELAYED, 1) local damage = i addDamageCondition(condition, 1, 4000, -damage) for j = 1, 36 do damage = damage * 1.2 addDamageCondition(condition, 1, 4000, -damage) end setCombatCondition(combat[i], condition) function onCastSpell(cid, var) if isCreature(cid) == true then if getCreatureCondition(cid, CONDITION_REGENERATION, 88888) == false then doAddCondition(cid, condition2) doCreatureSay(cid, "Terofar cast a greater death curse on you!", TALKTYPE_ORANGE_1) else return false end else return false end return doCombat(cid, combat[math.random(1, 1)], var) end erro : data/spells/scripts/monster/terofar curse.lua data/spells/scripts/monster/terofar curse.lua:2: attempt to call method 'setPara´╗┐mete´╗┐´╗┐r' (a nil value)

Informação Importante

Confirmação de Termo