• 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!
  • If you're using Gesior 2012 or MyAAC, please review this thread for information about a serious security vulnerability and a fix.

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

bpm91

Well-Known Member
Joined
May 23, 2019
Messages
531
Solutions
7
Reaction score
62
Location
Brazil
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
 

jakub742

Member
Joined
May 1, 2010
Messages
110
Solutions
2
Reaction score
8
Location
Slovakia
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
 
Top