tfs 1.2 sorry i forgot to write itWhich server do you use?
https://github.com/otland/forgottenserver/blob/master/data/lib/compat/compat.lua#L212
Here you can see the TFS 1.2 functions you can use for that.
With if statements you can check for different voc ids, or you can also do it with a table.
I can write an example if you post how it should work exactly and with which vocations and which messages.
if getPlayerVocation(cid):getID() == 1 or getPlayerVocation(cid):getID() == 5 and player:getStorageValue(44923) == 1 then
npcHandler:say('Do you have free 120 oz and 5 slots in your backpack? Make sure and check 2 times!', cid)
npcHandler.topic[cid] = 6
elseif getPlayerVocation(cid):getID() == 2 or getPlayerVocation(cid):getID() == 6 and player:getStorageValue(44923) == 1 then
npcHandler:say('Do you have free 120 oz and 5 slots in your backpack? Make sure and check 2 times!', cid)
npcHandler.topic[cid] = 5
elseif getPlayerVocation(cid):getID() == 3 or getPlayerVocation(cid):getID() == 7 and player:getStorageValue(44923) == 1 then
npcHandler:say('Do you have free 130 oz and 4 slots in your backpack? Make sure and check 2 times!', cid)
npcHandler.topic[cid] = 4
elseif getPlayerVocation(cid):getID() == 4 or getPlayerVocation(cid):getID() == 8 and player:getStorageValue(44923) == 1 then
npcHandler:say('What\'s your specialization? {axe}, {club} or {sword}?', cid)
npcHandler.topic[cid] = 2
elseif getPlayerVocation(cid):getID() == 12 or getPlayerVocation(cid):getID() == 13 and player:getStorageValue(44923) == 1 then
npcHandler:say('Do you have free 200 oz and 5 slots in your backpack? Make sure and check 2 times!', cid)
npcHandler.topic[cid] = 7
else
npcHandler:say('You need to be level 50+.', cid)
end
local config = {
[{1, 5}] = {text = "Do you have free 120 oz and 5 slots in your backpack? Make sure and check 2 times!", topic = 6},
[{2, 6}] = {text = "Do you have free 120 oz and 5 slots in your backpack? Make sure and check 2 times!", topic = 5},
[{3, 7}] = {text = "Do you have free 130 oz and 4 slots in your backpack? Make sure and check 2 times!", topic = 4},
[{4, 8}] = {text = "What's your specialization? {axe}, {club} or {sword}?", topic = 2},
[{12, 13}] = {text = "Do you have free 200 oz and 5 slots in your backpack? Make sure and check 2 times!", topic = 7}
}
for voc, x in pairs(config) do
local v = player:getVocation():getId()
if (v == voc[1] or v == voc[2]) and player:getStorageValue(44923) == 1 then
npcHandler:say(x.test, cid)
npcHandler.topic[cid] = x.topic
end
end