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

Windows Modern AAC - Startup Items

chmorin

New Member
Joined
Mar 7, 2012
Messages
34
Reaction score
0
Location
Texas
I am trying to find a way to configure the startup items for new characters made in Modern AAC. I currently have a quest chest that gives them all their items, but they cant receive them because they don't even have a backpack when they start.

Any idea where I can fix this? Characters currently start with nothing.

Modern AAC
TFS: v0.3.6

Let me know if you need any more information.
 
Should work with 0.3.6 and 0.4: (Its a mod, i didn't make this script)

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 or getPlayerVocation(cid) == 5 or getPlayerVocation(cid) == 9 then
            doPlayerAddItem(cid, 2190, 1)--Wand Of Vortex
            doPlayerAddItem(cid, 2175, 1)--Spellbook
            doPlayerAddItem(cid, 8820, 1)--Mage hat
            doPlayerAddItem(cid, 8819, 1)--Magician Robe
            doPlayerAddItem(cid, 2648, 1)--Chain Legs
            doPlayerAddItem(cid, 2643, 1)--Leather Boots
            doPlayerAddItem(cid, 1988, 1)--Brown Backpack
            doPlayerAddItem(cid, 2152, 10)--Money
            doPlayerAddItem(cid, 7620, 20)--Mana Potion
			doPlayerAddItem(cid, 2789, 100)--Food
        doPlayerSendTextMessage(cid,22,""..getPlayerName(cid).." you now have the first Sorcerer items.")
        end
        if getPlayerVocation(cid) == 2 or getPlayerVocation(cid) == 6 or getPlayerVocation(cid) == 10 then
            doPlayerAddItem(cid, 2182, 1)--Snakekbite Rod
            doPlayerAddItem(cid, 2175, 1)--Spellbook
            doPlayerAddItem(cid, 8820, 1)--Mage hat
            doPlayerAddItem(cid, 8819, 1)--Magician Robe
            doPlayerAddItem(cid, 2648, 1)--Chain Legs
            doPlayerAddItem(cid, 2643, 1)--Leather Boots
            doPlayerAddItem(cid, 1988, 1)--Brown Backpack
            doPlayerAddItem(cid, 2152, 10)--Money
            doPlayerAddItem(cid, 7620, 20)--Mana Potion
			doPlayerAddItem(cid, 2789, 100)--Food
        doPlayerSendTextMessage(cid,22,""..getPlayerName(cid).." you now have the first Druid items.")
        end
        if getPlayerVocation(cid) == 3 or getPlayerVocation(cid) == 7 or getPlayerVocation(cid) == 11 then
            doPlayerAddItem(cid, 2389, 1)--Spear
            doPlayerAddItem(cid, 2530, 1)--Copper Shield
            doPlayerAddItem(cid, 2660, 1)--Cloak
            doPlayerAddItem(cid, 8923, 1)--Legs
            doPlayerAddItem(cid, 2643, 1)--Leather Boots
            doPlayerAddItem(cid, 1988, 1)--Brown Backpack
            doPlayerAddItem(cid, 2152, 10)--Money
            doPlayerAddItem(cid, 7618, 20)--HP
			doPlayerAddItem(cid, 2789, 100)--Food
        doPlayerSendTextMessage(cid,22,""..getPlayerName(cid).." you now have the first Paladin items.")
        end
        if getPlayerVocation(cid) == 4 or getPlayerVocation(cid) == 8 or getPlayerVocation(cid) == 12 then
            doPlayerAddItem(cid, 2481, 1)--Soldier Helmet
            doPlayerAddItem(cid, 2465, 1)--Brass Armor
            doPlayerAddItem(cid, 2509, 1)--Steel Shield
            doPlayerAddItem(cid, 2478, 1)--Brass Legs
            doPlayerAddItem(cid, 2643, 1)--Leather Boots
            doPlayerAddItem(cid, 1988, 1)--Brown Backpack
            doPlayerAddItem(cid, 8602, 1)--Sword
            doPlayerAddItem(cid, 2439, 1)--Club
            doPlayerAddItem(cid, 8601, 1)--Axe
            doPlayerAddItem(cid, 2152, 10)--Money
            doPlayerAddItem(cid, 7618, 20)--HP
			doPlayerAddItem(cid, 2789, 100)--Food
        doPlayerSendTextMessage(cid,22,""..getPlayerName(cid).." you now have the first Knight items.")
        end
            setPlayerStorageValue(cid, 30001, 1)
    end
     return TRUE
end 
	]]></event>
</mod>
 
Thanks for the reply!

That didn't seem to work. Can you help me figure out what this does:
Lua:
if getPlayerStorageValue(cid, 30001) == -1 then
I presume my characters are not meeting that if statement, but I have no idea what the ID 30001 is supposed to be referencing.
 
The id is a storage, so if they have gained the items they get that storage/id into their character and next time they are login in it checks if they got this storage/id, if they do it will not add the item again but if they doesn't got the storage/id it will add the items.

If they aren't getting any items it could probably be that the characters already had gained that storage somehow before, if you are making a totaly new character and they still doesn't get it there is a script already probably in creaturescripts or mods that adds this storage when they login in so try to change that id everywhere in the script to something else, like 54324.
 
Back
Top