Hello, as you all know the new version of crying damson has been released with some nice futures. A new folder called mods is pretty nice, there is one script there called "firstitems". That script gives you start item when you logout, but i cant make it work ;/
please help
I want so you start with the items (as you can see in the code) for based on vocation. plx help.
+rep
regards, zkum
please help
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 = {1988, 2789}
}
]]></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(getPlayerVocation(cid) == Knight) then
doPlayerAddItem(cid, 2409, 1)
doPlayerAddItem(cid, 2513, 1)
doPlayerAddItem(cid, 2481, 1)
doPlayerAddItem(cid, 2465, 1)
doPlayerAddItem(cid, 2648, 1)
doPlayerAddItem(cid, 2643, 1)
doAddContainerItem(doPlayerAddItem(cid, 1988, 1), 2789, 10)
doPlayerAddItem(cid, 2428, 1)
doPlayerAddItem(cid, 2394, 1)
elseif (getPlayerVocation(cid) == Paladin) then
doPlayerAddItem(cid, 2389, 5)
doPlayerAddItem(cid, 2529, 1)
doPlayerAddItem(cid, 2480, 1)
doPlayerAddItem(cid, 2660, 1)
doPlayerAddItem(cid, 2507, 1)
doPlayerAddItem(cid, 2643, 1)
doAddContainerItem(doPlayerAddItem(cid, 1988, 1), 2789, 10)
elseif (getPlayerVocation(cid) == Druid) then
doPlayerAddItem(cid, 2182, 1)
doPlayerAddItem(cid, 2175, 1)
doPlayerAddItem(cid, 8820, 1)
doPlayerAddItem(cid, 8819, 1)
doPlayerAddItem(cid, 2468, 1)
doPlayerAddItem(cid, 2643, 1)
doAddContainerItem(doPlayerAddItem(cid, 1988, 1), 2789, 10)
elseif (getPlayerVocation(cid) == Sorcerer) then
doPlayerAddItem(cid, 2190, 1)
doPlayerAddItem(cid, 2175, 1)
doPlayerAddItem(cid, 8820, 1)
doPlayerAddItem(cid, 8819, 1)
doPlayerAddItem(cid, 2468, 1)
doPlayerAddItem(cid, 2643, 1)
doAddContainerItem(doPlayerAddItem(cid, 1988, 1), 2789, 10)
end
setPlayerStorageValue(cid, config.storage, 1)
return true
end
]]></event>
</mod>
I want so you start with the items (as you can see in the code) for based on vocation. plx help.
+rep
regards, zkum