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

Scripters ? Help find the player in the Spell ?

Paulim

New Member
Joined
Jun 3, 2009
Messages
31
Reaction score
0
Look, I tried to create a Spell, that stuns(freeze) Enemy for a while...

But the problem is... The script dont found the Player.cid or .uid

I'm so so on scripts :(

Here's the Script !

local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, 31)

local area = createCombatArea(AREA_BEAM1)
setCombatArea(combat, area)

function onTargetTile(cid, pos)
local position = pos
position.stackpos = 65535
local player = getThingfromPos(position)
if player.itemid > 0 and isPlayer(cid) then
doCreatureSetNoMove(player.uid, 1)
end
end

setCombatCallback(combat, CALLBACK_PARAM_TARGETTILE, "onTargetTile")

local function onCastSpell1(parameters)
doCombat(parameters.cid, parameters.combat, parameters.var)
end

function onCastSpell(cid, var)

local parameters = { cid = cid, var = var, combat = combat }
addEvent(onCastSpell1, 100, parameters)
addEvent(onCastSpell1, 1000, parameters)
addEvent(onCastSpell1, 2000, parameters)

end

The problem is... I use the spell, but the player Still moves...
It means that the players was not found! ='[

Help me, please ? :confused:
It's possible do this spell, cause I play an OT with it, so help me!

The Spell is so good, u will like it! :)
Thank's

Sorry if is wrong section! :(
 
Back
Top