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

Windows [8.60][Teleport on step in when the player have an spetial item]

SonGoqu

New Member
Joined
Nov 27, 2008
Messages
64
Reaction score
0
Hello, I need a little help. I have an OTS 8.60 client and I need two scripts:

1. the player when he have a special item (2130) and he step in to a tile with aid 17004 he will be teleported (y-2). I have a script that works on 8.40 but he don't work on 8.60 [Visum]


Code:
function onStepIn(cid, item, pos)

	if isPlayer(cid) == 1 then
		tible = getPlayerItemCount(cid,2130)
		if tible >= 1 then
			newpos = {x=pos.x,y=pos.y-3,z=pos.z}
			doSendMagicEffect(pos,12)
			doTeleportThing(cid,newpos)
			doSendMagicEffect(newpos,12)
		end
	end
end


2. A self closing door, when the player use a key and go through the door, they should close form self (key aid=10001)
HTML:
 
What server are you using?

try this

Lua:
function onStepIn(cid, item, pos)

	if isPlayer(cid) then
		tible = getPlayerItemCount(cid,2130)
		if tible > 0 then
			newpos = {x=pos.x,y=pos.y-3,z=pos.z}
			doSendMagicEffect(pos,12)
			doTeleportThing(cid,newpos)
			doSendMagicEffect(newpos,12)
		end
	end
end
 
What server are you using?

try this

Lua:
function onStepIn(cid, item, pos)

	if isPlayer(cid) then
		tible = getPlayerItemCount(cid,2130)
		if tible > 0 then
			newpos = {x=pos.x,y=pos.y-3,z=pos.z}
			doSendMagicEffect(pos,12)
			doTeleportThing(cid,newpos)
			doSendMagicEffect(newpos,12)
		end
	end
end

I use Visum Gold 8.60. Nothing happened when I using this script

--------------------------------------------------------

This wan't work too:


Code:
function onStepIn(cid, item, position)
    local teleport = {x=1631, y=2465, z=4}
 
    if item.uid == 17003 and getPlayerItemCount(cid,2130) >= 1 then
        doSendMagicEffect(position, 2)
        doTeleportThing(cid, teleport)
        doSendMagicEffect(getThingPos(cid), 10)
    end
    return true
end
 
Last edited:
Back
Top