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

Vocation Door

bomba

Member
Joined
Feb 26, 2008
Messages
635
Reaction score
7
Location
Brazil
I need one script of Vocation Door:
Knight and Paladin pass, sorcerer and druid don't pass.

Please help-me!
 
mmmi i found this:

Create a lua file and ad this:
Code:
-- Sorcerer Vocation Door by Vagox edited by Streamside (iam not scripter) --
function onUse(cid, item, frompos, item2, topos)
pvoc = getPlayerVocation(cid)

if item.uid == 5001 then
if pvoc == 3 or pvoc == 4 or pvoc == 7 or pvoc == 8 then
doPlayerSendTextMessage(cid, 22, "You can pass, you are a paladin or knight.")
pos = getPlayerPosition(cid)

if pos.x == topos.x then
if pos.y < topos.y then
pos.y = topos.y + 1
else
pos.y = topos.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,'Please stand in front of the door.')
return 1
end

doTeleportThing(cid,pos)
doSendMagicEffect(topos,12)
else
doPlayerSendTextMessage(cid,22,'You cant pass, you arent paladin or knight.')
end
return 1
else
return 0
end
end

And in actions.xml ad this:
Code:
<action uniqueid="5001" script="vocdoor_sorc.lua" />

P.D.: Sorry for my english
 
Last edited:
Druid
Code:
function onUse(cid, item, frompos, item2, topos)

if item.uid == 10093 then
if getPlayerVocation(cid) == 2 or getPlayerVocation(cid) == 6 then
doPlayerSendTextMessage(cid, 22, "You can pass, you are a Druid.")
pos = getPlayerPosition(cid)

if pos.x == topos.x then
if pos.y < topos.y then
pos.y = topos.y + 1
else
pos.y = topos.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,'Please stand in front of the door.')
return 1
end

doTeleportThing(cid,pos)
doSendMagicEffect(topos,12)
else
doPlayerSendTextMessage(cid,22,'You can\'t pass, you aren\'t a Druid.')
end
return 1
else
return 0
end
end

Sorcerer
Code:
function onUse(cid, item, frompos, item2, topos)

if item.uid == 10094 then
if getPlayerVocation(cid) == 1 or getPlayerVocation(cid) == 5 then
doPlayerSendTextMessage(cid, 22, "You can pass, you are a Sorcerer.")
pos = getPlayerPosition(cid)

if pos.x == topos.x then
if pos.y < topos.y then
pos.y = topos.y + 1
else
pos.y = topos.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,'Please stand in front of the door.')
return 1
end

doTeleportThing(cid,pos)
doSendMagicEffect(topos,12)
else
doPlayerSendTextMessage(cid,22,'You can\'t pass, you aren\'t a Sorcerer.')
end
return 1
else
return 0
end
end
 
Back
Top Bottom