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

Tp scroll --Help--

zidanefrance

Seniour Member
Joined
Jul 20, 2009
Messages
51
Reaction score
0
Need help with the TP scroll script..please release it and i will rep++ you!^_^
I mean with to scroll that it is the item when I use it it do a tp for 10seconds only then it sisappear and this tp leads to the temple depends on the player!and u can only use it once every 1minute and if u have pz it gives u error!
Plx do it and i rep++ u
 
Last edited:
Not tested.
Lua:
function storage(cid, teleport)
	setPlayerStorageValue(cid, 55000, 0)
	doRemoveItem(teleport)
return true
end

function onUse(cid, item, fromPosition, itemEx, toPosition)
	if isPlayerPzLocked(cid) == FALSE then
		if getPlayerStorageValue(cid, 55000) <= 0 then
			local teleport = doCreateTeleport(1387, getTownTemplePosition(getPlayerTown(cid)), getCreaturePosition(cid))
			setPlayerStorageValue(cid, 55000, 1)
			addEvent(storage, 10*1000, cid, teleport)
		else
			doPlayerSendCancel(cid, "You can only create a teleport once every 10 seconds.")
			doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
		end
	else
		doPlayerSendCancel(cid, "You can't use this while you are in a battle.")
		doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
	end
return true
end
 
Lua:
function onUse(cid, item, fromPosition, itemEx, toPosition) --when the item is used..
	local pzLocked = isPlayerPzLocked(cid)
	local textColour = 210
	local newPos = {x = 1000, y = 1000, z = 7, stackpos = 1} --location of temple

function teleportation(pos)
	doTeleportThing(cid, newPos)
end

	if pzLocked == false then
		addEvent(teleportation, 10000) --teleport player to newPos, in this case, the main town's temple pos :)
		doRemoveItem(cid, item.uid, 1) --removes the item
		doPlayerSendTextMessage(cid,27,"You will teleported to the temple in 10 seconds!")
		doSendAnimatedText(getPlayerPosition(cid), "Temple!", textColour)
	else
		doPlayerSendTextMessage(cid,27,"You cannot use this coin when you have recently been in battle!")
		doSendAnimatedText(getPlayerPosition(cid), "Fail!", 180)
	end
	return true 
end

Tested, except I used it as a coin to gain access to high-level hunting areas, just changed around some text so it should work.
 
PHP:
	local config = {
	---- CONFIG ----


        time =  10     -- after this seconds, the player will be teleportet


	----------------
}       -- Don't touch ----------------
        local events = {}
        local z = config.time
        -------------------------------

function onUse(cid, item, fromPosition, itemEx, toPosition)
	if isPlayerVip(cid) == TRUE then
		local message = "You will be teleportet in: 10 sec"

		if getPlayerGroupId(cid) >= 1 then
			if getCreatureCondition(cid, CONDITION_INFIGHT) == FALSE then
				events = addEvent(text,100,{cid = cid, z = z})
				doPlayerSendTextMessage(cid,18,message)
			else
				doPlayerSendTextMessage(cid,18,"Sorry you have a battle sign.")
			end
		else
			doPlayerSendTextMessage(cid,18,"Sry you are a gm :D, use /t.")
		end
	else
		doPlayerSendTextMessage(cid,18,"Only VIP Player can use this.")
	end
	return TRUE
end

function text(parameters)
	local cid = parameters.cid
	local z = parameters.z

	if z >= 1 then
		if getCreatureCondition(cid, CONDITION_INFIGHT) == FALSE then
			doPlayerSendTextMessage(cid,18,""..z.."")
			z = z-1
			events = addEvent(text,1000,{cid = cid, z = z})
		else
			events = nil
			doPlayerSendMessage(cid,18,"Failed, you have pz")
		end
	elseif z == 0 then
		if getCreatureCondition(cid, CONDITION_INFIGHT) == FALSE then
			z = config.time
			events = nil
			doSendMagicEffect(getCreaturePosition(cid),2)
			doTeleportThing(cid,(getTownTemplePosition(getPlayerTown(cid))))
			doSendMagicEffect(getCreaturePosition(cid),28)
			doPlayerSendTextMessage(cid,18,"You have teleported to temple.")
		else
			events = nil
			doPlayerSendMessage(cid,18,"Sorry you have a battle sign.")
		end
        end
        return TRUE
end

By Nemo

Hope to give me rep++ i tried to help u :D
 
Not tested.

function storage(cid, teleport)
setPlayerStorageValue(cid, 55000, 0)
doRemoveItem(teleport)
return true
end

function onUse(cid, item, fromPosition, itemEx, toPosition)
if isPlayerPzLocked(cid) == FALSE then
if getPlayerStorageValue(cid, 55000) <= 0 then
local teleport = doCreateTeleport(1387, getTownTemplePosition(getPlayerTown(cid)), getCreaturePosition(cid))
setPlayerStorageValue(cid, 55000, 1)
addEvent(storage, 10*1000, cid, teleport)
else
doPlayerSendCancel(cid, "You can only create a teleport once every 10 seconds.")
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
end
else
doPlayerSendCancel(cid, "You can't use this while you are in a battle.")
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
end
return true
end

Read carefully.


Read the script carefully.
 
No time to test!

:huh:

Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	local function delete(tp)
		doRemoveItem(tp.uid)
	end
	local cfg = {
		time = 10 * 1000,
		pos = { x = 100, y = 100, z = 7 }
	}
	local storage = 54312
	local exhausted = exhaustion.check(cid, cfg.storage)
	if(not exhausted) then
		local pzLocked = isPlayerPzLocked(cid)
		if(not pzLocked) then
			exhaustion.set(cid, cfg.storage, cfg.time)
			tp = doCreateTeleport(1387, cfg.pos, toPosition)
			addEvent(delete, cfg.time, tp)
		else
			doPlayerSendCancel(cid, "You are in a fight.")
		end
	else
		doPlayerSendCancel(cid, "You are exhausted.")
	end
	return true
end
 
Last edited:
:huh:

Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	local function delete(tp)
		doRemoveItem(tp.uid)
	end
	local cfg = {
		time = 10 * 1000,
		pos = { x = 100, y = 100, z = 7 }
	}
	local storage = 54312
	local exhausted = exhaustion.check(cid, cfg.storage)
	if(not exhausted) then
		local pzLocked = isPlayerPzLocked(cid)
		if(not pzLocked) then
			exhaustion.set(cid, cfg.storage, cfg.time)
			tp = doCreateTeleport(1387, cfg.pos, toPosition)
			addEvent(delete, cfg.time, tp)
		else
			doPlayerSendCancel(cid, "You are in a fight.")
		end
	else
		doPlayerSendCancel(cid, "You are exhausted.")
	end
	return true
end

What did you do that Third Aid didn't!?
 
Back
Top