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

Eq To New Players,

Nux

Yzeria Custom War
Joined
Jan 2, 2009
Messages
1,067
Reaction score
1
Hello people, well i got some trouble, how do i get so people start with X gear?, for example p set.. what do i need to do with the samples?.. so the players will get p set etc..
 
You have to have the eq you want the new players to have on your samples too or just use the firstitems.xml in mods folder :p
 
but when i put them into the samples, thay dissapear when i relog into the samples, if i put p set to a sample and relog into the same sample, then the p set just dissapear =/
 
Here you have mod:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<mod name="First Items" enabled="yes">
	<config name="firstitems_config"><![CDATA[
		STORAGE = 30001
		commonItems = {
			{itemid=2160, count=3, inContainer = true}, -- 2 platinum coins
			{itemid=2643} -- leather boots
		}
		firstItems = {
			{ -- Sorcerer	
				{itemid=1988}, -- backpack
				{itemid=2521}, -- dark shield
				{itemid=2190}, -- wand of vortex
				{itemid=8819}, -- magician's robe
				{itemid=8820}, -- mage hat
				{itemid=7730}  -- blue legs
			},
			{ -- Druid
				{itemid=1988}, -- backpack
				{itemid=2521}, -- dark shield
				{itemid=2182}, -- snakebite rod
				{itemid=8819}, -- magician's robe
				{itemid=8820}, -- mage hat
				{itemid=7730}  -- blue legs
			},
			{ -- Paladin
				{itemid=1988}, -- backpack
				{itemid=2521}, -- dark shield
				{itemid=2389, count=3}, -- 3 spears
				{itemid=2463}, -- plate armor
				{itemid=2457}, -- steel helmet
				{itemid=2647}  -- plate legs
			},
			{ -- Knight
				{itemid=1988}, -- backpack
				{itemid=2521}, -- dark shield
				{itemid=2394}, -- morning star
				{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>
 
Here you have mod:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<mod name="First Items" enabled="yes">
	<config name="firstitems_config"><![CDATA[
		STORAGE = 30001
		commonItems = {
			{itemid=2160, count=3, inContainer = true}, -- 2 platinum coins
			{itemid=2643} -- leather boots
		}
		firstItems = {
			{ -- Sorcerer	
				{itemid=1988}, -- backpack
				{itemid=2521}, -- dark shield
				{itemid=2190}, -- wand of vortex
				{itemid=8819}, -- magician's robe
				{itemid=8820}, -- mage hat
				{itemid=7730}  -- blue legs
			},
			{ -- Druid
				{itemid=1988}, -- backpack
				{itemid=2521}, -- dark shield
				{itemid=2182}, -- snakebite rod
				{itemid=8819}, -- magician's robe
				{itemid=8820}, -- mage hat
				{itemid=7730}  -- blue legs
			},
			{ -- Paladin
				{itemid=1988}, -- backpack
				{itemid=2521}, -- dark shield
				{itemid=2389, count=3}, -- 3 spears
				{itemid=2463}, -- plate armor
				{itemid=2457}, -- steel helmet
				{itemid=2647}  -- plate legs
			},
			{ -- Knight
				{itemid=1988}, -- backpack
				{itemid=2521}, -- dark shield
				{itemid=2394}, -- morning star
				{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>


Tnx for help it worked, Rep +
 
Back
Top