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

Knight online Action script? confused...

udxero

New Member
Joined
Mar 25, 2010
Messages
13
Reaction score
0
Okay, so i'm making an action script, and i'm trying to make it knight only.. but i have tried many different ways, and never got anywhere.. The part i added to check vocation is as follows ( i tried a lot of different ways )


Code:
local voc = 1, 2, 3, 5, 6, 7, 9, 10, 11
the code to go with the local voc
Code:
if voc == getPlayerVocation(cid) then doSendMagicEffect(frompos, CONST_ME_POFF) doPlayerSendCancel(cid, error_voc)
return 0
end

the thing with that code is in the local variable i created ( local voc = *** ) it only takes effect and cancels the first voc listed in this case ( 1 ) ... if i use a voc such as voc ( 5 ) then it works just fine? so the local variable only seems to be recognizing the first nearest number to the =...

the second way i tried was..

Code:
if (getPlayervocation(cid) and isInArray({1, 2, 3, 5, 6, 7, 9, 10, 11}) then doSendMagicEffect(frompos, CONST_ME_POFF) doPlayerSendCancel(cid, error_voc)

return 0
end

the same as before, in the second one it only registers the first voc i chose.. so i don't understand how to get it to register every voc listed in the array/ variable. I'm confused.... Just trying to make a knight only rune -.-'
 
Code:
local voc = getPlayerVocation(cid)

if voc == 4 or 8 then

return 0
end

You can also do it this way if you want....
Code:
local voc = getPlayerVocation(cid)
local id = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}

if voc == id then

return 0
end
 
Back
Top