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

Solved farmine lever

jesseripper

New Member
Joined
Mar 12, 2008
Messages
20
Reaction score
1
Hello, I am having some problem with my Zao Lever and I wonder what I am doing wrong, here is the code I am using;

Code:
local t = {
	[5501] = {{x=32991, y=31539, z=1}, {x=32991, y=31539, z=4}, effect = true},
	[5502] = {{x=32991, y=31539, z=4}, {x=32991, y=31539, z=1}, effect = true},
	[5503] = {{x=32993, y=31547, z=4}, {x=33061, y=31527, z=10}, effect = false},
	[5504] = {{x=33061, y=31527, z=10}, {x=32993, y=31547, z=4}, effect = false},
	[5505] = {{x=33055, y=31527, z=10}, {x=33055, y=31527, z=10}, effect = false}
}
 
function onUse(cid, item, fromPosition, itemEx, toPosition)
	local k = t[item.actionid]
	local thing = getTopCreature(k[1]).uid
	if(k and item.itemid == 1945) then
		if(isPlayer(thing)) then
			doTeleportThing(thing, k[2], false)
			if(k.effect) then
				doSendMagicEffect(k[2], CONST_ME_TELEPORT)
			end
		end
	end
	return doTransformItem(item.uid, item.itemid == 1945 and 1946 or 1945)
end


aswell as I have named every lever from [5501] - [5505] with the action ID ofc

I am also using

Code:
<action actionid="5501" event="script" value="zao/zaolever.lua"/> 
<action actionid="5502" event="script" value="zao/zaolever.lua"/> 
<action actionid="5503" event="script" value="zao/zaolever.lua"/> 
<action actionid="5504" event="script" value="zao/zaolever.lua"/> 
<action actionid="5505" event="script" value="zao/zaolever.lua"/>
What am I doing wrong?
 
Last edited:
What are the problems? do you get errors? what happens when you use it? Are you sure the positions are correct, do you use lever id 1945 and which server do you use?
 
I am using theforgottenserver-v0.2.15-win64gui and I have 99.9% sure that the positions are correct, and when I am trying to pull the lever nothing really happens, I don't get any real error it is just that nothing happens, the lever gets pulled but I do not get teleported, and I have been trying my ass off to get this to work but it just wont budge
 
TFS 0.2 doesn't use event and value but just script.
So that would be like this.
XML:
<action actionid="5501" script="zao/zaolever.lua"/>
Also be sure the lua script is in the right folder.
 

Similar threads

Back
Top