Postado Outubro 20, 2018 6 anos 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)
Postado Outubro 20, 2018 6 anos Solução Abre o arquivo com o notepad++ e converte pra ANSI Te ajudei ?? Que tal fazer uma contribuição ?
Postado Outubro 20, 2018 6 anos Autor 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
Postado Outubro 21, 2018 6 anos Spoiler 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 target = creature:getTarget() if not target then return false end if target:getCondition(CONDITION_MUTED) then return creature:sendTextMessage(MESSAGE_STATUS_SMALL, "This creature is already muted") end if target:isPlayer() then target:say("^SILENCED^",TALKTYPE_MONSTER_SAY) mute:setParameter(CONDITION_PARAM_TICKS, ptime) combat:addCondition(mute) return combat:execute(creature, var) end if target:isMonster() and tarmonster then target:say("^SILENCED^",TALKTYPE_MONSTER_SAY) mute:setParameter(CONDITION_PARAM_TICKS, mtime) combat:addCondition(mute) return combat:execute(creature, var) else return creature:sendTextMessage(MESSAGE_STATUS_SMALL, "You can only use this spell on Players.") end end Te ajudei ?? Que tal fazer uma contribuição ?
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.