• 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!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

Script for donation!

enriel

Big L
Joined
Dec 14, 2007
Messages
1,254
Reaction score
2
Location
Montenegro
Is it possible to do so if you use X item, you will be teleported to X position? For example, I buy donation scroll, the scroll teleports you too first X place, then if you use it again to X place. It can be used to teleport to quest, for example if you use it once, it teleports you to DHQ, then to POI, then to INQ etc.
 
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	local destinations = {
		{x=,y=,z=}, -- dhq
		{x=,y=,z=}, -- poi
		{x=,y=,z=} -- inq
	}
	local point = getPlayerStorageValue(cid, 12345)
	if (point <= 0) then
		point = 1
	end

	doTeleportThing(cid, destinations[point])
	setPlayerStorageValue(cid, 12345, point+1)
	return true
end
 
Back
Top