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

Haate

John Ever Stone
Joined
Apr 2, 2010
Messages
113
Reaction score
1
Location
Ełk
http://tibia.net.pl/showthread.php?t=7678 - the original topic

Script just does not work, did everything in sequence, but it puts me just like all of a ladder.

[31/05/2010 2000 : 44:46] The Forgotten Server version 0.3.6 (Crying Damson)

The engine has no errors, it can be to blame for the engine, which does not read anything? Why do not you work?

actions/scripts:
Code:
function onUse(cid, item, frompos)

local i460 = {x=2663, y=2896-3, z=4} -- pozycja itema 460 o uid 4503

if isPlayer(cid) == TRUE then
   doTeleportThing(cid,i460)
else
    return 0
end
end

actions.xml:
Code:
<action uniqueid="4503" script="drabina4503.lua"/>

movements/scripts:
Code:
function onStepIn(cid, item, pos)

local drabina = {x=2663, y=2896, z=7} -- wspolrzedne drabiny o uid 4503 (gdzie ma sie pojawic gracz)

if isPlayer(cid) == TRUE then
   doTeleportThing(cid,drabina)
else
    return 0
end
end

movements.xml
Code:
<movevent event="StepIn" uniqueid="4504" script="460_4504.lua"/>
 
I don't know for what you need it :(.
And it won't work 'cause this scipt is for tibia 8.11 (or someone will compil it to TFS 0.3.6).
 
action
Code:
function onUse(cid,item,fromPos)
local p = {x=2663, y=2896-3, z=4}
	if isPlayer(cid) then
		doTeleportthing(cid,p)
	else
		return false
	end
end

movement
Code:
function onStepIn(cid,item,pos)
local p = {x=2663, y=2896, z=7}
	if isPlayer(cid) then
		doTeleportThing(cid,p)
	else
		return false
	end
end
 
unknown666:

When I use a ladder TFS show me this error.

[code[01/06/2010 19:31:36] [Error - Action Interface]
[01/06/2010 19:31:36] data/actions/scripts/drabina4503.lua:eek:nUse
[01/06/2010 19:31:36] Description:
[01/06/2010 19:31:36] data/actions/scripts/drabina4503.lua:4: attempt to call global 'doTeleportthing' (a nil value)
[01/06/2010 19:31:36] stack traceback:
[01/06/2010 19:31:36] data/actions/scripts/drabina4503.lua:4: in function <data/actions/scripts/drabina4503.lua:1>[/code]
 
...
1.TFS don't show any bugs
2.Look my first post, ladder with this script(unique id) don't teleport to three floors up.
 
Code:
function onUse(cid,item,fromPos)
local p = {x=2663, y=2896-3, z=4}
	if isPlayer(cid) then
		doTeleportThing(cid,p)
	else
		return false
	end
end

should work now, or else tell error.
 
Code:
function onUse(cid,item,fromPos)
local p = {x=2663, y=2896-3, z=4}
	if isPlayer(cid) then
		doTeleportThing(cid,p)
	else
		[B][COLOR="Red"]return false[/COLOR][/B]
	end
        [B][COLOR="Blue"]return false[/COLOR][/B]
end

should work now, or else tell error.
You dont need "return false" here neither in the last of the script cuz it returns false alone if u didnt write it
 
The script looks like this:
Code:
function onus (cid, item, fromPos)
local p = (x = 2663, y = 2896, z = 4)
isPlayer if (cid) then
doTeleportThing (c and d, p)
else
return false
end
end
I did so as he wrote quas, but it did not help, also changed as previously reported unknown666.

Maybe someone else also knows how to help me?

But I want to mention that this part of the ladder it does not work, we teleport to the bottom ...
Code:
function onStepIn (cid, item, pos)
local p = (x = 2663, y = 2896, z = 7)
isPlayer if (cid) then
doTeleportThing (c and d, p)
else
return false
end
end

I did not know that a normal teleport would make me so many problems, yet pokombinuje alone, but I see no progress, as I guess.


I use Google Translate!
 
Back
Top