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

Action Teleport Items.!

Morlad

Mega USER
Joined
Dec 22, 2010
Messages
288
Reaction score
16
Location
/P/O/L/A/N/D
Hi ..

My script ... kilck scroll and teleport..

PHP:
local tpPos = {x=1000, y=1000, z=7}  -- Where teleporting

data/actions/tpscoll.lua

PHP:
local tpPos = {x=1000, y=1000, z=7}
function onUse(cid, item, fromPosition, itemEx, toPosition)
        if getCreatureCondition(cid, CONDITION_INFIGHT) == true then
			doRemoveItem(item.uid, 1)
		end
		doTeleportThing(cid, tpPos)
        return TRUE
end


Actions.xml

PHP:
<action itemid="8300" event="script" value="tpscroll.lua"/>


Rep plx.
 
Last edited:
PHP:
effect = 30,
msg = "You teleporting"
    }
yyy? but this is not local and you don't use this hah
 
okay, who deleted the other thread
Lua:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if getCreatureCondition(cid, CONDITION_INFIGHT) then
		doPlayerSendCancel(cid, 'You can\'t teleport while in fight.')
	else
		doRemoveItem(item.uid)
		local old, new = getThingPos(cid), getPlayerMasterPos(cid)
		doTeleportThing(cid, new)
		doSendMagicEffect(old, CONST_ME_TELEPORT)
		doSendMagicEffect(new, CONST_ME_TELEPORT)
		doCreatureSay(cid, 'You have teleported to your home temple.', TALKTYPE_ORANGE_1, false, cid)
	end
	return true
end
 
Back
Top