• 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

RunarM

Finally back
Joined
Jul 17, 2008
Messages
1,636
Reaction score
34
Location
Norway/Tromsø
I need help from you pro people :wub:

How can i do like when a player makes a character they get better items then noob rook eq?

Code:
local firstItems =
{
	2050,
	2382
}

function onLogin(cid)
	if getPlayerStorageValue(cid, 30001) == -1 then
		for i = 1, table.maxn(firstItems) do
			doPlayerAddItem(cid, firstItems[i], 1)
		end
		if getPlayerSex(cid) == 0 then
			doPlayerAddItem(cid, 2651, 1)
		else
			doPlayerAddItem(cid, 2650, 1)
		end
		local bag = doPlayerAddItem(cid, 1987, 1)
		doAddContainerItem(bag, 2674, 1)
		setPlayerStorageValue(cid, 30001, 1)
	end
 	return TRUE
end

I want all players to get:

Steel Helmet
Plate Armor
Plate legs
Leather Boots
Dwarven shield
Morning Star
Spike Sword
10 spears
1 bag
Orcish Axe (something like that)
and 1k

=)
please help me fast ^^
-Runaarm
 
local firstItems =
{
2050,
2382
}


Just add all your ID's there and for your backpack items;

doAddContainerItem(bag, 2674, 1)
 
local firstItems =
{
ITEM_ID_1, -- possibly steel helmet
ITEM_ID_2, -- possibly plate armor
ITEM_ID_3, -- possibly plate legs
ITEM_ID_4, -- possibly leather boots
ITEM_ID_5 -- possibly dwarven shield
}
 
I can't be arsed to find all the required item ids, and I bet you could do this by yourself. ; )
 
Just open items.xml and search for them there, also make sure your starting players have enough cap to carry everything or they won't get the items.

Jo3
 
Back
Top