scope Example
struct Items
static constant integer BOOTS_OF_SPEED = 'I00A'
static constant integer LIFE_CRYSTAL = 'I00B'
static constant integer HOMECOMING_STONE = 'I00D'
static constant integer GLOVES_OF_HASTE = 'I00C'
static constant integer BOOTS_OF_THE_BRAVES = 'I009'
private static method configure takes nothing returns nothing
call ItemAddComponents(BOOTS_OF_THE_BRAVES, BOOTS_OF_SPEED, HOMECOMING_STONE, GLOVES_OF_HASTE, LIFE_CRYSTAL, 0)
endmethod
static method create takes integer shop, real aoe, real tax returns thistype
local integer damage
local integer armor
local integer strength
local integer agility
local integer intelligence
local integer health
local integer mana
local integer attackSpeed
local integer movement
local integer spellPower
local integer cooldown
local integer regeneration
local integer consumable
call CreateShop(shop, aoe, tax)
set damage = ShopAddCategory(shop, "ReplaceableTextures\\CommandButtons\\BTNSteelMelee", "Damage")
set armor = ShopAddCategory(shop, "ReplaceableTextures\\CommandButtons\\BTNHumanArmorUpOne", "Armor")
set strength = ShopAddCategory(shop, "ReplaceableTextures\\CommandButtons\\BTNGauntletsOfOgrePower", "Strength")
set agility = ShopAddCategory(shop, "ReplaceableTextures\\CommandButtons\\BTNSlippersOfAgility", "Agility")
set intelligence = ShopAddCategory(shop, "ReplaceableTextures\\CommandButtons\\BTNMantleOfIntelligence", "Intelligence")
set health = ShopAddCategory(shop, "ReplaceableTextures\\CommandButtons\\BTNFireCrystalElement", "Health")
set mana = ShopAddCategory(shop, "ReplaceableTextures\\CommandButtons\\BTNItem_Gem_Aquamarine.blp", "Mana")
set attackSpeed = ShopAddCategory(shop, "ReplaceableTextures\\CommandButtons\\BTNGlove.blp", "Attack Speed")
set movement = ShopAddCategory(shop, "ReplaceableTextures\\CommandButtons\\BTNBootsOfSpeed", "Movement")
set spellPower = ShopAddCategory(shop, "ReplaceableTextures\\CommandButtons\\BTNControlMagic", "Spell Power")
set cooldown = ShopAddCategory(shop, "ReplaceableTextures\\CommandButtons\\BTNSpin.blp", "Cooldown")
set regeneration = ShopAddCategory(shop, "ReplaceableTextures\\CommandButtons\\BTNTowerRegen.blp", "Regeneration")
set consumable = ShopAddCategory(shop, "ReplaceableTextures\\CommandButtons\\BTNPotionGreenSmall", "Consumable")
call ShopAddItem(shop, BOOTS_OF_SPEED, movement)
call ShopAddItem(shop, LIFE_CRYSTAL, health)
call ShopAddItem(shop, HOMECOMING_STONE, movement)
call ShopAddItem(shop, GLOVES_OF_HASTE, attackSpeed)
call ShopAddItem(shop, BOOTS_OF_THE_BRAVES, movement + health + attackSpeed + cooldown)
return 0
endmethod
private static method onInit takes nothing returns nothing
call configure()
call create('ngme', 600, 0.5)
endmethod
endstruct
endscope