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

[support] Need help with teleport script.

christiandb

Member
Joined
Feb 5, 2008
Messages
2,469
Reaction score
5
Location
010
Code:
function onUse(cid, item, frompos, item2, topos)
area = {x=32316, y=31942, z=7} 
if itemid == 7722 then 
doTeleportThing(cid, area,0)
doCreatureSay(cid, "Go get your free addons at Addons!", TALKTYPE_ORANGE_1)
doRemoveItem(item.uid)
end
return 1
end

in actions.xml:
Code:
<action itemid="7722" script="donation/addon.lua"/>

If I use the item nothing happens :S
 
PHP:
local config = {
	itemid = 7722,
	position = { x = 32316, y = 31942, z = 7 } 
	}
function onUse(cid, item, frompos, item2, topos)
	if item.itemid == config.itemid then 
		doTeleportThing(cid, config.position, 0)
		doCreatureSay(cid, "Go get your free addons at Addons!", TALKTYPE_ORANGE_1)
		doRemoveItem(item.uid)
	end
	return TRUE
end
 
Back
Top Bottom