function addContainerWithItems(cid, container, item, item_count, count)
local Container = doPlayerAddItem(cid, container, 1)
for i = 1, count do
doAddContainerItem(Container, item, item_count)
end
end
function onLogin(cid)
local loss = getConfigValue('deathLostPercent')
if(loss ~= nil) then
for i = PLAYERLOSS_EXPERIENCE, PLAYERLOSS_ITEMS do
doPlayerSetLossPercent(cid, i, loss)
end
end
registerCreatureEvent(cid, "Mail")
registerCreatureEvent(cid, "GuildMotd")
registerCreatureEvent(cid, "PlayerDeath")
if getPlayerGroupId(cid) < 2 then
if isSorcerer(cid) then
doPlayerAddItem(cid, 8918, 1)
doPlayerAddItem(cid, 8922, 1)
local rand = math.random(1,4)
if rand == 1 then
doPlayerAddItem(cid, 8867, 1)
elseif rand == 2 then
doPlayerAddItem(cid, 8868, 1)
elseif rand == 3 then
doPlayerAddItem(cid, 8890, 1)
end
doPlayerAddItem(cid, 9778, 1)
doPlayerAddItem(cid, 7730, 1)
doPlayerAddItem(cid, 6132, 1)
doPlayerAddItem(cid, 2169, 1)
doPlayerAddItem(cid, 2195, 1)
doPlayerAddItem(cid, 2171, 1)
local bag = doPlayerAddItem(cid, 2365, 1)
addContainerWithItems(cid, 2004, 2293, 3, 20)
addContainerWithItems(cid, 2001, 7590, 1, 20)
addContainerWithItems(cid, 2002, 2274, 4, 20)
addContainerWithItems(cid, 1999, 2278, 1, 20)
local bag2 = doAddContainerItem(bag, 3939, 1)
doAddContainerItem(bag2, 2286, 2)
doAddContainerItem(bag2, 2305, 2)
doAddContainerItem(bag2, 2262, 2)
doAddContainerItem(bag2, 2208, 1)
doAddContainerItem(bag2, 2165, 1)
doAddContainerItem(bag2, 2167, 1)
doAddContainerItem(bag2, 2214, 1)
doAddContainerItem(bag2, 2168, 1)
doAddContainerItem(bag2, 2169, 1)
addContainerWithItems(cid, 2002, 2273, 1, 20)
addContainerWithItems(cid, 2003, 2268, 3, 20)
addContainerWithItems(cid, 2003, 2261, 3, 20)
addContainerWithItems(cid, 2000, 2304, 4, 20)
addContainerWithItems(cid, 2001, 2311, 10, 20)
addContainerWithItems(cid, 2001, 2313, 6, 20)
elseif isDruid(cid) then
local bag = doPlayerAddItem(cid, 2365, 1)
doPlayerAddItem(cid, 8918, 1)
doPlayerAddItem(cid, 8910, 1)
local rand = math.random(1,2)
if rand == 1 then
doPlayerAddItem(cid, 8866, 1)
elseif rand == 2 then
doPlayerAddItem(cid, 8869, 1)
end
doPlayerAddItem(cid, 9778, 1)
doPlayerAddItem(cid, 7730, 1)
doPlayerAddItem(cid, 6132, 1)
doPlayerAddItem(cid, 2169, 1)
doPlayerAddItem(cid, 2195, 1)
doPlayerAddItem(cid, 2171, 1)
addContainerWithItems(cid, 2004, 2293, 3, 20)
addContainerWithItems(cid, 2001, 7590, 1, 20)
addContainerWithItems(cid, 2002, 2274, 4, 20)
addContainerWithItems(cid, 1999, 2278, 1, 20)
local bag2 = doAddContainerItem(bag, 3939, 1)
doAddContainerItem(bag2, 2286, 2)
doAddContainerItem(bag2, 2305, 2)
doAddContainerItem(bag2, 2262, 2)
doAddContainerItem(bag2, 2208, 1)
doAddContainerItem(bag2, 2165, 1)
doAddContainerItem(bag2, 2167, 1)
doAddContainerItem(bag2, 2214, 1)
doAddContainerItem(bag2, 2168, 1)
doAddContainerItem(bag2, 2169, 1)
addContainerWithItems(cid, 2002, 2273, 1, 20)
addContainerWithItems(cid, 2003, 2268, 3, 20)
addContainerWithItems(cid, 2003, 2261, 3, 20)
addContainerWithItems(cid, 2000, 2304, 4, 20)
addContainerWithItems(cid, 2001, 2311, 10, 20)
addContainerWithItems(cid, 2001, 2313, 6, 20)
elseif isPaladin(cid) then
doPlayerAddItem(cid, 2520, 1)
doPlayerAddItem(cid, 7368, 100)
local rand = math.random(1,4)
if rand == 1 then
doPlayerAddItem(cid, 8885, 1)
elseif rand == 2 then
doPlayerAddItem(cid, 8886, 1)
elseif rand == 3 then
doPlayerAddItem(cid, 8887, 1)
elseif rand == 4 then
doPlayerAddItem(cid, 8888, 1)
end
doPlayerAddItem(cid, 2498, 1)
doPlayerAddItem(cid, 9777, 1)
doPlayerAddItem(cid, 6132, 1)
doPlayerAddItem(cid, 2169, 1)
doPlayerAddItem(cid, 2195, 1)
doPlayerAddItem(cid, 2171, 1)
local bag = doPlayerAddItem(cid, 2365, 1)
addContainerWithItems(cid, 2004, 2293, 3, 20)
addContainerWithItems(cid, 1988, 8472, 1, 20)
addContainerWithItems(cid, 2002, 2274, 4, 20)
addContainerWithItems(cid, 1999, 2278, 1, 20)
local bag2 = doAddContainerItem(bag, 3939, 1)
doAddContainerItem(bag2, 2286, 2)
doAddContainerItem(bag2, 2305, 2)
doAddContainerItem(bag2, 2262, 2)
doAddContainerItem(bag2, 2208, 1)
doAddContainerItem(bag2, 2165, 1)
doAddContainerItem(bag2, 2167, 1)
doAddContainerItem(bag2, 2214, 1)
doAddContainerItem(bag2, 2168, 1)
doAddContainerItem(bag2, 2169, 1)
addContainerWithItems(cid, 2002, 2273, 1, 20)
addContainerWithItems(cid, 2003, 2268, 3, 20)
addContainerWithItems(cid, 2003, 2261, 3, 20)
addContainerWithItems(cid, 2000, 2304, 4, 20)
addContainerWithItems(cid, 2001, 2311, 10, 20)
addContainerWithItems(cid, 2001, 2313, 6, 20)
elseif isKnight(cid) then
local rand = math.random(1,4)
if rand == 1 then
doPlayerAddItem(cid, 8906, 1)
elseif rand == 2 then
doPlayerAddItem(cid, 8907, 1)
elseif rand == 3 then
doPlayerAddItem(cid, 8908, 1)
elseif rand == 4 then
doPlayerAddItem(cid, 8909, 1)
end
doPlayerAddItem(cid, 8924, 1)
local rand = math.random(1,5)
if rand == 1 then
doPlayerAddItem(cid, 8881, 1)
elseif rand == 2 then
doPlayerAddItem(cid, 8882, 1)
elseif rand == 3 then
doPlayerAddItem(cid, 8883, 1)
elseif rand == 4 then
doPlayerAddItem(cid, 8884, 1)
elseif rand == 5 then
doPlayerAddItem(cid, 2472, 1)
end
doPlayerAddItem(cid, 2493, 1)
doPlayerAddItem(cid, 2470, 1)
doPlayerAddItem(cid, 6132, 1)
doPlayerAddItem(cid, 2169, 1)
doPlayerAddItem(cid, 2195, 1)
doPlayerAddItem(cid, 2171, 1)
local bag = doPlayerAddItem(cid, 2365, 1)
addContainerWithItems(cid, 2000, 8473, 1, 20)
addContainerWithItems(cid, 2001, 7620, 1, 20)
addContainerWithItems(cid, 2002, 2274, 4, 20)
local bag2 = doAddContainerItem(bag, 3939, 1)
doAddContainerItem(bag2, 2286, 2)
doAddContainerItem(bag2, 2305, 2)
doAddContainerItem(bag2, 2262, 2)
doAddContainerItem(bag2, 2208, 1)
doAddContainerItem(bag2, 2165, 1)
doAddContainerItem(bag2, 2167, 1)
doAddContainerItem(bag2, 2214, 1)
doAddContainerItem(bag2, 2168, 1)
doAddContainerItem(bag2, 2169, 1)
addContainerWithItems(cid, 2002, 2273, 1, 20)
addContainerWithItems(cid, 2003, 2261, 3, 20)
addContainerWithItems(cid, 2000, 2304, 4, 20)
addContainerWithItems(cid, 2001, 2311, 10, 20)
addContainerWithItems(cid, 2001, 2313, 6, 20)
end
end
return TRUE
end