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

MoveEvent Throw item get tped!

Printer

if Printer then print("LUA") end
Senator
Premium User
Joined
Dec 27, 2009
Messages
5,782
Solutions
31
Reaction score
2,286
Location
Sweden?
Stand on a tile, throw a special item and get tped to another place.

Add action/unique id on the coal basin. Then should the script work ;) Enjoy

Lua:
local item, pos = 0, 0
local pos1 = {x = 100, y = 100, z = 7} --Player posistion --The player need stand on a special place that you will add the posistion
local pos2 = {x = 100, y = 100, z = 7} --Where the teleport send player
local pos3 = {x = 100, y = 100, z = 7} --Where is coal basin there item goes in it
local placename = "Dungeon"

function onStepIn(cid, item, position, fromPosition)
	item = getThingfromPos(pos3)
	if item.itemid == HERE EDIT ITEM then --put item id
		doRemoveItem(item.uid, 1)
		doSendMagicEffect(pos1, CONST_ME_PUFF)
		doSendMagicEffect(pos2, CONST_ME_TELEPORT)
		doTeleportThing(cid, pos2)
		doSendMagicEffect(pos3, CONST_ME_HITBYFIRE)
        doPlayerSendTextMessage(cid,18, "You have been teleport too "..placename..". Have Fun Exploring!")
	end
	return TRUE
end
 
Last edited:
won't work BUT... not bad for being one of ur firsts scripts, i saw ur exp token (first script), keep this way u will learn fast.

small errors:
Code:
local placename = Dungeon
-- must be between "x" or 'x', its an string, not a variable.

Code:
doSendMagicEffect(pos1, CONST_ME_P[COLOR="#FF0000"]O[/COLOR]FF)

Regards, Strack
 
Thanks for the corrects :)

and about dungeon i should make like this local placename = "Dungeon"
 
Back
Top