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

Help Please, Rope aint Work.!!

fenomenoide

New Member
Joined
Oct 22, 2007
Messages
134
Reaction score
0
Hello,
Rope just aint work please someone help me.
I've tried to replace old and news and etc.. and none aint work..
I'm using:
[04/08/2009 05:02:54] The Forgotten Server - Version 0.2.4 (Mystic Spirit).

These is rope.lua
Code:
local holeId = {294, 369, 370, 383, 392, 408, 409, 427, 428, 430, 462, 469, 470, 482, 484, 485, 489, 924, 3135, 3136}
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if toPosition.x == CONTAINER_POSITION or toPosition.x == 0 and toPosition.y == 0 and toPosition.z == 0 then
		return FALSE
	end

	local groundTile = getThingfromPos(toPosition)
	if groundTile.itemid == 384 or groundTile.itemid == 418 or groundTile.itemid == 8278 then
		doTeleportThing(cid, {x = toPosition.x, y = toPosition.y + 1, z = toPosition.z - 1}, FALSE)
	elseif isInArray(holeId, itemEx.itemid) == TRUE then
		local hole = getThingfromPos({x = toPosition.x, y = toPosition.y, z = toPosition.z + 1, stackpos = STACKPOS_TOP_MOVEABLE_ITEM_OR_CREATURE})
		if hole.itemid > 0 then
			doTeleportThing(hole.uid, {x = toPosition.x, y = toPosition.y + 1, z = toPosition.z}, FALSE)
		else
			doPlayerSendCancel(cid, "Sorry, not possible.")
		end
	else
		return FALSE
	end
	return TRUE
end

At actions.xml
Code:
	<action itemid="2120" script="tools/rope.lua"/>
	<action itemid="7731" script="tools/rope.lua"/>

Hole Look-up:
Code:
05:04 You see a rope spot.
There is a hole in the ceiling.
ItemID: [384].
Position: [X: 33212] [Y: 31888] [Z: 8].

And look of rope:
Code:
05:04 You see a rope.
It weighs 18.00 oz.
ItemID: [2120].
Position: [X: 33213] [Y: 31888] [Z: 8].

These is all information.
Please Help Me.
Thanks.
 
try this :p just copyed from mine

local holeId = {294, 369, 370, 383, 392, 408, 409, 427, 428, 430, 462, 469, 470, 482, 484, 485, 489, 924, 3135, 3136}
function onUse(cid, item, fromPosition, itemEx, toPosition)
local groundTile = getThingfromPos(toPosition)
if groundTile.itemid == 384 or groundTile.itemid == 418 or groundTile.itemid == 8278 then
doTeleportThing(cid, {x = toPosition.x, y = toPosition.y + 1, z = toPosition.z - 1}, FALSE)
elseif isInArray(holeId, itemEx.itemid) == TRUE then
local hole = getThingfromPos({x = toPosition.x, y = toPosition.y, z = toPosition.z + 1, stackpos = STACKPOS_TOP_MOVEABLE_ITEM_OR_CREATURE})
if hole.itemid > 0 then
doTeleportThing(hole.uid, {x = toPosition.x, y = toPosition.y + 1, z = toPosition.z}, FALSE)
else
doPlayerSendCancel(cid, "Sorry, not possible.")
end
else
return FALSE
end
return TRUE
end
 
Back
Top