LoveSong
New Member
- Joined
- Dec 16, 2007
- Messages
- 185
- Reaction score
- 0
Hello i have a big problem... My server is almost finished and ready to be lunched...
But everytime when i make a character, then he get all the start items 3x...
I dont understand why...
look thats my firstitem.lua:
Help please
But everytime when i make a character, then he get all the start items 3x...
I dont understand why...
look thats my firstitem.lua:
local commonItems = {
-- ITEMS ALL VOCS RECEIVE
{itemid=2480, count=1}, -- legion helmet
{itemid=2464, count=1}, -- chain armor
{itemid=2648, count=1}, -- chain legs
{itemid=2643, count=1}, -- leather boots
{itemid=2120, count=1}, -- rope
{itemid=5710, count=1} -- shovel
}
local firstItems = {
{ -- SORC ITEMS
{itemid=2190, count=1}, -- wand of vortex
{itemid=2175, count=1} -- spellbook
},
{ -- DRUID ITEMS
{itemid=2182, count=1}, -- snakebite rod
{itemid=2175, count=1} -- spellbook
},
{ -- PALADIN ITEMS
{itemid=2389, count=1}, -- spear
{itemid=7378, count=1}, -- royal spear
{itemid=2530, count=1} -- copper shield
},
{ -- KNIGHT ITEMS
{itemid=2383, count=1}, -- spike sword
{itemid=2394, count=1}, -- morning star
{itemid=2428, count=1}, -- orcish axe
{itemid=2530, count=1} -- copper shield
}
}
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
local hasReceivedFirstItems = getPlayerStorageValue(cid, 67708)
if hasReceivedFirstItems ~= 1 then
--[[local backpack = ]]doPlayerAddItem(cid, 1988, 1)
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, "The instance downstairs is reccommended for new players!")
end
setPlayerStorageValue(cid, 67708, 1)
end
end
return TRUE
end
Help please