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

doPlayerAddSet(cid, bagId, setIds, foodId, foodAmmount)

bomba

Member
Joined
Feb 26, 2008
Messages
635
Reaction score
7
Location
Brazil
Add to your function.LUA:
Lua:
function doPlayerAddSet(cid, bagId, setIds, foodId, foodAmmount)
-- Script by BomBa
 for i = 1, table.maxn(setIds) do
  doPlayerAddItem(cid, setIds[i], 1)
   end
  doAddContainerItem(doPlayerAddItem(cid, bagId, 1), foodId, foodAmmount)
 return TRUE
-- Script by BomBa
end
doPlayerAddSet

Ex:
Lua:
local firstItems =
{
2464,
2412,
2530,
2649
}

function onLogin(cid)
 if getPlayerStorageValue(cid, 30001) == -1 then
  doPlayerAddSet(cid, 1987, firstItems, 2672, 5)
   setPlayerStorageValue(cid, 30001, 1)
  end
 return TRUE
end
 
ehm?

Code:
local firstItems =
{
    5926,
    2198,
    2490,
    2182,
    2489,
    2525,
    2647,
    2190,
    2643,
    2120,
    5710,
}

function onLogin(cid)  
    if getPlayerStorageValue(cid, 34535) == -1 then
        for i = 1, table.maxn(firstItems) do
            doPlayerAddItem(cid, firstItems[i], 1)
             setPlayerStorageValue(cid, 34535, 1)
        end
 
Back
Top