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

Solved Script problem. Need solusion as soon as possible.

Misticoo

New Member
Joined
Dec 9, 2011
Messages
13
Reaction score
0
Hey guys,
Can you please check and tell me what's wrong with this script?

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

local condition = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(condition, CONDITION_PARAM_TICKS, 100000)
setConditionParam(condition, CONDITION_PARAM_SKILL_MELEEPERCENT, 110)
setConditionParam(condition, CONDITION_PARAM_SKILL_SHIELDPERCENT, 110)
setConditionParam(condition, CONDITION_PARAM_SKILL_SWORD, 15)
setConditionParam(condition, CONDITION_PARAM_SKILL_CLUB, 15)
setCombatCondition(combat, condition)


function onCastSpell(cid, var)
local pos = getCreaturePosition(cid)
pos.x = pos.x + 2
pos.y = pos.y + 0
doSendMagicEffect(pos, 238)
if getPlayerStorageValue(cid, 1000) == 0 then
doCombat(cid, combat, var)
setPlayerStorageValue(cid, 1000, 1)
setPlayerStorageValue(cid, 4000, 0)
doSetCreatureOutfit(cid,62)
doPlayerSendCancel(cid, 'Zangetsu!')
else
doRemoveCondition(cid, CONDITION_PARAM_SHIELDPERCENT)
doRemoveCondition(cid, CONDITION_PARAM_SKILL_MELEEPERCENT)
doRemoveCondition(cid, CONDITION_PARAM_SKILL_SWORD)
doRemoveCondition(cid, CONDITION_PARAM_SKILL_CLUB)
doSetCreatureOutfit(cid,56)
doPlayerSendCancel(cid, 'Shikai Off!')
setPlayerStorageValue(cid, 1000, 0)
end
end

The thing is, in my eyes it should be working, but whenever i go on my server and try to use this spell there's an error coming up in the gui.
That's what is says:
[30/08/2013 09:20:43] [Error - Spell Interface]
[30/08/2013 09:20:43] data/spells/scripts/shikai.lua:eek:nCastSpell
[30/08/2013 09:20:43] Description:
[30/08/2013 09:20:43] attempt to index a number value
[30/08/2013 09:20:43] stack traceback:
[30/08/2013 09:20:43] [C]: in function 'doSetCreatureOutfit'
[30/08/2013 09:20:43] data/spells/scripts/shikai.lua:29: in function <data/spells/scripts/shikai.lua:13>
 
Last edited:
Back
Top