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

Branch promotion npc

MadMOOK

Hoo
Joined
Apr 20, 2011
Messages
802
Reaction score
43
Someone mind finishing this script?
Code:
local vocations =
{
--[sorc] = {master sorc}
[1] = {5},
--[druid] = {elder druid}
[2] = {6},
--[paladin] = {royal paladin}
[3] = {7},
--[knight] = {elite knight}
[8] = {8},
--[master sorc] = {epic sorc, noob sorc, super sorc, mega sorc}
[5] = {9, 13, 17, 21},
--[elder druid] = {epic druid, noob druid, super druid, mega druid, ultimate druid}
[6] = {10, 14, 18, 22, 26}

}

if msg:lower() == "promotion" then
if not vocations[getPlayerVocation(cid)] and getPlayerVocation(cid) > 0 then
return npcHandler:say("You already has the highest promotion.", cid)
end

local vocs = vocations[getPlayerVocation(cid)]
local sep = ", "
local i = 0
local text = ""
for _, id in pairs(vocs) do
i = i + 1
if i == #vocs - 1 then
sep = " and "
elseif i == #vocs then
sep = "."
end
text = text .. "{" .. getVocationInfo(id).name .. "}" .. sep
end
npcHandler:say("You can choose " .. (#vocs > 1 and "one between" or "") .. " the following promotion" .. (#vocs > 1 and "s" or "") .. ": " .. text .. ". Wich will you select?", cid)
talkState[talkUser] = 1
elseif
 
Back
Top