• 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!

Spell Transform With Extra speed condition

supermortaliz

Member
Joined
Jan 26, 2014
Messages
76
Solutions
6
Reaction score
12
HELP my please

function onCastSpell(cid, var)

local trans1 = { -- goku
[1] = {1,2,3,4,5,6}, -- Vocation
[2] = {2,56,62,83,8,59}, -- Outfit
[3] = {0,30,50,100,150,200}, -- Level NEED
[4] = {3,3,3,3,3,3}, -- Effect ID
[5] = {1000, 2000, 3000, 4000, 5000, 6000}, -- Additional HP
[6] = {1000, 2000, 3000, 4000, 5000, 6000} -- Additional Mana
[7] = {5, 7, 10, 15, 20, 30} -- Speed Extra
}

transform(cid, trans1)

return true
end
function transform(cid, parameter)
for i = 1, #parameter[1] do
if i >= #parameter[1] then
elseif getPlayerLevel(cid) < parameter[3][i+1] and getPlayerVocation(cid) == parameter[1] then
doPlayerSendCancel(cid, "Required level is ".. parameter[3][i+1] .." to transform!")
elseif getPlayerLevel(cid) >= parameter[3][#parameter[3]] and getPlayerVocation(cid) == parameter[1][#parameter[1]] then
doPlayerSendCancel(cid, "Its u last Transform!")
elseif getPlayerVocation(cid) == parameter[1] and getPlayerLevel(cid) >= parameter[3][i+1] then
doPlayerSetVocation(cid, parameter[1][i+1])
local outfit = {lookType = parameter[2][i+1] , lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookAddons = 0}
doSetCreatureOutfit(cid, outfit, -1)
doSendMagicEffect(getCreaturePosition(cid), parameter[4][i+1])
doPlayerSendCancel(cid, "Transform Success.")
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)+parameter[5][i+1])
setCreatureMaxMana(cid, getCreatureMaxMana(cid)+parameter[6][i+1])

local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false)

local condition = createConditionObject(CONDITION_HASTE)
setConditionParam(condition, CONDITION_PARAM_TICKS, -1)
setConditionFormula(condition, parameter[7[i+1])
setCombatCondition(combat, condition)
return doCombat(cid, combat, var)
return true
end
end
end




[12/04/2014 15:47:44] (luaSetConditionParam) Condition not found
[12/04/2014 15:47:44] [Error - LuaScriptInterface::loadFile] data/spells/scripts/transform.lua:10: '}' expected (to close '{' at line 3) near '['
[12/04/2014 15:47:44] [Warning - Event::loadScript] Cannot load script (data/spells/scripts/transform.lua)
[12/04/2014 15:47:44] data/spells/scripts/transform.lua:10: '}' expected (to close '{' at line 3) near '['
 
Back
Top