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

Magic Rope Script Not Working!

grogan

New Member
Joined
Dec 6, 2007
Messages
133
Reaction score
0
I need some help with magic rope script it isn't working and in my console it is spamming this error.

30/12/2008 19:43:59] data/spells/scripts/support/magic rope.lua:6: attempt to call global 'getThingfromPos' (a nil value)
[30/12/2008 19:43:59] stack traceback:
[30/12/2008 19:43:59] data/spells/scripts/support/magic rope.lua:6: in function <data/spells/scripts/support/magic rope.lua:3>


here is my script:


local ArrayRopeSpot = {384, 418, 8278}

function onCastSpell(cid, var)
local pos = getPlayerPosition(cid)
pos.stackpos = 0
local grounditem = getThingfromPos(pos)

if(isInArray(ArrayRopeSpot, grounditem.itemid) == TRUE) then
local newpos = pos
newpos.y = newpos.y + 1
newpos.z = newpos.z - 1
doTeleportThing(cid, newpos, 0)
doSendMagicEffect(pos, CONST_ME_TELEPORT)
return LUA_NO_ERROR
else
doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTPOSSIBLE)
doSendMagicEffect(pos, CONST_ME_POFF)
return LUA_ERROR
end
end
 
Eh, you don't have to make new script for rope, it already exists, so you can add more itemids. Add to actions.xml:
Code:
	<action itemid="XXXX" script="tools/rope.lua"/>
as XXXX put ID of the new rope.
 
Back
Top