Jump to content
  • 0

Vocation door, não deixa second promotion entrar


pedrizito15

Question

Galera alguém pode corrigir esse Script aqui :

 

---VocDoor-by Sky Hunter---
function onUse(cid, item, frompos, item2, topos)
PlayerVoc = getPlayerVocation(cid)
if PlayerVoc == 5 then
doTeleportThing(cid,{x=51, y=28, z=8})
   else
doPlayerSendCancel(cid,"Only Master Sorcerers may open this door.")
       return 1
   end
end

O problema é o seguinte ele só deixa Masters Sorcerers passar pela porta, eu queria que sorcerer, master sorcerer e a second promotion entrasse pela porta...

 

ID das vocations :

 

Sorcerer = 1

Master Sorcerer = 5

Under Sorcerer = 9

 

Uso o Styller Yurots versão premium

 

Link to comment
Share on other sites

8 answers to this question

Recommended Posts

  • 0


--config by uotl£

local playervoc = {1,5,9} -- vocations

--config by uotl£

 

function onUse(cid, item, frompos, item2, topos)

if isInArray(playervoc, getPlayerVocation(cid)) then

doTeleportThing(cid,{x=51, y=28, z=8})

else

doPlayerSendCancel(cid,"Only Master Sorcerers may open this door.")

return true

end

end

 

Edited by notle2012
Link to comment
Share on other sites

  • 0
Deu o seguinte erro :
[Error - LuaInterface::loadFile] data/actions/scripts/other/poi1.lua:4: unexpected symbol near ','
[Warning - Event::loadScript] Cannot load script (data/actions/scripts/other/poi1.lua)
data/actions/scripts/other/poi1.lua:4: unexpected symbol near ','

Eu tentei de três outros jeitos :

if PlayerVoc == 1 then, 5 then ,9 then 
if PlayerVoc == 1 then, 5 then, 9 then , 
if PlayerVoc == 1 then, 5 then, 9 then

Mas ocorreu erros também.

Link to comment
Share on other sites

  • 0

Tenta assim amigo sou novato ainda mais tento ajudar

 

 

 

function onUse(cid, item, frompos, item2, topos)
PlayerVoc = getPlayerVocation(cid)
if PlayerVoc == 1 or if PlayerVoc == 5 or if PlayerVoc == 9 then

doTeleportThing(cid,{x=51, y=28, z=8})
else
doPlayerSendCancel(cid,"Only Master Sorcerers may open this door.")
return 1
end
end

Link to comment
Share on other sites

  • 0


---VocDoor-by Sky Hunter---

function onUse(cid, item, frompos, item2, topos)

PlayerVoc = getPlayerVocation(cid)

if PlayerVoc == 1,5,9 then

doTeleportThing(cid,{x=51, y=28, z=8})

else

doPlayerSendCancel(cid,"Only Master Sorcerers may open this door.")

return 1

end

end

Link to comment
Share on other sites

×
×
  • Create New...