Sir MoX
New Member
- Joined
- Jan 14, 2009
- Messages
- 285
- Reaction score
- 1
Well hello everybody I have a problem very simple xD the problem is in a vocation door that works but the problem is that only sorcerer and pass and I dont know how to do that the Master sorcerers can pass to ok?:
function onUse(cid, item, fromPosition, itemEx, toPosition)
local voc = 1 --- Id de la voc que pasara.
local msg = "Solo sorcerers pueden pasar" --- Mensaje que le saldra si no es la voc requerida.
if getPlayerVocation(cid) == voc then
pos = getPlayerPosition(cid)
if pos.x == toPosition.x then
if pos.y < toPosition.y then
pos.y = toPosition.y + 1
else
pos.y = toPosition.y - 1
end
elseif pos.y == topos.y then
if pos.x < topos.x then
pos.x = topos.x + 1
else
pos.x = topos.x - 1
end
else
doPlayerSendTextMessage(cid,22,'Stand in front of the door.')
return 1
end
doTeleportThing(cid,pos)
doSendMagicEffect(toPosition,12)
else
doPlayerSendTextMessage(cid,22,"Only Sorcerers can pass this door")
end
return 1
end