blaisethunder
New Member
- Joined
- Aug 13, 2009
- Messages
- 20
- Reaction score
- 0
Help me fix this scrip please...
Do this error!
[Warning - Event::loadScript] Cannot load script (data/spells/scripts/healing/transform.lua)
[19/09/2009 09:50:04] data/spells/scripts/healing/transform.lua:32: 'end' expected (to close 'function' at line 7) near 'doCreatureAddHealth'
local condition = createConditionObject(CONDITION_HASTE)
setConditionParam(condition, CONDITION_PARAM_TICKS, 60000)
setConditionFormula(condition, 0.8, -72, 0.8, -72)
setCombatCondition(combat, condition)
function onCastSpell(cid, var)
local vocation = getPlayerVocation(cid)
--------------Config------------------
local colour = math.random(1,100)
local timeInOutfit = 1 * 60 * 1000
local sorcOutfit = 130
local druidOutfit = 308
local paladinOutfit = 64
local knightOutfit = 306
------------ End Config --------------
if vocation == 4 or vocation == 8 or vocation == 12 then --if knight or elite knight or super knight
doSetCreatureOutfit(cid, {lookType = knightOutfit,lookHead = colour,lookBody = colour,lookLegs = colour,lookFeet = colour,lookAddons = 0}, timeInOutfit)
elseif vocation == 3 or vocation == 7 or vocation == 11 then --if pally or royal pally or super pally
doSetCreatureOutfit(cid, {lookType = paladinOutfit,lookHead = colour,lookBody = colour,lookLegs = colour,lookFeet = colour,lookAddons = 0}, timeInOutfit)
elseif vocation == 2 or vocation == 6 or vocation == 10 then --if druid or elder druid or super druid
doSetCreatureOutfit(cid, {lookType = druidOutfit,lookHead = colour,lookBody = colour,lookLegs = colour,lookFeet = colour,lookAddons = 0}, timeInOutfit)
elseif vocation == 1 or vocation == 5 or vocation == 9 then --if sorc or master sorc or super sorc
doSetCreatureOutfit(cid, {lookType = sorcOutfit,lookHead = colour,lookBody = colour,lookLegs = colour,lookFeet = colour,lookAddons = 0}, timeInOutfit)
end
return doCombat(cid, combat, var)
doCreatureAddHealth(cid, 800)
end
return TRUE
Do this error!
[Warning - Event::loadScript] Cannot load script (data/spells/scripts/healing/transform.lua)
[19/09/2009 09:50:04] data/spells/scripts/healing/transform.lua:32: 'end' expected (to close 'function' at line 7) near 'doCreatureAddHealth'