Name | Type | is_array | initial_value |
_1 | integer | No | |
_2 | integer | No | |
_OrchishQuest001 | questitem | No | |
_OrchishQuest002 | questitem | No | |
_OrchishQuest003 | questitem | No | |
_TaurenQuest001 | questitem | No | |
_TaurenQuest002 | questitem | No | |
_TrollishQuest001 | questitem | No | |
_TrollishQuest002 | questitem | No | |
And1 | integer | No | |
btnA | button | No | |
BTNDruid | button | No | |
BTNHunter | button | No | |
btnI | button | No | |
BTNMage | button | No | |
BTNPaladin | button | No | |
BTNPriest | button | No | |
BTNRogue | button | No | |
btnS | button | No | |
BTNShaman | button | No | |
BTNWarlock | button | No | |
BTNWarrior | button | No | |
Caster | unit | No | |
CasterMass | unit | Yes | |
Charger | unit | No | |
Combo_Point_Number | integer | No | |
Damage | real | No | |
DamageOfCurseSergares | real | No | |
dialog | dialog | No | |
dialog1 | dialog | No | |
dialogOfClass | dialog | No | |
dialogue | dialog | No | |
DrakThul | unit | No | |
DuhofHero | unit | No | |
Dummy | unit | No | |
DummyMass | unit | Yes | |
Effect1 | effect | No | |
Effect2 | effect | No | |
EffectMass | effect | Yes | |
Fearing_Unit | unit | No | |
Fearing_unit_position | location | No | |
Fishing | integer | No | |
FlyingPath | unit | No | |
fs_cache | gamecache | No | |
GruntX | group | No | |
Guard | unit | No | |
HunterX | group | No | |
Inst_Block | destructable | Yes | |
ITEM | item | Yes | |
Item_charges_remaing | item | No | |
Item_charges_remaing2 | item | No | |
MainHERO | unit | No | |
MainVisionUnit | unit | No | |
Manipulate_Item | item | No | |
No | button | No | |
Orc1 | effect | No | |
Orc2 | effect | No | |
OrchishDialog1 | dialog | No | |
OrchishQuest001 | quest | No | |
OrchishQuest002 | quest | No | |
OrchishQuest003 | quest | No | |
Random_chislo | integer | No | |
Random_chislo_Axe | integer | No | |
Revive | rect | No | |
Rogue_Logue | boolean | No | |
Target | unit | No | |
TargetMass | unit | Yes | |
Tauren1 | effect | No | |
TaurenQuest001 | quest | No | |
TaurenX | group | No | |
TempFloatText | texttag | No | |
Troll1 | effect | No | |
Troll_hostage | unit | No | |
TrollishDialog1 | dialog | No | |
TrollishQuest001 | quest | No | |
Unit_Camera_Lock | unit | Yes | |
Vision_12 | unit | No | |
Vision_3 | unit | No | |
Vision_5 | unit | No | |
Vision_7 | unit | No | |
Vision_Group | group | No | |
WarlocksEffect1 | effect | No | |
WarlocksEffect2 | effect | No | |
WarlocksEffect3 | effect | No | |
WarlocksEffectMass | effect | Yes | |
Yes | button | No |
//#####################################################
//###### Fullscreen Inventory System, version 2 #######
//#####################################################
//
// ### Table of Contents ###
//
// 1. Key Features
// 2. Installation
// 3. Known issues
// 4. Extra trigger functions
// 5. Credits & contact info
// 6. Version history
//
//
// ### 0. Preamble ###
//
//
// The first version of fullscreen inventory system was released about a year ago, in August 2004.
// However, because of lack of multiplayer compatibility and quite hard installation procedure,
// it was more an impressive demo rather than a usable system...
// The project went to abandoned state soon after release, and I haven't planned to release new versions ever.
//
// But after receiving a lot of comments asking for a multiplayer version, I've finally decided to revive this project, so here we go...
// Now it's truly multiplayer and no longer use 280+ imported files.
// The code was rewritten from scratch, a powerful back-end fullscreen user interface system was developed, and large backpack is only an example of what could be done using it.
// The initial plans were to create a bunch of modules for this system, including:
// - Large inventory (this one :))
// - Diablo-like inventory (w/ active slots)
// - Some kind of a new dialog system
// - Shop interface
// - Spell Book
// - Mini Games :)
// Don't know whether I'll have time to code and design any of that stuff, but well, at least the new backpack is ready :)
//
// For JASS developers I'm also planning to release some notes on how to code your own fullscreen interfaces using my system;
// if you are interested, please feel free to contact me. (just need to know if anyone will be ever going to read it :))
//
//
// ### 1. Key Features ###
//
//
// - Up to 100 extra inventory slots;
// - Full multiplayer and multiunit compaltibility;
// - Blizzard style full screen interface, done for all 4 races;
// - No page-based navigation or typing anything in the chat: all controls are placed on the single screen and everything could be done by just clicking the left mouse button;
// - Option to pick up/buy items directly into backpack;
// - Items can be sold directly from backpack if standing enough close to shop;
// - Instant-use items (such as healing potions) can be used directly from backpack;
// - Extra trigger functions allow to control backpack behaviour via triggers:
// you can add/remove items to it, check whether an item is in the backpack,
// and even dynamically change backpack size;
//
//
// ### 2. Installing this to your map ###
//
//
// Installation process is still very complex, but you shouldn't experience problems
// if you follow notes in this section carefully as most common issues are explained here.
//
// (If you have a small map, it might be easier to transfer everything from your map to this one...
// in this case, you can go directly to step 2.5)
//
//
// 2.1. The first thing you need is to create a 'dead zone' for fullscreen controls in your target map.
// Requirements for this zone follow:
// 1. It must be at least 18 cells wide and located at the left edge of the map;
// 2. It must be completely flat ground - no water, no cliffs, no objects please;
// 3. It must be INSIDE camera bounds (note the difference with the first version)
// 4. Minimal required map height depends on maximal number of players that should be able to use fullscreen interface:
// one player requires 10 cells of map height, so map height of 128 will be enough for all 12 players.
// If your map height is insufficient, a warning message will be issued when you start the game.
//
// Note: When you start the map, this zone will be automatically isolated
// with a chain of black path blockers, and will be excluded from "Playable Map Area" region.
//
// 2.2. Transfer all of the imported files from this map to your map.
// Importing is a lot easier now, since imported files count reduced to 33 (from enormous 285 in first version).
// You can transfer files via WE Import Manager, or use WinMPQ or some other MPQ tool to speed up this process.
// Files to be transferred via MPQ tools are all .mdx, .tga and .blp files, and war3map.imp file.
// (you'll have to re-import all of your own custom files to the map after that)
// Note: all of the imported files should have file paths exactly as in this map!
// (this means they should NOT have prefix such as "war3mapImported/"!)
//
// IMPORTANT: Don't forget to make a backup copy of your map before changing it with any MPQ tools.
//
// 2.3. Transfer all the triggers and the only variable.
// This could be easily done with the WE 'Import/Export Triggers' feature if you're starting a new map,
// otherwise, copy & paste the only trigger category and the only gamecache variable.
//
// It is required to place these triggers higher in trigger list than any of your triggers
// if you are going to use extra inventory trigger functions.
// Be sure also to keep the original order of triggers.
//
// If you're getting compile errors, please read the note in the custom script code section
// (click map title at the top of triggers tree to access it)
//
// 2.4. Transfer custom destructible doodad data.
// The only way to to this is using "Export / Import Destructible Settings" feature in Object Editor.
//
// 2.5. Transfer the custom ability.
// Just Ctrl-C + Ctrl-V.
// If you've already had any custom abilities, you'll have to update
// ability ID of inventory ability in the configuration section. (see 2.7)
//
// 2.6. Open the "inventory init item settings" trigger and, using the example provided,
// fill in information about your custom items
// (since this information couldn't be extracted by the script, it has to be typed here manually).
//
// 2.7. Open the "configuration" trigger and tweak the options.
// You can disable certain features such as direct sell/use if you don't need them.
//
//
// 2.8. Well done! :)
//
// If you encounter any installation problems, you could ask for help at the feedback section of project homepage:
// http://dimon.xgm.ru/fsgui/feedback.php
//
//
// ### 3. Known issues ###
//
//
// 3.1. Items in the backpack do not give their passive ability bonuses.
// This is rather a feature than a bug, just imagine a hero with 100 attack or stat bonus items :)
// I'm planning to make an inventory system with some extra "active" slots that give their bonuses, but this is not the case.
//
// 3.2. If your main inventory is full, "pickup to extended inventory" will be automatically disabled,
// as you're need to have at least one free slot in your main inventory to use it.
//
// 3.3. Items set to undroppable state still could be dropped via fullscreen interface.
// The only solution is to completely disable item drop feature via configuration trigger,
// as I know no way to detect undroppable state in JASS.
//
// 3.4. If you experience problems with camera locking to unit after using the fullscreen interface,
// pay attention to the "inv100_lock_cam" option in configuration trigger.
//
//
// ### 4. Extra trigger functions ###
//
//
// You can use following functions via custom script.
// A patch that adds these to trigger editor is also available; it could be found at:
// http://dimon.xgm.ru/fsgui/downloads.php
//
// inv100_IsEnabled(player p)
// Returns whether inventory panel is currently active for specified player.
// Some triggers that deal with "Unit Acquires/Loses An Item" events could collide with
// internal inventory routines and cause problems. In such cases, you should add a check
// for inactive inventory state to these triggers.
//
// inv100_UnitItemInSlot(unit u, integer slot)
// Returns a handle to the item that unit u has in specified backpack slot.
// Note: in all of these functions, slot must be 0-99.
//
// inv100_UnitAddItemToSlot(unit u, item i, integer slot)
// Takes item i, and places it to specified slot of unit u backpack.
// If specified slot is already occupied, or item is a powerup, this function does nothing.
//
// inv100_UnitDropItemSlot(unit u, integer slot)
// Removes item from specified backpack slot and places it beneath unit feet.
//
// inv100_SetInventorySize(unit u, integer rows, integer cols)
// Sets backpack dimensions of a unit to specified values.
// rows and cols must be 1-10.
//
// inv100_UnitHasItem(unit u, item i)
// Returns whether a unit has specified item in his backpack.
//
// inv100_UnitHasItemOfType(unit u, itemcode i)
// Returns whether a unit has an item of specified type in his backpack.
//
// inv100_SaveToCache(gamecache cache, string missionkey, string label, unit u)
// Saves all of backpack contents of a unit to game cache.
// cache is the reference to gamecache variable
// (you may use bj_lastCreatedGameCache variable to refer to last gamecache created via triggers)
// missionkey is exactly what you specify as "Category" in other gamecache actions.
// label is an arbitrary string, it must be unique for each unit saved.
//
// inv100_LoadFromCache(gamecache cache, string missionkey, string label, unit u)
// Restores all of backpack contents stored at specified label, and attaches them to specified unit.
// Note that unit itself has to be restored before calling this action.
//
//
// ### 5. Credits & contact info ###
//
//
// 5.1. DimonT - all of the triggers & JASS coding, and this readme file :)
// E-mail : [email protected]
// ICQ : 937160
//
// 5.2. Illisor - all of 3D-models & custom graphics.
// E-mail : [email protected]
// ICQ : 221013519
//
// 5.3. Special Thanks to:
// Markiz
// HARN
//
// FSGUI Project Home Page:
// http://dimon.xgm.ru/fsgui/
//
// XGM - Russian Modmaking Community
// http://xgm.ru
//
//
// ### 6. Version History ###
//
// 2.01 (06/08/2005)
// - two minor hotfixes...
//
// 2.00 (06/08/2005)
// - completely new version, now fully multiplayer compatible.
//
// 1.15 (31/08/2004)
// - fixed a bug allowing to duplicate charged items by clicking "Use Item" button twice;
// - fixed description box background in Orc skin;
// - readme file included.
//
// 1.10 (29/08/2004)
// - 4 skins, for all of the races;
// - ability to use & sell items from backpack;
// - item sell value is displayed;
// - support for game cache to transfer backpack contents between maps.
//
// 1.00 (23/08/2004)
// - initial release.
//
//#####################################################
function InitTrig_readme_txt takes nothing returns nothing
endfunction
//################################################################################
//
// script : FSGUI (FullScreen Graphic User Interface)
// version : 2.01
// date : 06.08.2005
//
//
// made by : DimonT aka ZibadaMX
// mail : [email protected]
// icq : 937160
// www : http://dimon.xgm.ru/fsgui/
//
//################################################################################
//
// Module API :
//
// Initialization:
//
// fs_SetTrackableGroup(integer tid, integer g)
// fs_BuildGroupIDs()
//
//
// Variable Handling:
//
// 1. Globals (configuration):
// setcfg(string key, string val)
// cfg(string key)
// cfgi(string key)
// cfgr(string key)
//
// 2. Object Specific:
// set_object_iparam(handle h, string key, integer val)
// set_object_rparam(handle h, string key, real val)
// get_object_iparam(handle h, string key)
// get_object_rparam(handle h, string key)
//
// 3. Session (per-player):
// fs_GetPlayerID()
// set_session_param(string key, string val)
// set_session_iparam(string key, integer val)
// set_session_rparam(string key, real val)
// get_session_param(string key)
// get_session_iparam(string key)
// get_session_rparam(string key)
//
//
//
//
// Trackable grid mapping:
//
// fs_Coords2Id(integer x, integer y)
// fs_GetTrackableGroup(integer tid)
// fs_GetTrackableGroupID(integer tid)
// fs_GetTriggeringTrackableID()
// fs_GetTrackableX(integer tid)
// fs_GetTrackableY(integer tid)
//
// Text Tags:
//
// fs_AddNamedTextTag(string name, real x, real y, string msg, real size)
// fs_SetNamedTextTagText(string name, string msg, real size)
//
// Effects:
//
// fs_AddBackgroundEffectXY(string model, real x, real y, boolean useskin)
// fs_AddBackgroundEffect(string model, integer tid, boolean useskin)
// fs_AddNamedEffectXY(string name, string model, real x, real y, boolean useskin)
// fs_AddNamedEffect(string name, string model, integer tid, boolean useskin)
//
// Callback Functions:
//
// fs_[modname]_Init()
// fs_[modname]_ClickHandler()
// fs_[modname]_HoverHandler()
// fs_[modname]_Exit()
//
//
// In Game API:
//
// fs_LoadModule(int playerID, string modname)
// fs_Shutdown(int playerID)
//
//
//################################################################################
//################################################################################
constant function fs_H2I takes handle h returns integer
return h
return 0
endfunction
constant function fs_I2U takes integer i returns unit
return i
return null
endfunction
constant function fs_I2T takes integer i returns trigger
return i
return null
endfunction
constant function fs_I2TT takes integer i returns texttag
return i
return null
endfunction
constant function fs_I2It takes integer i returns item
return i
return null
endfunction
constant function fs_I2D takes integer i returns destructable
return i
return null
endfunction
constant function fs_I2FM takes integer i returns fogmodifier
return i
return null
endfunction
//################################################################################
function setcfg takes string key, string val returns nothing
call StoreString(udg_fs_cache, "config", key, val)
endfunction
function cfg takes string key returns string
return GetStoredString(udg_fs_cache, "config", key)
endfunction
function cfgr takes string key returns real
return S2R(cfg(key))
endfunction
function cfgi takes string key returns integer
return S2I(cfg(key))
endfunction
//################################################################################
function fs_echo takes integer playerID, string msg returns nothing
if playerID == -1 then
call DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,5.00, msg)
else
call DisplayTimedTextToPlayer(Player(playerID),0,0,5.00, msg)
endif
endfunction
//################################################################################
function get_object_iparam takes handle h, string key returns integer
return GetStoredInteger(udg_fs_cache, I2S(fs_H2I(h)), key)
endfunction
function set_object_iparam takes handle h, string key, integer val returns nothing
call StoreInteger(udg_fs_cache, I2S(fs_H2I(h)), key, val)
endfunction
function get_object_rparam takes handle h, string key returns real
return GetStoredReal(udg_fs_cache, I2S(fs_H2I(h)), key)
endfunction
function set_object_rparam takes handle h, string key, real val returns nothing
call StoreReal(udg_fs_cache, I2S(fs_H2I(h)), key, val)
endfunction
function flush_object takes handle h returns nothing
call FlushStoredMission(udg_fs_cache, I2S(fs_H2I(h)))
endfunction
//################################################################################
function get_session_iparam takes string key returns integer
return GetStoredInteger(udg_fs_cache, "session" + cfg("player"), key)
endfunction
function set_session_iparam takes string key, integer val returns nothing
call StoreInteger(udg_fs_cache, "session" + cfg("player"), key, val)
endfunction
function get_session_rparam takes string key returns real
return GetStoredReal(udg_fs_cache, "session" + cfg("player"), key)
endfunction
function set_session_rparam takes string key, real val returns nothing
call StoreReal(udg_fs_cache, "session" + cfg("player"), key, val)
endfunction
function get_session_param takes string key returns string
return GetStoredString(udg_fs_cache, "session" + cfg("player"), key)
endfunction
function set_session_param takes string key, string val returns nothing
call StoreString(udg_fs_cache, "session" + cfg("player"), key, val)
endfunction
//################################################################################
function fs_chr takes integer i returns string
local string abc = "abcdefghijklmnopqrstuvwxyz"
local string ABC = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
local string digits = "0123456789"
if i >= 65 and i <= 90 then
return SubString(ABC, i-65,i-64)
elseif i >= 97 and i <= 122 then
return SubString(abc, i-97,i-96)
elseif i >= 48 and i <= 57 then
return SubString(digits, i-48,i-47)
endif
return ""
endfunction
//################################################################################
function fs_iif takes boolean cond, string s1, string s2 returns string
if cond then
return s1
endif
return s2
endfunction
//################################################################################
constant function fs_Coords2Id takes integer x, integer y returns integer
return y * 20 + x
endfunction
//################################################################################
function fs_BuildGroupIDs takes nothing returns nothing
local integer i = 0
local integer g
local integer array count
loop
exitwhen i >= 200
set g = get_session_iparam("tk_group" + I2S(i))
if g != -1 then
call set_session_iparam("tk_groupid" + I2S(i), count[g])
set count[g] = count[g] + 1
else
call set_session_iparam("tk_groupid" + I2S(i), -1)
endif
set i = i + 1
endloop
endfunction
//################################################################################
function fs_SetTrackableGroup takes integer tid, integer g returns nothing
call set_session_iparam("tk_group" + I2S(tid), g)
endfunction
//################################################################################
function fs_GetTrackableGroup takes integer tid returns integer
return get_session_iparam("tk_group" + I2S(tid))
endfunction
//################################################################################
function fs_GetTrackableGroupID takes integer tid returns integer
return get_session_iparam("tk_groupid" + I2S(tid))
endfunction
//################################################################################
function fs_GetTriggeringTrackableID takes nothing returns integer
return get_session_iparam("fs_trigger_tid")
endfunction
//################################################################################
function fs_GetPlayerID takes nothing returns integer
return cfgi("player")
endfunction
//################################################################################
function fs_GetTrackableX takes integer tid returns real
return cfgr("tk_" + I2S(tid) + "_x" + I2S(fs_GetPlayerID()))
return get_session_rparam("tk_x" + I2S(tid))
endfunction
//################################################################################
function fs_GetTrackableY takes integer tid returns real
return cfgr("tk_" + I2S(tid) + "_y" + I2S(fs_GetPlayerID()))
return get_session_rparam("tk_y" + I2S(tid))
endfunction
//################################################################################
function fs_AddNamedTextTag takes string name, real x, real y, string msg, real size returns nothing
local texttag tt
local integer id = get_session_iparam("fs_texttags")
call DestroyTextTag(fs_I2TT(get_session_iparam("fs_texttag_" + name)))
if msg == "" then
call set_session_iparam("fs_texttag_" + name, 0)
return
endif
if size == 0 then
set size = cfgr("fs_texttag_size")
endif
set tt = CreateTextTag()
call SetTextTagPos(tt, get_session_rparam("fs_base_x") + x, get_session_rparam("fs_base_y") + y, 0)
call SetTextTagColor(tt, 255, 255, 255, 255)
call SetTextTagVelocity(tt, 0, 0)
call SetTextTagVisibility(tt, true)
call SetTextTagText(tt, msg, size)
call SetTextTagPermanent(tt, true)
call set_session_iparam("fs_texttag_" + name, fs_H2I(tt))
call set_session_iparam("fs_texttag" + I2S(id), fs_H2I(tt))
call set_session_iparam("fs_texttags", id + 1)
// call debugMsg("fs_AddNamedTextTag: name = " + name + " x = " + R2SW(x, 0, 0) + ", y = " + R2SW(y, 0, 0) + ", msg = " + msg)
endfunction
//################################################################################
function fs_SetNamedTextTagText takes string name, string msg, real size returns nothing
local texttag tt = fs_I2TT(get_session_iparam("fs_texttag_" + name))
if size == 0 then
set size = cfgr("fs_texttag_size")
endif
call SetTextTagText(tt, msg, size)
endfunction
//################################################################################
function fs_PlaySound takes string soundfile returns nothing
if cfgi("fs_sound") == 0 then
return
endif
if Player(fs_GetPlayerID()) == GetLocalPlayer() then
call PlaySound(soundfile)
endif
endfunction
//################################################################################
function fs_RegisterEffect takes integer id, string name returns nothing
call StoreInteger(udg_fs_cache, "FX", name, id)
endfunction
//################################################################################
function fs_AddBackgroundEffectXY takes string modelfile, real x, real y, boolean useskin returns destructable
local destructable d
local integer id = get_session_iparam("fs_effects")
if useskin then
set modelfile = modelfile + get_session_param("fs_skin")
endif
set d = CreateDestructable(GetStoredInteger(udg_fs_cache, "FX", modelfile), get_session_rparam("fs_base_x") + x, get_session_rparam("fs_base_y") + y, 0, 1.0, 1)
call set_session_iparam("fs_effect" + I2S(id), fs_H2I(d))
call set_session_iparam("fs_effects", id + 1)
return d
endfunction
//################################################################################
function fs_AddBackgroundEffect takes string modelfile, integer tid, boolean useskin returns destructable
return fs_AddBackgroundEffectXY(modelfile, fs_GetTrackableX(tid), fs_GetTrackableY(tid), useskin)
endfunction
//################################################################################
function fs_AddNamedEffectXY takes string name, string modelfile, real x, real y, boolean useskin returns nothing
call RemoveDestructable(fs_I2D(get_session_iparam("fs_effect_" + name)))
if modelfile != "" then
call set_session_iparam("fs_effect_" + name, fs_H2I(fs_AddBackgroundEffectXY(modelfile, x, y, useskin)))
else
call set_session_iparam("fs_effect_" + name, 0)
endif
endfunction
//################################################################################
function fs_AddNamedEffect takes string name, string modelfile, integer tid, boolean useskin returns nothing
call fs_AddNamedEffectXY(name, fs_iif(tid >= 0, modelfile, ""), fs_GetTrackableX(tid), fs_GetTrackableY(tid), useskin)
endfunction
//################################################################################
function fs_ClickHandler takes nothing returns nothing
local integer tid = get_object_iparam(GetTriggeringTrackable(), "id")
local integer p = get_object_iparam(GetTriggeringTrackable(), "p")
call setcfg("player", I2S(p))
if get_session_iparam("fs_enabled") == 0 then
return
endif
call set_session_iparam("fs_trigger_tid", tid)
call ExecuteFunc(get_session_param("fs_module") + "_ClickHandler")
endfunction
//################################################################################
function fs_HoverHandler takes nothing returns nothing
local integer tid = get_object_iparam(GetTriggeringTrackable(), "id")
local integer p = get_object_iparam(GetTriggeringTrackable(), "p")
call setcfg("player", I2S(p))
if get_session_iparam("fs_enabled") == 0 then
return
endif
call set_session_iparam("fs_trigger_tid", tid)
call ExecuteFunc(get_session_param("fs_module") + "_HoverHandler")
endfunction
//################################################################################
constant function fs_GetRaceID takes integer p returns string
local race r = GetPlayerRace(Player(p))
if r == RACE_NIGHTELF then
return "4"
elseif r == RACE_UNDEAD then
return "2"
elseif r == RACE_ORC then
return "3"
endif
return "1"
endfunction
//################################################################################
function fs_Shutdown takes integer p returns nothing
local integer i
local destructable d
local texttag tt
local real x
local real y
call setcfg("player", I2S(p))
if get_session_iparam("fs_enabled") == 0 then
return
endif
// ############ reset camera and visibility ############
if Player(p) == GetLocalPlayer() then
call SetCameraBoundsToRect(bj_mapInitialCameraBounds)
call ResetToGameCamera(0)
call SetCameraPosition(get_session_rparam("fs_cam_x"), get_session_rparam("fs_cam_y"))
endif
set x = get_session_rparam("fs_base_x")
set y = get_session_rparam("fs_base_y")
call DestroyFogModifier(fs_I2FM(get_session_iparam("fs_fogmodifier")))
call SetFogStateRect(Player(p), FOG_OF_WAR_MASKED, Rect(x + 100 , y + 100, x + 2100, y + 1100), false)
// ##### exec module shutdown func #####
call ExecuteFunc(get_session_param("fs_module") + "_Exit")
// ########## do some cleanup ###########
set i = get_session_iparam("fs_effects") - 1
loop
exitwhen i < 0
set d = fs_I2D(get_session_iparam("fs_effect" + I2S(i)))
call RemoveDestructable(d)
set i = i - 1
endloop
set i = get_session_iparam("fs_texttags") - 1
loop
exitwhen i < 0
set tt = fs_I2TT(get_session_iparam("fs_texttag" + I2S(i)))
call DestroyTextTag(tt)
set i = i - 1
endloop
call set_session_iparam("fs_enabled", 0)
endfunction
//################################################################################
function fs_LoadModule takes integer p, string modname returns nothing
local integer i = 0
local real x
local real y
local fogmodifier fm
if p >= cfgi("max_players") then
call fs_echo(p, "|c00ff0000ERROR:|r cannot access fullscreen interface")
call fs_echo(p, "(try increasing max_players setting in map configuration)")
return
endif
call setcfg("player", I2S(p))
if get_session_iparam("fs_enabled") == 1 then
call fs_Shutdown(p)
endif
call FlushStoredMission(udg_fs_cache, "session" + I2S(p))
set x = cfgr("fs_base_x" + I2S(p))
set y = cfgr("fs_base_y" + I2S(p))
call set_session_rparam("fs_base_x", x)
call set_session_rparam("fs_base_y", y)
set fm = CreateFogModifierRect(Player(p), FOG_OF_WAR_VISIBLE, Rect(x + 100 , y + 100, x + 2100, y + 1100), false, false)
call set_session_iparam("fs_fogmodifier", fs_H2I(fm))
call FogModifierStart(fm)
set x = x + 1024
set y = y + 512
// ############# set camera #############
call set_session_param("fs_module", modname)
call set_session_rparam("fs_cam_x", GetCameraTargetPositionX())
call set_session_rparam("fs_cam_y", GetCameraTargetPositionY())
if Player(p) == GetLocalPlayer() then
call SetCameraPosition(x,y)
call SetCameraBounds(x,y,x,y,x,y,x,y)
endif
// ############## init vars #############
call set_session_iparam("fs_enabled", 1)
call set_session_iparam("fs_effect_count", 0)
if cfgi("fs_skin") == 0 then
call set_session_param("fs_skin", fs_GetRaceID(p))
else
call set_session_param("fs_skin", cfg("fs_skin"))
endif
loop
exitwhen i >= 200
call set_session_iparam("tk_group" + I2S(i), -1)
set i = i + 1
endloop
// ##### exec module init functions #####
call ExecuteFunc(modname + "_Init")
call fs_BuildGroupIDs()
endfunction
//################################################################################
function fs_InitPlayer takes nothing returns nothing
local timer tm = GetExpiredTimer()
local integer p = cfgi("player")
local integer i = 0
local integer j
local trackable tk
local trigger t
local real x
local real y
if p >= cfgi("max_players") then
call DestroyTimer(tm)
return
endif
set x = cfgr("base_x")
set y = cfgr("base_y") + p * 1200
if y + 1100 > GetRectMaxY(GetWorldBounds()) then
call fs_echo(-1, "|c00ff0000WARNING:|r FSGUI Init: not enough map space for players " + I2S(p + 1) + "+")
call fs_echo(-1, "(try increasing your map height)")
call setcfg("max_players", I2S(p))
call DestroyTimer(tm)
return
endif
call setcfg("fs_base_x" + I2S(p), R2S(x))
call setcfg("fs_base_y" + I2S(p), R2S(y))
set i = 0
loop
exitwhen i >= 10
set j = 0
loop
exitwhen j >= 20
set tk = CreateTrackable("square.mdx", x + 74 + 100 * j, y + 962 - 100 * i, 0)
set t = CreateTrigger()
call TriggerRegisterTrackableHitEvent(t, tk)
call TriggerAddAction(t, function fs_ClickHandler)
set t = CreateTrigger()
call TriggerRegisterTrackableTrackEvent(t, tk)
call TriggerAddAction(t, function fs_HoverHandler)
call set_object_iparam(tk, "p", p)
call set_object_iparam(tk, "id", i * 20 + j)
call setcfg("tk_" + I2S(i * 20 + j) + "_x" + I2S(p), R2S(74 + (100*j)))
call setcfg("tk_" + I2S(i * 20 + j) + "_y" + I2S(p), R2S(1024 - 62 - (100*i)))
set j = j + 1
endloop
// ### dummy left & right border trackables
call CreateTrackable("square.mdx", x + 74 + 2000, y + 962 - 100 * i, 0)
call CreateTrackable("square.mdx", x + 74 - 100 , y + 962 - 100 * i, 0)
set i = i + 1
endloop
// ### dummy top & bottom border trackables
set i = -1
loop
exitwhen i > 20
call CreateTrackable("square.mdx", x + 74 + 100 * i, y + 1062 , 0)
call CreateTrackable("square.mdx", x + 74 + 100 * i, y - 38, 0)
set i = i + 1
endloop
call setcfg("player", I2S(p + 1))
endfunction
//################################################################################
function fs_Initialize takes nothing returns nothing
local integer i = 0
local integer p = 0
local integer j
local trigger t
local timer tm
local real x
local real y
// ############### set up workspace ##############
call setcfg("base_x", R2S(GetRectMinX(bj_mapInitialPlayableArea) + 100.00))
call setcfg("base_y", R2S(GetRectMinY(bj_mapInitialPlayableArea) + 100.00))
set bj_mapInitialPlayableArea = Rect(cfgr("base_x") + 2300, GetRectMinY(bj_mapInitialPlayableArea), GetRectMaxX(bj_mapInitialPlayableArea), GetRectMaxY(bj_mapInitialPlayableArea))
// ############### set up path blocker line ##############
set x = cfgr("base_x") + 2200
set y = GetRectMinY(GetWorldBounds())
loop
exitwhen y > GetRectMaxY(GetWorldBounds())
call CreateDestructable('BX00', x, y, 0, 1.28, 0)
set y = y + 128
endloop
// ############### auto detect max players if necessary ##############
if cfgi("max_players") <= 0 then
loop
exitwhen i >= 12
if GetPlayerSlotState(Player(i)) == PLAYER_SLOT_STATE_PLAYING then
call setcfg("max_players", I2S(i + 1))
endif
set i = i + 1
endloop
endif
set tm = CreateTimer()
call TimerStart(tm, 0.00, true, function fs_InitPlayer)
endfunction
//################################################################################
function fs_ForceCameraAction takes nothing returns nothing
if GetStoredInteger(udg_fs_cache, "session" + I2S(GetPlayerId(GetLocalPlayer())), "fs_enabled") != 1 then
return
endif
call SetCameraField(CAMERA_FIELD_ANGLE_OF_ATTACK, 269.00, 0 )
call SetCameraField(CAMERA_FIELD_ROTATION, 90.00, 0 )
call SetCameraField(CAMERA_FIELD_FARZ, 5000.00, 0 )
call SetCameraField(CAMERA_FIELD_TARGET_DISTANCE, 3100.00, 0 )
call SetCameraField(CAMERA_FIELD_FIELD_OF_VIEW, 44.00, 0 )
endfunction
//################################################################################
function InitTrig_FSGUI_main_script takes nothing returns nothing
local trigger t
set t = CreateTrigger()
call TriggerRegisterTimerEventPeriodic(t, 0.05)
call TriggerAddAction(t, function fs_ForceCameraAction)
set gg_trg_FSGUI_main_script = CreateTrigger()
call TriggerAddAction(gg_trg_FSGUI_main_script, function fs_Initialize)
set udg_fs_cache = InitGameCache("FSGUI.w3v")
call FlushGameCache(udg_fs_cache)
call SaveGameCache(udg_fs_cache)
set udg_fs_cache = InitGameCache("FSGUI.w3v")
endfunction
//################################################################################
function InitTrig_configuration takes nothing returns nothing
// ### Note: ALL settings in this section are strings, so they must be enclosed in quotes
// ### Most of these settings could be changed at any point of game via setcfg function
// #############################################
// ####### FSGUI basic settings #######
// #############################################
// number of players allowed to access the fullscreen panel
// value of 0 enables auto-detection, i.e. it will be set to max player id used in the game
// note that each player requires about extra 10 cells of dead-zone height
call setcfg("max_players", "0")
// default text labels size
call setcfg("fs_texttag_size", "0.0204")
// style used in interface:
// 0 - Auto (depends on player race)
// 1 - Human
// 2 - Undead
// 3 - Orc
// 4 - Night Elf
call setcfg("fs_skin", "0")
// enables or disables sound effects
// !!!WARNING!!! it seems to be multiplayer incompatible, that's why it's disabled by default
// set to 1 in single player maps ONLY!
call setcfg("fs_sound", "0")
// #############################################
// ####### Fullscreen Inventory settings #######
// #############################################
// inventory ability id
// replace 'A000' below with the actual id of "inventory screen" ability
// (press Ctrl+D in Object Editor to view codes)
call setcfg("inv100_ability", I2S('A000'))
// enables / disables selling items directly from backpack:
// 0 - always off
// 1 - only if standing at most sell_range away from closest shop
// 2 - always on
call setcfg("inv100_sell_mode" , "1")
call setcfg("inv100_sell_range", "400")
// part of actual cost paid when selling (1.00 = 100%)
call setcfg("inv100_sell_rate", "0.50")
// enables / disables using or dropping items directly from backpack: 0 - off, 1 - on
call setcfg("inv100_allow_use", "1")
call setcfg("inv100_allow_drop", "1")
// default backpack dimensions - min 1, max 10
// you can explicitly set backpack dimensions of any unit using inv100_SetInventorySize function
// (see "init" trigger for an example)
call setcfg("inv100_default_rows", "10")
call setcfg("inv100_default_cols", "10")
// if you had camera locked on a unit before entering the inventory screen, this lock will be lost
// setting this option to "1" will force camera re-locking to the unit using the inventory
call setcfg("inv100_lock_cam", "0")
// allow exiting the inventory by pressing ESC key
call setcfg("inv100_allow_escape", "1")
// enables / disables fade filter effect when entering / exiting inventory
call setcfg("inv100_fadefilter", "1")
// #############################################
// ####### background effects database ########
// #############################################
// do not change unless you know what you're doing
call fs_RegisterEffect('BX00', "square")
call fs_RegisterEffect('BX01', "borderD1")
call fs_RegisterEffect('BX02', "borderD2")
call fs_RegisterEffect('BX03', "borderD3")
call fs_RegisterEffect('BX04', "borderD4")
call fs_RegisterEffect('BX05', "borderL1")
call fs_RegisterEffect('BX06', "borderL2")
call fs_RegisterEffect('BX07', "borderL3")
call fs_RegisterEffect('BX08', "borderL4")
call fs_RegisterEffect('BX09', "borderR1")
call fs_RegisterEffect('BX10', "borderR2")
call fs_RegisterEffect('BX11', "borderR3")
call fs_RegisterEffect('BX12', "borderR4")
call fs_RegisterEffect('BX13', "borderU1")
call fs_RegisterEffect('BX14', "borderU2")
call fs_RegisterEffect('BX15', "borderU3")
call fs_RegisterEffect('BX16', "borderU4")
call fs_RegisterEffect('BX17', "central1")
call fs_RegisterEffect('BX18', "central2")
call fs_RegisterEffect('BX19', "central3")
call fs_RegisterEffect('BX20', "central4")
call fs_RegisterEffect('BX21', "cornerDL1")
call fs_RegisterEffect('BX22', "cornerDL2")
call fs_RegisterEffect('BX23', "cornerDL3")
call fs_RegisterEffect('BX24', "cornerDL4")
call fs_RegisterEffect('BX25', "cornerDR1")
call fs_RegisterEffect('BX26', "cornerDR2")
call fs_RegisterEffect('BX27', "cornerDR3")
call fs_RegisterEffect('BX28', "cornerDR4")
call fs_RegisterEffect('BX29', "cornerUL1")
call fs_RegisterEffect('BX30', "cornerUL2")
call fs_RegisterEffect('BX31', "cornerUL3")
call fs_RegisterEffect('BX32', "cornerUL4")
call fs_RegisterEffect('BX33', "cornerUR1")
call fs_RegisterEffect('BX34', "cornerUR2")
call fs_RegisterEffect('BX35', "cornerUR3")
call fs_RegisterEffect('BX36', "cornerUR4")
call fs_RegisterEffect('BX37', "cost")
call fs_RegisterEffect('BX38', "description1")
call fs_RegisterEffect('BX39', "description2")
call fs_RegisterEffect('BX40', "description3")
call fs_RegisterEffect('BX41', "description4")
call fs_RegisterEffect('BX42', "empinv1")
call fs_RegisterEffect('BX43', "empinv2")
call fs_RegisterEffect('BX44', "empinv3")
call fs_RegisterEffect('BX45', "empinv4")
call fs_RegisterEffect('BX46', "selecter1")
call fs_RegisterEffect('BX47', "selecter2")
call fs_RegisterEffect('BX48', "selecter3")
call fs_RegisterEffect('BX49', "selecter4")
call fs_RegisterEffect('BX50', "selector")
call fs_RegisterEffect('BX51', "number")
call fs_RegisterEffect('BX52', "BTNAutoPickup")
call fs_RegisterEffect('BX53', "BTNDrop")
call fs_RegisterEffect('BX54', "BTNExit")
call fs_RegisterEffect('BX55', "BTNSell")
call fs_RegisterEffect('BX56', "BTNUse")
call fs_RegisterEffect('BX57', "DISBTNDrop")
call fs_RegisterEffect('BX58', "DISBTNSell")
call fs_RegisterEffect('BX59', "DISBTNUse")
endfunction
//################################################################################
//
// script : FSGUI module - 100-slot inventory
// version : 2.01
// date : 06.08.2005
//
//
// made by : DimonT | Illisor
// mail : [email protected] | [email protected]
// icq : 937160 | 221013519
// www : http://dimon.xgm.ru/fsgui/
//
//################################################################################
//################################################################################
function inv100_ItemID2String takes integer itemid returns string
return fs_chr(itemid/256/256/256) + fs_chr(ModuloInteger(itemid/256/256, 256)) + fs_chr(ModuloInteger(itemid/256, 256)) + fs_chr(ModuloInteger(itemid, 256))
endfunction
//################################################################################
function inv100_GetItemName takes integer itemId returns string
local integer i = 0
if HaveStoredString(udg_fs_cache, I2S(itemId), "name") then
return GetStoredString(udg_fs_cache, I2S(itemId), "name")
endif
return "Unknown Item (" + inv100_ItemID2String(itemId) + ")"
endfunction
//################################################################################
function inv100_GetItemDesc takes integer itemId returns string
local integer i = 0
if HaveStoredString(udg_fs_cache, I2S(itemId), "desc") then
return GetStoredString(udg_fs_cache, I2S(itemId), "desc")
endif
return "read how to add your own custom items in the \"init item settings\" trigger of the map"
endfunction
//################################################################################
function inv100_GetItemFX takes integer itemId returns string
if itemId == 0 then
return "empinv" + get_session_param("fs_skin")
endif
if not HaveStoredInteger(udg_fs_cache, "FX", "inv100_item" + I2S(itemId)) then
set itemId = 'sclp'
endif
return "inv100_item" + I2S(itemId)
endfunction
//################################################################################
function inv100_GetItemCost takes integer itemId returns integer
if HaveStoredInteger(udg_fs_cache, I2S(itemId), "cost") then
return R2I(GetStoredInteger(udg_fs_cache, I2S(itemId), "cost") * cfgr("inv100_sell_rate"))
endif
return 0
endfunction
//################################################################################
function inv100_IsMainInventoryFull takes unit u returns boolean
local integer i = 0
loop
exitwhen i >= 6
if UnitItemInSlot(u, i) == null then
return false
endif
set i = i + 1
endloop
return true
endfunction
//################################################################################
function inv100_IsEnabled takes player p returns boolean
call setcfg("player", I2S(GetPlayerId(p)))
return get_session_iparam("fs_enabled") == 1 and get_session_param("fs_module") == "inv100"
endfunction
//################################################################################
function inv100_UnitItemInSlot takes unit u, integer slot returns item
return fs_I2It(get_object_iparam(u, "inv100_item" + I2S(slot)))
endfunction
//################################################################################
function UnitAddItemToSlotMy takes unit u, item it, integer slot returns nothing
local integer i = 0
// ### following simple order method doesn't seem to work w/ paused units... :/
// call UnitAddItem(u, it)
// call IssueTargetOrderById(u, 852002 + slot, it)
// return
call UnitRemoveItem(u, it)
loop
exitwhen i >= 6 or i > slot
if i < slot then
if UnitItemInSlot(u, i) == null then
call UnitAddItemById(u, 'phlt')
endif
elseif i == slot then
call UnitAddItem(u, it)
endif
set i = i + 1
endloop
set i = 0
loop
exitwhen i >= 6 or i >= slot
if GetItemTypeId(UnitItemInSlot(u, i)) == 'phlt' then
call RemoveItem(UnitItemInSlot(u,i ))
endif
set i = i + 1
endloop
endfunction
//################################################################################
function inv100_UnitAddItemToSlot takes unit u, item it, integer slot returns nothing
if GetItemTypeId(inv100_UnitItemInSlot(u, slot)) != 0 or IsItemPowerup(it) then
return
endif
call UnitRemoveItem(u, it)
call set_object_iparam(u, "inv100_item" + I2S(slot), fs_H2I(it))
call SetItemVisible(it, false)
call SetItemPosition(it, get_session_rparam("fs_base_x") - 100, get_session_rparam("fs_base_y") - 100 + slot * 10)
endfunction
//################################################################################
function inv100_UnitDropItemSlot takes unit u, integer slot returns nothing
local item it = fs_I2It(get_object_iparam(u, "inv100_item" + I2S(slot)))
call SetItemVisible(it, true)
call SetItemPosition(it, GetUnitX(u), GetUnitY(u))
call set_object_iparam(u, "inv100_item" + I2S(slot), 0)
endfunction
//################################################################################
function inv100_UnitHasItem takes unit u, item it returns boolean
local integer i = 0
local integer slots = get_object_iparam(u, "inv100_rows") * get_object_iparam(u, "inv100_cols")
loop
exitwhen i >= slots
if inv100_UnitItemInSlot(u, i) == it then
return true
endif
set i = i + 1
endloop
return false
endfunction
//################################################################################
function inv100_UnitHasItemOfType takes unit u, integer it returns boolean
local integer i = 0
local integer slots = get_object_iparam(u, "inv100_rows") * get_object_iparam(u, "inv100_cols")
loop
exitwhen i >= slots
if GetItemTypeId(inv100_UnitItemInSlot(u, i)) == it then
return true
endif
set i = i + 1
endloop
return false
endfunction
//################################################################################
function inv100_SetInventorySize takes unit u, integer rows, integer cols returns nothing
if rows < 1 then
set rows = 1
elseif rows > 10 then
set rows = 10
endif
if cols < 1 then
set cols = 1
elseif cols > 10 then
set cols = 10
endif
call set_object_iparam(u, "inv100_rows", rows)
call set_object_iparam(u, "inv100_cols", cols)
endfunction
//################################################################################
function inv100_DrawItem takes integer tid, item it returns nothing
call fs_AddNamedEffect("item" + I2S(tid) , inv100_GetItemFX(GetItemTypeId(it)), tid, false)
if GetItemCharges(it) > 0 then
call fs_AddNamedEffectXY("charges" + I2S(tid), "number", fs_GetTrackableX(tid) + 20, fs_GetTrackableY(tid) - 25, false)
call fs_AddNamedTextTag("charges" + I2S(tid), fs_GetTrackableX(tid) + 1.65 * ModuloInteger(tid, 20) + 2, fs_GetTrackableY(tid) - 30 - 1.8 * I2R(R2I(tid / 20)), I2S(GetItemCharges(it)), 0.015)
else
call fs_AddNamedEffectXY("charges" + I2S(tid), "", 0, 0, false)
call fs_AddNamedTextTag("charges" + I2S(tid), 0, 0, "", 0)
endif
endfunction
//################################################################################
function inv100_UseItem takes nothing returns nothing
local timer t = GetExpiredTimer()
local unit u = fs_I2U(get_object_iparam(t, "unit"))
local integer charges = get_object_iparam(t, "charges")
local integer tid = get_object_iparam(t, "tid")
local integer g = fs_GetTrackableGroup(tid)
local integer slot = fs_GetTrackableGroupID(tid)
local item it = UnitItemInSlot(u, 0)
call setcfg("player", I2S(get_object_iparam(t, "player")))
if GetItemCharges(it) > 0 then
if g == 0 then
call UnitAddItemToSlotMy(u, it, slot)
else
call inv100_UnitAddItemToSlot(u, it, slot)
endif
else
call fs_SetNamedTextTagText("item_name", " ", 0)
call fs_SetNamedTextTagText("item_desc", " ", 0)
call fs_AddNamedEffectXY("cost", "", 0, 0, false)
call fs_SetNamedTextTagText("item_cost", " ", 0)
call fs_SetNamedTextTagText("item_hint", " ", 0)
endif
if GetItemCharges(it) != charges then
call inv100_DrawItem(tid, it)
call fs_PlaySound("Abilities\\Spells\\Items\\AIam\\Tomes.wav")
call set_session_iparam("selected_item", 0)
call set_session_iparam("selected_cell", -1)
call fs_SetNamedTextTagText("item_hint", " ", 0)
call fs_SetNamedTextTagText("button_label", " ", 0)
call fs_AddNamedEffect("item_select", "", 0, false)
call fs_AddNamedEffect("button_sell", "DISBTNSell", get_session_iparam("button_sell_pos"), false)
call fs_AddNamedEffect("button_drop", "DISBTNDrop", get_session_iparam("button_drop_pos"), false)
call fs_AddNamedEffect("button_use" , "DISBTNUse" , get_session_iparam("button_use_pos") , false)
else
call fs_PlaySound("Sound\\Interface\\Error.wav")
call fs_SetNamedTextTagText("item_hint", "|c00ff0000Cannot use this item.|r", 0)
endif
call UnitAddItemToSlotMy(u, inv100_UnitItemInSlot(u, -1), 0)
call set_object_iparam(u, "inv100_item-1", 0)
call PauseUnit(u, true)
call DestroyTimer(t)
call flush_object(t)
endfunction
//################################################################################
function inv100_ClickHandler takes nothing returns nothing
local integer tid = fs_GetTriggeringTrackableID()
local integer g = fs_GetTrackableGroup(tid)
local integer slot = fs_GetTrackableGroupID(tid)
local integer p = fs_GetPlayerID()
local unit u = fs_I2U(get_session_iparam("unit"))
local integer tid2 = get_session_iparam("selected_cell")
local integer g2 = fs_GetTrackableGroup(tid2)
local integer slot2 = fs_GetTrackableGroupID(tid2)
local integer charges
local string str
local item it
local item it2 = fs_I2It(get_session_iparam("selected_item"))
local timer t
if g == -1 then
return
endif
if g == 2 then
call fs_Shutdown(fs_GetPlayerID())
return
endif
// ####### validity checks #######
if g == 3 and not IsItemSellable(it2) then
return
endif
if g == 4 and (GetItemCharges(it2) == 0 or GetItemTypeId(inv100_UnitItemInSlot(u, -1)) != 0) then
return
endif
if g == 5 and GetItemTypeId(it2) == 0 then
return
endif
// ####### auto-pickup button #######
if g == 6 then
if get_object_iparam(u, "inv100_auto_pickup") == 0 then
if inv100_IsMainInventoryFull(u) then
call fs_SetNamedTextTagText("button_label", "|cffffcc00Free at least one slot in your main inventory.|r", 0)
call fs_PlaySound("Sound\\Interface\\Error.wav")
return
endif
call set_object_iparam(u, "inv100_auto_pickup", 1)
call fs_AddNamedEffect("button_pickup_selected", "selector", get_session_iparam("button_pickup_pos"), false)
else
call set_object_iparam(u, "inv100_auto_pickup", 0)
call fs_AddNamedEffect("button_pickup_selected", "", 0, false)
endif
set str = "Pickup to Extended Inventory: |cffffcc00" + fs_iif(get_object_iparam(u, "inv100_auto_pickup") == 1, "ON", "OFF") + "|r"
call fs_SetNamedTextTagText("button_label", str, 0)
call fs_PlaySound("Sound\\Interface\\AutoCastButtonClick1.wav")
return
endif
// ####### use button #######
if g == 4 then
if g2 == 0 then
call UnitRemoveItem(u, it2)
else
call inv100_UnitDropItemSlot(u, slot2)
endif
call inv100_UnitAddItemToSlot(u, UnitItemInSlot(u, 0), -1)
call UnitAddItemToSlotMy(u, it2, 0)
set t = CreateTimer()
call TimerStart(t, 0.02, false, function inv100_UseItem)
call set_object_iparam(t, "unit", fs_H2I(u))
call set_object_iparam(t, "player", p)
call set_object_iparam(t, "charges", GetItemCharges(it2))
call set_object_iparam(t, "tid", tid2)
call PauseUnit(u, false)
call UnitUseItem(u, it2)
return
endif
// ####### deselect current item #######
if tid2 != -1 then
call set_session_iparam("selected_item", 0)
call set_session_iparam("selected_cell", -1)
call fs_SetNamedTextTagText("item_hint", " ", 0)
call fs_AddNamedEffect("item_select", "", 0, false)
call fs_AddNamedEffect("button_sell", "DISBTNSell", get_session_iparam("button_sell_pos"), false)
call fs_AddNamedEffect("button_drop", "DISBTNDrop", get_session_iparam("button_drop_pos"), false)
call fs_AddNamedEffect("button_use" , "DISBTNUse" , get_session_iparam("button_use_pos") , false)
endif
// ####### sell button #######
if g == 3 then
call SetPlayerState(Player(p), PLAYER_STATE_RESOURCE_GOLD, GetPlayerState(Player(p), PLAYER_STATE_RESOURCE_GOLD) + inv100_GetItemCost(GetItemTypeId(it2)))
if g2 == 1 then
call set_object_iparam(u, "inv100_item" + I2S(slot2), 0)
endif
call RemoveItem(it2)
call inv100_DrawItem(tid2, null)
call fs_SetNamedTextTagText("item_name", " ", 0)
call fs_SetNamedTextTagText("item_desc", " ", 0)
call fs_AddNamedEffectXY("cost", "", 0, 0, false)
call fs_SetNamedTextTagText("item_cost", " ", 0)
call fs_SetNamedTextTagText("item_hint", " ", 0)
call fs_SetNamedTextTagText("button_label", " ", 0)
call fs_PlaySound("Sound\\Interface\\ReceiveGold.wav")
return
endif
// ####### drop button #######
if g == 5 then
if g2 == 0 then
call UnitRemoveItem(u, it2)
else
call inv100_UnitDropItemSlot(u, slot2)
endif
call inv100_DrawItem(tid2, null)
call fs_SetNamedTextTagText("item_name", " ", 0)
call fs_SetNamedTextTagText("item_desc", " ", 0)
call fs_AddNamedEffectXY("cost", "", 0, 0, false)
call fs_SetNamedTextTagText("item_cost", " ", 0)
call fs_SetNamedTextTagText("item_hint", " ", 0)
call fs_SetNamedTextTagText("button_label", " ", 0)
call fs_PlaySound("Sound\\Interface\\BigButtonClick.wav")
return
endif
// ####### item zones #######
if g != 0 and g != 1 then
return
endif
if g == 0 then
set it = UnitItemInSlot(u, slot)
else
set it = inv100_UnitItemInSlot(u, slot)
endif
// ####### select / deselect if clicked on item #######
if GetItemTypeId(it) != 0 then
call fs_PlaySound("Sound\\Interface\\MouseClick1.wav")
if tid == tid2 then
return
endif
call set_session_iparam("selected_item", fs_H2I(it))
call set_session_iparam("selected_cell", tid)
call fs_SetNamedTextTagText("item_hint", "|c00999999Click on empty slot to move this item.|r", 0)
call fs_AddNamedEffect("item_select", "selecter", tid, true)
if IsItemSellable(it) then
call fs_AddNamedEffect("button_sell", "BTNSell", get_session_iparam("button_sell_pos"), false)
endif
if GetItemTypeId(it) != 0 then
call fs_AddNamedEffect("button_drop", "BTNDrop", get_session_iparam("button_drop_pos"), false)
endif
if GetItemCharges(it) > 0 then
call fs_AddNamedEffect("button_use" , "BTNUse" , get_session_iparam("button_use_pos") , false)
endif
return
endif
// ####### clicked on empty slot and no item selected #######
if GetItemTypeId(it2) == 0 then
return
endif
// ####### move item #######
if g2 == 0 then
call UnitRemoveItem(u, it2)
else
call inv100_UnitDropItemSlot(u, slot2)
endif
if g == 0 then
call UnitAddItemToSlotMy(u, it2, slot)
else
call inv100_UnitAddItemToSlot(u, it2, slot)
endif
call inv100_DrawItem(tid2, null)
call inv100_DrawItem(tid , it2)
call fs_PlaySound("Sound\\Interface\\BigButtonClick.wav")
if inv100_IsMainInventoryFull(u) then
call set_object_iparam(u, "inv100_auto_pickup", 0)
call fs_AddNamedEffect("button_pickup_selected", "", 0, false)
endif
endfunction
//################################################################################
function inv100_HoverHandler takes nothing returns nothing
local integer tid = fs_GetTriggeringTrackableID()
local integer g = fs_GetTrackableGroup(tid)
local integer slot = fs_GetTrackableGroupID(tid)
local integer p = fs_GetPlayerID()
local unit u = fs_I2U(get_session_iparam("unit"))
local string str
local item it
if get_session_iparam("selected_cell") != -1 then
set it = fs_I2It(get_session_iparam("selected_item"))
elseif g == 0 then
set it = UnitItemInSlot(u, slot)
elseif g == 1 then
set it = inv100_UnitItemInSlot(u, slot)
else
set it = null
endif
if g == 6 then
set str = "Pickup to Extended Inventory: |cffffcc00" + fs_iif(get_object_iparam(u, "inv100_auto_pickup") == 1, "ON", "OFF") + "|r"
elseif g == 2 then
set str = "Return to Game (|cffffcc00ESC|r)"
elseif g == 3 then
set str = fs_iif(get_session_iparam("selected_cell") != -1 and IsItemSellable(it), "Sell Item", " ")
elseif g == 4 then
set str = fs_iif(get_session_iparam("selected_cell") != -1 and GetItemCharges(it) > 0, "Use Item", " ")
elseif g == 5 then
set str = fs_iif(get_session_iparam("selected_cell") != -1, "Drop Item", " ")
else
set str = " "
endif
call fs_SetNamedTextTagText("button_label", str, 0)
if GetItemTypeId(it) != 0 then
call fs_SetNamedTextTagText("item_name", inv100_GetItemName(GetItemTypeId(it)), 0)
call fs_SetNamedTextTagText("item_desc", inv100_GetItemDesc(GetItemTypeId(it)), 0)
else
call fs_SetNamedTextTagText("item_name", " ", 0)
call fs_SetNamedTextTagText("item_desc", " ", 0)
endif
if IsItemSellable(it) then
call fs_AddNamedEffectXY("cost", "cost", 185, 885, false)
call fs_SetNamedTextTagText("item_cost", "|cffffcc00" + I2S(inv100_GetItemCost(GetItemTypeId(it))) + "|r", 0)
else
call fs_AddNamedEffectXY("cost", "", 0, 0, false)
call fs_SetNamedTextTagText("item_cost", " ", 0)
endif
endfunction
//################################################################################
function inv100_PlayCineFilter takes nothing returns nothing
if cfgi("inv100_fadefilter") == 0 then
return
endif
if Player(fs_GetPlayerID()) != GetLocalPlayer() then
return
endif
call SetCineFilterTexture("ReplaceableTextures\\CameraMasks\\Black_mask.blp")
call SetCineFilterStartColor(0, 0, 0, 255)
call SetCineFilterEndColor(0, 0, 0, 0)
call SetCineFilterDuration(1.00)
call DisplayCineFilter(true)
endfunction
//################################################################################
function inv100_DetectShop takes nothing returns nothing
if GetUnitAbilityLevel(GetEnumUnit(), 'Apit') >= 1 then
call set_session_iparam("allow_sell", 1)
endif
endfunction
//################################################################################
function inv100_Init takes nothing returns nothing
local integer i
local integer tid
local unit u = GetTriggerUnit()
local integer rows
local integer cols
local integer x = 0
local integer y = 0
local item it
local group gr
call set_session_iparam("unit", fs_H2I(u))
call set_session_iparam("selected_cell", -1)
call set_session_iparam("selected_item", 0)
call PauseUnit(u, true)
// ####### validate dimensions #######
set rows = get_object_iparam(u, "inv100_rows")
set cols = get_object_iparam(u, "inv100_cols")
if rows == 0 or cols == 0 then
set rows = cfgi("inv100_default_rows")
set cols = cfgi("inv100_default_cols")
endif
call inv100_SetInventorySize(u, rows, cols)
set rows = get_object_iparam(u, "inv100_rows")
set cols = get_object_iparam(u, "inv100_cols")
// ####### detect nearby shop to allow sell mode #######
call set_session_iparam("allow_sell", 0)
if cfgi("inv100_sell_mode") == 1 then
set gr = CreateGroup()
call GroupEnumUnitsInRange(gr, GetUnitX(u), GetUnitY(u), cfgr("inv100_sell_range"), null)
call ForGroup(gr, function inv100_DetectShop)
call DestroyGroup(gr)
elseif cfgi("inv100_sell_mode") == 2 then
call set_session_iparam("allow_sell", 1)
endif
// ####### attach auto-pickup trigger #######
if get_object_iparam(u, "inv100_enabled") == 0 then
call TriggerRegisterUnitEvent( fs_I2T(cfgi("inv100_exit_trigger")), u, EVENT_UNIT_DEATH )
call TriggerRegisterUnitEvent( fs_I2T(cfgi("inv100_pickup_trigger")), u, EVENT_UNIT_PICKUP_ITEM )
call set_object_iparam(u, "inv100_enabled", 1)
endif
// ####### small inventory #######
call fs_AddBackgroundEffect("cornerUL", fs_Coords2Id(1, 6), true)
call fs_AddBackgroundEffect("cornerUR", fs_Coords2Id(2, 6), true)
call fs_AddBackgroundEffect("borderL" , fs_Coords2Id(1, 7), true)
call fs_AddBackgroundEffect("borderR" , fs_Coords2Id(2, 7), true)
call fs_AddBackgroundEffect("cornerDL", fs_Coords2Id(1, 8), true)
call fs_AddBackgroundEffect("cornerDR", fs_Coords2Id(2, 8), true)
set i = 0
loop
exitwhen i >= 6
set x = ModuloInteger(i, 2) + 1
set y = i / 2 + 6
set tid = fs_Coords2Id(x, y)
call fs_SetTrackableGroup(tid, 0)
call fs_AddBackgroundEffect("central", tid, true)
call inv100_DrawItem(tid, UnitItemInSlot(u, i))
set i = i + 1
endloop
// ####### large inventory #######
call fs_AddBackgroundEffect("cornerUL", fs_Coords2Id(9, 0), true)
call fs_AddBackgroundEffect("cornerUR", fs_Coords2Id(8 + cols, 0), true)
call fs_AddBackgroundEffect("cornerDL", fs_Coords2Id(9, rows - 1), true)
call fs_AddBackgroundEffect("cornerDR", fs_Coords2Id(8 + cols, rows - 1), true)
set y = 0
loop
exitwhen y >= rows
set x = 0
loop
exitwhen x >= cols
set tid = fs_Coords2Id(x + 9, y)
call fs_SetTrackableGroup(tid, 1)
call fs_AddBackgroundEffect("central", tid, true)
set it = inv100_UnitItemInSlot(u, y * cols + x)
if GetItemTypeId(it) == 0 or IsItemOwned(it) or RectContainsItem(it, bj_mapInitialPlayableArea) then
call set_object_iparam(u, "inv100_item" + I2S(y * cols + x), 0)
set it = null
endif
call inv100_DrawItem(tid, it)
set x = x + 1
endloop
set y = y + 1
endloop
call set_object_iparam(u, "inv100_item-1", 0)
set y = 1
loop
exitwhen y >= rows - 1
call fs_AddBackgroundEffect("borderL" , fs_Coords2Id(9, y), true)
call fs_AddBackgroundEffect("borderR" , fs_Coords2Id(8 + cols, y), true)
set y = y + 1
endloop
set x = 1
loop
exitwhen x >= cols - 1
call fs_AddBackgroundEffect("borderU" , fs_Coords2Id(x + 9, 0), true)
call fs_AddBackgroundEffect("borderD" , fs_Coords2Id(x + 9, rows - 1), true)
set x = x + 1
endloop
// ####### description box #######
call fs_AddBackgroundEffect("description", fs_Coords2Id(4, 1), true)
call fs_AddBackgroundEffect("cornerUL", fs_Coords2Id(1, 0), true)
call fs_AddBackgroundEffect("borderL" , fs_Coords2Id(1, 1), true)
call fs_AddBackgroundEffect("cornerDL", fs_Coords2Id(1, 2), true)
call fs_AddBackgroundEffect("cornerUR", fs_Coords2Id(6, 0), true)
call fs_AddBackgroundEffect("borderR" , fs_Coords2Id(6, 1), true)
call fs_AddBackgroundEffect("cornerDR", fs_Coords2Id(6, 2), true)
call fs_AddBackgroundEffect("borderU" , fs_Coords2Id(2, 0), true)
call fs_AddBackgroundEffect("borderU" , fs_Coords2Id(3, 0), true)
call fs_AddBackgroundEffect("borderU" , fs_Coords2Id(4, 0), true)
call fs_AddBackgroundEffect("borderU" , fs_Coords2Id(5, 0), true)
call fs_AddBackgroundEffect("borderD" , fs_Coords2Id(2, 2), true)
call fs_AddBackgroundEffect("borderD" , fs_Coords2Id(3, 2), true)
call fs_AddBackgroundEffect("borderD" , fs_Coords2Id(4, 2), true)
call fs_AddBackgroundEffect("borderD" , fs_Coords2Id(5, 2), true)
// ####### buttons #######
set x = 1
set y = 4
call fs_AddBackgroundEffect("cornerUL", fs_Coords2Id(x, y), true)
call fs_AddBackgroundEffect("cornerDL", fs_Coords2Id(x, y), true)
call fs_AddBackgroundEffect("central" , fs_Coords2Id(x, y), true)
call fs_SetTrackableGroup(fs_Coords2Id(x, y), 2)
call fs_AddNamedEffect("button_exit", "BTNExit", fs_Coords2Id(x, y), false)
set x = x + 1
if get_session_iparam("allow_sell") == 1 then
call fs_AddBackgroundEffect("borderU" , fs_Coords2Id(x, y), true)
call fs_AddBackgroundEffect("borderD" , fs_Coords2Id(x, y), true)
call fs_AddBackgroundEffect("central" , fs_Coords2Id(x, y), true)
call fs_SetTrackableGroup(fs_Coords2Id(x, y), 3)
call fs_AddNamedEffect("button_sell", "DISBTNSell", fs_Coords2Id(x, y), false)
call set_session_iparam("button_sell_pos", fs_Coords2Id(x, y))
set x = x + 1
else
call set_session_iparam("button_sell_pos", -1)
endif
if cfgi("inv100_allow_use") == 1 then
call fs_AddBackgroundEffect("borderU" , fs_Coords2Id(x, y), true)
call fs_AddBackgroundEffect("borderD" , fs_Coords2Id(x, y), true)
call fs_AddBackgroundEffect("central" , fs_Coords2Id(x, y), true)
call fs_SetTrackableGroup(fs_Coords2Id(x, y), 4)
call fs_AddNamedEffect("button_use" , "DISBTNUse" , fs_Coords2Id(x, y), false)
call set_session_iparam("button_use_pos", fs_Coords2Id(x, y))
set x = x + 1
else
call set_session_iparam("button_use_pos", -1)
endif
if cfgi("inv100_allow_drop") == 1 then
call fs_AddBackgroundEffect("borderU" , fs_Coords2Id(x, y), true)
call fs_AddBackgroundEffect("borderD" , fs_Coords2Id(x, y), true)
call fs_AddBackgroundEffect("central" , fs_Coords2Id(x, y), true)
call fs_SetTrackableGroup(fs_Coords2Id(x, y), 5)
call fs_AddNamedEffect("button_drop" , "DISBTNDrop" , fs_Coords2Id(x, y), false)
call set_session_iparam("button_drop_pos", fs_Coords2Id(x, y))
set x = x + 1
else
call set_session_iparam("button_drop_pos", -1)
endif
call fs_AddBackgroundEffect("cornerUR", fs_Coords2Id(x, y), true)
call fs_AddBackgroundEffect("cornerDR", fs_Coords2Id(x, y), true)
call fs_AddBackgroundEffect("central" , fs_Coords2Id(x, y), true)
call fs_SetTrackableGroup(fs_Coords2Id(x, y), 6)
call fs_AddNamedEffect("button_pickup", "BTNAutoPickup", fs_Coords2Id(x, y), false)
call set_session_iparam("button_pickup_pos", fs_Coords2Id(x, y))
if get_object_iparam(u, "inv100_auto_pickup") == 1 then
call fs_AddNamedEffect("button_pickup_selected", "selector", fs_Coords2Id(x, y), false)
endif
call fs_AddNamedTextTag("button_label", 380, 400 , " ", 0)
call fs_AddNamedTextTag("item_hint", 150, 720, " ", 0)
call fs_AddNamedTextTag("item_desc", 150, 774, " ", 0)
call fs_AddNamedTextTag("item_cost", 185, 874, " ", 0)
call fs_AddNamedTextTag("item_name", 150, 924, " ", 0)
call fs_PlaySound("Sound\\Interface\\RightGlueScreenPopDown.wav")
call inv100_PlayCineFilter()
// call dbg("player " + cfg("player") + " entered inventory")
endfunction
//################################################################################
function inv100_Exit takes nothing returns nothing
call inv100_PlayCineFilter()
call fs_PlaySound("Sound\\Interface\\RightGlueScreenPopUp.wav")
call PauseUnit(fs_I2U(get_session_iparam("unit")), false)
if cfgi("inv100_lock_cam") == 1 then
call SetCameraTargetControllerNoZForPlayer(Player(fs_GetPlayerID()), fs_I2U(get_session_iparam("unit")), 0, 0, false)
endif
// call dbg("player " + cfg("player") + " exited inventory")
endfunction
//################################################################################
function inv100_SaveToCache takes gamecache cache, string missionkey, string label, unit u returns nothing
local integer i = 0
local integer rows = get_object_iparam(u, "inv100_rows")
local integer cols = get_object_iparam(u, "inv100_cols")
call StoreBoolean(cache, missionkey, label + "_inventory", true)
call StoreInteger(cache, missionkey, label + "_rows", rows)
call StoreInteger(cache, missionkey, label + "_cols", cols)
call StoreInteger(cache, missionkey, label + "_auto_pickup", get_object_iparam(u, "inv100_auto_pickup"))
loop
exitwhen i >= rows * cols
call StoreInteger(cache, missionkey, label + "_item" + I2S(i), GetItemTypeId(inv100_UnitItemInSlot(u, i)))
call StoreInteger(cache, missionkey, label + "_charges" + I2S(i), GetItemCharges(inv100_UnitItemInSlot(u, i)))
set i = i + 1
endloop
// call dbg("saved label '" + label + "'...")
endfunction
//################################################################################
function inv100_LoadFromCache takes gamecache cache, string missionkey, string label, unit u returns nothing
local integer i = 0
local integer rows = GetStoredInteger(cache, missionkey, label + "_rows")
local integer cols = GetStoredInteger(cache, missionkey, label + "_cols")
local item it
if not HaveStoredBoolean(cache, missionkey, label + "_inventory") then
return
endif
call inv100_SetInventorySize(u, rows, cols)
set rows = get_object_iparam(u, "inv100_rows")
set cols = get_object_iparam(u, "inv100_cols")
call set_object_iparam(u, "inv100_auto_pickup", GetStoredInteger(cache, missionkey, label + "_auto_pickup"))
loop
exitwhen i >= rows * cols
call RemoveItem(inv100_UnitItemInSlot(u, i))
if GetStoredInteger(cache, missionkey, label + "_item" + I2S(i)) != 0 then
set it = CreateItem(GetStoredInteger(cache, missionkey, label + "_item" + I2S(i)), 0, 0)
call SetItemCharges(it, GetStoredInteger(cache, missionkey, label + "_charges" + I2S(i)))
call inv100_UnitAddItemToSlot(u, it, i)
endif
set i = i + 1
endloop
if get_object_iparam(u, "inv100_enabled") == 0 then
call TriggerRegisterUnitEvent( fs_I2T(cfgi("inv100_pickup_trigger")), u, EVENT_UNIT_PICKUP_ITEM )
call set_object_iparam(u, "inv100_enabled", 1)
endif
// call dbg("loaded label '" + label + "'...")
endfunction
//################################################################################
function inv100_AutoPickupAction takes nothing returns nothing
local integer i = 0
local unit u = GetTriggerUnit()
local integer p = GetPlayerId(GetOwningPlayer(u))
local integer slots = get_object_iparam(u, "inv100_rows") * get_object_iparam(u, "inv100_cols")
call setcfg("player", I2S(GetPlayerId(GetOwningPlayer(u))))
if IsItemPowerup(GetManipulatedItem()) or get_session_iparam("fs_enabled") == 1 or get_object_iparam(u, "inv100_auto_pickup") == 0 then
return
endif
loop
exitwhen i >= slots
if GetItemTypeId(inv100_UnitItemInSlot(u, i)) == 0 then
call inv100_UnitAddItemToSlot(u, GetManipulatedItem(), i)
return
endif
set i = i + 1
endloop
endfunction
//################################################################################
function inv100_ExitEscapeAction takes nothing returns nothing
if cfgi("inv100_allow_escape") == 1 then
call fs_Shutdown(GetPlayerId(GetTriggerPlayer()))
endif
endfunction
//################################################################################
function inv100_ExitOnDeathAction takes nothing returns nothing
local integer p = GetPlayerId(GetOwningPlayer(GetDyingUnit()))
call setcfg("player", I2S(p))
if get_session_iparam("unit") == fs_H2I(GetDyingUnit()) then
call fs_Shutdown(p)
endif
endfunction
//################################################################################
function inv100_EnterAction takes nothing returns nothing
if GetSpellAbilityId() != cfgi("inv100_ability") then
return
endif
call IssueImmediateOrderBJ( GetTriggerUnit(), "stop" )
call TriggerSleepAction( 0.00 )
call fs_LoadModule(GetPlayerId(GetOwningPlayer(GetTriggerUnit())), "inv100")
endfunction
//################################################################################
function InitTrig_inventory_module takes nothing returns nothing
local trigger t
local integer i = 0
set t = CreateTrigger()
call TriggerAddAction(t, function inv100_AutoPickupAction)
call setcfg("inv100_pickup_trigger", I2S(fs_H2I(t)))
set t = CreateTrigger()
call TriggerAddAction(t, function inv100_ExitOnDeathAction)
call setcfg("inv100_exit_trigger", I2S(fs_H2I(t)))
set t = CreateTrigger()
call TriggerAddAction(t, function inv100_ExitEscapeAction)
loop
exitwhen i >= 12
call TriggerRegisterPlayerEventEndCinematic(t, Player(i))
set i = i + 1
endloop
set t = CreateTrigger()
call TriggerAddAction(t, function inv100_EnterAction)
call TriggerRegisterAnyUnitEventBJ(t, EVENT_PLAYER_UNIT_SPELL_CHANNEL)
endfunction
//################################################################################
function inv100_RegisterItem takes integer i, integer did, string name, string desc, integer cost returns nothing
call StoreString(udg_fs_cache, I2S(i), "name", name)
call StoreString(udg_fs_cache, I2S(i), "desc", desc)
call StoreInteger(udg_fs_cache,I2S(i), "cost", cost)
call fs_RegisterEffect(did, "inv100_item" + I2S(i))
endfunction
//################################################################################
function InitTrig_inventory_init_item_settings takes nothing returns nothing
//################################################################################
//
// To add your custom items, do the following:
//
// 1. Go to Destructibles tab in Object Editor, open "Custom Destructibles" section
// 2. Copy and paste any of the "inv100_IconXXX" objects, then change the
// "Art - Replaceable Texture File" field to the path to your item icon
// (make sure you've imported icon itself :))
// 3. Copy and uncomment the example line below this comment block
// replace:
// 'I000' with code of your item (press Ctrl+D in Object Editor to view codes)
// 'B000' with code of destructible you created on step 2
// "Name" and "Description" with those of your item
// 100 with gold cost of your item
// 4. Repeat steps 1-3 for each custom item you have.
//
//################################################################################
// data for custom items
//################################################################################
// call inv100_RegisterItem('I000', 'B000', "Name", "Description", 100)
//################################################################################
// data for standard items
// based on ItemStrings.txt, ItemFunc.txt & ItemData.slk v1.18 (274 items total)
//################################################################################
call inv100_RegisterItem('amrc', 'BI00', "Amulet of Recall", "Can be used to teleport units to the user.", 250)
call inv100_RegisterItem('ankh', 'BI01', "Ankh of Reincarnation", "Allows reincarnation upon death.", 800)
call inv100_RegisterItem('belv', 'BI02', "Boots of Quel'Thalas +6", "Provides a bonus to Agility.", 500)
call inv100_RegisterItem('bgst', 'BI03', "Belt of Giant Strength +6", "Provides a bonus to Strength.", 500)
call inv100_RegisterItem('bspd', 'BI04', "Boots of Speed", "Increases movement rate.", 250)
call inv100_RegisterItem('ccmd', 'BI05', "Scepter of Mastery", "Allows mind control of non-Hero units.", 1000)
call inv100_RegisterItem('ciri', 'BI06', "Robe of the Magi +6", "Provides a bonus to Intelligence.", 500)
call inv100_RegisterItem('ckng', 'BI07', "Crown of Kings +5", "Provides a +5 bonus to Agility, Strength, and Intelligence.", 1000)
call inv100_RegisterItem('clsd', 'BI08', "Cloak of Shadows", "Provides the Shadowmeld ability.", 100)
call inv100_RegisterItem('crys', 'BI09', "Crystal Ball", "Permits the viewing of distant areas.", 500)
call inv100_RegisterItem('desc', 'BI10', "Kelen's Dagger of Escape", "Teleports the Hero a short distance.", 400)
call inv100_RegisterItem('flag', 'BI11', "Human Flag", "Can be captured in special scenarios.", 1000)
call inv100_RegisterItem('nflg', 'BI12', "Night Elf Flag", "Can be captured in special scenarios.", 1000)
call inv100_RegisterItem('oflg', 'BI13', "Orc Flag", "Can be captured in special scenarios.", 1000)
call inv100_RegisterItem('uflg', 'BI14', "Undead Flag", "Can be captured in special scenarios.", 1000)
call inv100_RegisterItem('gemt', 'BI15', "Gem of True Seeing", "Permits invisible units to be seen.", 200)
call inv100_RegisterItem('gobm', 'BI16', "Goblin Land Mines", "Explosive mines.", 225)
call inv100_RegisterItem('gsou', 'BI17', "Soul Gem", "Allows the theft of a Hero's soul.", 1000)
call inv100_RegisterItem('guvi', 'BI18', "Glyph of Ultravision", "Improves night vision.", 125)
call inv100_RegisterItem('gfor', 'BI19', "Glyph of Fortification", "Improves building armor and hit points.", 200)
call inv100_RegisterItem('soul', 'BI20', "Soul", "This is a trapped soul.", 1000)
call inv100_RegisterItem('mdpb', 'BI21', "Medusa Pebble", "Turns target unit to stone.", 0)
call inv100_RegisterItem('rag1', 'BI22', "Slippers of Agility +3", "Boosts Agility by 3.", 100)
call inv100_RegisterItem('rat3', 'BI23', "Claws of Attack +3", "Boosts attack damage by 3.", 50)
call inv100_RegisterItem('rin1', 'BI24', "Mantle of Intelligence +3", "Boosts Intelligence by 3.", 100)
call inv100_RegisterItem('rde1', 'BI25', "Ring of Protection +2", "Boosts armor by 2.", 150)
call inv100_RegisterItem('rde2', 'BI26', "Ring of Protection +3", "Boosts armor by 3.", 400)
call inv100_RegisterItem('rde3', 'BI27', "Ring of Protection +4", "Boosts armor by 4.", 500)
call inv100_RegisterItem('rhth', 'BI28', "Khadgar's Gem of Health", "Increases the hit points of the Hero.", 500)
call inv100_RegisterItem('rst1', 'BI29', "Gauntlets of Ogre Strength +3", "Boosts Strength by 3.", 100)
call inv100_RegisterItem('ofir', 'BI30', "Orb of Fire", "Attacks also do fire damage.", 275)
call inv100_RegisterItem('ofro', 'BI31', "Orb of Frost", "Attacks cause Frost Shock.", 800)
call inv100_RegisterItem('olig', 'BI32', "Orb of Lightning", "Attacks cause lightning damage.", 450)
call inv100_RegisterItem('oli2', 'BI33', "Orb of Lightning", "Attacks cause lightning damage.", 375)
call inv100_RegisterItem('oven', 'BI34', "Orb of Venom", "Attacks cause poison damage.", 325)
call inv100_RegisterItem('odef', 'BI35', "Orb of Darkness", "Attacks can create Dark Minions.", 500)
call inv100_RegisterItem('ocor', 'BI36', "Orb of Corruption", "Attacks reduce armor.", 375)
call inv100_RegisterItem('pdiv', 'BI37', "Potion of Divinity", "Turns Hero invulnerable.", 600)
call inv100_RegisterItem('phea', 'BI38', "Potion of Healing", "Restores lost hit points.", 150)
call inv100_RegisterItem('pghe', 'BI39', "Potion of Greater Healing", "Restores lost hit points.", 400)
call inv100_RegisterItem('pinv', 'BI40', "Potion of Invisibility", "Renders Hero temporarily invisible.", 100)
call inv100_RegisterItem('pgin', 'BI41', "Potion of Greater Invisibility", "Renders Hero temporarily invisible.", 200)
call inv100_RegisterItem('pman', 'BI42', "Potion of Mana", "Restores lost mana.", 200)
call inv100_RegisterItem('pgma', 'BI43', "Potion of Greater Mana", "Restores lost mana.", 400)
call inv100_RegisterItem('pnvu', 'BI44', "Potion of Invulnerability", "Renders Hero temporarily invulnerable.", 400)
call inv100_RegisterItem('pnvl', 'BI45', "Potion of Lesser Invulnerability", "Renders Hero temporarily invulnerable.", 150)
call inv100_RegisterItem('pres', 'BI46', "Potion of Restoration", "Restores lost hit points and mana.", 600)
call inv100_RegisterItem('pspd', 'BI47', "Potion of Speed", "Provides Hero with a temporary speed increase.", 75)
call inv100_RegisterItem('rlif', 'BI48', "Ring of Regeneration", "Provides regeneration.", 200)
call inv100_RegisterItem('rwiz', 'BI49', "Sobi Mask", "Increases mana regeneration rate.", 400)
call inv100_RegisterItem('sfog', 'BI50', "Horn of the Clouds", "Stops enemy towers from attacking.", 200)
call inv100_RegisterItem('rhe1', 'BI51', "Rune of Lesser Healing", "Restores hit points to nearby units.", 100)
call inv100_RegisterItem('rhe2', 'BI52', "Rune of Healing", "Restores hit points to nearby units.", 200)
call inv100_RegisterItem('rhe3', 'BI53', "Rune of Greater Healing", "Restores hit points to nearby units.", 300)
call inv100_RegisterItem('shea', 'BI54', "Scroll of Healing", "Restores hit points to nearby units.", 250)
call inv100_RegisterItem('sman', 'BI55', "Scroll of Mana", "Restores mana to nearby units.", 150)
call inv100_RegisterItem('rman', 'BI56', "Rune of Mana", "Restores mana to nearby units.", 100)
call inv100_RegisterItem('rma2', 'BI57', "Rune of Greater Mana", "Restores mana to nearby units.", 300)
call inv100_RegisterItem('spro', 'BI58', "Scroll of Protection", "Temporarily increases the armor of nearby units.", 150)
call inv100_RegisterItem('sres', 'BI59', "Scroll of Restoration", "Restores hit points and mana to nearby units.", 750)
call inv100_RegisterItem('rres', 'BI60', "Rune of Restoration", "Restores hit points and mana to nearby units.", 250)
call inv100_RegisterItem('ssil', 'BI61', "Staff of Silence", "Stops enemy spellcasting.", 500)
call inv100_RegisterItem('stwp', 'BI62', "Scroll of Town Portal", "Transports troops to friendly town hall.", 350)
call inv100_RegisterItem('tels', 'BI63', "Goblin Night Scope", "Increases sight range at night.", 200)
call inv100_RegisterItem('tdex', 'BI64', "Tome of Agility", "Permanently increases Agility.", 150)
call inv100_RegisterItem('texp', 'BI65', "Tome of Experience", "Gives bonus experience points.", 500)
call inv100_RegisterItem('tint', 'BI66', "Tome of Intelligence", "Permanently increases Intelligence.", 150)
call inv100_RegisterItem('tkno', 'BI67', "Tome of Power", "Gives the Hero an experience level.", 1250)
call inv100_RegisterItem('tstr', 'BI68', "Tome of Strength", "Permanently increases Strength.", 150)
call inv100_RegisterItem('ward', 'BI69', "Warsong Battle Drums", "Increases combat effectiveness of nearby units.", 500)
call inv100_RegisterItem('will', 'BI70', "Wand of Illusion", "Creates a phantom double.", 150)
call inv100_RegisterItem('wneg', 'BI71', "Wand of Negation", "Dispels magic in an area.", 200)
call inv100_RegisterItem('rdis', 'BI72', "Rune of Dispel Magic", "Dispels magic in the surrounding area.", 75)
call inv100_RegisterItem('rwat', 'BI73', "Rune of the Watcher", "Creates an invulnerable Sentry Ward here.", 75)
call inv100_RegisterItem('fgrd', 'BI74', "Red Drake Egg", "Summons a Red Drake.", 450)
call inv100_RegisterItem('fgrg', 'BI75', "Stone Token", "Summons a Rock Golem.", 450)
call inv100_RegisterItem('fgdg', 'BI76', "Demonic Figurine", "Summons a Doom Guard.", 750)
call inv100_RegisterItem('fgfh', 'BI77', "Spiked Collar", "Summons a Fel Stalker.", 450)
call inv100_RegisterItem('fgsk', 'BI78', "Book of the Dead", "Summons skeletons.", 450)
call inv100_RegisterItem('ktrm', 'BI79', "Urn of King Terenas", "This urn contains the remains of King Terenas.", 200)
call inv100_RegisterItem('sehr', 'BI80', "The Heart of Searinox", "The heart of the Dragon Searinox.", 200)
call inv100_RegisterItem('azhr', 'BI81', "Heart of Aszune", "The magical amulet Heart of Aszune.", 200)
call inv100_RegisterItem('bzbe', 'BI82', "Empty Vial", "This is an empty vial.", 200)
call inv100_RegisterItem('bzbf', 'BI83', "Full Vial", "This vial is full of healing waters.", 200)
call inv100_RegisterItem('cnhn', 'BI84', "Horn of Cenarius", "This is the Horn of Cenarius.", 200)
call inv100_RegisterItem('glsk', 'BI85', "Skull of Gul'dan", "This is the Skull of Gul'dan.", 200)
call inv100_RegisterItem('engs', 'BI86', "Enchanted Gemstone", "This is an enchanted gemstone.", 200)
call inv100_RegisterItem('k3m1', 'BI87', "Mooncrystal", "This is one part of the Key of Three Moons.", 200)
call inv100_RegisterItem('k3m2', 'BI88', "Partial Key of the Three Moons", "This is two parts of the Key of Three Moons.", 200)
call inv100_RegisterItem('k3m3', 'BI89', "Key of Three Moons", "This is the complete Key of Three Moons.", 200)
call inv100_RegisterItem('modt', 'BI90', "Mask of Death", "This mask causes the Hero's attacks to drain life.", 1000)
call inv100_RegisterItem('sand', 'BI91', "Scroll of Animate Dead", "Animates the dead to fight for you.", 750)
call inv100_RegisterItem('srrc', 'BI92', "Scroll of Resurrection", "Resurrects your dead to fight again.", 750)
call inv100_RegisterItem('rre1', 'BI93', "Rune of Lesser Resurrection", "Resurrects your dead to fight again.", 100)
call inv100_RegisterItem('rre2', 'BI94', "Rune of Greater Resurrection", "Resurrects your dead to fight again.", 300)
call inv100_RegisterItem('rspl', 'BI95', "Rune of Spirit Link", "Links units together to distribute damage.", 150)
call inv100_RegisterItem('sror', 'BI96', "Scroll of the Beast", "Boosts friendly unit combat damage.", 400)
call inv100_RegisterItem('infs', 'BI97', "Inferno Stone", "Brings down an Infernal Demon.", 750)
call inv100_RegisterItem('shar', 'BI98', "Ice Shard", "Summons an Ice Revenant.", 750)
call inv100_RegisterItem('wild', 'BI99', "Amulet of the Wild", "Summons a Furbolg.", 750)
call inv100_RegisterItem('wswd', 'BJ00', "Sentry Wards", "Conjures a Sentry Ward.", 150)
call inv100_RegisterItem('whwd', 'BJ01', "Healing Wards", "Conjures a Healing Ward.", 600)
call inv100_RegisterItem('wlsd', 'BJ02', "Wand of Lightning Shield", "Casts Lightning Shield.", 150)
call inv100_RegisterItem('wcyc', 'BJ03', "Wand of the Wind", "Casts Cyclone.", 450)
call inv100_RegisterItem('rnec', 'BJ04', "Rod of Necromancy", "Creates two Skeleton Warriors from a corpse.", 150)
call inv100_RegisterItem('pams', 'BJ05', "Anti-magic Potion", "Renders Hero immune to magic.", 100)
call inv100_RegisterItem('clfm', 'BJ06', "Cloak of Flames", "Surrounds the Hero with damaging flames.", 600)
call inv100_RegisterItem('evtl', 'BJ07', "Talisman of Evasion", "Makes the Hero harder to hit.", 400)
call inv100_RegisterItem('nspi', 'BJ08', "Necklace of Spell Immunity", "Grants immunity to magic.", 1000)
call inv100_RegisterItem('lhst', 'BJ09', "The Lion Horn of Stormwind", "Generates a protective aura around the Hero.", 400)
call inv100_RegisterItem('kpin', 'BJ10', "Khadgar's Pipe of Insight", "Nearby units regain mana more swiftly.", 500)
call inv100_RegisterItem('sbch', 'BJ11', "Scourge Bone Chimes", "Nearby units gain some life from damage they deal to enemy units.", 450)
call inv100_RegisterItem('afac', 'BJ12', "Alleria's Flute of Accuracy", "Nearby units' missile attacks do more damage.", 400)
call inv100_RegisterItem('ajen', 'BJ13', "Ancient Janggo of Endurance", "Nearby units move and attack more swiftly.", 500)
call inv100_RegisterItem('lgdh', 'BJ14', "Legion Doom-Horn", "Nearby units heal and move more swiftly.", 400)
call inv100_RegisterItem('hcun', 'BJ15', "Hood of Cunning", "Provides bonuses to Agility and Intelligence.", 500)
call inv100_RegisterItem('mcou', 'BJ16', "Medallion of Courage", "Provides bonuses to Strength and Intelligence.", 500)
call inv100_RegisterItem('hval', 'BJ17', "Helm of Valor", "Provides bonuses to Strength and Agility.", 500)
call inv100_RegisterItem('cnob', 'BJ18', "Circlet of Nobility", "Provides a +2 bonus to Strength, Agility and Intelligence.", 175)
call inv100_RegisterItem('prvt', 'BJ19', "Periapt of Vitality", "Increases the hit points of the Hero.", 350)
call inv100_RegisterItem('tgxp', 'BJ20', "Tome of Greater Experience", "Gives bonus experience points.", 1000)
call inv100_RegisterItem('mnst', 'BJ21', "Mana Stone", "Provides faster mana regeneration, and can be consumed for mana.", 450)
call inv100_RegisterItem('hlst', 'BJ22', "Health Stone", "Provides faster regeneration, and can be consumed for hit points.", 450)
call inv100_RegisterItem('tpow', 'BJ23', "Tome of Knowledge", "Permanently increases Strength, Agility and Intelligence.", 300)
call inv100_RegisterItem('tst2', 'BJ24', "Tome of Strength +2", "Permanently increases Strength.", 300)
call inv100_RegisterItem('tin2', 'BJ25', "Tome of Intelligence +2", "Permanently increases Intelligence.", 300)
call inv100_RegisterItem('tdx2', 'BJ26', "Tome of Agility +2", "Permanently increases Agility.", 300)
call inv100_RegisterItem('rde0', 'BJ27', "Ring of Protection +1", "Boosts armor by 1.", 50)
call inv100_RegisterItem('rde4', 'BJ28', "Ring of Protection +5", "Boosts armor by 5.", 800)
call inv100_RegisterItem('rat6', 'BJ29', "Claws of Attack +6", "Boosts attack damage by 6.", 100)
call inv100_RegisterItem('rat9', 'BJ30', "Claws of Attack +9", "Boosts attack damage by 9.", 400)
call inv100_RegisterItem('ratc', 'BJ31', "Claws of Attack +12", "Boosts attack damage by 12.", 500)
call inv100_RegisterItem('ratf', 'BJ32', "Claws of Attack +15", "Boosts attack damage by 15.", 800)
call inv100_RegisterItem('manh', 'BJ33', "Manual of Health", "Permanent +50 hit points.", 200)
call inv100_RegisterItem('pmna', 'BJ34', "Pendant of Mana", "Provides additional mana.", 500)
call inv100_RegisterItem('penr', 'BJ35', "Pendant of Energy", "Provides additional mana.", 400)
call inv100_RegisterItem('gcel', 'BJ36', "Gloves of Haste", "Increases attack speed.", 100)
call inv100_RegisterItem('ledg', 'BJ37', "Gerard's Lost Ledger", "A ledger.", 200)
call inv100_RegisterItem('totw', 'BJ38', "Talisman of the Wild", "Summons Furbolgs.", 450)
call inv100_RegisterItem('kybl', 'BJ39', "Blood Key", "A bloody key.", 200)
call inv100_RegisterItem('kygh', 'BJ40', "Ghost Key", "A ghostly key.", 200)
call inv100_RegisterItem('kysn', 'BJ41', "Sun Key", "A glowing key.", 200)
call inv100_RegisterItem('kymn', 'BJ42', "Moon Key", "A faintly glowing key.", 200)
call inv100_RegisterItem('phlt', 'BJ43', "Phat Lewt", "The phattest lewt, definitely.", 500)
call inv100_RegisterItem('gopr', 'BJ44', "Glyph of Purification", "A glyph.", 250)
call inv100_RegisterItem('ches', 'BJ45', "Cheese", "It's the Cheese!", 250)
call inv100_RegisterItem('mlst', 'BJ46', "Maul of Strength", "Boosts Strength by 1.", 50)
call inv100_RegisterItem('rnsp', 'BJ47', "Ring of Superiority", "Provides a +1 bonus to Strength, Agility and Intelligence.", 100)
call inv100_RegisterItem('brag', 'BJ48', "Bracer of Agility", "Boosts Agility by 1.", 50)
call inv100_RegisterItem('sksh', 'BJ49', "Skull Shield", "Boosts Strength by 1.", 200)
call inv100_RegisterItem('vddl', 'BJ50', "Voodoo Doll", "Boosts Intelligence by 1.", 50)
call inv100_RegisterItem('sprn', 'BJ51', "Spider Ring", "Boosts Agility by 1.", 50)
call inv100_RegisterItem('tmmt', 'BJ52', "Totem of Might", "Boosts Strength by 1.", 50)
call inv100_RegisterItem('anfg', 'BJ53', "Ancient Figurine", "Boosts Intelligence by 1.", 150)
call inv100_RegisterItem('lnrn', 'BJ54', "Lion's Ring", "Boosts Agility by 1.", 50)
call inv100_RegisterItem('iwbr', 'BJ55', "Ironwood Branch", "Boosts Strength by 1.", 50)
call inv100_RegisterItem('jdrn', 'BJ56', "Jade Ring", "Boosts Agility by 1.", 50)
call inv100_RegisterItem('drph', 'BJ57', "Druid Pouch", "Boosts Intelligence by 1.", 50)
call inv100_RegisterItem('hslv', 'BJ58', "Healing Salve", "Regenerates lost hit points over time.", 100)
call inv100_RegisterItem('pclr', 'BJ59', "Clarity Potion", "Regenerates mana over time.", 160)
call inv100_RegisterItem('plcl', 'BJ60', "Lesser Clarity Potion", "Regenerates mana over time.", 70)
call inv100_RegisterItem('rej1', 'BJ61', "Minor Replenishment Potion", "Regenerates health and mana.", 20)
call inv100_RegisterItem('rej2', 'BJ62', "Lesser Replenishment Potion", "Regenerates health and mana.", 36)
call inv100_RegisterItem('rej3', 'BJ63', "Replenishment Potion", "Regenerates health and mana.", 60)
call inv100_RegisterItem('rej4', 'BJ64', "Greater Replenishment Potion", "Regenerates health and mana.", 120)
call inv100_RegisterItem('rej5', 'BJ65', "Lesser Scroll of Replenishment ", "Regenerates the health and mana of nearby units.", 160)
call inv100_RegisterItem('rej6', 'BJ66', "Greater Scroll of Replenishment ", "Regenerates the health and mana of nearby units.", 200)
call inv100_RegisterItem('sreg', 'BJ67', "Scroll of Regeneration", "Regenerates the health of nearby units.", 100)
call inv100_RegisterItem('gold', 'BJ68', "Gold Coins", "Gives gold to player.", 150)
call inv100_RegisterItem('lmbr', 'BJ69', "Bundle of Lumber", "Gives lumber to player.", 150)
call inv100_RegisterItem('fgun', 'BJ70', "Flare Gun", "Reveals an area on the map.", 125)
call inv100_RegisterItem('pomn', 'BJ71', "Potion of Omniscience", "Reveals the entire map.", 400)
call inv100_RegisterItem('gomn', 'BJ72', "Glyph of Omniscience", "Reveals the entire map.", 300)
call inv100_RegisterItem('wneu', 'BJ73', "Wand of Neutralization", "Dispels magical effects in a chain.", 150)
call inv100_RegisterItem('silk', 'BJ74', "Spider Silk Broach", "Webs a target air unit.", 50)
call inv100_RegisterItem('lure', 'BJ75', "Monster Lure", "Draws nearby creeps to ward.", 200)
call inv100_RegisterItem('skul', 'BJ76', "Sacrificial Skull", "Creates Blight at a target location.", 50)
call inv100_RegisterItem('moon', 'BJ77', "Moonstone", "Makes it night time.", 50)
call inv100_RegisterItem('brac', 'BJ78', "Runed Bracers", "Reduces Magic damage to Hero.", 400)
call inv100_RegisterItem('vamp', 'BJ79', "Vampiric Potion", "Damage bonus and life-stealing attack.", 75)
call inv100_RegisterItem('woms', 'BJ80', "Wand of Mana Stealing", "Steals mana.", 400)
call inv100_RegisterItem('tcas', 'BJ81', "Tiny Castle", "Creates a Castle.", 800)
call inv100_RegisterItem('tgrh', 'BJ82', "Tiny Great Hall", "Creates a Great Hall.", 600)
call inv100_RegisterItem('tsct', 'BJ83', "Ivory Tower", "Creates a Scout Tower.", 30)
call inv100_RegisterItem('wshs', 'BJ84', "Wand of Shadowsight", "Grants vision of a target unit.", 150)
call inv100_RegisterItem('tret', 'BJ85', "Tome of Retraining", "Unlearns a Hero's skills.", 300)
call inv100_RegisterItem('sneg', 'BJ86', "Arcane Staff", "Dispels magic in an area.", 138)
call inv100_RegisterItem('stel', 'BJ87', "Staff of Teleportation", "Teleports the Hero.", 100)
call inv100_RegisterItem('spre', 'BJ88', "Staff of Preservation", "Teleports a target unit home.", 150)
call inv100_RegisterItem('mcri', 'BJ89', "Mechanical Critter", "Creates a mechanical critter.", 50)
call inv100_RegisterItem('spsh', 'BJ90', "Amulet of Spell Shield", "Blocks enemy spells.", 400)
call inv100_RegisterItem('rsps', 'BJ91', "Rune of Shielding", "Gives nearby units a shield that blocks an enemy spell.", 300)
call inv100_RegisterItem('sbok', 'BJ92', "Spell Book", "A book full of random spells.", 325)
call inv100_RegisterItem('ssan', 'BJ93', "Staff of Sanctuary", "Heals and teleports a unit.", 250)
call inv100_RegisterItem('shas', 'BJ94', "Scroll of Speed", "Increases movement speed of units.", 50)
call inv100_RegisterItem('rspd', 'BJ95', "Rune of Speed", "Increases movement speed of units.", 200)
call inv100_RegisterItem('dust', 'BJ96', "Dust of Appearance", "Reveals invisible units.", 75)
call inv100_RegisterItem('oslo', 'BJ97', "Orb of Slow", "Attacks can slow enemies.", 550)
call inv100_RegisterItem('rreb', 'BJ98', "Rune of Rebirth", "Makes a monster yours.", 250)
call inv100_RegisterItem('dsum', 'BJ99', "Diamond of Summoning", "Summons your units to your Hero.", 400)
call inv100_RegisterItem('sor1', 'BK00', "Shadow Orb +1", "Gul'dan's Shadow Orb.", 50)
call inv100_RegisterItem('sor2', 'BK01', "Shadow Orb +2", "Gul'dan's Shadow Orb.", 100)
call inv100_RegisterItem('sor3', 'BK02', "Shadow Orb +3", "Gul'dan's Shadow Orb.", 200)
call inv100_RegisterItem('sor4', 'BK03', "Shadow Orb +4", "Gul'dan's Shadow Orb.", 300)
call inv100_RegisterItem('sor5', 'BK04', "Shadow Orb +5", "Gul'dan's Shadow Orb.", 350)
call inv100_RegisterItem('sor6', 'BK05', "Shadow Orb +6", "Gul'dan's Shadow Orb.", 400)
call inv100_RegisterItem('sor7', 'BK06', "Shadow Orb +7", "Gul'dan's Shadow Orb.", 550)
call inv100_RegisterItem('sor8', 'BK07', "Shadow Orb +8", "Gul'dan's Shadow Orb.", 700)
call inv100_RegisterItem('sor9', 'BK08', "Shadow Orb +9", "Gul'dan's Shadow Orb.", 900)
call inv100_RegisterItem('sora', 'BK09', "Shadow Orb +10", "Gul'dan's Shadow Orb.", 1250)
call inv100_RegisterItem('sorf', 'BK10', "Shadow Orb Fragment", "A fragment of the Shadow Orb.", 200)
call inv100_RegisterItem('fwss', 'BK11', "Frost Wyrm Skull Shield", "A powerful Undead artifact.", 750)
call inv100_RegisterItem('gmfr', 'BK12', "Gem Fragment", "A Gem Fragment from a powerful ring.", 200)
call inv100_RegisterItem('ram1', 'BK13', "Ring of the Archmagi", "A powerful artifact with a shattered gem.", 125)
call inv100_RegisterItem('ram2', 'BK14', "Ring of the Archmagi", "A powerful artifact with a fragmented gem.", 300)
call inv100_RegisterItem('ram3', 'BK15', "Ring of the Archmagi", "A powerful artifact with a nearly intact gem.", 550)
call inv100_RegisterItem('ram4', 'BK16', "Ring of the Archmagi", "A powerful artifact with a wondrous gem.", 750)
call inv100_RegisterItem('shtm', 'BK17', "Shamanic Totem", "A powerful Orcish artifact.", 600)
call inv100_RegisterItem('esaz', 'BK18', "Essence of Aszune", "A powerful Night Elf artifact.", 600)
call inv100_RegisterItem('jpnt', 'BK19', "Note to Jaina Proudmoore", "A note to Jaina Proudmoore.", 200)
call inv100_RegisterItem('shwd', 'BK20', "Shimmerweed", "A shimmering plant.", 200)
call inv100_RegisterItem('btst', 'BK21', "Battle Standard", "Thrall's Battle Standard.", 1000)
call inv100_RegisterItem('skrt', 'BK22', "Skeletal Artifact", "Soulfeast the Devourer.", 250)
call inv100_RegisterItem('thle', 'BK23', "Thunder Lizard Egg", "Massive Lizard Egg.", 200)
call inv100_RegisterItem('sclp', 'BK24', "Secret Level Powerup", "Unlocks a secret level!", 75)
call inv100_RegisterItem('gldo', 'BK25', "Orb of Kil'jaeden", "Attacks also do fire damage.", 450)
call inv100_RegisterItem('wtlg', 'BK26', "Wirt's Leg", "The One Leg.", 200)
call inv100_RegisterItem('wolg', 'BK27', "Wirt's Other Leg", "The One Other Leg.", 200)
call inv100_RegisterItem('tbsm', 'BK28', "Tiny Blacksmith", "Creates a Blacksmith.", 200)
call inv100_RegisterItem('tfar', 'BK29', "Tiny Farm", "Creates a Farm.", 75)
call inv100_RegisterItem('tlum', 'BK30', "Tiny Lumber Mill", "Creates a Lumber Mill.", 150)
call inv100_RegisterItem('tbar', 'BK31', "Tiny Barracks", "Creates a Barracks.", 160)
call inv100_RegisterItem('tbak', 'BK32', "Tiny Altar of Kings", "Creates a Altar of Kings.", 180)
call inv100_RegisterItem('mgtk', 'BK33', "Magic Key Chain", "A key chain.", 200)
call inv100_RegisterItem('stre', 'BK34', "Staff of Reanimation", "Animates a corpse.", 200)
call inv100_RegisterItem('horl', 'BK35', "Sacred Relic", "A sacred shaman artifact.", 950)
call inv100_RegisterItem('hbth', 'BK36', "Helm of Battlethirst", "|cff8b00ffUnique|r|nThis helm makes you crave combat.", 4200)
call inv100_RegisterItem('blba', 'BK37', "Bladebane Armor", "Increases armor.", 3500)
call inv100_RegisterItem('rugt', 'BK38', "Runed Gauntlets", "Increases strength and armor.", 725)
call inv100_RegisterItem('frhg', 'BK39', "Firehand Gauntlets", "Fiery gauntlets that increase armor and attack rate.", 3500)
call inv100_RegisterItem('gvsm', 'BK40', "Gloves of Spell Mastery", "|cff8b00ffUnique|r|nThese gloves have a highly magical nature.", 1400)
call inv100_RegisterItem('crdt', 'BK41', "Crown of the Deathlord", "|cffff8c00Artifact|r|nA simple crown with the emblem of an unfamiliar Paladin order on it.", 6400)
call inv100_RegisterItem('arsc', 'BK42', "Arcane Scroll", "Restores hit points, mana and increases armor to nearby units.", 1000)
call inv100_RegisterItem('scul', 'BK43', "Scroll of the Unholy Legion", "Animates nearby corpses.", 950)
call inv100_RegisterItem('tmsc', 'BK44', "Tome of Sacrifices", "|cff8b00ffUnique|r|nAn evil looking tome with runes of necromancy etched into the binding.", 1250)
call inv100_RegisterItem('dtsb', 'BK45', "Drek'thar's Spellbook", "|cffff8c00Artifact|r|nA seemingly simple spellbook, handed down from a master Farseer, Drek'thar.", 3350)
call inv100_RegisterItem('grsl', 'BK46', "Grimoire of Souls", "|cff87ceebUnique Consumable|r|nPermanently increases hit points.", 1350)
call inv100_RegisterItem('arsh', 'BK47', "Arcanite Shield", "Increases armor and reduces damage from ranged attacks.", 3500)
call inv100_RegisterItem('shdt', 'BK48', "Shield of the Deathlord", "|cffff8c00Artifact|r|nA magical shield with the emblem of an unfamiliar Paladin order on it.", 9000)
call inv100_RegisterItem('shhn', 'BK49', "Shield of Honor", "|cff8b00ffUnique|r|nA Kul Tiras navy commander's shield.", 3350)
call inv100_RegisterItem('shen', 'BK50', "Enchanted Shield", "Increases armor and hit points.", 650)
call inv100_RegisterItem('thdm', 'BK51', "Thunderlizard Diamond", "|cff8b00ffUnique|r|nA massive diamond that crackles with electricity.", 1190)
call inv100_RegisterItem('stpg', 'BK52', "Clockwork Penguin", "A small clockwork penguin that squeaks.", 450)
call inv100_RegisterItem('shrs', 'BK53', "Shimmerglaze Roast", "Restores lost hit points.", 150)
call inv100_RegisterItem('bfhr', 'BK54', "Bloodfeather's Heart", "|cff8b00ffUnique|r|nThe heart of Bloodfeather.", 22)
call inv100_RegisterItem('cosl', 'BK55', "Celestial Orb of Souls", "|cffff8c00Artifact|r|nA bright glowing orb that instills peace.", 10000)
call inv100_RegisterItem('shcw', 'BK56', "Shaman Claws", "|cff8b00ffUnique|r|nIncreases attack damage and dispels magic.", 950)
call inv100_RegisterItem('srbd', 'BK57', "Runed Blade", "Shining steel blade, with runes on it, which gives it the power.", 994)
call inv100_RegisterItem('frgd', 'BK58', "Steel Blade", "Shining steel blade.", 1400)
call inv100_RegisterItem('envl', 'BK59', "Enchanted Vial", "Regenerates health and mana.", 450)
call inv100_RegisterItem('rump', 'BK60', "Rusty Mining Pick", "Rusty pickle.", 16)
call inv100_RegisterItem('mort', 'BK61', "Mogrin's Report", "A letter for Thrall.", 200)
call inv100_RegisterItem('srtl', 'BK62', "Runed axe", "Shining steel axe, with runes on it, which gives it the power.", 1152)
call inv100_RegisterItem('stwa', 'BK63', "Copper axe", "Simple copper axe.", 88)
call inv100_RegisterItem('klmm', 'BK64', "Killmaim", "|cffff8c00Artifact|r|nA slender crescent axe that smells of blood and salt.", 7500)
call inv100_RegisterItem('rots', 'BK65', "Scepter of the Sea", "|cff87ceebUnique Consumable|r|nSummons murlocs.", 1000)
call inv100_RegisterItem('axas', 'BK66', "Ancestral Staff", "|cffff8c00Artifact|r|nThis intricate staff has many names carved into it.", 3000)
call inv100_RegisterItem('mnsf', 'BK67', "Mindstaff", "Increases mana.", 1800)
call inv100_RegisterItem('schl', 'BK68', "Scepter of Healing", "A staff that heals others.", 4200)
call inv100_RegisterItem('asbl', 'BK69', "Assassin's Blade", "Increases attack damage.", 2000)
call inv100_RegisterItem('kgal', 'BK70', "Keg of Ale", "Alcohol drink.", 850)
call inv100_RegisterItem('dphe', 'BK71', "Thunder Phoenix Egg", "A rare egg of a Thunder Hawk.", 200)
call inv100_RegisterItem('dkfw', 'BK72', "Keg of Thunderwater", "A keg filled to the brim with the strongest drink available this side of Khaz Modan!", 12)
call inv100_RegisterItem('dthb', 'BK73', "Thunderbloom Bulb", "An exotic plant well known for its unstable and dangerous properties.", 200)
call inv100_RegisterItem('I000', 'B000', "Copper Blade", "Old copper blade.", 76)
call inv100_RegisterItem('I001', 'B001', "Frostguard", "|cffff8c00Artifact. |r This dagger, made of Safiron's tooth, release cold.", 426)
call inv100_RegisterItem('I002', 'B002', "Wood Shield", "Simple wood shield.", 50)
call inv100_RegisterItem('I003', 'B003', "Scroll of Fireball", "This scroll have a fireball spell.", 120)
call inv100_RegisterItem('I004', 'B004', "Copper rifle", "Old copper rifle.", 200)
call inv100_RegisterItem('I005', 'B005', "Copper bullets", "Simple bullets.", 10)
call inv100_RegisterItem('I006', 'B006', "Steel axe", "Shining steel axe.", 366)
call inv100_RegisterItem('I007', 'B007', "Shell", "Simple shell.", 2)
call inv100_RegisterItem('I008', 'B008', "Copper spear", "Old copper spear.", 104)
call inv100_RegisterItem('I009', 'B009', "Scroll of Shadowbolt", "This scroll have a shadowbolt spell.", 120)
call inv100_RegisterItem('I00A', 'B00A', "Copper Shield", "Old copper shield.", 96)
call inv100_RegisterItem('I00B', 'B00B', "Scroll of Nature Wrath", "This scroll have a nature wrath spell.", 120)
call inv100_RegisterItem('I00C', 'B00C', "Scroll of Lightningball", "This scroll have a lightningball spell.", 120)
call inv100_RegisterItem('I00D', 'B00D', "Scroll of Holybolt", "This scroll have a holybolt spell.", 130)
call inv100_RegisterItem('I00E', 'B00E', "Copper Dagger", "Old copper dagger.", 64)
call inv100_RegisterItem('I00F', 'B00F', "Venomed dagger", "Old copper dagger.", 104)
call inv100_RegisterItem('I00G', 'B00G', "Defended Shield", "Simple wood shield, with a copper.", 146)
call inv100_RegisterItem('I00H', 'B00H', "Steel Shield", "Shining steel shield.", 188)
call inv100_RegisterItem('I00I', 'B00I', "Steeled wooden shield", "Simple wood shield, with a steel.", 190)
call inv100_RegisterItem('I00J', 'B00J', "Warrior's Abilities", "Book for warrioirs. Rank 1.", 330)
call inv100_RegisterItem('I00K', 'B00K', "Linen web", "You have a ensnare ability.", 64)
call inv100_RegisterItem('I00L', 'B00L', "Green mushroom", "Alchemy ingredient.", 10)
call inv100_RegisterItem('I00M', 'B00M', "Blue mushroom", "Alchemy ingredient.", 16)
call inv100_RegisterItem('I00N', 'B00N', "Paladin's Abilities", "Book for paladins. Rank 1.", 330)
call inv100_RegisterItem('I00O', 'B00O', "Leather boots", "This boots give to you a light walk ability.", 240)
call inv100_RegisterItem('I00P', 'B00P', "Fishing Rod", "The Fishing Rod allows you to catch a fish.", 30)
call inv100_RegisterItem('I00Q', 'B00Q', "Small fish", "Small Fish are Fished from the water.", 10)
call inv100_RegisterItem('I00R', 'B00R', "Copper Dagger", "Old copper dagger.", 64)
call inv100_RegisterItem('I00U', 'B00U', "Flask of poison", "In this bottle simple poison.", 42)
call inv100_RegisterItem('I010', 'B010', "Detail", "Enginering detail.", 50)
call inv100_RegisterItem('I01J', 'B01I', "Frostmourne", "Legendary frost sword of Arthas.", 2500)
call inv100_RegisterItem('I01K', 'B01I', "Frostmourne", "Legendary frost sword of Arthas.", 2500)
call inv100_RegisterItem('I01L', 'B00R', "Bronze Dagger", "Not bad bronze dagger.", 94)
call inv100_RegisterItem('I01M', 'B00R', "Bronze Dagger", "Not bad bronze dagger.", 94)
call inv100_RegisterItem('I01N', 'B00R', "Iron Dagger", "Good iron dagger.", 124)
call inv100_RegisterItem('I01O', 'B00R', "Iron Dagger", "Good iron dagger.", 124)
call inv100_RegisterItem('I01P', 'B01J', "Helm 1", " ", 1000)
call inv100_RegisterItem('I01Q', 'B01K', "Helm 2", " ", 1000)
call inv100_RegisterItem('I01R', 'B01L', "Helm 3", " ", 1000)
call inv100_RegisterItem('I01S', 'B01M', "Helm 4", " ", 1000)
call inv100_RegisterItem('I01T', 'B01N', "Helm 5", " ", 1000)
call inv100_RegisterItem('I01U', 'B01O', "Helm 6", " ", 1000)
call inv100_RegisterItem('I01V', 'B01P', "Helm 7", " ", 1000)
call inv100_RegisterItem('I01W', 'B01Q', "Helm 8", " ", 1000)
call inv100_RegisterItem('I01X', 'B01R', "Helm 9", " ", 1000)
call inv100_RegisterItem('I01Y', 'B01S', "Helm 10", " ", 1000)
call inv100_RegisterItem('I01Z', 'B01T', "Helm 11", " ", 1000)
call inv100_RegisterItem('I020', 'B01U', "Helm 12", " ", 1000)
call inv100_RegisterItem('I021', 'B01V', "Helm 13", " ", 1000)
call inv100_RegisterItem('I022', 'B01W', "Helm 14", " ", 1000)
call inv100_RegisterItem('I023', 'B01X', "Helm 15", " ", 1000)
call inv100_RegisterItem('I024', 'B01Y', "Helm 16", " ", 1000)
endfunction