• 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!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

Backpack Gives Attributes!

Beo

Three Magic
Joined
Aug 25, 2009
Messages
9,075
Solutions
1
Reaction score
857
In items.xml;

Find Backpack of Holding..
Code:
	<item id="2365" name="backpack of holding" article="a">
		<attribute key="weight" value="1500" />
		<attribute key="containerSize" value="24" />
		<attribute key="slotType" value="backpack" />
		<attribute key="speed" value="10" />
	</item>
.. This will increase your base speed by 10 when wearing this backpack.


Find Demon Backpack..
Code:
	<item id="10518" name="demon backpack" article="a">
		<attribute key="weight" value="1800" />
		<attribute key="containerSize" value="20" />
		<attribute key="slotType" value="backpack" />
		<attribute key="healthGain" value="10" />
		<attribute key="healthTicks" value="6000" />
		<attribute key="manaGain" value="10" />
		<attribute key="manaTicks" value="6000" />
	</item>
Gives 10 health and 10 mana over 6000 ticks.

Find Orange Backpack..
Code:
	<item id="10519" name="orange backpack" article="an">
		<attribute key="weight" value="1800" />
		<attribute key="containerSize" value="20" />
		<attribute key="slotType" value="backpack" />
		<attribute key="axe" value="20" />
	</item>
Gives axe fighting +20.

Find Blue Backpack..
Code:
	<item id="2002" name="blue backpack" article="a">
		<attribute key="weight" value="1800" />
		<attribute key="containerSize" value="20" />
		<attribute key="slotType" value="backpack" />
		<attribute key="maxManaPercentage" value="110" />
	</item>
Gives 10% more mana..

In movements.xml add:

Code:
	<movevent type="Equip" itemid="2365" slot="bag" event="function" value="onEquipItem"/>

	<movevent type="Equip" itemid="10518" slot="bag" event="function" value="onEquipItem"/>

	<movevent type="Equip" itemid="10519" slot="bag" event="function" value="onEquipItem"/>

	<movevent type="Equip" itemid="2002" slot="bag" event="function" value="onEquipItem"/>

Making more on request.
 
Hey mate thanks for this , I just wonder how do you do when you have full set THEN you get bonus for example if you have the demon set then your demon backpack gives you for example + 10 speed. Thanks in advance.
 
Nice script man (:

all backpacks:


script name.lua
Code:
local backpacks = { 
[1988] = 1998, 
[1998] = 1999, 
[1999] = 2000, 
[2000] = 2001, 
[2001] = 2002, 
[2002] = 2003, 
[2003] = 2004, 
[2004] = 2365, 
[2365] = 3940,
[3940] = 3960, 
[3960] = 5926, 
[5926] = 5949,
[5949] = 7342, 
[7342] = 9774,
[9774] = 10518, 
[10518] = 10519,
[10519] = 10521, 
[10521] = 10522,
[10522] = 11115,
[11115] = 11235, 
[11235] = 11237,
[11237] = 11238,
[11238] = 11257, 
[11257] = 1988
}
 
function onUse(cid, item, fromPosition, itemEx, toPosition) 
doTransformItem(item.uid, backpacks[item.itemid]) 
doSendMagicEffect(getThingPos(item.uid),math.random(28,30)) 
return TRUE 
end

actions.xml
Code:
<action itemid="1988;1998;1999;2000;2001;2002;2003;2004;2365;3940;3960;5926;5949;7342;9774;10518;10519;10521;10522;11115;11235;11237;11238;11257" script="script name.lua" />
 
Do not forget to
Code:
<movevent type="DeEquip" itemid="2365" slot="bag" event="function" value="onDeEquipItem"/>

(Sorry for bumping old thread, but might help to someone)
 
Didnt we have to add some "addCreatureMaxHealth 200" to movement.xml?
if yes can you tell me the full line, ty
 
sorry for bumping old thread but im using 0.3.6 and i get this error in console anyone know what attribute key values i should use instead?

Code:
[27/08/2015 09:23:55] [Warning - Items::loadFromXml] Unknown key value fishing
[27/08/2015 09:23:55] [Warning - Items::loadFromXml] Unknown key value fishing
[27/08/2015 09:23:55] [Warning - Items::loadFromXml] Unknown key value axe
[27/08/2015 09:23:55] [Warning - Items::loadFromXml] Unknown key value shielding
[27/08/2015 09:23:55] [Warning - Items::loadFromXml] Unknown key value sword
[27/08/2015 09:23:55] [Warning - Items::loadFromXml] Unknown key value maxManaPercentage
[27/08/2015 09:23:55] [Warning - Items::loadFromXml] Unknown key value magiclevelpotions
[27/08/2015 09:23:55] [Warning - Items::loadFromXml] Unknown key value club
 
Back
Top