vJASS & Zinc Documentation
For the latest documentation about how it works vJASS and Zinc language layers for Warcraft III, please follow these links:
Jasshelper documentation - Zinc documentation - WC3 Optimizer documentation

* Random Spells & Systems

Custom Ability Source Cost v1.1

Views: 8777
Replies: 3
Posted by radamantus
June 27, 2013, 02:48:58 PM

Window Interface

Views: 562
Replies: 0
Posted by GALLED
May 02, 2011, 09:32:32 PM

Bags System

Guest · 659

0 Members and 1 Guest are viewing this topic.

Rating

Average Score - 5 / 5

« Created: December 18, 2017, 07:04:32 AM by moyack »

Bags System
on: August 21, 2011, 07:41:28 AM
Categories: Pack, System, vJASS
Rating: 5
Image/screenshot:
Warcraft III Spell resource
« Created: December 18, 2017, 07:06:05 AM by moyack »
« Last Edit: January 28, 2018, 09:11:41 AM by moyack »

Related Topics or Resources



by

by

by

Used DGUI system
in description there is variable - laziness to fix

All is written on vjass

3 libs: Math, Camera, DGUI

and DataBase Item + Bags System as follows:

Code: jass
  1. library DataBaseBags initializer InventoryInitDB
  2.  
  3. globals
  4.     private gamecache gcbag = InitGameCache("BagsSystem.w3v")
  5.     integer TypeTextureBlank = 'dbnk'
  6. endglobals
  7.  
  8. function GetItemTexture takes integer typeitem returns integer
  9.     local string hi = I2S(typeitem)
  10.     local string tex
  11.     if HaveStoredString(gcbag, "Texture", hi) then
  12.         set tex = GetStoredString(gcbag, "Texture", hi)
  13.         if HaveStoredInteger(gcbag, "IconDest", tex) then
  14.             return GetStoredInteger(gcbag, "IconDest", tex)
  15.         endif
  16.     endif
  17.     return TypeTextureBlank
  18. endfunction
  19.  
  20. function GetItemCost takes integer typeitem returns integer
  21.     local string hi = I2S(typeitem)
  22.     if HaveStoredInteger(gcbag, "Cost", hi) then
  23.         return  GetStoredInteger(gcbag, "Cost", hi)
  24.     endif
  25.     return -1
  26. endfunction
  27.  
  28. function GetItemDescription takes integer typeitem returns string
  29.     local string hi = I2S(typeitem)
  30.     if HaveStoredString(gcbag, "Description", hi) then
  31.         return GetStoredString(gcbag, "Description", hi)
  32.     endif
  33.     return null
  34. endfunction
  35.  
  36. function GetItemHasCharges takes integer typeitem returns boolean
  37.     local string hi = I2S(typeitem)
  38.     if HaveStoredBoolean(gcbag, "Charge", hi) then
  39.         return GetStoredBoolean(gcbag, "Charge", hi)
  40.     endif
  41.     return false
  42. endfunction
  43.  
  44. function InventoryInitItemDB_Func takes integer ItemType, string Texture, string Description, integer Cost, boolean Charge returns nothing
  45.     local string ItemTypeStr = I2S(ItemType)
  46.     call StoreString(gcbag, "Texture", ItemTypeStr, Texture)
  47.     call StoreString(gcbag, "Description", ItemTypeStr, Description)
  48.     call StoreInteger(gcbag, "Cost", ItemTypeStr, Cost)
  49.     call StoreBoolean(gcbag, "Charge", ItemTypeStr, Charge)
  50. endfunction
  51.  
  52. function InventoryInitDestDB_Func takes integer TypeDest, string Texture returns nothing
  53.     call StoreInteger(gcbag, "IconDest", Texture, TypeDest)
  54. endfunction
  55.  
  56. function InventoryInitIconDB_Func takes integer TypeUnit, string Texture returns nothing
  57.     call StoreString(gcbag, "Texture", I2S(TypeUnit), Texture)
  58. endfunction
  59.  
  60. private function InventoryInitDB takes nothing returns nothing
  61.     //---------------------------------------------------------------------------------------------------+
  62.     //                                                                                                   |
  63.     //                                               Item                                                |
  64.     //                                                                                                   |
  65.     //---------------------------------------------------------------------------------------------------+
  66.     //__________
  67.     call InventoryInitItemDB_Func('afac', "BTNAlleriaFlute.blp"     , "Increases nearby ranged units' damage by <AIar,DataA1,%>%. |nDoes not stack with Trueshot Aura.", 400, false)
  68.     call InventoryInitItemDB_Func('spsh', "BTNSpellShieldAmulet.blp", "Blocks a negative spell that an enemy casts on the Hero once every <ANss,Cool1> seconds.", 400, false)
  69.     call InventoryInitItemDB_Func('ajen', "BTNJanggo.blp"           , "Grants the Hero and friendly nearby units increased attack rate and movement speed. |nDoes not stack with Endurance Aura.", 500, false)
  70.     call InventoryInitItemDB_Func('bgst', "BTNBelt.blp"             , "Increases the Strength of the Hero by 6 when worn.", 500, false)
  71.     call InventoryInitItemDB_Func('belv', "BTNBoots.blp"            , "Increases the Agility of the Hero by 6 when worn.", 500, false)
  72.     call InventoryInitItemDB_Func('bspd', "BTNBootsOfSpeed.blp"     , "Increases the movement speed of the Hero when worn.", 150, false)
  73.     call InventoryInitItemDB_Func('cnob', "BTNCirclet.blp"          , "Increases the Strength, Agility and Intelligence of the Hero by 2 when worn.", 175, false)
  74.     call InventoryInitItemDB_Func('ratc', "BTNClawsOfAttack.blp"    , "Increases the attack damage of the Hero by 12 when worn.", 500, false)
  75.     call InventoryInitItemDB_Func('rat6', "BTNClawsOfAttack.blp"    , "Increases the attack damage of the Hero by 6 when worn.", 100, false)
  76.     call InventoryInitItemDB_Func('rat9', "BTNClawsOfAttack.blp"    , "Increases the attack damage of the Hero by 9 when worn.", 400, false)
  77.     call InventoryInitItemDB_Func('clfm', "BTNCloakOfFlames.blp"    , "Engulfs the Hero in fire which deals <AIcf,DataA1> damage per second to nearby enemy land units. |nDoes not stack with Immolation.", 600, false)
  78.     call InventoryInitItemDB_Func('clsd', "BTNCloak.blp"            , "Provides the Hero with invisibility at night when worn. An invisible Hero is untargetable by the enemy unless detected. If the Hero moves, attacks, uses an ability, or casts a spell, the invisibility effect is lost.", 100, false)
  79.     call InventoryInitItemDB_Func('crys', "BTNCrystalBall.blp"      , "Reveals a targeted area. Invisible units are also revealed by the Crystal Ball's effect. |nLasts <AIta,Dur1> seconds.", 500, false)
  80.     call InventoryInitItemDB_Func('dsum', "BTNDarkSummoning.blp"    , "Teleports <AUds,DataA1> of the player's units within the targeted area to the location of the Hero when used.", 400, false)
  81.     call InventoryInitItemDB_Func('lgdh', "BTNHornOfDoom.blp"       , "Grants the Hero and friendly nearby units increased life regeneration and movement speed. |nDoes not stack with Unholy Aura.", 400, false)
  82.     call InventoryInitItemDB_Func('hval', "BTNHelmOfValor.blp"      , "Increases the Strength and Agility of the Hero by 4 when worn.", 500, false)
  83.     call InventoryInitItemDB_Func('rst1', "BTNGauntletsOfOgrePower.blp", "Increases the Strength of the Hero by 3 when worn.", 100, false)
  84.     call InventoryInitItemDB_Func('gcel', "BTNGlove.blp"            , "Increases the attack speed of the Hero by <AIsx,DataA1,%>% when worn.", 100, false)
  85.     call InventoryInitItemDB_Func('hcun', "BTNHoodOfCunning.blp"    , "Increases the Agility and Intelligence of the Hero by 4 when worn.", 500, false)
  86.     call InventoryInitItemDB_Func('rhth', "BTNPeriapt1.blp"         , "Increases the hit points of the Hero by <AIl2,DataA1> when worn.", 500, false)
  87.     call InventoryInitItemDB_Func('kpin', "BTNPipeOfInsight.blp"    , "Grants the Hero and friendly nearby units a bonus to mana regeneration. |nDoes not stack with Brilliance Aura.", 500, false)
  88.     call InventoryInitItemDB_Func('rin1', "BTNMantleOfIntelligence.blp", "Increases the Intelligence of the Hero by 3 when worn.", 100, false)
  89.     call InventoryInitItemDB_Func('mcou', "BTNMedalionOfCourage.blp", "Increases the Strength and Intelligence of the Hero by 4 when worn.", 500, false)
  90.     call InventoryInitItemDB_Func('odef', "BTNOrbOfDarkness.blp"    , "Adds <AIdf,DataA1> bonus damage to the attack of a Hero when carried. The Hero's attack also becomes ranged when attacking air and will create a Dark Minion when it is the killing blow on an enemy unit. The Dark Minion lasts <ANbs,DataC1> seconds.", 500, false)
  91.     call InventoryInitItemDB_Func('penr', "BTNPendantOfEnergy.blp"  , "Increases the mana capacity of the Hero by <AImb,DataA1> when worn.", 400 , false)
  92.     call InventoryInitItemDB_Func('pmna', "BTNPendantOfMana.blp"    , "Increases the mana capacity of the Hero by <AIbm,DataA1> when worn.", 500, false)
  93.     call InventoryInitItemDB_Func('prvt', "BTNPeriapt.blp"          , "Increases the hit points of the Hero by <AIlf,DataA1> when worn.", 350, false)
  94.     call InventoryInitItemDB_Func('rde1', "BTNRingGreen.blp"        , "Increases the armor of the Hero by 2 when worn.", 150, false)
  95.     call InventoryInitItemDB_Func('rde2', "BTNRingGreen.blp"        , "Increases the armor of the Hero by 3 when worn.", 400, false)
  96.     call InventoryInitItemDB_Func('rde3', "BTNRingGreen.blp"        , "Increases the armor of the Hero by 4 when worn.", 500, false)
  97.     call InventoryInitItemDB_Func('rlif', "BTNRingSkull.blp"        , "Increases the Hero's hit point regeneration by <Arel,DataA1> hit points per second.", 200, false)
  98.     call InventoryInitItemDB_Func('ciri', "BTNRobeOfTheMagi.blp"    , "Increases the Intelligence of the Hero by 6 when worn.", 500, false)
  99.     call InventoryInitItemDB_Func('brac', "BTNRunedBracers.blp"     , "Reduces Magic damage dealt to the Hero by <AIsr,DataB1,%>%.", 400, false)
  100.     call InventoryInitItemDB_Func('sbch', "BTNBoneChimes.blp"       , "Grants a melee Hero and friendly nearby melee units life stealing attacks which take <AIav,DataA1,%>% of the damage they deal and convert it into life. |nDoes not stack with Vampiric Aura.", 450, false)
  101.     call InventoryInitItemDB_Func('rag1', "BTNSlippersOfAgility.blp", "Increases the Agility of the Hero by 3 when worn.", 100, false)
  102.     call InventoryInitItemDB_Func('rwiz', "BTNSobiMask.blp"         , "Increases the Hero's rate of mana regeneration by <AIrm,DataA1,%>% when worn.", 400, false)
  103.     call InventoryInitItemDB_Func('ssil', "BTNStaffOfSilence.blp"   , "Stops all enemies in a target area from casting spells.", 500, false)
  104.     call InventoryInitItemDB_Func('stel', "BTNStaffOfTeleportation.blp", "Teleports the Hero to the targeted allied land unit or structure.", 100, false)
  105.     call InventoryInitItemDB_Func('evtl', "BTNTalisman.blp"         , "Causes attacks against the wearer to miss <AIev,DataA1,%>% of the time. |nDoes not stack with Evasion or Drunken Brawler.", 400, false)
  106.     call InventoryInitItemDB_Func('lhst', "BTNLionHorn.blp"         , "Grants the Hero and friendly nearby units <AIad,DataA1> bonus armor. |nDoes not stack with Devotion Aura.", 400, false)
  107.     call InventoryInitItemDB_Func('ward', "BTNDrum.blp"             , "Increases the attack damage of nearby friendly units by <AIcd,DataA1,%>% when worn. |nDoes not stack with Command Aura.", 500, false)
  108.     //_______ ______
  109.     call InventoryInitItemDB_Func('wild', "BTNAmuletOftheWild.blp"  , "Summons a Furbolg Warrior. The Furbolg lasts <AIuw,Dur1> seconds.", 750, true)
  110.     call InventoryInitItemDB_Func('ankh', "BTNAnkh.blp"             , "Automatically brings the Hero back to life with <AIrc,DataB1> hit points when the Hero wearing the Ankh dies.", 800, true)
  111.     call InventoryInitItemDB_Func('fgsk', "BTNBookOfTheDead.blp"    , "Summons <AIfs,DataA1> Skeleton Warriors and <AIfs,DataB1> Skeleton Archers to fight for you. |nLasts <AIfs,Dur1> seconds.", 450, true)
  112.     call InventoryInitItemDB_Func('fgdg', "BTNDoomGuard.blp"        , "Summons a Doom Guard to fight for you. |nLasts <AIfu,Dur1> seconds.", 750, true)
  113.     call InventoryInitItemDB_Func('whwd', "BTNHealingWard.blp"      , "Drops a ward that heals nearby friendly units for <Ahwd,Dur1> seconds. |nContains <whwd,uses> charges.", 600, true)
  114.     call InventoryInitItemDB_Func('hlst', "BTNHealthStone.blp"      , "Increases the life regeneration rate of the Hero by <Arll,DataA1> hit points per second when worn. Can be consumed for <AIh2,DataA1> health.", 450, true)
  115.     call InventoryInitItemDB_Func('shar', "BTNIceShard.blp"         , "Summons an Ice Revenant. The Ice Revenant lasts <AIir,Dur1> seconds.", 750, true)
  116.     call InventoryInitItemDB_Func('infs', "BTNInfernalStone.blp"    , "Calls an Infernal down from the sky, dealing <AIin,DataA1> damage and stunning enemy land units for <AIin,Dur1> seconds in an area. The Infernal lasts <AIin,DataB1> seconds.", 750, true)
  117.     call InventoryInitItemDB_Func('mnst', "BTNManaStone.blp"        , "Increases the mana regeneration rate of the Hero by <AIrn,DataA1,%>% when worn. Can be consumed for <AIm2,DataA1> mana.", 450, true)
  118.     call InventoryInitItemDB_Func('pdiv', "BTNPotionOfDivinity.blp" , "Turns the Hero invulnerable for <AIdv,Dur1> seconds.", 600, true)
  119.     call InventoryInitItemDB_Func('pghe', "BTNPotionGreen.blp"      , "Heals <AIh2,DataA1> hit points when used.", 400, true)
  120.     call InventoryInitItemDB_Func('pgma', "BTNPotionBlueBig.blp"    , "Restores <AIm2,DataA1> mana when used.", 400, true)
  121.     call InventoryInitItemDB_Func('pnvu', "BTNGreaterInvulneralbility.blp", "Makes the Hero invulnerable to damage for <AIvu,Dur1> seconds when used. An invulnerable Hero may not be the target of spells or effects.", 400, true)
  122.     call InventoryInitItemDB_Func('pomn', "BTNPotionOfOmniscience.blp", "Reveals the entire map for <AIrv,Dur1> seconds when used.", 400, true)
  123.     call InventoryInitItemDB_Func('pres', "BTNPotionOfRestoration.blp", "Restores <AIre,DataA1> hit points and <AIre,DataB1> mana of the Hero when used.", 600, true)
  124.     call InventoryInitItemDB_Func('fgrd', "BTNRedDragon.blp"        , "Summons a Red Drake to fight for you. |nLasts <AIfd,Dur1> seconds.", 450, true)
  125.     call InventoryInitItemDB_Func('rej3', "BTNRejuvPotion.blp"      , "|cff87ceebNon-Combat Consumable|r|nRegenerates <AIp3,DataA1> hit points and <AIp3,DataB1> mana of the Hero over <AIp3,Dur1> seconds.", 400, true)
  126.     call InventoryInitItemDB_Func('sand', "BTNSnazzyScrollPurple.blp", "Raises <AIan,DataA1> nearby dead units to fight for <AIan,Dur1> seconds.", 750, true)
  127.     call InventoryInitItemDB_Func('sres', "BTNScrollOfHealing.blp"  , "Restores <AIra,DataA1> hit points and <AIra,DataB1> mana of friendly non-mechanical units in an area around your Hero.", 750, true)
  128.     call InventoryInitItemDB_Func('srrc', "BTNSnazzyScroll.blp"     , "Brings <AIrs,DataA1> of your nearby dead units back to life.", 750, true)
  129.     call InventoryInitItemDB_Func('sror', "BTNSnazzyScrollGreen.blp", "Gives friendly nearby units a <AIrr,DataA1,%>% bonus to damage for <AIrr,Dur1> seconds.", 400, true)
  130.     call InventoryInitItemDB_Func('wswd', "BTNSentryWard.blp"       , "Drops a Sentry Ward to spy upon an area for <AIsw,Dur1> seconds. |nContains <wswd,uses> charges.", 150, true)
  131.     call InventoryInitItemDB_Func('fgfh', "BTNFelHound.blp"         , "Summons a Fel Stalker to fight for you. |nLasts <AIfh,Dur1> seconds.", 450, true)
  132.     call InventoryInitItemDB_Func('fgrg', "BTNRockGolem.blp"        , "Summons a Rock Golem to fight for you. |nLasts <AIfr,Dur1> seconds.", 450, true)
  133.     call InventoryInitItemDB_Func('totw', "BTNStone.blp"            , "This mystic stone summons a Furbolg to fight for you. |nContains <totw,uses> charges. |nLasts <AIff,Dur1> seconds.", 450, true)
  134.     call InventoryInitItemDB_Func('will', "BTNWand.blp"             , "Create an illusory double of the targeted unit when used. The illusory double deals no damage to enemy units, takes <AIil,DataB1> times the damage from enemy attacks, and will disappear after <AIil,Dur1> seconds or when its hit points reach zero. |nContains <will,uses> charges.", 150, true)
  135.     call InventoryInitItemDB_Func('wlsd', "BTNStarWand.blp"         , "Allows the Hero to cast Lightning Shield on a target unit. Lightning Shield surrounds a unit with electricity, dealing <AIls,DataA1> damage per second to nearby units. |nContains <wlsd,uses> charges. |nLasts <AIls,Dur1> seconds.", 150, true)
  136.     call InventoryInitItemDB_Func('woms', "BTNWandOfManaSteal.blp"  , "Steals mana from a target unit and gives it to the Hero. |nContains <woms,uses> charges.", 400, true)
  137.     call InventoryInitItemDB_Func('wshs', "BTNWandOfShadowSight.blp", "Gives the player vision of a target unit until that unit is dispelled. |nContains <wshs,uses> charges.", 150, true)
  138.     call InventoryInitItemDB_Func('wcyc', "BTNWandOfCyclone.blp"    , "Allows the Hero to cast Cyclone. Cyclone tosses a target enemy unit into the air, rendering it unable to attack, move or cast spells. |nContains <wcyc,uses> charges. |nLasts <AIcy,Dur1> seconds.", 450, true)
  139.     //___________
  140.     //_________
  141.     call InventoryInitItemDB_Func('ratf', "BTNClawsOfAttack.blp"    , "Increases the attack damage of the Hero by 15 when worn.", 800, false)
  142.     call InventoryInitItemDB_Func('ckng', "BTNHelmutPurple.blp"     , "Increases the Strength, Intelligence, and Agility of the Hero by 5 when worn.", 1000, false)
  143.     call InventoryInitItemDB_Func('desc', "BTNDaggerOfEscape.blp"   , "Allows the Hero to teleport a short distance.", 400, false)
  144.     call InventoryInitItemDB_Func('modt', "BTNMaskOfDeath.blp"      , "While wearing this mask, a Hero will recover hit points equal to <AIva,DataA1,%>% of the attack damage dealt to an enemy unit.", 1000, false)
  145.     call InventoryInitItemDB_Func('ofro', "BTNOrbOfFrost.blp"       , "Adds <AIob,DataA1> bonus cold damage to the attack of a Hero when carried. The Hero's attacks also become ranged when attacking air and slow the movement speed and attack rate of the enemy for <AIob,Dur1> seconds.", 800, false)
  146.     call InventoryInitItemDB_Func('rde4', "BTNRingGreen.blp"        , "Increases the armor of the Hero by 5 when worn.", 800, false)
  147.     call InventoryInitItemDB_Func('tkno', "BTNTomeRed.blp"          , "Increases the level of the Hero by <AIlm,DataA1> when used.", 1200, false)
  148.     //__________ _______
  149.     call InventoryInitItemDB_Func('pclr', "BTNPotionOfClarity.blp"  , "|cff87ceebNon-Combat Consumable|r|nRegenerates the Hero's mana by <AIpr,DataB1> over <AIpr,Dur1> seconds when used.", 160, true)
  150.     call InventoryInitItemDB_Func('hslv', "BTNHealingSalve.blp"     , "|cff87ceebNon-Combat Consumable|r|nRegenerates a target unit's hit points by <AIrl,DataA1> over <AIrl,Dur1> seconds when used. |nContains <hslv,uses> charges.", 100, true)
  151.     call InventoryInitItemDB_Func('tsct', "BTNHumanWatchTower.blp"  , "Creates a Scout Tower at a target location.", 30, true)
  152.     call InventoryInitItemDB_Func('plcl', "BTNLesserClarityPotion.blp", "|cff87ceebNon-Combat Consumable|r|nRegenerates the Hero's mana by <AIpl,DataB1> over <AIpl,Dur1> seconds when used.", 70, true)
  153.     call InventoryInitItemDB_Func('mcri', "BTNMechanicalCritter.blp", "Creates a player-controlled critter that can be used to scout enemies.", 50, true)
  154.     call InventoryInitItemDB_Func('moon', "BTNMoonStone.blp"        , "Causes an eclipse that blocks out the sun and creates an artificial night. |nLasts <AIct,Dur1> seconds.", 50, true)
  155.     call InventoryInitItemDB_Func('phea', "BTNPotionGreenSmall.blp" , "Heals <AIh1,DataA1> hit points when used.", 150, true)
  156.     call InventoryInitItemDB_Func('pinv', "BTNLesserInvisibility.blp", "|cff87ceebNon-Combat Consumable|r|nRenders the Hero invisible for <AIv1,Dur1> seconds when used. An invisible Hero is untargetable by the enemy unless detected. If the Hero attacks, uses an ability, or casts a spell, the invisibility effect is lost.", 100, true)
  157.     call InventoryInitItemDB_Func('pnvl', "BTNLesserInvulneralbility.blp", "Makes the Hero invulnerable to damage for <AIvl,Dur1> seconds when used. An invulnerable Hero may not be the target of spells or effects.", 150, true)
  158.     call InventoryInitItemDB_Func('rnec', "BTNRodOfNecromancy.blp"  , "Creates two Skeleton Warriors from a corpse. |nContains <rnec,uses> charges.", 150, true)
  159.     call InventoryInitItemDB_Func('pman', "BTNPotionBlueSmall.blp"  , "Restores <AIm1,DataA1> mana when used.", 200, true)
  160.     call InventoryInitItemDB_Func('skul', "BTNSacrificialSkull.blp" , "Creates an area of Blight at a target location.", 50, true)
  161.     call InventoryInitItemDB_Func('shea', "BTNScrollOfTownPortal.blp", "Heals <AIha,DataA1> hit points to all friendly non-mechanical units around the Hero when used.", 250, true)
  162.     call InventoryInitItemDB_Func('sman', "BTNScrollOfProtection.blp", "Restores <AImr,DataA1> mana to all friendly units in an area around your Hero.", 150, true)
  163.     call InventoryInitItemDB_Func('spro', "BTNScroll.blp"           , "Increases the armor of all friendly units in an area around your Hero by <AIda,DataA1> for <AIda,Dur1> seconds.", 150, true)
  164.     call InventoryInitItemDB_Func('sreg', "BTNScrollOfRegenerationGreen.blp", "|cff87ceebNon-Combat Consumable|r|nRegenerates the hit points of all friendly non-mechanical units in an area around your Hero by <AIsl,DataA1> over <AIsl,Dur1> seconds when used.", 100, true)
  165.     call InventoryInitItemDB_Func('shas', "BTNScrollOfHaste.blp"    , "Increases the movement speed of the Hero and nearby allied units to the maximum movement speed. |nLasts <AIsa,Dur1> seconds.", 50, true)
  166.     call InventoryInitItemDB_Func('stwp', "BTNScrollUber.blp"       , "Teleports the Hero and any of its nearby troops to a target friendly town hall.", 350, true)
  167.     call InventoryInitItemDB_Func('silk', "BTNSpiderSilkBroach.blp" , "Binds a target enemy air unit in webbing, forcing the target to the ground. Webbed units can be hit as though they were land units. |nContains <silk,uses> charges.", 50, true)
  168.     call InventoryInitItemDB_Func('sneg', "BTNStaffOfNegation.blp"  , "Dispels all magical effects in a target area. |n|cffffcc00Deals <AIdi,DataB1> damage to summoned units.|r", 200, true)
  169.     call InventoryInitItemDB_Func('ssan', "BTNStaffOfSanctuary.blp" , "Teleports a target unit to your highest level town hall, stunning the unit and regenerating <ANsa,DataE1> hit points per second. Lasts until the unit is fully healed.", 250, true)
  170.     call InventoryInitItemDB_Func('tcas', "BTNTinyCastle.blp"       , "Creates a Castle at a target location.", 800, true)
  171.     call InventoryInitItemDB_Func('tgrh', "BTNGreathall.blp"        , "Creates a Great Hall at a target location. Human, Night Elf, and Undead players will get their racial equivalent town hall.", 600, true)
  172.     call InventoryInitItemDB_Func('tret', "BTNTomeOfRetraining.blp" , "Unlearns all of the Hero's spells, allowing the Hero to learn different skills.", 300, true)
  173.     call InventoryInitItemDB_Func('vamp', "BTNPotionOfVampirism.blp", "Adds <AIpv,DataA1> bonus damage and a life-stealing attack to the Hero. |nLasts <AIpv,Dur1> seconds.", 75, true)
  174.     call InventoryInitItemDB_Func('wneg', "BTNWandSkull.blp"        , "Dispels all magical effects in a target area. |nContains <wneg,uses> charges. |n|cffffcc00Deals <AIdi,DataB1> damage to summoned units.|r", 200, true)
  175.     call InventoryInitItemDB_Func('wneu', "BTNWandOfNeutralization.blp", "Hurls forth a stream of neutralizing magic that bounces up to <AIdc,DataC1> times, dispelling units in its wake. |nContains <wneu,uses> charges.", 150, true)
  176.     //______ ___ ________
  177.     call InventoryInitItemDB_Func('kybl', "BTNBloodKey.blp"         , "This key is covered in blood.", 200, false)
  178.     call InventoryInitItemDB_Func('ches', "BTNCheese.blp"           , "Cheese cheese cheese cheese!", 250, false)
  179.     call InventoryInitItemDB_Func('bzbe', "BTNVialEmpty.blp"        , "A special vial adept at containing the magical healing waters of a Fountain of Life.", 200, false)
  180.     call InventoryInitItemDB_Func('engs', "BTNEnchantedGemstone.blp", "This artifact of the Kelani Magi is said to hold the power to make constructs out of pure energy. When the Kelani fell to ruin, the Razormane Quillboars were quick to scavenge and covet these beautiful and powerful objects.", 200, false)
  181.     call InventoryInitItemDB_Func('bzbf', "BTNVialFull.blp"         , "A special vial adept at containing the magical healing waters of a Fountain of Life.", 200, false)
  182.     call InventoryInitItemDB_Func('gmfr', "BTNGem.blp"              , "A fragment of a gem from a powerful ring.", 200, false)
  183.     call InventoryInitItemDB_Func('ledg', "BTNSorceressMaster.blp"  , "This Ledger looks to be full of boring facts and figures.", 200, false)
  184.     call InventoryInitItemDB_Func('kygh', "BTNGhostKey.blp"         , "This key is rather insubstantial.", 200, false)
  185.     call InventoryInitItemDB_Func('gopr', "BTNGlyph.blp"            , "Created by ancient druids, this glyph has the power to heal the land.", 250, false)
  186.     call InventoryInitItemDB_Func('azhr', "BTNHeartOfAszune.blp"    , "Legends say that the imprisoned spirit of Aszune seeks out her heart to this very day.", 200, false)
  187.     call InventoryInitItemDB_Func('cnhn', "BTNHornOfCenarius.blp"   , "This ancient relic of the Night Elves is said to hold the power to call the spirits of all Night Elves. It imbues its owner with <AIl1,DataA1> hit points, and a <Arel,DataA1> hit point per second regeneration bonus.", 200, false)
  188.     call InventoryInitItemDB_Func('dkfw', "BTNBarrel.blp"           , "A keg filled to the brim with the strongest drink available this side of Khaz Modan!", 200, false)
  189.     call InventoryInitItemDB_Func('k3m3', "BTN3M3.blp"              , "Cut from the sapphire Body of Enulaia, it opens the soul of the Gate Keeper.", 200, false)
  190.     call InventoryInitItemDB_Func('mgtk', "BTNBlood&GhostKey.blp"   , "This magical chain of keys can open many doors.", 200, false)
  191.     call InventoryInitItemDB_Func('mort', "BTNSpy.blp"              , "The letter is magically sealed. On the front, written in large scrawling letters is the word Thrall.", 200, false)
  192.     call InventoryInitItemDB_Func('kymn', "BTNMoonKey.blp"          , "This key glows faintly.", 200, false)
  193.     call InventoryInitItemDB_Func('k3m1', "BTN3M1.blp"              , "Cut from the emerald Eye of Jennala, it opens the mind of the Gate Keeper.", 200, false)
  194.     call InventoryInitItemDB_Func('jpnt', "BTNScrollOfProtection.blp", "A note from Thrall, for Jaina Proudmoore.", 200, false)
  195.     call InventoryInitItemDB_Func('k3m2', "BTN3M2.blp"              , "Cut from the amethyst Stone of Hannalee, it opens the heart of the Gate Keeper.", 200, false)
  196.     call InventoryInitItemDB_Func('phlt', "BTNUndeadShrine.blp"     , "There is no phatter lewt than this.", 500, false)
  197.     call InventoryInitItemDB_Func('sclp', "BTNSelectHeroOn.blp"     , "Unlocks a secret level!", 75, false)
  198.     call InventoryInitItemDB_Func('sorf', "BTNOrbOfDarkness.blp"    , "A fragment of a powerful artifact.", 200, false)
  199.     call InventoryInitItemDB_Func('shwd', "BTNShimmerWeed.blp"      , "Wondrous plant said to have miraculous mind-expanding properties.", 200, false)
  200.     call InventoryInitItemDB_Func('skrt', "BTNOrbOfCorruption.blp"  , "This ancient artifact entraps the souls of those who die violently, forcing them to relive the last moments of their lives for eternity.", 250, false)
  201.     call InventoryInitItemDB_Func('glsk', "BTNGuldanSkull.blp"      , "Once a powerful user of Demonic magics, the Demons answered his calls, and found a greater use for his head.", 200, false)
  202.     call InventoryInitItemDB_Func('kysn', "BTNSunKey.blp"           , "This key glows brightly.", 200, false)
  203.     call InventoryInitItemDB_Func('sehr', "BTNHeartOfSearinox.blp"  , "The still beating heart of Searinox can be used to imbue an Orb with the fiery powers of a Dragon.", 200, false)
  204.     call InventoryInitItemDB_Func('thle', "BTNThunderLizardEgg.blp" , "This massive egg will not hatch without a parent to warm it.", 200, false)
  205.     call InventoryInitItemDB_Func('dphe', "BTNThunderLizardEgg.blp" , "A rare egg of a Thunder Hawk.", 200, false)
  206.     call InventoryInitItemDB_Func('dthb', "BTNManaFlareOff.blp"     , "An exotic plant well known for its unstable and dangerous properties.", 200, false)
  207.     call InventoryInitItemDB_Func('ktrm', "BTNUrnOfKelThuzad.blp"   , "Formerly the container of King Terenas' ashes, this magically enchanted Urn was chosen by Tichondrius to preserve Kel'Thuzad's remains.", 200, false)
  208.     call InventoryInitItemDB_Func('wtlg', "BTNWirtsLeg.blp"         , "Could it be that a portal opened up and expelled the remains of our dearest pal from the world of Diablo to here? If so, was it a player, or a Demon? Just how many worlds have the Burning Legion conquered? Could the Demons of the Burning Legion and those of Sanctuary be one and the same? The mind wobbles.", 200, false)
  209.     call InventoryInitItemDB_Func('wolg', "BTNWirtsOtherLeg.blp"    , "Perhaps the overzealous adventurer pried this off before his journey here thinking it might give him one last opportunity at bovine slaughter. Little did he know where it would lead him.", 200, false)
  210.     //_____
  211.     call InventoryInitItemDB_Func('amrc', "BTNAmulet.blp"           , "Teleports <AIrt,DataA1> of the player's units within the targeted area to the location of the Hero when used.", 250, true)
  212.     call InventoryInitItemDB_Func('axas', "BTNWitchDoctorMaster.blp", "|cffff8c00Artifact|r|nSummons <AIsh,DataB1> Troll Berserkers to fight for you. Also grants the Hero and friendly nearby units increased attack rate and movement speed.|n|cffffcc00History|r|n|cffffdeadNames of generations of Witch Doctors are carved into this staff. The wielder can call upon them for wisdom and guidance in times of peril.|r", 3000, false)
  213.     call InventoryInitItemDB_Func('anfg', "BTNClayFigurine.blp"     , "Increases the Intelligence of the Hero by 1 when carried.", 150, false)
  214.     call InventoryInitItemDB_Func('pams', "BTNSnazzyPotion.blp"     , "Gives the Hero immunity to magical spells for <AIxs,Dur1> seconds.", 100, true)
  215.     call InventoryInitItemDB_Func('arsc', "BTNBansheeAdept.blp"     , "A powerful scroll that restores <AIha,DataA1> hit points, <AImr,DataA1> mana, and grants <AIda,DataA1> bonus armor to nearby friendly units.", 1000, true)
  216.     call InventoryInitItemDB_Func('arsh', "BTNArcaniteArmor.blp"    , "Reduces damage from ranged attacks to <AIdd,DataA1,%>%. Also increases the Hero's armor by <AId5,DataA1> when worn.", 3500, false)
  217.     call InventoryInitItemDB_Func('asbl', "BTNDaggerOfEscape.blp"   , "Adds <AItj,DataA1> bonus damage to the attack of the Hero when carried. The Hero's attacks also deal <AIsz,DataA1> damage per second, and slow the movement speed and attack rate of the enemy.", 2000, false)
  218.     call InventoryInitItemDB_Func('btst', "BTNOrcBattleStandard.blp", "The Battle Standard of Thrall's Orcs, carry it with pride.", 1000, false)
  219.     call InventoryInitItemDB_Func('blba', "BTNArmorGolem.blp"       , "Grants nearby units <AIad,DataA1> bonus defense. Enhances the Hero's armor by <AId7,DataA1>.", 3500, false)
  220.     call InventoryInitItemDB_Func('bfhr', "BTNPhilosophersStone.blp", "|cff8b00ffUnique|r|nIncreases the Hero's agility by <AIaz,DataA1> when worn.", 2500, false)
  221.     call InventoryInitItemDB_Func('brag', "BTNRingPurple.blp"       , "Increases the Agility of the Hero by 1 when worn.", 50, false)
  222.     call InventoryInitItemDB_Func('cosl', "BTNUsedSoulGem.blp"      , "|cffff8c00Artifact|r|nBrings <AIrx,DataA1> of your nearby dead units back to life. |n|cffffcc00History|r|n|cffffdeadCrafted by the Titans as gifts to their favored creations, the Celestial Orb of Souls channels the powers of the light to bring back to life those who have recently fallen.|r", 10000, false)
  223.     call InventoryInitItemDB_Func('rat3', "BTNClawsOfAttack.blp"    , "Increases the attack damage of the Hero by 3 when worn.", 50, false)
  224.     call InventoryInitItemDB_Func('stpg', "BTNPenguin.blp"          , "This penguin squeak-toy was first created by the goblin tinkerer Salzhigh for the centaur. Regarding it with some awe (having never seen a penguin before) the centaur purchased them as idols and worshipped them at altars.", 450,  false)
  225.     call InventoryInitItemDB_Func('crdt', "BTNRevenant.blp"         , "|cffff8c00Artifact|r|nGrants the ability to fire bolts of pain that deal <AIfz,DataC1> damage. Also increases the Hero's hit points by <AIlf,DataA1> and mana by <AImz,DataA1> when worn.|n|cffffcc00History|r|n|cffffdeadThe Deathlords are rumored to have been mighty Paladins once. One of their order turned from the light when he slaughtered his own family, believing they were impure.|r", 6400, false)
  226.     call InventoryInitItemDB_Func('dtsb', "BTNSorceressMaster.blp"  , "|cffff8c00Artifact|r|nGrants the ability to portal to your home town. Also reduces spell damage by <AIsr,DataB1,%>% and increases the Hero's mana by <AImv,DataA1> while equipped.|n|cffffcc00History|r|n|cffffdeadDrek'Thar's old spellbook is filled with pages stolen from Kirin Tor mages that were slain in battle.|r", 3350, false)
  227.     call InventoryInitItemDB_Func('drph', "BTNDust.blp"             , "Increases the Intelligence of the Hero by 1 when carried.", 50, false)
  228.     call InventoryInitItemDB_Func('dust', "BTNDustOfAppearance.blp" , "Reveals enemy invisible units in an area around the Hero. |nContains <dust,uses> charges. |nLasts <AItb,Dur1> seconds.", 750, true)
  229.     call InventoryInitItemDB_Func('shen', "BTNThoriumArmor.blp"     , "Increases the Hero's armor by <AId2,DataA1> and hit points by <AIlz,DataA1> when worn.", 650, false)
  230.     call InventoryInitItemDB_Func('envl', "BTNVialFull.blp"         , "Regenerates <AIp3,DataA1> hit points and <AIp3,DataB1> mana of the Hero over <AIp3,Dur1> seconds. |nContains <envl,uses> charges.", 450, true)
  231.     call InventoryInitItemDB_Func('esaz', "BTNHeartOfAszune.blp"    , "Legends speak of an intelligent Orc who found the Heart of Aszune. This is the essence of her heart, precious to the Night Elves. It has the power to heal the Hero that wields it. This item is permanent.", 600, false)
  232.     call InventoryInitItemDB_Func('frhg', "BTNAdvancedUnholyStrength.blp", "Increases armor by <AId5,DataA1> and attack rate by <AIs2,DataA1,%>% when worn.", 3500, false)
  233.     call InventoryInitItemDB_Func('fgun', "BTNFlare.blp"            , "Reveals a target area on the map. |nContains <fgun,uses> charges.", 125, false)
  234.     call InventoryInitItemDB_Func('fwss', "BTNGrimWard.blp"         , "This ancient Frost Wyrm skull has been equipped with handles, turning it into a powerful shield. Increases armor by 2 when worn and reduces Magic damage dealt to the Hero by <AIsr,DataB1,%>%.", 750, false)
  235.     call InventoryInitItemDB_Func('frgd', "BTNThoriumMelee.blp"     , "Adds <AIft,DataA1> bonus cold damage to the attack of a Hero and <AId5,DataA1> bonus armor when carried. The Hero's attacks also slow the movement speed and attack rate of the enemy.", 1400, false)
  236.     call InventoryInitItemDB_Func('gemt', "BTNGem.blp"              , "Allows the Hero to detect hidden or invisible units in the Hero's line of sight when carried.", 200, false)
  237.     call InventoryInitItemDB_Func('gvsm', "BTNSpellSteal.blp"       , "|cff8b00ffUnique|r|nGrants the ability to control summoned units. Also increases the intelligence of the Hero by <AIa6,DataA1> when worn.", 1400, false)
  238.     call InventoryInitItemDB_Func('gobm', "BTNGoblinLandMine.blp"   , "Places a hidden land mine at a target point. Enemy units that move near the land mine will activate the mine, destroying the mine and causing area of effect damage to nearby units. |nContains <gobm,uses> charges.", 225, true)
  239.     call InventoryInitItemDB_Func('tels', "BTNTelescope.blp"        , "Provides an increase to the Hero's line of sight radius at night when carried.", 200, false)
  240.     call InventoryInitItemDB_Func('rej4', "BTNGreaterRejuvPotion.blp", "|cff87ceebNon-Combat Consumable|r|nRegenerates <AIp4,DataA1> hit points and <AIp4,DataB1> mana of the Hero over <AIp4,Dur1> seconds.", 450, true)
  241.     call InventoryInitItemDB_Func('rej6', "BTNGreaterRejuvScroll.blp", "|cff87ceebNon-Combat Consumable|r|nRegenerates <AIp6,DataA1> hit points and <AIp6,DataB1> mana of the Hero and nearby friendly units over <AIp6,Dur1> seconds.", 500, true)
  242.     call InventoryInitItemDB_Func('grsl', "BTNNecromancerMaster.blp", "|cff87ceebUnique Consumable|r|nThis powerful book permanently increases the hit points of the Hero by <AIpx,DataA1> each time it is used. |nContains <grsl,uses> charges.", 1350, true)
  243.     call InventoryInitItemDB_Func('hbth', "BTNUnholyAura.blp"       , "|cff8b00ffUnique|r|nGrants the ability to go Berserk, causing the Hero to attack <AIxk,DataB1,%>% faster but take <AIxk,DataC1,%>% more damage. Also increases strength and agility by 4 when worn.", 4200, false)
  244.     call InventoryInitItemDB_Func('sfog', "BTNHornOfFog.blp"        , "Allows the Hero to channel the Cloud ability, which stops an area of enemy towers from attacking for <AIfg,Dur1> seconds.", 200, false)
  245.     call InventoryInitItemDB_Func('flag', "BTNHumanCaptureFlag.blp" , "An object that is often captured in special scenarios as a win condition.", 1000, false)
  246.     call InventoryInitItemDB_Func('iwbr', "BTNNatureTouchGrow.blp"  , "Increases the Strength of the Hero by 1 when carried.", 50, false)
  247.     call InventoryInitItemDB_Func('jdrn', "BTNRingJadeFalcon.blp"   , "Increases the Agility of the Hero by 1 when worn.", 50, false)
  248.     call InventoryInitItemDB_Func('kgal', "BTNBarrel.blp"           , "Increases hit point and mana regeneration.", 850, false)
  249.     call InventoryInitItemDB_Func('klmm', "BTNSpiritWalkerAdeptTraining.blp", "|cffff8c00Artifact|r|nIncreases the attack damage of the Hero by <AItx,DataA1> when carried. Also causes the Hero's attacks to steal life.|n|cffffcc00History|r|n|cffffdeadWhen Dethorin found his lady, Allurana, in the arms of another, he went to the Barrens and cried out. An axe burst forth from the sands as if in answer. Dethorin slew Allurana and her lover, then hurled the axe with all his might into the deep dark sea.|r", 7500, false)
  250.     call InventoryInitItemDB_Func('rej2', "BTNLesserRejuvPotion.blp", "|cff87ceebNon-Combat Consumable|r|nRegenerates <AIp2,DataA1> hit points and <AIp2,DataB1> mana of the Hero over <AIp2,Dur1> seconds.", 150, true)
  251.     call InventoryInitItemDB_Func('rej5', "BTNLesserRejuvScroll.blp", "|cff87ceebNon-Combat Consumable|r|nRegenerates <AIp5,DataA1> hit points and <AIp5,DataB1> mana of the Hero and nearby friendly units over <AIp5,Dur1> seconds.", 400, true)
  252.     call InventoryInitItemDB_Func('lnrn', "BTNRingLionHead.blp"     , "Increases the Agility of the Hero by 1 when worn.", 50, false)
  253.     call InventoryInitItemDB_Func('mlst', "BTNHammer.blp"           , "Increases the Strength of the Hero by 1 when carried.", 50, false)
  254.     call InventoryInitItemDB_Func('mnsf', "BTNBrilliance.blp"       , "Increases the mana of the Hero by <AI2m,DataA1>. Also grants the Hero and friendly nearby units a bonus to mana regeneration.", 1800, false)
  255.     call InventoryInitItemDB_Func('rej1', "BTNMinorRejuvPotion.blp" , "|cff87ceebNon-Combat Consumable|r|nRegenerates <AIp1,DataA1> hit points and <AIp1,DataB1> mana of the Hero over <AIp1,Dur1> seconds.", 100, true)
  256.     call InventoryInitItemDB_Func('lure', "BTNMonsterLure.blp"      , "Creates a ward that draws nearby creeps to it.", 200, true)
  257.     call InventoryInitItemDB_Func('nspi', "BTNNecklace.blp"         , "Renders the Hero invulnerable to magic.", 1000, false)
  258.     call InventoryInitItemDB_Func('nflg', "BTNNightElfCaptureFlag.blp", "An object that is often captured in special scenarios as a win condition.", 1000, false)
  259.     call InventoryInitItemDB_Func('ocor', "BTNOrbOfCorruption.blp"  , "Adds <AIcb,DataA1> bonus damage to the attack of a Hero when carried. The Hero's attacks also become ranged when attacking air and reduce the armor of enemy units for <AIcb,Dur1> seconds.", 400, false)
  260.     call InventoryInitItemDB_Func('ofir', "BTNOrbOfFire.blp"        , "Adds <AIfb,DataA1> bonus fire damage to the attack of a Hero when carried. The Hero's attacks also become ranged when attacking air and do splash damage to nearby enemy units.", 400, false)
  261.     call InventoryInitItemDB_Func('gldo', "BTNUsedSoulGem.blp"      , "Adds <AIgd,DataA1> bonus fire damage to the attack of a Hero when carried. The Hero's attacks also become ranged when attacking air and do splash damage to nearby enemy units.", 450, false)
  262.     call InventoryInitItemDB_Func('olig', "BTNOrbOfLightning.blp"   , "Adds <AIlb,DataA1> bonus damage to the attack of a Hero when carried. The Hero's attacks also become ranged when attacking air, dispel magic and slow the movement speed of the enemy for <AIlp,Dur1> seconds. |n|cffffcc00Deals <AIlp,DataC1> bonus damage to summoned units.", 450, false)
  263.     call InventoryInitItemDB_Func('oli2', "BTNOrbOfLightning.blp"   , "Adds <AIll,DataA1> bonus damage to the attack of a Hero when carried. The Hero's attacks also become ranged when attacking air, and have a chance to dispel magic and slow the movement speed of the enemy for <AIlp,Dur1> seconds. |n|cffffcc00Deals <AIpg,DataC1> bonus damage to summoned units.", 400, false)
  264.     call InventoryInitItemDB_Func('oslo', "BTNOrbofSlowness.blp"    , "Adds <AIsb,DataA1> bonus damage to the attack of a Hero when carried. The Hero's attacks also become ranged when attacking air, and have a chance to slow a target enemy unit's movement speed by <AIos,DataA1,%>% and attack rate by <AIos,DataB1,%>% for <AIos,Dur1> seconds.", 550, false)
  265.     call InventoryInitItemDB_Func('oven', "BTNOrbOfVenom.blp"       , "Adds <AIpb,DataA1> bonus damage to the attack of a Hero when carried. The Hero's attacks also become ranged when attacking air and poison enemy units for <Apo2,Dur1> seconds.", 400, false)
  266.     call InventoryInitItemDB_Func('oflg', "BTNOrcCaptureFlag.blp"   , "An object that is often captured in special scenarios as a win condition.", 1000, false)
  267.     call InventoryInitItemDB_Func('pgin', "BTNGreaterInvisibility.blp", "|cff87ceebNon-Combat Consumable|r|nRenders the Hero invisible for <AIv2,Dur1> seconds when used. An invisible Hero is untargetable by the enemy unless detected. If the Hero attacks, uses an ability, or casts a spell, the invisibility effect is lost.", 200, true)
  268.     call InventoryInitItemDB_Func('pspd', "BTNPotionRed.blp"        , "Increases the movement speed of the Hero by <AIsp,DataA1,%>% for <AIsp,Dur1> seconds.", 75, true)
  269.     call InventoryInitItemDB_Func('rde0', "BTNRingGreen.blp"        , "Increases the armor of the Hero by 1 when worn.", 50, false)
  270.     call InventoryInitItemDB_Func('rnsp', "BTNGoldRing.blp"         , "Increases the Strength, Agility and Intelligence of the Hero by 1 when worn.", 100, false)
  271.     call InventoryInitItemDB_Func('ram1', "BTNRingJadeFalcon.blp"   , "A powerful artifact with a sliver of a fragmented gem inset. Increases the Strength, Agility and Intelligence of the Hero by 1.", 125, false)
  272.     call InventoryInitItemDB_Func('ram4', "BTNRingJadeFalcon.blp"   , "A powerful artifact with a wondrous gem inset. Increases the Strength, Agility and Intelligence of the Hero by 3 and gives nearby friendly units a bonus to mana regeneration.", 750, false)
  273.     call InventoryInitItemDB_Func('ram2', "BTNRingJadeFalcon.blp"   , "A powerful artifact with a part of a fragmented gem inset. Increases the Strength, Agility and Intelligence of the Hero by 2.", 300, false)
  274.     call InventoryInitItemDB_Func('ram3', "BTNRingJadeFalcon.blp"   , "A powerful artifact with most of a fragmented gem inset. Increases the Strength, Agility and Intelligence of the Hero by 3.", 550, false)
  275.     call InventoryInitItemDB_Func('rugt', "BTNImprovedUnholyStrength.blp", "Increases the strength and armor of the Hero by 3 when worn.", 725, false)
  276.     call InventoryInitItemDB_Func('rump', "BTNGatherGold.blp"       , "This heavy pick can be swung with force. Increases the Hero's attack damage by <AItg,DataA1> and gives a <AIbx,DataA1>% chance to stun the enemy.", 100, false)
  277.     call InventoryInitItemDB_Func('horl', "BTNGlyph.blp"            , "A powerful artifact, sacred to the orc shaman. |nGrants the Hero and friendly nearby units increased attack rate and movement speed. |nDoes not stack with Endurance Aura.", 950, false)
  278.     call InventoryInitItemDB_Func('schl', "BTNPriestAdept.blp"      , "Grants the ability to heal a friendly unit. Also grants the Hero and friendly nearby units <AIgx,DataA1,%>% increased hit point regeneration.", 4200, false)
  279.     call InventoryInitItemDB_Func('ccmd', "BTNScepterOfMastery.blp" , "Transfers control of the targeted non-Hero unit to the player who uses the Scepter. The transfer of control is permanent. |nCannot be used on Heroes or on creeps higher than level <AIco,DataA1>. |nContains <ccmd,uses> charges.", 1000, true)
  280.     call InventoryInitItemDB_Func('rots', "BTNWitchDoctorAdept.blp" , "|cff87ceebUnique Consumable|r|nSummons <AIwm,DataA1> Murlocs to fight for you. Also increases the Hero's strength, agility, and intelligence by 2. |nContains <rots,uses> charges.", 1000, true)
  281.     call InventoryInitItemDB_Func('scul', "BTNBansheeMaster.blp"    , "Animates <AIan,DataA1> nearby corpses to fight for you. Lasts <AIan,Dur1> seconds.", 950, true)
  282.     call InventoryInitItemDB_Func('srbd', "BTNArcaniteMelee.blp"    , "Adds <AIfw,DataA1> bonus fire damage to the attack of a Hero when carried. The Hero's attacks also do splash damage to nearby enemy units, and have a <AIcs,DataA1>% chance to deal <AIcs,DataB1> times their normal damage.", 1650, false)
  283.     call InventoryInitItemDB_Func('srtl', "BTNOrcMeleeUpThree.blp"  , "|cffff8c00Artifact|r|nIncreases the attack rate of the Hero by <AIsx,DataA1,%>% and attack damage by <AItf,DataA1>.|n|cffffcc00History|r|n|cffffdeadThis weapon was crafted on Draenor for Kash'drakor and used in the Blood River war that ended with the annihilation of the Dark Scar clan. Nazgrel is the last living relative of Kash'drakor.|r", 5500, false)
  284.     call InventoryInitItemDB_Func('sor1', "BTNOrbOfDarkness.blp"    , "This artifact was imbued with special powers by the Orc Shadow Council. It increases your attack damage by 1.", 50, false)
  285.     call InventoryInitItemDB_Func('sora', "BTNOrbOfDarkness.blp"    , "This artifact was imbued with special powers by the Orc Shadow Council. It increases your attack damage by 10, armor by 3 and grants enhanced hit point regeneration.", 1250, false)
  286.     call InventoryInitItemDB_Func('sor2', "BTNOrbOfDarkness.blp"    , "This artifact was imbued with special powers by the Orc Shadow Council. It increases your attack damage by 2.", 100, false)
  287.     call InventoryInitItemDB_Func('sor3', "BTNOrbOfDarkness.blp"    , "This artifact was imbued with special powers by the Orc Shadow Council. It increases your attack damage by 3.", 200, false)
  288.     call InventoryInitItemDB_Func('sor4', "BTNOrbOfDarkness.blp"    , "This artifact was imbued with special powers by the Orc Shadow Council. It increases your attack damage by 4 and armor by 1.", 300, false)
  289.     call InventoryInitItemDB_Func('sor5', "BTNOrbOfDarkness.blp"    , "This artifact was imbued with special powers by the Orc Shadow Council. It increases your attack damage by 5 and armor by 1.", 350, false)
  290.     call InventoryInitItemDB_Func('sor6', "BTNOrbOfDarkness.blp"    , "This artifact was imbued with special powers by the Orc Shadow Council. It increases your attack damage by 6 and armor by 1.", 400, false)
  291.     call InventoryInitItemDB_Func('sor7', "BTNOrbOfDarkness.blp"    , "This artifact was imbued with special powers by the Orc Shadow Council. It increases your attack damage by 7 and armor by 2.", 550, false)
  292.     call InventoryInitItemDB_Func('sor8', "BTNOrbOfDarkness.blp"    , "This artifact was imbued with special powers by the Orc Shadow Council. It increases your attack damage by 8 and armor by 2.", 700, false)
  293.     call InventoryInitItemDB_Func('sor9', "BTNOrbOfDarkness.blp"    , "This artifact was imbued with special powers by the Orc Shadow Council. It increases your attack damage by 9, armor by 2 and grants enhanced hit point regeneration.", 900, false)
  294.     call InventoryInitItemDB_Func('shcw', "BTNShamanMaster.blp"     , "|cff8b00ffUnique|r|nThese are given to shaman upon the completion of their training. Increases attack damage by <AIlx,DataA1>. The Hero's attacks also have a chance to dispel magic and slow the movement speed of the enemy for <AIpg,Dur1> seconds.", 950, false)
  295.     call InventoryInitItemDB_Func('shtm', "BTNEntrapmentWard.blp"   , "This powerful Orc artifact channels Shamanic powers through its user, allowing them to cast Purge.", 600, false)
  296.     call InventoryInitItemDB_Func('shhn', "BTNHumanArmorUpThree.blp", "|cff8b00ffUnique|r|nGrants nearby friendly units a <AIcd,DataA1,%>% bonus to attack damage. Also increases the armor of the Hero by <AId8,DataA1> when worn.", 3350, false)
  297.     call InventoryInitItemDB_Func('shdt', "BTNLightningShield.blp"  , "|cffff8c00Artifact|r|nEngulfs the Hero in fire which deals <AIcf,DataA1> damage per second to nearby enemy land units. Also increases the Hero's armor by <AId0,DataA1>, hit points by <AIlf,DataA1>, and mana by <AImz,DataA1> when worn. |n|cffffcc00History|r|n|cffffdeadWhen Arthas took up the sword against his own people in Stratholme, the Deathlords committed the same heinous act in many other cities across Lordaeron.|r", 9000, false)
  298.     call InventoryInitItemDB_Func('shrs', "BTNMonsterLure.blp"      , "A tasty roast with a shimmerweed base. Heals <AIhx,DataA1> hit points when eaten. |nContains <shrs,uses> charges.", 150, true)
  299.     call InventoryInitItemDB_Func('sksh', "BTNGrimWard.blp"         , "Increases the Strength of the Hero by 1 when carried.", 200, false)
  300.     call InventoryInitItemDB_Func('soul', "BTNUsedSoulGem.blp"      , "A soul, trapped by the enchantments of a Soul Gem.", 1000, false)
  301.     call InventoryInitItemDB_Func('gsou', "BTNSoulGem.blp"          , "Traps the targeted enemy Hero inside the Soul Gem when used. The enemy Hero is returned to play when the bearer of the Soul Gem is killed. While an enemy Hero is trapped, the bearer of the Soul Gem is revealed to the enemy through the Fog of War.", 1000, true)
  302.     call InventoryInitItemDB_Func('sbok', "BTNSpellBookBLS.blp"     , "A book full of random spells.", 325, false)
  303.     call InventoryInitItemDB_Func('sprn', "BTNRingVioletSpider.blp" , "Increases the Agility of the Hero by 1 when worn.", 50, false)
  304.     call InventoryInitItemDB_Func('spre', "BTNStaffOfPreservation.blp", "Teleports a target friendly unit to its highest level town hall.", 200, false)
  305.     call InventoryInitItemDB_Func('stre', "BTNWandSkull.blp"        , "Animates a nearby corpse to fight your enemies. Lasts <AInd,Dur1> seconds.", 200, false)
  306.     call InventoryInitItemDB_Func('stwa', "BTNOrcMeleeUpOne.blp"    , "Increases the attack damage of the Hero by <AItj,DataA1> when carried.", 600, false)
  307.     call InventoryInitItemDB_Func('thdm', "BTNEnchantedGemstone.blp", "|cff8b00ffUnique|r|nCasts bolts of lightning that deal damage to multiple targets.", 1190, false)
  308.     call InventoryInitItemDB_Func('tbak', "BTNAltarOfKings.blp"     , "Creates a Altar of Kings at a target location.", 180, true)
  309.     call InventoryInitItemDB_Func('tbar', "BTNHumanBarracks.blp"    , "Creates a Barracks at a target location.", 160, true)
  310.     call InventoryInitItemDB_Func('tbsm', "BTNBlacksmith.blp"       , "Creates a Blacksmith at a target location.", 200, true)
  311.     call InventoryInitItemDB_Func('tfar', "BTNFarm.blp"             , "Creates a Farm at a target location.", 75, true)
  312.     call InventoryInitItemDB_Func('tlum', "BTNHumanLumberMill.blp"  , "Creates a Lumber Mill at a target location.", 150, true)
  313.     call InventoryInitItemDB_Func('tgxp', "BTNManual3.blp"          , "Gives the Hero <AIe2,DataA1> bonus experience points when used.", 1000, true)
  314.     call InventoryInitItemDB_Func('tmsc', "BTNNecromancerAdept.blp" , "|cff8b00ffUnique|r|nGrants the ability to sacrifice a friendly non-Hero unit to restore hit points. Also increases the Hero's mana by <AImz,DataA1> while equipped.", 1250, false)
  315.     call InventoryInitItemDB_Func('tmmt', "BTNEntrapmentWard.blp"   , "Increases the Strength of the Hero by 1 when carried.", 50, false)
  316.     call InventoryInitItemDB_Func('uflg', "BTNUndeadCaptureFlag.blp", "An object that is often captured in special scenarios as a win condition.", 1000, false)
  317.     call InventoryInitItemDB_Func('vddl', "BTNShadowPact.blp"       , "Increases the Intelligence of the Hero by 1 when carried.", 50, false)
  318.     //---------------------------------------------------------------------------------------------------+
  319.     //                                                                                                   |
  320.     //                                               Dest                                                |
  321.     //                                                                                                   |
  322.     //---------------------------------------------------------------------------------------------------+
  323.     //________
  324.     call InventoryInitDestDB_Func('D000', "BTNSpellShieldAmulet.blp")
  325.     call InventoryInitDestDB_Func('D001', "BTNAmuletOftheWild.blp")
  326.     call InventoryInitDestDB_Func('D002', "BTNPendantOfMana.blp")
  327.     call InventoryInitDestDB_Func('D003', "BTNAmulet.blp")
  328.     call InventoryInitDestDB_Func('D004', "BTNPendantOfEnergy.blp")
  329.     call InventoryInitDestDB_Func('D005', "BTNSnazzyPotion.blp")
  330.     call InventoryInitDestDB_Func('D006', "BTNArcaniteArmor.blp")
  331.     call InventoryInitDestDB_Func('D007', "BTNOrcMeleeUpOne.blp")
  332.     call InventoryInitDestDB_Func('D008', "BTNDrum.blp")
  333.     call InventoryInitDestDB_Func('D009', "BTNClawsOfAttack.blp")
  334.     call InventoryInitDestDB_Func('D00A', "BTNBarrel.blp")
  335.     call InventoryInitDestDB_Func('D00B', "BTNRingPurple.blp")
  336.     call InventoryInitDestDB_Func('D00C', "BTNCirclet.blp")
  337.     call InventoryInitDestDB_Func('D00D', "BTNNatureTouchGrow.blp")
  338.     call InventoryInitDestDB_Func('D00E', "BTNBlood&GhostKey.blp")
  339.     call InventoryInitDestDB_Func('D00F', "BTNWirtsOtherLeg.blp")
  340.     call InventoryInitDestDB_Func('D00G', "BTNBundleOfLumber.blp")
  341.     call InventoryInitDestDB_Func('D00H', "BTNGoblinLandMine.blp")
  342.     call InventoryInitDestDB_Func('D00I', "BTNTelescope.blp")
  343.     call InventoryInitDestDB_Func('D00J', "BTNOrcMeleeUpThree.blp")
  344.     call InventoryInitDestDB_Func('D00K', "BTNSpy.blp")
  345.     call InventoryInitDestDB_Func('D00L', "BTNArmorGolem.blp")
  346.     call InventoryInitDestDB_Func('D00M', "BTNClayFigurine.blp")
  347.     call InventoryInitDestDB_Func('D00N', "BTNHealingWard.blp")
  348.     call InventoryInitDestDB_Func('D00O', "BTNUsedSoulGem.blp")
  349.     call InventoryInitDestDB_Func('D00P', "BTNWandOfCyclone.blp")
  350.     call InventoryInitDestDB_Func('D00Q', "BTNWand.blp")
  351.     call InventoryInitDestDB_Func('D00R', "BTNPriestAdept.blp")
  352.     call InventoryInitDestDB_Func('D00S', "BTNStarWand.blp")
  353.     call InventoryInitDestDB_Func('D00T', "BTNWitchDoctorAdept.blp")
  354.     call InventoryInitDestDB_Func('D00U', "BTNWandSkull.blp")
  355.     call InventoryInitDestDB_Func('D00V', "BTNRodOfNecromancy.blp")
  356.     call InventoryInitDestDB_Func('D00W', "BTNWandOfManaSteal.blp")
  357.     call InventoryInitDestDB_Func('D00X', "BTNWandOfNeutralization.blp")
  358.     call InventoryInitDestDB_Func('D00Y', "BTNWandOfShadowSight.blp")
  359.     call InventoryInitDestDB_Func('D00Z', "BTNMechanicalCritter.blp")
  360.     call InventoryInitDestDB_Func('D010', "BTNPenguin.blp")
  361.     call InventoryInitDestDB_Func('D011', "BTNSacrificialSkull.blp")
  362.     call InventoryInitDestDB_Func('D012', "BTNEnchantedGemstone.blp")
  363.     call InventoryInitDestDB_Func('D013', "BTNThoriumArmor.blp")
  364.     call InventoryInitDestDB_Func('D014', "BTNShimmerWeed.blp")
  365.     call InventoryInitDestDB_Func('D015', "BTNPotionOfVampirism.blp")
  366.     call InventoryInitDestDB_Func('D016', "BTNPotionOfOmniscience.blp")
  367.     call InventoryInitDestDB_Func('D017', "BTNPotionBlueSmall.blp")
  368.     call InventoryInitDestDB_Func('D018', "BTNLesserInvisibility.blp")
  369.     call InventoryInitDestDB_Func('D019', "BTNGreaterInvulneralbility.blp")
  370.     call InventoryInitDestDB_Func('D01A', "BTNRejuvPotion.blp")
  371.     call InventoryInitDestDB_Func('D01B', "BTNPotionOfClarity.blp")
  372.     call InventoryInitDestDB_Func('D01C', "BTNPotionRed.blp")
  373.     call InventoryInitDestDB_Func('D01D', "BTNGrimWard.blp")
  374.     call InventoryInitDestDB_Func('D01E', "BTNGlyph.blp")
  375.     call InventoryInitDestDB_Func('D01F', "BTNHumanCaptureFlag.blp")
  376.     call InventoryInitDestDB_Func('D01G', "BTNUndeadCaptureFlag.blp")
  377.     call InventoryInitDestDB_Func('D01H', "BTNNightElfCaptureFlag.blp")
  378.     call InventoryInitDestDB_Func('D01I', "BTNOrcBattleStandard.blp")
  379.     call InventoryInitDestDB_Func('D01J', "BTNOrcCaptureFlag.blp")
  380.     call InventoryInitDestDB_Func('D01K', "BTNHumanWatchTower.blp")
  381.     call InventoryInitDestDB_Func('D01L', "BTNBlacksmith.blp")
  382.     call InventoryInitDestDB_Func('D01M', "BTNHumanLumberMill.blp")
  383.     call InventoryInitDestDB_Func('D01N', "BTNFarm.blp")
  384.     call InventoryInitDestDB_Func('D01O', "BTNHumanBarracks.blp")
  385.     call InventoryInitDestDB_Func('D01P', "BTNAltarOfKings.blp")
  386.     call InventoryInitDestDB_Func('D01Q', "BTNTinyCastle.blp")
  387.     call InventoryInitDestDB_Func('D01R', "BTNRockGolem.blp")
  388.     call InventoryInitDestDB_Func('D01S', "BTNSoulGem.blp")
  389.     call InventoryInitDestDB_Func('D01T', "BTNPeriapt1.blp")
  390.     call InventoryInitDestDB_Func('D01U', "BTNMoonStone.blp")
  391.     call InventoryInitDestDB_Func('D01V', "BTNHealthStone.blp")
  392.     call InventoryInitDestDB_Func('D01W', "BTNDarkSummoning.blp")
  393.     call InventoryInitDestDB_Func('D01X', "BTNManaStone.blp")
  394.     call InventoryInitDestDB_Func('D01Y', "BTNInfernalStone.blp")
  395.     call InventoryInitDestDB_Func('D01Z', "BTNGem.blp")
  396.     call InventoryInitDestDB_Func('D020', "BTNHoodOfCunning.blp")
  397.     call InventoryInitDestDB_Func('D021', "BTNBoots.blp")
  398.     call InventoryInitDestDB_Func('D022', "BTNDaggerOfEscape.blp")
  399.     call InventoryInitDestDB_Func('D023', "BTN3M3.blp")
  400.     call InventoryInitDestDB_Func('D024', "BTNGhostKey.blp")
  401.     call InventoryInitDestDB_Func('D025', "BTNNecromancerAdept.blp")
  402.     call InventoryInitDestDB_Func('D026', "BTNTomeOfRetraining.blp")
  403.     call InventoryInitDestDB_Func('D027', "BTNNecromancerMaster.blp")
  404.     call InventoryInitDestDB_Func('D028', "BTNTomeRed.blp")
  405.     call InventoryInitDestDB_Func('D029', "BTNTome.blp")
  406.     call InventoryInitDestDB_Func('D02A', "BTNBookOfTheDead.blp")
  407.     call InventoryInitDestDB_Func('D02B', "BTNTomeBrown.blp")
  408.     call InventoryInitDestDB_Func('D02C', "BTNSpellBookBLS.blp")
  409.     call InventoryInitDestDB_Func('D02D', "BTNShamanMaster.blp")
  410.     call InventoryInitDestDB_Func('D02E', "BTNRingJadeFalcon.blp")
  411.     call InventoryInitDestDB_Func('D02F', "BTNRingGreen.blp")
  412.     call InventoryInitDestDB_Func('D02G', "BTNRingLionHead.blp")
  413.     call InventoryInitDestDB_Func('D02H', "BTNRingVioletSpider.blp")
  414.     call InventoryInitDestDB_Func('D02I', "BTNGoldRing.blp")
  415.     call InventoryInitDestDB_Func('D02J', "BTNRingSkull.blp")
  416.     call InventoryInitDestDB_Func('D02K', "BTNManaFlareOff.blp")
  417.     call InventoryInitDestDB_Func('D02L', "BTNHelmutPurple.blp")
  418.     call InventoryInitDestDB_Func('D02M', "BTNRevenant.blp")
  419.     call InventoryInitDestDB_Func('D02N', "BTNBoneChimes.blp")
  420.     call InventoryInitDestDB_Func('D02O', "BTNAnkh.blp")
  421.     call InventoryInitDestDB_Func('D02P', "BTNSpiritWalkerAdeptTraining.blp")
  422.     call InventoryInitDestDB_Func('D02Q', "BTNBloodKey.blp")
  423.     call InventoryInitDestDB_Func('D02R', "BTNShadowPact.blp")
  424.     call InventoryInitDestDB_Func('D02S', "BTNThoriumMelee.blp")
  425.     call InventoryInitDestDB_Func('D02T', "BTNPotionGreenSmall.blp")
  426.     call InventoryInitDestDB_Func('D02U', "BTNHealingSalve.blp")
  427.     call InventoryInitDestDB_Func('D02V', "BTNMoonKey.blp")
  428.     call InventoryInitDestDB_Func('D02W', "BTN3M1.blp")
  429.     call InventoryInitDestDB_Func('D02X', "BTNMantleOfIntelligence.blp")
  430.     call InventoryInitDestDB_Func('D02Y', "BTNSobiMask.blp")
  431.     call InventoryInitDestDB_Func('D02Z', "BTNMaskOfDeath.blp")
  432.     call InventoryInitDestDB_Func('D030', "BTNMedalionOfCourage.blp")
  433.     call InventoryInitDestDB_Func('D031', "BTNManual.blp")
  434.     call InventoryInitDestDB_Func('D032', "BTNDust.blp")
  435.     call InventoryInitDestDB_Func('D033', "BTNHammer.blp")
  436.     call InventoryInitDestDB_Func('D034', "BTNSpiderSilkBroach.blp")
  437.     call InventoryInitDestDB_Func('D035', "BTNMinorRejuvPotion.blp")
  438.     call InventoryInitDestDB_Func('D036', "BTNSentryWard.blp")
  439.     call InventoryInitDestDB_Func('D037', "BTNWirtsLeg.blp")
  440.     call InventoryInitDestDB_Func('D038', "BTNArcaniteMelee.blp")
  441.     call InventoryInitDestDB_Func('D039', "BTNCloakOfFlames.blp")
  442.     call InventoryInitDestDB_Func('D03A', "BTNRobeOfTheMagi.blp")
  443.     call InventoryInitDestDB_Func('D03B', "BTNNecklace.blp")
  444.     call InventoryInitDestDB_Func('D03C', "BTNUndeadShrine.blp")
  445.     call InventoryInitDestDB_Func('D03D', "BTNFlare.blp")
  446.     call InventoryInitDestDB_Func('D03E', "BTNIceShard.blp")
  447.     call InventoryInitDestDB_Func('D03F', "BTNLesserInvulneralbility.blp")
  448.     call InventoryInitDestDB_Func('D03G', "BTNLesserRejuvPotion.blp")
  449.     call InventoryInitDestDB_Func('D03H', "BTNLesserClarityPotion.blp")
  450.     call InventoryInitDestDB_Func('D03I', "BTNFelHound.blp")
  451.     call InventoryInitDestDB_Func('D03J', "BTNAdvancedUnholyStrength.blp")
  452.     call InventoryInitDestDB_Func('D03K', "BTNGlove.blp")
  453.     call InventoryInitDestDB_Func('D03L', "BTNSpellSteal.blp")
  454.     call InventoryInitDestDB_Func('D03M', "BTNCloak.blp")
  455.     call InventoryInitDestDB_Func('D03N', "BTNVialFull.blp")
  456.     call InventoryInitDestDB_Func('D03O', "BTNDustOfAppearance.blp")
  457.     call InventoryInitDestDB_Func('D03P', "BTNStaffOfSilence.blp")
  458.     call InventoryInitDestDB_Func('D03Q', "BTNStaffOfPreservation.blp")
  459.     call InventoryInitDestDB_Func('D03R', "BTNBrilliance.blp")
  460.     call InventoryInitDestDB_Func('D03S', "BTNStaffOfNegation.blp")
  461.     call InventoryInitDestDB_Func('D03T', "BTNWitchDoctorMaster.blp")
  462.     call InventoryInitDestDB_Func('D03U', "BTNStaffOfSanctuary.blp")
  463.     call InventoryInitDestDB_Func('D03V', "BTNStaffOfTeleportation.blp")
  464.     call InventoryInitDestDB_Func('D03W', "BTNBelt.blp")
  465.     call InventoryInitDestDB_Func('D03X', "BTNMonsterLure.blp")
  466.     call InventoryInitDestDB_Func('D03Y', "BTNVialEmpty.blp")
  467.     call InventoryInitDestDB_Func('D03Z', "BTNGatherGold.blp")
  468.     call InventoryInitDestDB_Func('D040', "BTNLionHorn.blp")
  469.     call InventoryInitDestDB_Func('D041', "BTNHornOfCenarius.blp")
  470.     call InventoryInitDestDB_Func('D042', "BTNHornOfFog.blp")
  471.     call InventoryInitDestDB_Func('D043', "BTNGauntletsOfOgrePower.blp")
  472.     call InventoryInitDestDB_Func('D044', "BTNRune.blp")
  473.     call InventoryInitDestDB_Func('D045', "BTNRunedBracers.blp")
  474.     call InventoryInitDestDB_Func('D046', "BTNImprovedUnholyStrength.blp")
  475.     call InventoryInitDestDB_Func('D047', "BTNBootsOfSpeed.blp")
  476.     call InventoryInitDestDB_Func('D048', "BTNScrollUber.blp")
  477.     call InventoryInitDestDB_Func('D049', "BTNScrollOfHealing.blp")
  478.     call InventoryInitDestDB_Func('D04A', "BTNSnazzyScroll.blp")
  479.     call InventoryInitDestDB_Func('D04B', "BTNSnazzyScrollPurple.blp")
  480.     call InventoryInitDestDB_Func('D04C', "BTNScroll.blp")
  481.     call InventoryInitDestDB_Func('D04D', "BTNSnazzyScrollGreen.blp")
  482.     call InventoryInitDestDB_Func('D04E', "BTNScrollOfTownPortal.blp")
  483.     call InventoryInitDestDB_Func('D04F', "BTNScrollOfProtection.blp")
  484.     call InventoryInitDestDB_Func('D04G', "BTNGreaterRejuvScroll.blp")
  485.     call InventoryInitDestDB_Func('D04H', "BTNLesserRejuvScroll.blp")
  486.     call InventoryInitDestDB_Func('D04I', "BTNBansheeMaster.blp")
  487.     call InventoryInitDestDB_Func('D04J', "BTNScrollOfRegenerationGreen.blp")
  488.     call InventoryInitDestDB_Func('D04K', "BTNBansheeAdept.blp")
  489.     call InventoryInitDestDB_Func('D04L', "BTNScrollOfHaste.blp")
  490.     call InventoryInitDestDB_Func('D04M', "BTNSelectHeroOn.blp")
  491.     call InventoryInitDestDB_Func('D04N', "BTNHeartOfAszune.blp")
  492.     call InventoryInitDestDB_Func('D04O', "BTNHeartOfSearinox.blp")
  493.     call InventoryInitDestDB_Func('D04P', "BTNPhilosophersStone.blp")
  494.     call InventoryInitDestDB_Func('D04Q', "BTNScepterOfMastery.blp")
  495.     call InventoryInitDestDB_Func('D04R', "BTNSunKey.blp")
  496.     call InventoryInitDestDB_Func('D04S', "BTNDoomGuard.blp")
  497.     call InventoryInitDestDB_Func('D04T', "BTNOrbofSlowness.blp")
  498.     call InventoryInitDestDB_Func('D04U', "BTNOrbOfFrost.blp")
  499.     call InventoryInitDestDB_Func('D04V', "BTNOrbOfLightning.blp")
  500.     call InventoryInitDestDB_Func('D04W', "BTNOrbOfFire.blp")
  501.     call InventoryInitDestDB_Func('D04X', "BTNOrbOfCorruption.blp")
  502.     call InventoryInitDestDB_Func('D04Y', "BTNOrbOfDarkness.blp")
  503.     call InventoryInitDestDB_Func('D04Z', "BTNOrbOfVenom.blp")
  504.     call InventoryInitDestDB_Func('D050', "BTNChestOfGold.blp")
  505.     call InventoryInitDestDB_Func('D051', "BTNCheese.blp")
  506.     call InventoryInitDestDB_Func('D052', "BTNTalisman.blp")
  507.     call InventoryInitDestDB_Func('D053', "BTNPeriapt.blp")
  508.     call InventoryInitDestDB_Func('D054', "BTNStone.blp")
  509.     call InventoryInitDestDB_Func('D055', "BTNEntrapmentWard.blp")
  510.     call InventoryInitDestDB_Func('D056', "BTNHornOfDoom.blp")
  511.     call InventoryInitDestDB_Func('D057', "BTNSlippersOfAgility.blp")
  512.     call InventoryInitDestDB_Func('D058', "BTNUrnOfKelThuzad.blp")
  513.     call InventoryInitDestDB_Func('D059', "BTNSorceressMaster.blp")
  514.     call InventoryInitDestDB_Func('D05A', "BTNAlleriaFlute.blp")
  515.     call InventoryInitDestDB_Func('D05B', "BTNPipeOfInsight.blp")
  516.     call InventoryInitDestDB_Func('D05C', "BTNCrystalBall.blp")
  517.     call InventoryInitDestDB_Func('D05D', "BTNPotionGreen.blp")
  518.     call InventoryInitDestDB_Func('D05E', "BTN3M2.blp")
  519.     call InventoryInitDestDB_Func('D05F', "BTNJanggo.blp")
  520.     call InventoryInitDestDB_Func('D05G', "BTNGuldanSkull.blp")
  521.     call InventoryInitDestDB_Func('D05H', "BTNGreathall.blp")
  522.     call InventoryInitDestDB_Func('D05I', "BTNHelmOfValor.blp")
  523.     call InventoryInitDestDB_Func('D05J', "BTNUnholyAura.blp")
  524.     call InventoryInitDestDB_Func('D05K', "BTNHumanArmorUpThree.blp")
  525.     call InventoryInitDestDB_Func('D05L', "BTNLightningShield.blp")
  526.     call InventoryInitDestDB_Func('D05M', "BTNPotionOfRestoration.blp")
  527.     call InventoryInitDestDB_Func('D05N', "BTNPotionBlueBig.blp")
  528.     call InventoryInitDestDB_Func('D05O', "BTNGreaterInvisibility.blp")
  529.     call InventoryInitDestDB_Func('D05P', "BTNPotionOfDivinity.blp")
  530.     call InventoryInitDestDB_Func('D05Q', "BTNGreaterRejuvPotion.blp")
  531.     call InventoryInitDestDB_Func('D05R', "BTNManual3.blp")
  532.     call InventoryInitDestDB_Func('D05S', "BTNThunderLizardEgg.blp")
  533.     call InventoryInitDestDB_Func('D05T', "BTNRedDragon.blp")
  534. endfunction
  535.  
  536. endlibrary

Code: jass
  1. library Bags initializer Init requires Camera, DGUI, DataBaseBags
  2.  
  3. private function echo takes string msg returns nothing
  4.     call DisplayTextToPlayer(GetLocalPlayer(), 0, 0, msg)
  5. endfunction
  6.  
  7. private function BagH2I takes handle h returns integer
  8.     return GetHandleId(h)
  9. endfunction
  10.  
  11. globals
  12.     private integer TypeItemBag = 'IBAG'
  13.     private code FuncLClickSlot = null
  14.     private code FuncRClickSlot = null
  15.    
  16.     private integer CountWindow = 0
  17.    
  18.     private real array XPosWin
  19.     private real array YPosWin
  20. endglobals
  21.  
  22. globals
  23.     constant real XIndentionSlot = 0.07
  24.     constant real YIndentionSlot = -0.11
  25.     constant real WidthSlot = 0.08
  26.     constant real HeightSlot = 0.08*AspectRatio
  27. endglobals
  28.  
  29. struct BAG
  30.     static constant integer MaxCount = 6
  31.     unit Owner
  32.     BAGSYS BS
  33.     private item Bag
  34.     private item array Slot[.MaxCount]
  35.     integer CountItem
  36.     boolean open
  37.     integer Pos
  38.     //window
  39.     private PICTURE Win
  40.     private BUTTON array WinSlot[.MaxCount]
  41.     private TEXT array WinCharge[.MaxCount]
  42.  
  43.     static method RegistrationItemBag takes item b returns BAG
  44.         local BAG this = BAG.create()
  45.         local integer i = .MaxCount-1
  46.         set .Owner = null
  47.         set .Bag = b
  48.         set .CountItem = 0
  49.         set .open = false
  50.         set .Pos = 0
  51.         call SetItemCharges(b, 0)
  52.         call SetItemUserData(b, this)
  53.         set .Win = PICTURE.NewCostumModel(0, 0, 1, 0.26, 'bwin', 140.002, 42.692, 0)
  54.         loop
  55.             exitwhen i < 0
  56.             set .Slot[i] = null
  57.             set .WinSlot[i] = BUTTON.New(0, 0, WidthSlot, HeightSlot, 0.5, TypeTextureBlank)
  58.             set .WinSlot[i].CostumValue = this*.MaxCount+i
  59.             call .WinSlot[i].AddActionL(FuncLClickSlot)
  60.             call .WinSlot[i].AddActionR(FuncRClickSlot)
  61.             set .WinCharge[i] = TEXT.New(0, 0, 1)
  62.             set i = i - 1
  63.         endloop
  64.         return this
  65.     endmethod
  66.    
  67.     method ResetCharges takes integer slot returns nothing
  68.         local integer charg = GetItemCharges(.Slot[slot])
  69.         if GetItemHasCharges(GetItemTypeId(.Slot[slot])) and (charg > 0) then
  70.             call SetTextTagText(.WinCharge[slot].text, I2S(charg), 7*0.0023)
  71.             call .WinCharge[slot].Show(true, .BS.Camera) //-0.08*StringLength(I2S(GetItemCharges(.Slot[slot])))
  72.             call .WinCharge[slot].SetPosition(XPosWin[.Pos]+XIndentionSlot+(WidthSlot+0.01)*slot+WidthSlot-0.022, YPosWin[.Pos]+YIndentionSlot-HeightSlot)
  73.         else
  74.             call .WinCharge[slot].Show(false, 0)
  75.         endif
  76.     endmethod
  77.    
  78.     method ResetPosition takes integer pos returns nothing
  79.         local integer i = .MaxCount - 1
  80.         set .Pos = pos
  81.         call .Win.SetPosition(XPosWin[pos], YPosWin[pos])
  82.         loop
  83.             exitwhen i < 0
  84.             call .WinSlot[i].SetPosition(XPosWin[.Pos]+XIndentionSlot+(WidthSlot+0.01)*i, YPosWin[pos]+YIndentionSlot)
  85.             call .ResetCharges(i)
  86.             set i = i - 1
  87.         endloop
  88.     endmethod
  89.    
  90.     method Open takes BAGSYS bs, integer pos, integer r returns nothing
  91.         local integer i = .MaxCount-1
  92.         set .open = true
  93.         set .BS = bs
  94.         call .ResetPosition(pos)
  95.         call .Win.SetTexture('D201'+r)
  96.         call .Win.Show(true, bs.Camera)
  97.         loop
  98.             exitwhen i < 0
  99.             if (.Slot[i] != null) then
  100.                 call .WinSlot[i].SetTexture(GetItemTexture(GetItemTypeId(.Slot[i])))
  101.             else
  102.                 call .WinSlot[i].SetTexture(TypeTextureBlank)
  103.             endif
  104.             call .WinSlot[i].Show(true, bs.Camera)
  105.             set i = i - 1
  106.         endloop
  107.     endmethod
  108.    
  109.     method Close takes nothing returns nothing
  110.         local integer i = .MaxCount-1
  111.         set .BS = 0
  112.         set .open = false
  113.         call .Win.Show(false, 0)
  114.         loop
  115.             exitwhen i < 0
  116.             call .WinSlot[i].Show(false, 0)
  117.             call .WinCharge[i].Show(false, 0)
  118.             set i = i - 1
  119.         endloop
  120.     endmethod
  121.    
  122.     method AddItem takes item add returns boolean
  123.         local integer i = 0
  124.         local BAG b
  125.         local integer charg
  126.         if (GetItemTypeId(add) == TypeItemBag) then
  127.             if (add == .Bag) or (GetItemCharges(add) > 0) then
  128.                 return false
  129.             else
  130.                 set b = GetItemUserData(add)
  131.                 if b != 0 and b.open then
  132.                     call .BS.RemoveBag(b)
  133.                 endif
  134.             endif
  135.         endif
  136.         loop
  137.             exitwhen i >= .MaxCount
  138.             if (.Slot[i] == null) then
  139.                 set .Slot[i] = add
  140.                 set .CountItem = .CountItem + 1
  141.                 call SetItemCharges(.Bag, .CountItem)
  142.                 call SetItemPosition(add, 0, 0)
  143.                 call SetItemVisible(add, false)
  144.                 if .open then
  145.                     call .WinSlot[i].SetTexture(GetItemTexture(GetItemTypeId(add)))
  146.                     call .ResetCharges(i)
  147.                 endif
  148.                 return true
  149.             endif
  150.             set i = i + 1
  151.         endloop
  152.         return false
  153.     endmethod
  154.    
  155.     method ClickSlot takes integer slot returns integer
  156.         local BAG curbag
  157.         local integer curslot
  158.         local item curit
  159.         local item it = .Slot[slot]
  160.         local integer SelectSlot = this*.MaxCount+slot
  161.         if .BS.CurSelectSlot != -1 then
  162.             set curbag = .BS.CurSelectSlot/.MaxCount
  163.             set curslot = .BS.CurSelectSlot-curbag*.MaxCount
  164.             set curit = curbag.Slot[curslot]
  165.             call SetUnitVertexColor(curbag.WinSlot[curslot].picture, 255, 255, 255, 255)
  166.         endif
  167.         if it != null then
  168.             if .BS.CurSelectSlot != SelectSlot then
  169.                 call SetUnitVertexColor(.WinSlot[slot].picture, 200, 200, 200, 255)
  170.                 set .BS.CurSelectSlot = this*.MaxCount+slot
  171.                 return GetItemTypeId(.Slot[slot])
  172.             else
  173.                 set .BS.CurSelectSlot = -1
  174.             endif
  175.             return 0
  176.         elseif .BS.CurSelectSlot != -1 then
  177.             set .Slot[slot] = curit
  178.             call .WinSlot[slot].SetTexture(GetItemTexture(GetItemTypeId(curit)))
  179.             call .ResetCharges(slot)
  180.             set curbag.Slot[curslot] = null
  181.             call curbag.WinSlot[curslot].SetTexture(TypeTextureBlank)
  182.             call curbag.ResetCharges(curslot)
  183.             set .BS.CurSelectSlot = -1
  184.             if (curbag != this) then
  185.                 set curbag.CountItem = curbag.CountItem - 1
  186.                 set .CountItem = .CountItem + 1
  187.                 call SetItemCharges(curbag.Bag, curbag.CountItem)
  188.                 call SetItemCharges(.Bag, .CountItem)
  189.             endif
  190.         endif
  191.         return 0
  192.     endmethod
  193.    
  194.     method DropItemInSlot takes integer slot returns boolean
  195.         local boolean b = false
  196.         if .Slot[slot] != null then
  197.             call SetItemVisible(.Slot[slot], true)
  198.             if not UnitAddItem(.Owner, .Slot[slot]) then
  199.                 call SetItemPosition(.Slot[slot], GetUnitX(.Owner), GetUnitY(.Owner))
  200.             endif
  201.             set b = .BS.CurSelectSlot == this*.MaxCount+slot
  202.             if b then
  203.                 set .BS.CurSelectSlot = -1
  204.                 call SetUnitVertexColor(.WinSlot[slot].picture, 255, 255, 255, 255)
  205.             endif
  206.             call .WinCharge[slot].Show(false, 0)
  207.             set .Slot[slot] = null
  208.             call .WinSlot[slot].SetTexture(TypeTextureBlank)
  209.             set .CountItem = .CountItem - 1
  210.             call SetItemCharges(.Bag, .CountItem)
  211.         endif
  212.         return b
  213.     endmethod
  214.    
  215. endstruct
  216.  
  217. struct DESCRIPTITEM
  218.     static real PosWinX = -0.88
  219.     static real PosWinY = 0.95
  220.     private BAGSYS BS
  221.     private PICTURE WinDesc
  222.     private PICTURE IconItem
  223.     private TEXT Name
  224.     //private TEXT Cost
  225.     private TEXT Desc
  226.    
  227.     static method New takes BAGSYS bs returns DESCRIPTITEM
  228.         local DESCRIPTITEM this = DESCRIPTITEM.create()
  229.         set .BS = bs
  230.         set .WinDesc = PICTURE.NewCostumModel(.PosWinX, .PosWinY, 1, 0.26, 'dwin', 140.002, 122.646, 'D201'+bs.Race)
  231.         set .IconItem = PICTURE.New(.PosWinX+0.06, .PosWinY-0.06*AspectRatio, 0.07, 0.07*AspectRatio, 0.5, 0)
  232.         set .Name = TEXT.New(.PosWinX+0.15, .PosWinY-0.20, 1)
  233.         call SetTextTagColor(.Name.text, 80, 80, 255, 255)
  234.         //set .Cost = TEXT.New(.PosWinX+0.07, .PosWinY-0.30, 1)
  235.         //call SetTextTagColor(.Cost.text, 255, 255, 0, 255)
  236.         set .Desc = TEXT.New(.PosWinX+0.07, .PosWinY-0.95, 1)
  237.         return this
  238.     endmethod
  239.    
  240.     method DescriptionItem takes integer typeitem returns nothing
  241.         local string name
  242.         local integer cost
  243.         local string desc
  244.         if typeitem != 0 then
  245.             call .IconItem.SetTexture(GetItemTexture(typeitem))
  246.             set name = GetObjectName(typeitem)
  247.             set cost = GetItemCost(typeitem)
  248.             set desc = GetItemDescription(typeitem)
  249.             call SetTextTagText(.Name.text, name, 10 * 0.0023)
  250.             call .Name.Show(true, .BS.Camera)
  251.             //if cost != -1 then
  252.             //    call SetTextTagText(.Cost.text, I2S(cost), 10 * 0.0023)
  253.             //    call .Cost.Show(true, .BS.Camera)
  254.             //else
  255.             //    call .Cost.Show(false, 0)
  256.             //endif
  257.             call SetTextTagText(.Desc.text, desc, 10 * 0.0023)
  258.             call .Desc.Show(true, .BS.Camera)
  259.         else
  260.             call .Name.Show(false, 0)
  261.             //call .Cost.Show(false, 0)
  262.             call .Desc.Show(false, 0)
  263.         endif
  264.     endmethod
  265.    
  266.     method Show takes boolean show returns nothing
  267.         call .WinDesc.Show(show, .BS.Camera)
  268.         call .IconItem.Show(show, .BS.Camera)
  269.         call .Name.Show(show, .BS.Camera)
  270.         //call .Cost.Show(show, .BS.Camera)
  271.         call .Desc.Show(show, .BS.Camera)
  272.     endmethod
  273.    
  274. endstruct
  275.  
  276. globals
  277.     private trigger TrigPickupItem = null
  278.     private trigger TrigMoveItem = null
  279.     private trigger TrigUseItem = null
  280.     private trigger TrigDropItem = null
  281.     private conditionfunc itemisbagcondition = null
  282. endglobals
  283.  
  284. struct BAGSYS
  285.     static constant integer MaxCount = 6
  286.    
  287.     private DESCRIPTITEM DescItem
  288.     private BAG array Bags[.MaxCount]
  289.     private integer Count = 0
  290.     integer CurSelectSlot
  291.  
  292.     private boolean Enable
  293.     player p
  294.     CAMERA Camera
  295.     integer Race
  296.    
  297.     method EnableBagSys takes nothing returns nothing
  298.         if not .Enable then
  299.             set .p = Player(this)
  300.             set .Race = BagH2I(GetPlayerRace(.p))-1
  301.             set .CurSelectSlot = -1
  302.             set .Enable = true
  303.             call TriggerRegisterPlayerUnitEvent(TrigMoveItem, .p, EVENT_PLAYER_UNIT_ISSUED_TARGET_ORDER, null)
  304.             call TriggerRegisterPlayerUnitEvent(TrigUseItem, .p, EVENT_PLAYER_UNIT_USE_ITEM, null)
  305.             call TriggerRegisterPlayerUnitEvent(TrigDropItem, .p, EVENT_PLAYER_UNIT_DROP_ITEM, null)
  306.             set .DescItem = DESCRIPTITEM.New(this)
  307.         endif
  308.     endmethod
  309.    
  310.     method AddBag takes BAG b returns boolean
  311.         if .Count < .MaxCount and b != 0 then
  312.             set .Bags[.Count] = b
  313.             call b.Open(this, .Count, .Race)
  314.             set .Count = .Count + 1
  315.             return true
  316.         endif
  317.         return false
  318.     endmethod
  319.    
  320.     method RemoveBag takes BAG bag returns boolean
  321.         local integer i
  322.         local boolean b = false
  323.         local integer a = 0
  324.         if .Count > 0 and bag != 0 then
  325.             set .Count = .Count - 1
  326.             loop
  327.                 exitwhen a > .Count
  328.                 if (.Bags[a] == bag) then
  329.                     if .CurSelectSlot>=bag*BAG.MaxCount and .CurSelectSlot<(bag+1)*BAG.MaxCount then
  330.                         call .DescriptionItemShow(0)
  331.                     endif
  332.                     call bag.Close()
  333.                     set .Bags[a] = 0
  334.                     set b = true
  335.                 endif
  336.                 if (.Bags[a] == 0) and (.Bags[a+1] != 0) then
  337.                     set .Bags[a] = .Bags[a+1]
  338.                     set .Bags[a+1] = 0
  339.                     call .Bags[a].ResetPosition(a)
  340.                 endif
  341.                 set a = a + 1
  342.             endloop
  343.         endif
  344.         return b
  345.     endmethod
  346.    
  347.     method SetCamera takes CAMERA cam returns nothing
  348.         set .Camera = cam
  349.     endmethod
  350.    
  351.     method DescriptionItemShow takes integer typeitem returns nothing
  352.         call .DescItem.DescriptionItem(typeitem)
  353.         call .DescItem.Show(typeitem != 0)
  354.     endmethod
  355.    
  356. endstruct
  357.    
  358. function EnableForPlayerBagSystem takes player p, CAMERA cam returns nothing
  359.     local BAGSYS bs = GetPlayerId(p)
  360.     call bs.EnableBagSys()
  361.     call bs.SetCamera(cam)
  362. endfunction
  363.  
  364. private function LCkickItemSlot takes nothing returns nothing
  365.     local BUTTON but = GetTriggerButton()
  366.     local BAG bag = but.CostumValue/BAG.MaxCount
  367.     local BAGSYS bs = bag.BS
  368.     local integer Slot = but.CostumValue-bag*BAG.MaxCount
  369.     call bag.BS.DescriptionItemShow(bag.ClickSlot(Slot))
  370. endfunction
  371.  
  372. private function RCkickItemSlot takes nothing returns nothing
  373.     local BUTTON but = GetTriggerButton()
  374.     local BAG bag = but.CostumValue/BAG.MaxCount
  375.     local integer Slot = but.CostumValue-bag*BAG.MaxCount
  376.     if bag.DropItemInSlot(Slot) then
  377.         call bag.BS.DescriptionItemShow(0)
  378.     endif
  379. endfunction
  380.  
  381. private function MoveItemInBag takes nothing returns nothing
  382.     local integer NewSlot = GetIssuedOrderId()-0xD0022
  383.     local unit u = GetTriggerUnit()
  384.     local item New = UnitItemInSlot(u, NewSlot)
  385.     local item Old = GetOrderTargetItem()
  386.     local BAG b
  387.     if (Old != New) and (GetItemTypeId(New) == TypeItemBag) then
  388.         set b = GetItemUserData(New)
  389.         call b.AddItem(Old)
  390.     endif
  391.     set u = null
  392.     set New = null
  393.     set Old = null
  394. endfunction
  395.  
  396. private function UseItemBag takes nothing returns nothing
  397.     local BAGSYS bs = GetPlayerId(GetOwningPlayer(GetTriggerUnit()))
  398.     local item i = GetManipulatedItem()
  399.     local BAG b = GetItemUserData(i)
  400.     call SetItemCharges(i, b.CountItem)
  401.     if b.open then
  402.         call bs.RemoveBag(b)
  403.     else
  404.         call bs.AddBag(b)
  405.     endif
  406.     set i = null
  407. endfunction
  408.  
  409. private function DropBag takes nothing returns nothing
  410.     local BAGSYS bs = GetPlayerId(GetOwningPlayer(GetTriggerUnit()))
  411.     local BAG b = GetItemUserData(GetManipulatedItem())
  412.     if b.open then
  413.         call bs.RemoveBag(b)
  414.     endif
  415. endfunction
  416.  
  417. private function RegistrationBag takes nothing returns nothing
  418.     local item i = GetManipulatedItem()
  419.     local BAG b = GetItemUserData(i)
  420.     if (b == 0) then
  421.         set b = BAG.RegistrationItemBag(i)
  422.     endif
  423.     set b.Owner = GetTriggerUnit()
  424.     set i = null
  425. endfunction
  426.  
  427. private function OrderMoveCondition takes nothing returns boolean
  428.     local integer o = GetIssuedOrderId()
  429.     return 0xD0022<=o and o<=0xD0027
  430. endfunction
  431.  
  432. private function ItemIsBagCondition takes nothing returns boolean
  433.     return GetItemTypeId(GetManipulatedItem()) == TypeItemBag
  434. endfunction
  435.  
  436. private function BagsInitTriggers takes nothing returns nothing
  437.     local integer i = bj_MAX_PLAYER_SLOTS-1
  438.     set TrigPickupItem = CreateTrigger()
  439.     loop
  440.         exitwhen i < 0
  441.         call TriggerRegisterPlayerUnitEvent(TrigPickupItem, Player(i), EVENT_PLAYER_UNIT_PICKUP_ITEM, null)
  442.         set i = i - 1
  443.     endloop
  444.     call TriggerAddCondition(TrigPickupItem, itemisbagcondition)
  445.     call TriggerAddAction(TrigPickupItem, function RegistrationBag)
  446.     set TrigMoveItem = CreateTrigger()
  447.     call TriggerAddCondition(TrigMoveItem, Condition(function OrderMoveCondition))
  448.     call TriggerAddAction(TrigMoveItem, function MoveItemInBag)
  449.     set TrigUseItem = CreateTrigger()
  450.     call TriggerAddCondition(TrigUseItem, itemisbagcondition)
  451.     call TriggerAddAction(TrigUseItem, function UseItemBag)
  452.     set TrigDropItem = CreateTrigger()
  453.     call TriggerAddCondition(TrigDropItem, itemisbagcondition)
  454.     call TriggerAddAction(TrigDropItem, function DropBag)
  455. endfunction
  456.  
  457. private function Init takes nothing returns nothing
  458.     local integer i = 0
  459.     call InventoryInitItemDB_Func(TypeItemBag, "BTNDust.blp", "Bag for 6 item.", 0, true)
  460.     set FuncLClickSlot = function LCkickItemSlot
  461.     set FuncRClickSlot = function RCkickItemSlot
  462.     set itemisbagcondition = Condition(function ItemIsBagCondition)
  463.     call BagsInitTriggers()
  464.     loop
  465.         exitwhen i >= 5
  466.         set XPosWin[i  ] =  0.35
  467.         set XPosWin[i+5] = -0.35
  468.         set YPosWin[i  ] =  -0.52+0.36*i
  469.         set YPosWin[i+5] = YPosWin[i]
  470.         set i = i + 1
  471.     endloop
  472.     set i = 0
  473. endfunction
  474.  
  475. endlibrary

Changelog:
 - Updated to the current code standards, removed H2I bug
« Last Edit: January 28, 2018, 09:11:40 AM by moyack »



 

Power of Corruption - A Warcraft III altered melee map   Chaos Realm - The world of Game modders and wc3 addicts     WC3JASS.com - The JASS Vault   Jetcraft - A Starcraft II mod