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

Solved

Exmortis

Member
Joined
Jun 27, 2008
Messages
189
Reaction score
5
I would like a script for my TFS 0.2.7 server that does the following:
When you rightclick the grave with ID 1406, you get teleported to a secret tomb.
And a message flashes in orange "You now entered a secret location".
Would be awesome!
Rep for anyone who tries to help.
 
Last edited:
Requested

Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)

local newPosition  = {x=#, y=#, z=#}
local animationID = #
local graveID = 1406

	if item.itemid == graveID then
		doTeleportThing(cid, newPosition, TRUE)
		doSendMagicEffect(newPosition, animationID)
                doCreatureSay(cid, "You now entered a secret location", TALKTYPE_ORANGE_1)

		end
	return 1 --- IF FAILS TRY PUTTING       true          instead of       1       ---
end

if any errors send me the error message :)

EDITED:
-Added the requested ORANGE MESSAGE :)
-Removed Local Message, adding the message is done manually. * Set Message is as requested by Exmortis and his Grave Teleporter Idea.
 
Last edited:
Set the item in actions.xml

Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	doTeleportThing(cid, [COLOR="red"]{x = 100, y = 100, z = 7}[/COLOR])
	doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You have now entered a secret area.")
	return true
end
 
"Btw, how do I add the animation to it?"

function onUse(cid, item, fromPosition, itemEx, toPosition)
doTeleportThing(cid, {x = 100, y = 100, z = 7})
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You have now entered a secret area.")
doSendMagicEffect(newPosition, animationID)
return true
end

Here ya go.
 
The only thing wrong with what u did is that in line 6, the message config needs to be taken out and u need to place "asdfkajsdghasdg" in place of message in the command area
 
Back
Top