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

Lua Firstitems

Cookie

New Member
Joined
Oct 28, 2007
Messages
17
Reaction score
0
Hey folks, I'm having an issue with my firstitems.xml

Basically my aac isn't giving the starter eq it should be... here is my current script, can someone tell me if i am missing anything here? Also to add, I'm not getting any errors in my execute.

local firstItems =
{
2050,
2395,
2465,
2478,
2511,
2460
}

function onStepIn(cid, item, position, fromPosition)
if isPlayer(cid) == TRUE then
if getPlayerStorageValue(cid, 30001) == -1 then
for i = 1, table.maxn(firstItems) do
doPlayerAddItem(cid, firstItems, 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
end
return TRUE
end
 
now go to ur map editor and where your players first log on set the unique id for the tile to 30001. i recommend placing it in the tiles next to it also in case several people log on at once b/c they will only get the items if they log on in that one space otherwise

ex.
0=where the main login is
x=othertiles
xxx
x0x
xxx

set all of those to 30001 b/c if some1 logs on and stay at the '0' then if another player logs on they wont be able to go there and will be automatically pushed onto a 'x' space so also set those with unique id 30001 so they can get there first items also

edit:boo master-m posted b4 me i was typing to much
 
Back
Top