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

Status
Not open for further replies.

lizudus

Www.Xivarian.Com Owner
Joined
May 14, 2008
Messages
456
Reaction score
5
Location
Milky Way,Earth,America Central,Costa rica, Heredi
I got this problem when i use this lever



Got this problem!




PHP:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if(item.actionid == 4830) then
		doTeleportThing(getTopCreature({x=836,y=918,z=1}).uid, {x=836,y=918,z=4})
	elseif (item.actionid == 4831) then
       		doTeleportThing(getTopCreature({x=836,y=918,z=4}).uid, {x=836,y=918,z=1})
	elseif (item.actionid == 4832) then
		doTeleportThing(getTopCreature({x=838,y=926,z=4}).uid, {x=906,y=906,z=10})
	elseif (item.actionid == 4833) then
		doTeleportThing(getTopCreature({x=906,y=906,z=10}).uid, {x=838,y=926,z=4})
	elseif (item.actionid == 4834) then
		doTeleportThing(getTopCreature({x=923,y=461,z=13}).uid, {x=927,y=490,z=2})
	elseif (item.actionid == 4835) then
		doTeleportThing(getTopCreature({x=927,y=490,z=2}).uid, {x=923,y=461,z=13})
	end
	return false
end

thanks in advance
rep++
 
try this and change postions
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if(item.actionid == 4830) then
       doTeleportThing(getTopCreature({x=32991,y=31539,z=1}).uid, {x=32991,y=31539,z=4})
	elseif (item.actionid == 4831) then
		doTeleportThing(getTopCreature({x=32991,y=31539,z=4}).uid, {x=32991,y=31539,z=1})
	elseif (item.actionid == 4832) then
		doTeleportThing(getTopCreature({x=32993,y=31547,z=4}).uid, {x=33061,y=31527,z=10})
	elseif (item.actionid == 4833) then
		doTeleportThing(getTopCreature({x=33061,y=31527,z=10}).uid, {x=32993,y=31547,z=4})
	end
	return true
end
 
Lua:
local t = {
	[4830] = {{x=836,y=918,z=1}), {x=836,y=918,z=4}},
	[4831] = {{x=836,y=918,z=4}), {x=836,y=918,z=1}},
	[4832] = {{x=838,y=926,z=4}), {x=906,y=906,z=10}},
	[4833] = {{x=906,y=906,z=10}), {x=838,y=926,z=4}},
	[4834] = {{x=923,y=461,z=13}), {x=927,y=490,z=2}},
	[4835] = {{x=927,y=490,z=2}), {x=923,y=461,z=13}},
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if item.itemid == 1945 then
		local i = t[item.actionid]
		local v = getTopCreature(i[1]).uid
		if isPlayer(v) then
			doTeleportThing(v, i[2])
			doSendMagicEffect(i[1], CONST_ME_TELEPORT)
			doSendMagicEffect(i[2], CONST_ME_TELEPORT)
			doTransformItem(item.uid, 1946)
		else
			return doPlayerSendCancel(cid, 'Sorry, not possible.')
		end
	else
		return doTransformItem(item.uid, 1945)
	end
end
If it says Sorry, not possible. then you have the wrong positions :p
 
Status
Not open for further replies.
Back
Top