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

player beginner items

dydocan

dydocan
Joined
Jul 2, 2010
Messages
95
Reaction score
0
How do i change player beginner items? I mean when they make a character and login they should have the items I want how do I do that?

and yes anybody got the aeron layout:Xiah? who i can get pls? the link is broken and I can't download it
 
make a file called firstitems.lua in creature scripts/scripts

and place:

LUA:
local firstItems = {}
firstItems[0] =
{
2173,
2525,
2124,
2457,
2647,
2643
}
firstItems[1] =
{
2173,
2525,
2124,
8820,
2649,
2643,
8819
}
firstItems[2] =
{
2173,
2525,
2124,
8820,
2649,
2643,
8819
}
firstItems[3] =
{
2173,
2525,
2124,
2460,
2649,
2643,
2660,
}
firstItems[4] =
{
2173,
2525,
2124,
2460,
2478,
2643,
2465
}

function onLogin(cid)
if getPlayerStorageValue(cid, 30001) == -1 then
for i = 1, table.maxn(firstItems[getPlayerVocation(cid)]) do
doPlayerAddItem(cid, firstItems[getPlayerVocation(cid)][i], 1)
end
local bag = doPlayerAddItem(cid, 10521, 1)
doAddContainerItem(bag, 2160, 2)
doAddContainerItem(bag, 2554, 1)
doAddContainerItem(bag, 2120, 1)
doAddContainerItem(bag, 7618, 1)
setPlayerStorageValue(cid, 30001, 1)
end
return TRUE
end

Replace the item id's with what you want them to have

The [1][2][3] etc are the voc ids

Then in creature scripts.xml put
LUA:
 <event type="login" name="FirstItems" event="script" value="firstitems.lua"/>

Hope i helped, tell me if you recieve errors, etc and if i helped.. REP ++ :D
 
Last edited:
Back
Top