<?xml version="1.0" encoding="UTF-8"?>
<mod name="First Items" version="1.2" author="TFS (Modified by Guitar Freak)" contact="http://otland.net/members/Guitar-Freak" enabled="yes">
<config name="firstitems_config"><![CDATA[
config = {
storage = 30301,
items = {123, 117, 112, 113, 110, 115, 114} -- Generic EQ (i.e Helmet, Armor, Legs, Boots, etc), all vocs will receive them.
}
weapons = {
sorcerer = {130},
druid = {131},
paladin = {135},
knight = {140, 141, 142}
}
]]></config>
<event type="login" name="FirstItems" event="script"><![CDATA[
domodlib('firstitems_config')
function onLogin(cid)
if(getPlayerStorageValue(cid, config.storage) > 0) then
return true
end
if getCreatureName(cid) ~= "Account Manager" then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Welcome " .. getCreatureName(cid) .. "! You have obtained some items to start out.")
end
for _, id in ipairs(config.items) do
doPlayerAddItem(cid, id, 1)
end
if isFemale(cid) then
doPlayerAddItem(cid, 121, 1)
else
doPlayerAddItem(cid, 111, 1)
end
local BP = doPlayerAddItem(cid, 1988, 1)
if isSorcerer(cid) then
doAddContainerItem(BP, weapons.sorcerer, 1)
elseif isDruid(cid) then
doAddContainerItem(BP, weapons.druid, 1)
elseif isPaladin(cid) then
doAddContainerItem(BP, weapons.paladin, 1)
elseif isKnight(cid) then
for _, it in ipairs(weapons.knight) do
doAddContainerItem(BP, it, 1)
end
end
setPlayerStorageValue(cid, config.storage, 1)
return true
end
]]></event>
</mod>