-- Colandus @ 1337Rox0r
-- Slighty Modified by ArtofWork
-- How to think when adding items? Try fill the hands first, then the arrow slot. This because armor etc won't go to hand slot (Vocation items will be given before commonItems, as you usually use to have
-- the hand/arrow slot items there and not in common items. Take a look at how I did it:
local commonItems = {
-- ITEMS ALL VOC RECEIVE
{itemid=2457, count=1}, -- steel helmet
{itemid=2463, count=1}, -- plate armor
{itemid=2647, count=1}, -- plate legs
{itemid=7457, count=1}, -- fur boots
{itemid=2160, count=1}, -- 1 gold coin
{itemid=2120, count=1}, -- rope
{itemid=5710, count=1}, -- shovel
{itemid=2789, count=100}, -- food
}
local firstItems = {
{ -- SORC ITEMS
{itemid=2190, count=1}, -- wand of vortex
{itemid=2546, count=50}, -- burst
{itemid=2173, count=1}, -- aol
{itemid=7620, count=1}, -- mana pot
{itemid=2268, count=1}, -- sudden death
{itemid=2293, count=1}, -- magic wall
{itemid=2305, count=1}, -- fire bomb
{itemid=2261, count=1}, -- destroy field
{itemid=2286, count=1}, -- poison bomb
{itemid=2262, count=1}, -- energy bomb
{itemid=2304, count=1}, -- fire ball rune
{itemid=2273, count=1}, -- ultimate healing rune
},
{ -- DRUID ITEMS
{itemid=2182, count=1}, -- snakebite rod
{itemid=2546, count=50}, -- burst
{itemid=2173, count=1}, -- aol
{itemid=7620, count=1}, -- mana pot
{itemid=2268, count=1}, -- sudden death
{itemid=2293, count=1}, -- magic wall
{itemid=2305, count=1}, -- fire bomb
{itemid=2261, count=1}, -- destroy field
{itemid=2286, count=1}, -- poison bomb
{itemid=2262, count=1}, -- energy bomb
{itemid=2304, count=1}, -- fire ball rune
{itemid=2273, count=1}, -- ultimate healing rune
},
{ -- PALADIN ITEMS
{itemid=2455, count=1}, -- crossbow
{itemid=2543, count=100}, -- bolts
{itemid=2173, count=1}, -- aol
{itemid=2273, count=1}, -- ultimate healing rune
{itemid=2268, count=1}, -- sudden death
{itemid=2305, count=1}, -- fire bomb
{itemid=2293, count=1}, -- magic wall
{itemid=2286, count=1}, -- poison bomb
{itemid=2261, count=1}, -- destroy field
{itemid=7589, count=1}, -- strong potion
},
{ -- KNIGHT ITEMS
{itemid=2383, count=1}, -- spike sword
{itemid=2521, count=1}, -- dark shield
{itemid=2173, count=1}, -- aol
{itemid=2286, count=1}, -- poison bomb
{itemid=2261, count=1}, -- destroy field
{itemid=7618, count=1}, -- weak hp pot
{itemid=2313, count=1}, -- explosion
{itemid=7620, count=1}, -- mana fluid
{itemid=2305, count=1}, -- fire bomb
}
}
for _, items in ipairs(firstItems) do
for _, item in ipairs(commonItems) do
table.insert(items, item)
end
end
function onLogin(cid)
if getPlayerGroupId(cid) < 2 then
if getPlayerStorageValue(cid, 30002) ~= 1 then
--[[local backpack = ]]doPlayerAddItem(cid, 1988, TRUE)
local giveItems = firstItems[getPlayerVocation(cid)]
if giveItems ~= nil then
for _, v in ipairs(giveItems) do
--doAddContainerItem(backpack, v.itemid, v.count or 1)
doPlayerAddItem(cid, v.itemid, v.count or 1)
end
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You received your first items depending on your vocation.")
end
setPlayerStorageValue(cid, 30002, 1)
end
end
return TRUE
end