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

(SOLVED) Quest TFS 1.3 lua

Mr Noxi

Noxus Otserver
Joined
May 13, 2010
Messages
272
Solutions
3
Reaction score
94
Location
Sweden
Hellos!

So i have been looking into this script from another post Advanced quest chests 1.x (using Itutorial version of it that can be seen below if u scroll on the link)

Only having issue with how to apply it to my own server,

my code is
Lua:
questChests = {
   
   [5010] = {    
        questStorage = 10000,
        questStatus = 5,
        questMsg_success = "Woho!",
        questMsg_fail = "Nope, still weak!",
        levelReq = 150,
        expReward = 500000,
        item_reward = {
        [1] = {itemid = 8900, count = 1},  --spellbook 1
        [2] = {itemid = 2195, count = 1}    -- boh
        }
     
   },

   [5011] = {
        questStorage = 10000,
        questStatus = 5,
        questMsg_success = "Woho!",
        questMsg_fail = "Nope, still weak!",
        levelReq = 150,
        expReward = 500000,
        item_reward = {
        [1] = {itemid = 2517, count = 1},  -- Shield of honour
        [2] = {itemid = 2195, count = 1}    -- boh
        }
   },


picture eg

I want the mage voc to be able to choose chest on the left and the knight picks right chest, atm the player can pick both chests and i would like them to only be able to choose one of the chests,

Left chest contains spellbook + boh and right chest contains shield + boh. Idk how to arrange it tho in code wise.

Linking the quest chest file if it helps out..

Appreciate if anyone can have a look!
 

Attachments

Try this vocation = { id = {1, 2, } },
And add this to lib file before Give player exp reward
Lua:
if chest.vocation then
    if not table.contains(chest.vocation.id, player:getVocation():getId()) then
        return player:sendCancelMessage("Your vocation cannot open this chest.")
    end
end
Not tested, but this should do the trick.
 
Back
Top