• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

starting items

if you dont know what to edit take this in firstitems.xml

LUA:
<?xml version="1.0" encoding="UTF-8"?>
<mod name="First Items" enabled="yes">
<config name="firstitems_config"><![CDATA[
STORAGE = 30001
commonItems = {
{itemid=2152, count=25, inContainer = true}, -- 25 platinum coins
{itemid=2643}, -- leather boots
{itemid=2173} -- aol
}
firstItems = {
{ --Sorcerer	
{itemid=1988}, -- backpack
{itemid=2175}, -- spellbook
{itemid=2190}, -- wand of vortex
{itemid=8819}, -- magician's robe
{itemid=8820}, -- mage hat
{itemid=2648} -- chain legs
},
{ -- Druid
{itemid=1988}, -- backpack
{itemid=2175}, -- spellbook
{itemid=2182}, -- snakebite rod
{itemid=8819}, -- magician's robe
{itemid=8820}, -- mage hat
{itemid=2648} -- chain legs
},
{ -- Paladin
{itemid=1988}, -- backpack
{itemid=2525}, -- dwarven shield
{itemid=2389, count=3}, -- 3 spears
{itemid=2463}, -- plate armor
{itemid=2457}, -- steel helmet
{itemid=2647} -- plate legs
},
{ -- Knight
{itemid=1988}, -- backpack
{itemid=2525}, -- dwarven shield
{itemid=2383}, -- spike sword
{itemid=2463}, -- plate armor
{itemid=2457}, -- steel helmet
{itemid=2647} -- plate legs
}
}
]]></config>
<event type="login" name="FirstItems" event="script"><![CDATA[
domodlib('firstitems_config')

for _, items in ipairs(firstItems) do
for _, item in ipairs(commonItems) do
table.insert(items, item)
end
end

function onLogin(cid)
if getPlayerGroupId(cid) < 4 and getPlayerStorageValue(cid, STORAGE) < 1 and firstItems[getPlayerVocation(cid)] then
for _, v in ipairs(firstItems[getPlayerVocation(cid)]) do
if isItemContainer(v.itemid) then
backpack = doPlayerAddItem(cid, v.itemid, 1)
elseif v.inContainer then
doAddContainerItem(backpack, v.itemid, v.count or 1)
else
doPlayerAddItem(cid, v.itemid, v.count or 1)
end
end
setPlayerStorageValue(cid, STORAGE, 1)
end
return true
end
]]></event>
</mod>
 
thanks for the respons
but i dont get it the code

<?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[
config = {
storage = 30001,
items = {2050, 2382}
}
]]></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

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
]]></event>
</mod>
 
That's not it... You are probably using the Crying Damson (Otswe)'s 0.3.6. That distribution has a bug in sources that makes the player drop item if the server is giving it the player.

I would recommend you to change distribution to continue your otserver. :)
 
That's not it... You are probably using the Crying Damson (Otswe)'s 0.3.6. That distribution has a bug in sources that makes the player drop item if the server is giving it the player.

I would recommend you to change distribution to continue your otserver. :)

Thanks for the reply
Yes im the server.
But what do u mean with distribution and how do i change it and which one you prefer?
 
Back
Top