<?xml version="1.0" encoding="UTF-8"?>
<mod name="First Items" version="1.0" author="The Forgotten Server" contact="otland.net" enabled="yes">
<config name="firstitems_config"><![CDATA[
--- sample taken from TFS. Slightly modified by Znote to fit Modern AAC users ---
config = {
storage = 30001,
items = {2050, 2382},
-- if you start without EQ from Modern AAC, you have more available cap than else
-- pick a value greater than the free capacity you start with when you get EQ from
-- modern aac. But make sure to pick lower than your available cap
----------------------------------------------------------------------------------
---------- Sample: Char with MACC items: 150 cap, Char without MACC items: 420 cap
----------------------------------------------------------------------------------
------------- Then set caplimit to something higher than 150, but also lower than 420
----------------------------------------------------------------------------------
-- Then this script will launch and give you the items you didnt get from
-- Modern AAC.
caplimit = 300
}
]]></config>
<event type="login" name="FirstItems" event="script"><![CDATA[
domodlib('firstitems_config')
function onLogin(cid)
local freecap = getPlayerFreeCap(cid)
if(getPlayerStorageValue(cid, config.storage) > 0) then
return true
end
----- only give items if the player dont already have the items -----
if freecap > config.caplimit then
for _, id in ipairs(config.items) do
doPlayerAddItem(cid, id, 1)
end
if(getPlayerSex(cid) == PLAYERSEX_FEMALE) then
doPlayerAddItem(cid, 2651, 1)
else
doPlayerAddItem(cid, 2650, 1)
end
doAddContainerItem(doPlayerAddItem(cid, 1987, 1), 2674, 1)
setPlayerStorageValue(cid, config.storage, 1)
return true
end
---- if the player already have items from MACC but dont got the storage value ---
else
setPlayerStorageValue(cid, config.storage, 1)
return true
end
]]></event>
</mod>