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

Lua spells;/

tim26

Member
Joined
Aug 12, 2008
Messages
618
Reaction score
11
Location
Poland
i want make learn spell to 2 vocations i have that script
Code:
local node5 = keywordHandler:addKeyword({'haste'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn haste for 500 gp?'})
    node5:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = true, spellName = 'Haste', [COLOR="Red"]vocation = 3, vocation = 4, [/COLOR]price = 500, level = 13})
    node5:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})

i put 2 vocations knight can learn but palladin no;/ i have that in more spells;/ what i should do;/
 
Its simple, in the script you define the same variable two times, thus first you set allowed vocation to "paladin" and then directly after, you set it to "knight", thus paladin is overwritten by knight, and only knight is allowed.

You would need to go about another way to make it allow two vocations methinks.
 
Back
Top