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

Action click on item? REP+

IMac

entrepreneur
Joined
May 31, 2009
Messages
2,482
Reaction score
16
Location
Pluto
is there a way to make a script that when u click on a scroll it will tp u somewhere with eq>?:D
 
i think he mean that u use a scroll and u got tped somewhere with better eq for exemple from plate set to crown set
 
I don't know if it work but try:

To actions.xml add:
PHP:
<action actionid="7548" script="tpitem.lua"/>

Then create tpitem.lua and in it:
PHP:
function onUse(cid, item, fromPosition, itemEx, toPosition)
local pos = {x=1078,y=984,z=9} --change {x=1078,y=984,z=9} to your
	if item.itemid == XXXX and item.actionid == 7548 and isPlayerPzLocked(cid) == FALSE then --item.itemid == XXXX (change XXXX to scroll id)
		doSendMagicEffect(cid, CONST_ME_POFF)
		doTeleportThing(cid, local.pos)
	elseif isPlayerPzLocked(cid) == TRUE then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have pz lock, try again when u don't have it.")
		return FALSE
	end
end


I don't test it
If work REP please :]
Edit:
Fixed loca.pos to local.pos -- My bad :p
 
Last edited:
Back
Top