• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

items teleport

Elgenady

Veteran OT User
Joined
Aug 5, 2011
Messages
1,683
Solutions
36
Reaction score
388
hello guys i want script teleport you with items like you can't teleport if u don't have 100 script coins tfs 3.6
 
LUA:
local pos = {x = 1000, y = 1000, z = 7}

function onStepIn(cid, item, itemEx, frompos, topos)
if not doPlayerRemoveItem(cid, itemid, amount) then
   doPlayerSendCancel(cid, "You dont have the coins")
   doTeleportThing(cid, fromPos, true)
return false
else
doTeleportThing(cid, pos)
doPlayerRemoveItem(cid, itemid, amount)
end
end

or

LUA:
local pos = {x = 1000, y = 1000, z = 7}

function onStepIn(cid, item, itemEx, frompos, topos)
if getPlayerStorageValue(cid, script_coin) < 100 then
doPlayerSendCancel(cid, "You do not have enough script coins.")
doTeleportThing(cid, fromPos, true)
else
doTeleportThing(cid, pos)
setPlayerStorageValue(cid, script_coin - 100)
end
end
 
Last edited:
or:
LUA:
local tpto = {x = 100, y = 100, z = 7}
local itemid = 2148
function onStepIn(cid, item, position, fromPosition)
	if not(isPlayer(cid)) then return true end 
	if doPlayerRemoveItem(cid,itemid,100) then
		doTeleportThing(cid, tpto)
		doSendMagicEffect(tpto,10)
	else
		doPlayerSendTextMessage(cid,22, "Sorry, but it require 100 "..getItemName(itemid).." to enter here")
		doSendMagicEffect(getThingPos(cid),10)
		doTeleportThing(cid, fromPosition)
		end
	return true
end
 
Last edited:
this
function onStepIn(cid, item, itemEx, frompos, topos)
if not doPlayerRemoveItem(cid, itemid, amount) then
doPlayerSendCancel(cid, "You dont have the coins")
doTeleportThing(cid, fromPos, true)
return false
else
doTeleportThing(cid, pos)
doPlayerRemoveItem(cid, itemid, amount)
end
end
when use this script tp me and don't loot if i have items or no " tp if i have items or no :S " just tp me :S and othere script gave me this Bug

[01/03/2013 19:38:01] [Error - MoveEvents Interface]
[01/03/2013 19:38:01] data/movements/scripts/bosstp.lua:onStepIn
[01/03/2013 19:38:01] Description:
[01/03/2013 19:38:01] attempt to index a nil value
[01/03/2013 19:38:01] stack traceback:
[01/03/2013 19:38:01] [C]: in function 'doTeleportThing'
[01/03/2013 19:38:01] data/movements/scripts/bosstp.lua:6: in function <data/movements/scripts/bosstp.lua:3>
 
yea cyko and gave me this error

[01/03/2013 19:38:01] [Error - MoveEvents Interface]
[01/03/2013 19:38:01] data/movements/scripts/bosstp.luanStepIn
[01/03/2013 19:38:01] Description:
[01/03/2013 19:38:01] attempt to index a nil value
[01/03/2013 19:38:01] stack traceback:
[01/03/2013 19:38:01] [C]: in function 'doTeleportThing'
[01/03/2013 19:38:01] data/movements/scripts/bosstp.lua:6: in function <data/movements/scripts/bosstp.lua:3>
 
Here We Are :)
LUA:
local topos = {x = 1000, y = 1000, z = 7}
local cancel = "You need "..amount.." Script Coins to enter here"
local item = 2190
local amount = 100
function onStepIn(cid, item, position, fromPosition)
    if doPlayerRemoveItem(cid, item, amount) and isPlayer(cid) then
		doTeleportThing(cid, topos)
	else
		doPlayerSendCancel(cid, cancel)
		doTeleportThing(cid, fromPosition)
		end
	return true
end

Rep++ If It Helpful For You
 
[02/03/2013 00:34:01] [Error - MoveEvents Interface]
[02/03/2013 00:34:01] data/movements/scripts/bosstp.lua
[02/03/2013 00:34:01] Description:
[02/03/2013 00:34:01] data/movements/scripts/bosstp.lua:2: attempt to concatenate global 'amount' (a nil value)
[02/03/2013 00:34:01] [Warning - Event::loadScript] Cannot load script (data/movements/scripts/bosstp.lua)
 
Typo enjoy:
LUA:
local tpto = {x = 100, y = 100, z = 7}
local itemid = 2148
function onStepIn(cid, item, position, fromPosition)
	if not(isPlayer(cid)) then return true end 
	if doPlayerRemoveItem(cid,itemid,100) then
		doTeleportThing(cid, tpto)
		doSendMagicEffect(tpto,10)
	else
		doPlayerSendTextMessage(cid,22, "Sorry, but it require 100 "..getItemName(itemid).." to enter here")
		doSendMagicEffect(getThingPos(cid),10)
		doTeleportThing(cid, fromPosition)
		end
	return true
end
 
Try this:
LUA:
local topos = {x = 1000, y = 1000, z = 7}
local cancel = "You need 100 Script Coins to enter here"
local item = 2190
local amount = 100
function onStepIn(cid, item, position, fromPosition)
    if doPlayerRemoveItem(cid, item, amount) and isPlayer(cid) then
		doTeleportThing(cid, topos)
	else
		doPlayerSendCancel(cid, cancel)
		doTeleportThing(cid, fromPosition)
		end
	return true
end
 
[02/03/2013 01:36:58] [Error - MoveEvents Interface]
[02/03/2013 01:36:58] data/movements/scripts/bosstp.lua:onStepIn
[02/03/2013 01:36:58] Description:
[02/03/2013 01:36:58] (luaGetThing) Thing not found

[02/03/2013 01:36:58] [Error - MoveEvents Interface]
[02/03/2013 01:36:58] data/movements/scripts/bosstp.lua:onStepIn
[02/03/2013 01:36:58] Description:
[02/03/2013 01:36:58] data/lib/050-function.lua:239: attempt to index a boolean value
[02/03/2013 01:36:58] stack traceback:
[02/03/2013 01:36:58] data/lib/050-function.lua:239: in function 'getItemName'
[02/03/2013 01:36:58] data/movements/scripts/bosstp.lua:9: in function <data/movements/scripts/bosstp.lua:3>



im use tfs 3.6
 
Try this:
LUA:
local topos = {x = 1000, y = 1000, z = 7}
local cancel = "You need 100 Script Coins to enter here"
local item = 2190
local amount = 100
function onStepIn(cid, item, position, fromPosition)
    if doPlayerRemoveItem(cid, item, amount) and isPlayer(cid) then
		doTeleportThing(cid, topos)
	else
		doPlayerSendCancel(cid, cancel)
		doTeleportThing(cid, fromPosition)
		end
	return true
end

tested this one ? :S
 
about ur script Sirion_Mido its don't gave me error but when try to teleport its say u need 100 scrip coin to enter here and i have coins
local topos = {x = 32339, y = 32222, z = 7}
local cancel = "You need 100 Script Coins to enter here"
local item = 2159
local amount = 100
function onStepIn(cid, item, position, fromPosition)
if doPlayerRemoveItem(cid, item, amount) and isPlayer(cid) then
doTeleportThing(cid, topos)
else
doPlayerSendCancel(cid, cancel)
doTeleportThing(cid, fromPosition)
end
return true
end
and xml
<movevent type="StepIn" actionid="77041" event="script" value="bosstp.lua"/>

- - - Updated - - -

that about ur script cyko

[02/03/2013 01:52:14] [Error - MoveEvents Interface]
[02/03/2013 01:52:14] data/movements/scripts/bosstp.lua:onStepIn
[02/03/2013 01:52:14] Description:
[02/03/2013 01:52:15] (luaGetThing) Thing not found

[02/03/2013 01:52:15] [Error - MoveEvents Interface]
[02/03/2013 01:52:15] data/movements/scripts/bosstp.lua:onStepIn
[02/03/2013 01:52:15] Description:
[02/03/2013 01:52:15] data/lib/050-function.lua:239: attempt to index a boolean value
[02/03/2013 01:52:15] stack traceback:
[02/03/2013 01:52:15] data/lib/050-function.lua:239: in function 'getItemName'
[02/03/2013 01:52:15] data/movements/scripts/bosstp.lua:9: in function <data/movements/scripts/bosstp.lua:3>
 
Here you go:
LUA:
local tpto = {x = 100, y = 100, z = 7}
local itemid = 2148
function onStepIn(cid, item, position, fromPosition)
	if not(isPlayer(cid)) then return true end 
	if doPlayerRemoveItem(cid,itemid,100) then
		doTeleportThing(cid, tpto)
		doSendMagicEffect(tpto,10)
	else
		doPlayerSendTextMessage(cid,22, "Sorry, but it require 100 coins to enter here")
		doSendMagicEffect(getThingPos(cid),10)
		doTeleportThing(cid, fromPosition)
		end
	return true
end
 
[02/03/2013 14:28:01] [Error - MoveEvents Interface]
[02/03/2013 14:28:01] data/movements/scripts/bosstp.lua:onStepIn
[02/03/2013 14:28:01] Description:
[02/03/2013 14:28:01] attempt to index a nil value
[02/03/2013 14:28:01] stack traceback:
[02/03/2013 14:28:01] [C]: in function 'doTeleportThing'
[02/03/2013 14:28:01] data/movements/scripts/bosstp.lua:6: in function <data/movements/scripts/bosstp.lua:3>
 
Try this :S
LUA:
function onStepIn(cid, item, fromPosition, itemEx, toPosition) 
local newPosition = {x=1000, y=1000, z=7} 
local item = 2548

	 if doPlayerRemoveItem(cid, item, 100) and isPlayer(cid) then
		getThingfromPos(fromPosition) 
		doSendMagicEffect(fromPosition, CONST_ME_FIREAREA) 
		doTeleportThing(cid, newPosition) 
		doSendMagicEffect(newPosition, 10) 
		else
		doPlayerSendCancel(cid, "you need 100 Script Coins")
	end
return TRUE	
end
 
Well , try this :) 90% will work
LUA:
function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor)
local tpos,v = {x=1000, y=1000, z=7},getThingPos(cid)
local item = 2547
	 if doPlayerRemoveItem(cid, item, 100) and isPlayer(cid) then
		doTeleportThing(cid,tpos)
		doSendMagicEffect(v,10)
	else
		doTeleportThing(cid,fromPosition)
		doPlayerSendTextMessage(cid,19,'You need 100 Script Coins.')
		doSendMagicEffect(v,2)
	end
	return true
end
 
Here you go:
LUA:
local tpto = {x = 100, y = 100, z = 7}
local itemid = 2148
function onStepIn(cid, item, position, fromPosition)
	if not(isPlayer(cid)) then return true end 
	if doPlayerRemoveItem(cid,itemid,100) then
		doTeleportThing(cid, tpto)
		doSendMagicEffect(tpto,10)
	else
		doPlayerSendTextMessage(cid,22, "Sorry, but it require 100 coins to enter here")
		doSendMagicEffect(getThingPos(cid),10)
		doTeleportThing(cid, fromPosition)
		end
	return true
end
I couldn't see anything wrong in this script, so I tested on 0.3.6 and and it worked fine for me.
 
Back
Top