local config = {
vocation = X, --Id of the vocation to teleport
telepos = {x= , y= , z= }, --Teleport position
actionid = XXXX --Action ID of the tile you step on
}
function onStepIn(cid, item, pos, fromPos)
if (item.actionid == config.actionid) then
if (getPlayerVocation(cid) == config.vocation) then
doTeleportThing(cid, config.telepos)
doPlayerSendTextMessage(cid, 25, 'You have been teleported!')
else
doPlayerSendTextMessage(cid, 25, 'You have to be a Druid to step on this tile.')
end
end
end
Lua:local config = { vocation = X, --Id of the vocation to teleport telepos = {x= , y= , z= }, --Teleport position actionid = XXXX --Action ID of the tile you step on } function onStepIn(cid, item, pos, fromPos) if (item.actionid == config.actionid) then if (getPlayerVocation(cid) == config.vocation) then doTeleportThing(cid, config.telepos) doPlayerSendTextMessage(cid, 25, 'You have been teleported!') else doPlayerSendTextMessage(cid, 25, 'You have to be a Druid to step on this tile.') end end end
Make sure to use the Search Function
before you request.
I want to make a tile that teleport example only Druids.
It it easy to make a script for that?
The one who's able to read got the advantage
local vocation = item.actionid - 100
if(vocation >= 0 and vocation < 50) then
local playerVocationInfo = getVocationInfo(getPlayerVocation(cid))
if(playerVocationInfo.id ~= vocation and playerVocationInfo.fromVocation ~= vocation) then
pushBack(cid, position, fromPosition, true)
end
return true
end
he wanna customizePart of code from tiles.lua:
Code:local vocation = item.actionid - 100 if(vocation >= 0 and vocation < 50) then local playerVocationInfo = getVocationInfo(getPlayerVocation(cid)) if(playerVocationInfo.id ~= vocation and playerVocationInfo.fromVocation ~= vocation) then pushBack(cid, position, fromPosition, true) end return true end
Okay?
he wanna customize