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
<movevent event="StepIn" uniqueid="55100" script="gravestone.lua"/>
Are you using TFS 0.3?ill check if it works with my tfs, if rep ofc
#edit sorry but it doesnt work
still want this please help
How hard is it to change? I've only fixed the xml part to work in 0.3.5he said "if someone uses" hes talkin about an onuse action not a movevent -.-"
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
<action uniqueid="55100" event="script" value="gravestone.lua"/>
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
<action itemid="1409" event="script" value="gravestone.lua"/>
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