• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Help me fix that please

blaisethunder

New Member
Joined
Aug 13, 2009
Messages
20
Reaction score
0
Help me fix this scrip please...

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'
 
so in other words its

Lua:
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)

return TRUE
end

Thanks to babalow
 
Error again T,T....

[Warning - Event::loadScript] Cannot load script (data/spells/scripts/healing/transform.lua)
[20/09/2009 12:02:55] data/spells/scripts/healing/transform.lua:32: 'end' expected (to close 'function' at line 7) near 'doCreatureAddHealth'
 
Code:
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
end
 
Same error please help T,T

[20/09/2009 14:03:53] [Warning - Event::loadScript] Cannot load script (data/spells/scripts/healing/transform.lua)
[20/09/2009 14:03:53] data/spells/scripts/healing/transform.lua:32: 'end' expected (to close 'function' at line 7) near 'doCreatureAddHealth'
 
I'm pretty sure it should be as Dizzie Blad said:
Lua:
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)

return TRUE
end
 
Same error 0,0.

[20/09/2009 15:03:53] [Warning - Event::loadScript] Cannot load script (data/spells/scripts/healing/transform.lua)
[20/09/2009 15:03:53] data/spells/scripts/healing/transform.lua:32: 'end' expected (to close 'function' at line 7) near 'doCreatureAddHealth'
 
Back
Top