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

Zao Lever's not work

xitos

New Member
Joined
Oct 14, 2008
Messages
213
Reaction score
1
Hiho ...

the lever's not work

error in console:

[19/01/2010 22:28:12] [Error - Action Interface]
[19/01/2010 22:28:12] data/actions/scripts/zaolever.lua:-OnUse
[19/01/2010 22:28:12] Description:
[19/01/2010 22:28:12] (luaDoTeleportThing) Thing not found

Script:

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



sorry to be asking a lot of help but, is why I'm packing the new city :p

Thanks !! :peace:
 
You need to fix the positions.

this part not work:

Code:
     if(item.actionid == 4830) then
       doTeleportThing(getTopCreature({x=32091,y=31389,z=1}).uid, {x=32091,y=31389,z=4})
     elseif (item.actionid == 4831) then
       doTeleportThing(getTopCreature({x=32091,y=31389,z=4}).uid, {x=32091,y=31389,z=1})

error:

[20/01/2010 00:36:06] [Error - Action Interface]
[20/01/2010 00:36:06] data/actions/scripts/zaolever.lua:eek:nUse
[20/01/2010 00:36:06] Description:
[20/01/2010 00:36:06] (luaDoTeleportThing) Thing not found

is it a bug with coordinates ??

Thanks !!
 
Hiho ...

the lever's not work

error in console:

[19/01/2010 22:28:12] [Error - Action Interface]
[19/01/2010 22:28:12] data/actions/scripts/zaolever.lua:-OnUse
[19/01/2010 22:28:12] Description:
[19/01/2010 22:28:12] (luaDoTeleportThing) Thing not found

Script:

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



sorry to be asking a lot of help but, is why I'm packing the new city :p

Thanks !! :peace:

Try standing on those "special" tiles and then pull the lever lol :p
 
JUST TO EXPLAIN HOW THAT SCRIPT WORKS AND TO EDIT


Code:
if(item.actionid == [COLOR="Lime"]4830[/COLOR]) then
       doTeleportThing(getTopCreature({[COLOR="Red"]x=32991,y=31539,z=1[/COLOR]}).uid, {[COLOR="blue"]x=32991,y=31539,z=4[/COLOR]})

If the lever has the actionid 4830 then it checks the "creature" from

Code:
getTopCreature({[COLOR="red"]x=32991,y=31539,z=1[/COLOR]}).uid

and teleports it to
Code:
{[COLOR="Blue"]x=32991,y=31539,z=4[/COLOR]})


So simply
RED = Where you need to stand
BLUE = Where you get tped
GREEN = Action id xD
 
Back
Top