• 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] Remove item

VirrageS

←•†ĿuĀ && ©¤¤•→
Joined
May 30, 2010
Messages
984
Reaction score
63
Location
Poland
Hello

I need script when you say "!teleport" then teleport is appearing:

Lua:
doCreateTeleport(1387, {x = 335, y = 543, x= 432}, getPlayerPosition(cid))
then you can go into it but after 10 sec teleport is disappearing.

Could someone do this script??

Thanks and rep++ for help :thumbup:
 
Last edited:
try this.

Lua:
local p,s = {x = 335, y = 543, x= 432},2715
function onSay(cid,words,param)
	if getPlayerStorageValue(cid,s) => os.time then
		doCreateTeleport(1387, p, getPlayerPosition(cid))
		doPlayerSendTextMessage(cid,MESSAGE_EVENT_ORANGE,'Teleport will dissapear in 10 seconds.')
		addEvent(removeTile,10*60*1000)
	else
		doPlayerSendCancel(cid,'Can summon again in '..getPlayerStorageValue(cid,s)-os.time..' seconds.')
	end
	return true
end

function removeTile()
p.stackpos = 1
	doRemoveItem(p.uid,1)
	doSendMagicEffect(p,2)
	return true
end
 
You are doing it wrong. Teleport position isn't this:
Lua:
{x = 335, y = 543, x= 432} // position where player is teleporting!!
but this:
Lua:
getPlayerPosition(cid) // teleport is creating under player (but player isn't teleporting istantly. He must step on teleport again.)
 
Not working ;/

Code:
[9:21:25.218] [Error - TalkAction Interface]
[9:21:25.218] data/talkactions/scripts/tpele.lua:onSay
[9:21:25.218] Description:
[9:21:25.218] attempt to index a number value
[9:21:25.218] stack traceback:
[9:21:25.218]   [C]: in function 'getTileInfo'
[9:21:25.218]   data/talkactions/scripts/tpele.lua:15: in function <data/talkactions/scripts/tpele.lua:10>

#Solved. Thanks and rep++ to JDB and unknown666
 
Last edited:
Back
Top