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

Request!! Teleport doll with exh.. rep+ for help

Dramix

New Member
Joined
Jun 26, 2009
Messages
289
Reaction score
1
Hello otlanders, i need some "edit" help with my teleport doll ! :) rep+ for help, here's my script!

I need someone that can help with this; add 30 sec delay, so you can't spam it!, rep+ for help me! :)

local newpos = {x=1002, y=1001, z=4} --New position
function onUse(cid, item, frompos, item2, topos)
local inFight = hasCondition(cid, CONDITION_INFIGHT)
if not inFight then
doSendMagicEffect(getPlayerPosition(cid), 2)
doTeleportThing(cid,newpos)
doSendMagicEffect(newpos,10)
else
doPlayerSendTextMessage(cid,25,"You could not use this teleport scroll if you are in fight!")
end
return 1
end
 
Lua:
local storage, time = 1337, 10
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if exhastion.get(cid, storage) then
		return doPlayerSendCancel(cid, "You are exhausted.")
	end
	
	if hasCondition(cid, CONDITION_INFIGHT) then
		return doPlayerSendCancel(cid, "You cannot teleport while in battle!")
	end
	
	doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
	doTeleportThing(cid, {x = 1002, y = 1001, z = 4})
	exhaustion.set(cid, storage, time)
	doSendMagicEffect({x = 1002, y = 1001, z = 4}, CONST_ME_TELEPORT)
	return true
end
 
Back
Top