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

[REQUEST] FirstItems.XML

Heroid

Active Member
Joined
Mar 7, 2011
Messages
336
Solutions
13
Reaction score
36
Hello, I need some help, I decided to use the "FirstItems.XML"...
At first, I want to make it possible to make so All Druids and Sorcerers get EQ With IDs 2190, 9815, 9820, 9811, 2121, 2173, 9817, 2389 And a normal backpack and in that 1 ID's 7618 and 7620!... Knights: At EQ Spots: 2384, 9815, 9820, 9811, 2121, 2173, 9817, 2389 And in backpack: 7618, 7620, 2428, 2398! Paladins: At EQ Spots: 2389, 9815, 9820, 9811, 2121, 2173, 9817! And In Backpack 7618, 7620!
But if thats not possible i want like this: ALL Vocations gets this at EQ Spots: 2190, 9815, 9820, 9811, 2121, 2173, 9817, 2389 And this in Backpack: 1988, 7618, 7620, 2428, 2398, 2384... Thanks Alot ;)... I Get A Fucking Wierd Error With My Script... x]
Well, Thanks In Advance... :D
 
this add items perfectly on the slot, just follow the -- place.
and i won't config it for you, it's to lazy for you?
:O

take mod.
LUA:
<?xml version="1.0" encoding="UTF-8"?>
<mod name="First Items" version="1.0" author="Ratser" contact="otland.net/members/ratser/" enabled="yes">
	<config name="firstitems_config"><![CDATA[
		commonItems = {
			{itemid = 2120}, -- rope
			{itemid = 5710}, -- shovel
			{itemid = 2420}, -- machete
			{itemid = 2789, count = 50}, -- brown mushroom
			{itemid = 2305}, -- firebomb rune
			{itemid = 2261} -- destroy field rune
		}
 
		firstItems = {
			[1] = { -- Sorcerer
				{itemid = 1988}, -- backpack
				{itemid = 8902}, -- spellbook
				{itemid = 2187}, -- wand
				{itemid = 8871}, -- cape
				{itemid = 2323}, -- hat
				{itemid = 7730}, -- legs
				{itemid = 2195}, -- boots
				{itemid = 2268}, -- sd
				{itemid = 2273}, -- uh
				{itemid = 7590}, -- gmp
				{itemid = 2293} -- mw
			},
			[2] = { -- Druid
				{itemid = 1988}, -- backpack
				{itemid = 8902}, -- spellbook
				{itemid = 2183}, -- rod
				{itemid = 8871}, -- cape
				{itemid = 2323}, -- hat
				{itemid = 7730}, -- legs
				{itemid = 2195}, -- boots
				{itemid = 2268}, -- sd
				{itemid = 2273}, -- uh
				{itemid = 7590}, -- gmp
				{itemid = 2293}, -- mw
				{itemid = 2269}, -- wg
				{itemid = 2278} -- para
			},
			[3] = { -- Paladin
				{itemid = 1988}, -- backpack
				{itemid = 2514}, -- shield
				{itemid = 7368, count = 1}, -- weapon
				{itemid = 8891}, -- armor
				{itemid = 2493}, -- helmet
				{itemid = 7730}, -- legs
				{itemid = 2195}, -- boots
				{itemid = 2268}, -- sd
				{itemid = 2273}, -- uh
				{itemid = 8472}, -- gsp
				{itemid = 7589}, -- smp
				{itemid = 7588}, -- shp
				{itemid = 2293} -- mw
			},
			[4] = { -- Knight
				{itemid = 1988}, -- backpack
				{itemid = 2514}, -- shield
				{itemid = 2400}, -- sword
				{itemid = 2472}, -- armor
				{itemid = 2493}, -- helmet
				{itemid = 2470}, -- legs
				{itemid = 2195}, -- boots
				{itemid = 2273}, -- uh
				{itemid = 7620}, -- mp
				{itemid = 8473}, -- uhp
				{itemid = 2293} -- mw
			}
		}
	]]></config>
	<event type="login" name="FirstItems" event="script"><![CDATA[
		domodlib('firstitems_config')
 
		function onLogin(cid)
			local vocationItems = firstItems[getPlayerVocation(cid)]
			if(not vocationItems) then
				return true
			end
 
			if(getPlayerGroupId(cid) < 4 and getPlayerStorageValue(cid, 30001) == -1) then
				for i = 1, #vocationItems do
					doPlayerAddItem(cid, vocationItems[i].itemid, vocationItems[i].count or 1, true)
				end
 
				for i = 1, #commonItems do
					doPlayerAddItem(cid, commonItems[i].itemid, commonItems[i].count or 1, true)
				end
 
				doCreatureSetStorage(cid, 30001, 1)
			end
 
			return true
		end
	]]></event>
</mod>
 
Back
Top