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

TFS 1.X+ only 1 vocation pass in teleport tfs 1.5

bpm91

Intermediate OT User
Joined
May 23, 2019
Messages
926
Solutions
7
Reaction score
127
Location
Brazil
YouTube
caruniawikibr
hi, I'm trying to adapt a teleport for only druid and elder druid to pass inside it, how do I do it? tfs 1.5 nekiro 7.72


Lua:
function onStepIn(cid, item, position, fromPosition)

local config = {
msgDenied = "druids only has access to this place.",
pos = {x=32851, y=32339, z=6},
msgWelcome = ""
}

if(not isDruid(cid)) then
doTeleportThing(cid, fromPosition, true)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, config.msgDenied)
doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_BLUE)
return TRUE
end
doTeleportThing(cid,config.pos)
return TRUE
end
 
check the vocation id. player:getVocation():getId() should return a player voc id. So add check if player voc id matches the voc id of druid or elder druid
 
Back
Top