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

Lua Quick easy question - tile location for onCastSpell

I do not need to post the script. How do you obtain target tile in onCastSpell script. in scripts onUse you have toPosition, I wonder how to get target tile position in onCastSpell.
 
Depending on the type of script you either use:
variantToPosition(var)
or
variantToNumber(var) --creatureid
 
As Evan said, this function..er..script type thing can tell the player's position..decode it yourself.

Lua:
local function delayedTeleport(cid, position)
	if(not isCreature(cid)) then return true end
	doTeleportThing(cid, position)
	return true
end
 
Back
Top