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

Need a decent 8.5 firstitems.lua script plx

Slain

TrueHavoc.com
Joined
Nov 27, 2008
Messages
2,243
Reaction score
31
If someoen has a firstitems script that works with 8.5 that would be great for some reason mine doesnt work anymore when i switched. I know i said lua but yes my script is xml...3:30 am havent slept lol heres my script:

LUA:
function onLogin(cid)
    if getPlayerStorageValue(cid, 30001) == -1 then
if getPlayerVocation(cid) == 1 then
        local head = doPlayerAddItem(cid, 2175, 1)
        local left = doPlayerAddItem(cid, 2190, 1)
            doPlayerAddItem(cid, 7730, 1)    
        local armor = doPlayerAddItem(cid, 8870, 1)
            doPlayerAddItem(cid, 2323, 1)
        local feed = doPlayerAddItem(cid, 2643, 1)
            local bag = doPlayerAddItem(cid, 1999, 1)
            doAddContainerItem(bag, 7620, 1)
            doAddContainerItem(bag, 5710, 1)
            doAddContainerItem(bag, 2120, 1)
        setPlayerStorageValue(cid, 30001, 1)
elseif getPlayerVocation(cid) == 2 then    
            doPlayerAddItem(cid, 2175, 1)
            doPlayerAddItem(cid, 2182, 1)
            doPlayerAddItem(cid, 7730, 1)
            doPlayerAddItem(cid, 8870, 1)
            doPlayerAddItem(cid, 2323, 1)
            doPlayerAddItem(cid, 2643, 1)
            local bag = doPlayerAddItem(cid, 3940, 1)
        doAddContainerItem(bag, 7620, 1)
        doAddContainerItem(bag, 5710, 1)
        doAddContainerItem(bag, 2120, 1)
        setPlayerStorageValue(cid, 30001, 1)
elseif getPlayerVocation(cid) == 3 then  
            doPlayerAddItem(cid, 2455, 1)
            doPlayerAddItem(cid, 2457, 1)
            doPlayerAddItem(cid, 8872, 1)
            doPlayerAddItem(cid, 7730, 1)
            doPlayerAddItem(cid, 2643, 1)
            doPlayerAddItem(cid, 2543, 1)
            local bag = doPlayerAddItem(cid, 7342, 1)
        doAddContainerItem(bag, 7618, 1)
        doAddContainerItem(bag, 5710, 1)
        doAddContainerItem(bag, 2120, 1)
        setPlayerStorageValue(cid, 30001, 1)
elseif getPlayerVocation(cid) == 4 then    
            doPlayerAddItem(cid, 2533, 1)
            doPlayerAddItem(cid, 2383, 1)
            doPlayerAddItem(cid, 2481, 1)
        local armor    = doPlayerAddItem(cid, 2478, 1)
        local armor    = doPlayerAddItem(cid, 3968, 1)
            doPlayerAddItem(cid, 2643, 1)
        local bag = doPlayerAddItem(cid, 1998, 1)
            doAddContainerItem(bag, 7618, 1)
            doAddContainerItem(bag, 2383, 1)
            doAddContainerItem(bag, 2428, 1)
            doAddContainerItem(bag, 2394, 1)
            doAddContainerItem(bag, 5710, 1)
            doAddContainerItem(bag, 2120, 1)
        setPlayerStorageValue(cid, 30001, 1)

        end


end
     return TRUE
end
 
Place it in your mod folder.

LUA:
<?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, 30001) == -1 then
if getPlayerVocation(cid) == 1 then
        local head = doPlayerAddItem(cid, 2175, 1)
        local left = doPlayerAddItem(cid, 2190, 1)
            doPlayerAddItem(cid, 7730, 1)    
        local armor = doPlayerAddItem(cid, 8870, 1)
            doPlayerAddItem(cid, 2323, 1)
        local feed = doPlayerAddItem(cid, 2643, 1)
            local bag = doPlayerAddItem(cid, 1999, 1)
            doAddContainerItem(bag, 7620, 1)
            doAddContainerItem(bag, 5710, 1)
            doAddContainerItem(bag, 2120, 1)
        setPlayerStorageValue(cid, 30001, 1)
elseif getPlayerVocation(cid) == 2 then    
            doPlayerAddItem(cid, 2175, 1)
            doPlayerAddItem(cid, 2182, 1)
            doPlayerAddItem(cid, 7730, 1)
            doPlayerAddItem(cid, 8870, 1)
            doPlayerAddItem(cid, 2323, 1)
            doPlayerAddItem(cid, 2643, 1)
            local bag = doPlayerAddItem(cid, 3940, 1)
        doAddContainerItem(bag, 7620, 1)
        doAddContainerItem(bag, 5710, 1)
        doAddContainerItem(bag, 2120, 1)
        setPlayerStorageValue(cid, 30001, 1)
elseif getPlayerVocation(cid) == 3 then  
            doPlayerAddItem(cid, 2455, 1)
            doPlayerAddItem(cid, 2457, 1)
            doPlayerAddItem(cid, 8872, 1)
            doPlayerAddItem(cid, 7730, 1)
            doPlayerAddItem(cid, 2643, 1)
            doPlayerAddItem(cid, 2543, 1)
            local bag = doPlayerAddItem(cid, 7342, 1)
        doAddContainerItem(bag, 7618, 1)
        doAddContainerItem(bag, 5710, 1)
        doAddContainerItem(bag, 2120, 1)
        setPlayerStorageValue(cid, 30001, 1)
elseif getPlayerVocation(cid) == 4 then    
            doPlayerAddItem(cid, 2533, 1)
            doPlayerAddItem(cid, 2383, 1)
            doPlayerAddItem(cid, 2481, 1)
        local armor    = doPlayerAddItem(cid, 2478, 1)
        local armor    = doPlayerAddItem(cid, 3968, 1)
            doPlayerAddItem(cid, 2643, 1)
        local bag = doPlayerAddItem(cid, 1998, 1)
            doAddContainerItem(bag, 7618, 1)
            doAddContainerItem(bag, 2383, 1)
            doAddContainerItem(bag, 2428, 1)
            doAddContainerItem(bag, 2394, 1)
            doAddContainerItem(bag, 5710, 1)
            doAddContainerItem(bag, 2120, 1)
        setPlayerStorageValue(cid, 30001, 1)

        end


end
     return TRUE
end 
	]]></event>
</mod>

Only tested Knight
 
Last edited:
Code:
[07/11/2009 15:27:20] Loading firstitems.xml...[Error - ScriptingManager::loadFromXml] Cannot load mod mods/firstitems.xml
[07/11/2009 15:27:20] Line: 1, Info: XML declaration allowed only at the start of the document


[07/11/2009 15:27:20]  failed!

It doesnt work :S
 
Last edited:
Back
Top