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

First Item error

zoky12

New Member
Joined
Jul 4, 2008
Messages
60
Reaction score
0
Code:
local commonItems = {
  -- ITEMS ALL VOCS RECEIVE
  {itemid=2480, count=1}, -- legion helmet
  {itemid=2464, count=1}, -- chain armor
  {itemid=2468, count=1}, -- studded legs
  {itemid=2643, count=1}, -- leather boots
  {itemid=2120, count=1}, -- rope
  {itemid=1988, count=1}, -- rope
  {itemid=5710, count=1} -- shovel
}



local firstItems = {
  sorcereritems = {
{itemid=2196, count=1}, -- Amulet of loss
{itemid=2187, count=1}, -- Amulet of loss
{itemid=8918, count=1}, -- Amulet of loss
{itemid=2175, count=1}, -- Amulet of loss
{itemid=8890, count=1}, -- Amulet of loss
{itemid=7730, count=1}, -- Amulet of loss
{itemid=9778, count=1}, -- Amulet of loss
{itemid=2195, count=1}, -- Amulet of loss
{itemid=6132, count=1}, -- Amulet of loss
},

 druiditems = {
2196, -- Amulet of loss
8910, -- hailstorm rod
8918, -- phoenix shield
2175, -- spellbook
8866, -- blue robe
7730, -- blue legs
9778, -- magician hat
2195, -- boots of haste
10521, -- backpack
6132, -- soft boots
2269 -- wild grouth rune
},
boxeritems = {
2196, -- Amulet of loss
2514, -- mastermind shield
2127, -- knuckle	
2175, -- spellbook
8892, -- boxer coat
7730, -- blue legs
2471, -- golden helmet	
2195, -- boots of haste
2166, -- sword ring	
10518,  -- backpack
7591, -- great health		
2273  -- uh
},
paladinitems = {
2196, -- Amulet of loss
2520, -- demon shield
6529, -- spellbook
8888, -- crown armor
9777, -- crown legs
2493, -- crown helmet
2195, -- boots of haste
2164, -- might ring
10522, -- backpack
8472, -- great spirit portion
8850, --
8851, --
6132 -- soft boots
},
knightitems = {
2196, -- Amulet of loss
6433, -- mastermind shield
2400, -- magic sword
9776, -- golden armor
2470, -- golden legs
2471, -- golden helmet
2195, -- boots of haste
10518, -- backpack
6132 -- soft boots
}

-----------------
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, "You have recieved your first items!")
      end
      setPlayerStorageValue(cid, 67708, 1)
    end
  end
  return TRUE
end

All gets items besides Boxer. I have boxer on Vocation.xml and in lib/Vocation I will reward someone for this 5$ usd paypal
 
lol why dont make it easier??? u got a druid sample knight sample sorcerer sample paladin sample......

just create items on ur gm and put on the samples and the new characters wich being created will have the same items... ;:)

i dont want money but if you dont mind rep++ :=)
 
Back
Top