AdiMit
c(;
- Joined
- May 2, 2016
- Messages
- 70
- Solutions
- 2
- Reaction score
- 3
Hello dear OtLanders
I'm trying to create a Mutation/Polymorph spell that would change the target into one of the animals on the list... The most important part of the spell (the animals) is taken from the following thread:
Lua - [Spell] Polymorph Rune
(^and that is the only part of the spell that brings about an error)
The error:
Although it seems to be clear what is wrong with the script, I cannot figure out where to put the ','
The script:
By the way, I'm currently using the [8.60] The Forgotten Server 0.3.6 (Crying Damson) V8 by Printer, from the thread: [8.60] The Forgotten Server 0.3.6 (Crying Damson) V8
Thank you in advance for your support,
Best regards!
I'm trying to create a Mutation/Polymorph spell that would change the target into one of the animals on the list... The most important part of the spell (the animals) is taken from the following thread:
Lua - [Spell] Polymorph Rune
(^and that is the only part of the spell that brings about an error)
The error:
Although it seems to be clear what is wrong with the script, I cannot figure out where to put the ','
The script:
Lua:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_PLANTATTACK)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_EARTH)
local outfit = createConditionObject(CONDITION_OUTFIT)
setConditionParam(outfit, CONDITION_PARAM_TICKS, 6000)
local animals = {
276, -- cat
111, -- chicken
32, -- dog
212, -- flamingo
224, -- frog
60, -- pig
21, -- rat
14, -- sheep
197, -- tortoise
28 -- snake
}
local animal = animals[math.random(animals)]
for animal = animals[math.random(animals)] do
addOutfitCondition(outfit, {lookTypeEx = animal})
end
local muted = createConditionObject(CONDITION_MUTED)
setConditionParam(muted, CONDITION_PARAM_TICKS, 6000)
local regen = createConditionObject(CONDITION_REGENERATION)
setConditionParam(regen, CONDITION_PARAM_SUBID, 1)
setConditionParam(regen, CONDITION_PARAM_BUFF, true)
setConditionParam(regen, CONDITION_PARAM_TICKS, 7 * 1000)
setConditionParam(regen, CONDITION_PARAM_HEALTHGAIN, 100)
setConditionParam(regen, CONDITION_PARAM_HEALTHTICKS, 1000)
local paralyze = createConditionObject(CONDITION_PARALYZE)
setConditionParam(paralyze, CONDITION_PARAM_TICKS, 6500)
setConditionFormula(paralyze, -0.9, 0, -0.9, 0)
setCombatCondition(combat, paralyze)
setCombatCondition(combat, outfit)
setCombatCondition(combat, muted)
setCombatCondition(combat, regen)
setCombatCondition(combat, paralyze)
function onCastSpell(cid, var)
return doCombat(cid, combat, var)
end
Thank you in advance for your support,
Best regards!