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

Gravestone as a teleport.

derkon

New Member
Joined
Oct 13, 2009
Messages
81
Reaction score
0
Location
UK, but im Polish!
Hi everyone!

Does anybody has script or whatever to use gravestone as a teleport.

I mean if someone uses "gravestone(1409)". That person will be teleported immediately to "X.Y.Z"

rep++ for that


Link
 
Last edited:
If for 0.2.5 Ofc i Got :D

Gravestone.lua

Lua:
function onStepIn(cid, item, pos)
local npos = {x=32786,y=32412,z=8}
	if item.uid == 55100 and getPlayerStorageValue(cid,21545) == 2 then
		doTeleportThing(cid,npos)
			doPlayerSendTextMessage(cid, 20, 'You have entered the secret gravestone! You are a true legend!')
    end
end

xml:

Code:
 <movevent event="StepIn" uniqueid="55100" script="gravestone.lua"/>

If helped feel free to rep :p
 
This is the correct line that you should add in movements.xml:
Code:
<movevent type="StepIn" uniqueid="55100" event="script" value="gravestone.lua"/>
 
he said "if someone uses" hes talkin about an onuse action not a movevent -.-"
How hard is it to change? I've only fixed the xml part to work in 0.3.5

@Thread
Code:
local npos = {x=32786,y=32412,z=8}  
function onStepIn(cid, item, pos)
	if getPlayerStorageValue(cid, 21545) == 2 then
		doTeleportThing(cid, npos)
		doSendMagicEffect(npos, CONST_ME_TELEPORT)
		doPlayerSendTextMessage(cid, 25, "You have entered the secret gravestone! You are a true legend!")
		return TRUE
	end
end
Code:
	<action uniqueid="55100" event="script" value="gravestone.lua"/>
 
Create a file in "..\actions\scripts" and name it "gravestone.lua" and in it, put:
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
local newPos = {x = 1000, y = 1000, z = 7, stackpos = 255}

	doTeleportThing(cid, newPos)
	doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"You have been teleported back to the temple!")
	return true
end

And in the actions.xml file, put:
Code:
<action itemid="1409" event="script" value="gravestone.lua"/>
 
Code:
local cfg = {
	pos = {x = 1000, y = 1000, z = 7},
	lvl = 100,
	msg = "You have been teleported back to the temple!"
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if getPlayerLevel(cid) >= cfg.lvl then
		doTeleportThing(cid, cfg.pos)
		doSendMagicEffect(cfg.pos, CONST_ME_TELEPORT)
		return true, cfg.msg and doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, cfg.msg)
	else
		return false, doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You don't have the required level.")
	end
end
 
Back
Top