SleepyFox 5 years ago
parent
commit
6a4efc7211

+ 5 - 2
MakeQSP.bat

@@ -53,11 +53,15 @@ if defined NOT_FOUND (
 	set NOT_FOUND=
 )
 
+set action=f
+goto skip
+
 echo.
 echo ACTIONS: (B)uild  (R)un  (F)ull  (Q)Gen  (E)xit
 echo.
 set /p action=Choose an action:
 
+:skip
 if defined QSPFILE (
 	if %action% == b goto build
 	if %action% == r goto run
@@ -75,7 +79,7 @@ echo.
 echo Building ...
 
 @ECHO ON
-python -3 txtmerge.py locations glife.txt
+python txtmerge.py locations glife.txt
 txt2gam.exe glife.txt %QSPFILE% > nul
 @ECHO OFF
 
@@ -84,7 +88,6 @@ if defined CP_TO ( echo Copying %QSPFILE% to "%CP_TO%" ... & copy %QSPFILE% %CP_
 
 echo.
 echo Done.
-pause
 if %action% == f ( goto run ) else ( goto menu )
 
 :qgen

+ 26 - 0
glife.qproj

@@ -19,6 +19,7 @@
 		<Location name="saveposition"/>
 		<Location name="mod_setting"/>
 		<Location name="$difficulty"/>
+		<Location name="KILLVARS"/>
 	</Folder>
 	<Folder name="Stats">
 		<Location name="DNA"/>
@@ -901,6 +902,31 @@
 		<Location name="FSfight"/>
 		<Location name="FSroom"/>
 	</Folder>
+	<Folder name="Game 5">
+		<Location name="DH_Functions"/>
+		<Location name="DH_Main"/>
+		<Location name="DH_QuestManager"/>
+		<Location name="DH_Quest_NewBeginnings"/>
+		<Location name="DH_Achievements"/>
+		<Location name="DH_Character"/>
+		<Location name="DH_Creatures"/>
+		<Location name="DH_NPCs"/>
+		<Location name="DH_Player"/>
+		<Location name="DH_Classes"/>
+		<Location name="DH_Races"/>
+		<Location name="DH_Inventory"/>
+		<Location name="DH_Gear_Heads"/>
+		<Location name="DH_Gear_Suits"/>
+		<Location name="DH_Gear_Chests"/>
+		<Location name="DH_Gear_Legs"/>
+		<Location name="DH_Gear_Gloves"/>
+		<Location name="DH_Gear_Feet"/>
+		<Location name="DH_Gear_Shoulders"/>
+		<Location name="DH_Gear_Cloaks"/>
+		<Location name="DH_Gear_Wings"/>
+		<Location name="DH_Gear_Shields"/>
+		<Location name="DH_Gear_Weapons"/>
+	</Folder>
 	<Folder name="Youth Shop">
 		<Location name="young_shop"/>
 		<Location name="sell_young_clothes"/>

+ 8 - 0
locations/DH_Achievements.qsrc

@@ -0,0 +1,8 @@
+# DH_Achievements
+
+!! Keeps track of kill stats for each enemy (used for lore?)
+!! Keeps track of damage stats, deaths, etc.
+!! Keeps track of achievements
+
+--- DH_Achievements ---------------------------------
+

+ 156 - 0
locations/DH_Character.qsrc

@@ -0,0 +1,156 @@
+# DH_Character
+if $ARGS[0] = 'Create':
+	$.id   = $ARGS[1]
+	$.name = iif($ARGS[2] ! '', $ARGS[2], $.id)
+	
+	IF $.id = '': exit
+	
+	if ARRPOS('$dhCh_Chars', $.id) = -1:
+		$dhCh_Chars[] = $.id
+		gs 'DH_Character', 'CreateInfo', $.id, $.name
+		gs 'DH_Character', 'CreateStats', $.id, $.name
+		!!gs 'DH_Inventory', 'NewInventory', $.id
+	end
+	
+	!!gs 'DH_Player', 'CreateStats'
+	
+end
+
+if $ARGS[0] = 'Delete':
+	$.id = $ARGS[1]
+	
+	IF $.id = '': exit
+	
+	_charPos = ARRPOS('$dhCh_Chars', $.id)
+	if _charPos ! -1:
+		!! Info
+		KILLVAR '$dhCh_Name',     _charPos
+		KILLVAR '$dhCh_RaceFull', _charPos
+		KILLVAR '$dhCh_Race',     _charPos
+		KILLVAR '$dhCh_SubRace',  _charPos
+		KILLVAR '$dhCh_Gender',   _charPos
+		KILLVAR '$dhCh_Class',    _charPos
+		
+		!! Stats
+		KILLVAR 'dhCh_Level',       _charPos
+		KILLVAR 'dhCh_StatPoints',  _charPos
+		KILLVAR 'dhCh_Exp',         _charPos
+		KILLVAR 'dhCh_ExpMax',      _charPos
+		
+		KILLVAR 'dhCh_Health',  _charPos
+		KILLVAR 'dhCh_Stamina', _charPos
+		KILLVAR 'dhCh_Mana',    _charPos
+		KILLVAR 'dhCh_Rage',    _charPos
+		KILLVAR 'dhCh_Energy',  _charPos
+		
+		KILLVAR 'dhCh_HealthMax',  _charPos
+		KILLVAR 'dhCh_StaminaMax', _charPos
+		KILLVAR 'dhCh_ManaMax',    _charPos
+		KILLVAR 'dhCh_RageMax',    _charPos
+		KILLVAR 'dhCh_EnergyMax',  _charPos
+		
+		KILLVAR 'dhCh_Agi',  _charPos
+		KILLVAR 'dhCh_Cha',  _charPos
+		KILLVAR 'dhCh_Int',  _charPos
+		KILLVAR 'dhCh_Lore', _charPos
+		KILLVAR 'dhCh_Luck', _charPos
+		KILLVAR 'dhCh_Per',  _charPos
+		KILLVAR 'dhCh_Str',  _charPos
+		
+		KILLVAR 'dhCh_ArmorVal',  _charPos
+		KILLVAR 'dhCh_WeaponDmg', _charPos
+		KILLVAR 'dhCh_CritDmg',   _charPos
+		
+		KILLVAR 'dhCh_DmgPhys',   _charPos
+		KILLVAR 'dhCh_DmgPoison', _charPos
+		KILLVAR 'dhCh_DmgFire',   _charPos
+		KILLVAR 'dhCh_DmgEarth',  _charPos
+		KILLVAR 'dhCh_DmgMetal',  _charPos
+		KILLVAR 'dhCh_DmgWater',  _charPos
+		KILLVAR 'dhCh_DmgWood',   _charPos
+		
+		KILLVAR 'dhCh_ResPhys',   _charPos
+		KILLVAR 'dhCh_ResPoison', _charPos
+		KILLVAR 'dhCh_ResFire',   _charPos
+		KILLVAR 'dhCh_ResEarth',  _charPos
+		KILLVAR 'dhCh_ResMetal',  _charPos
+		KILLVAR 'dhCh_ResWater',  _charPos
+		KILLVAR 'dhCh_ResWood',   _charPos
+		
+		!! CharacterList
+		KILLVAR '$dhCh_Chars', _charPos
+	end
+	
+end
+
+if $ARGS[0] = 'CreateInfo':
+	$.id   = $ARGS[1]
+	$.name = $ARGS[2]
+	
+	$dhCh_Name[$.id]     = $.name
+	$dhCh_RaceFull[$.id] = ''
+	$dhCh_Race[$.id]     = ''
+	$dhCh_SubRace[$.id]  = ''
+	$dhCh_Gender[$.id]   = ''
+	$dhCh_Class[$.id]    = ''
+	
+end
+
+if $ARGS[0] = 'CreateStats':
+	$.id   = $ARGS[1]
+	$.name = $ARGS[2] &! Special names act like cheat codes? Give extra stats
+	
+	dhCh_Level[$.id]      = 1
+	dhCh_StatPoints[$.id] = 0
+	dhCh_Exp[$.id]        = 0
+	dhCh_ExpMax[$.id]     = 100
+	
+	dhCh_Health[$.id]  = 5
+	dhCh_Stamina[$.id] = 5
+	dhCh_Mana[$.id]    = 0
+	dhCh_Rage[$.id]    = 0
+	dhCh_Energy[$.id]  = 0
+	
+	dhCh_HealthMax[$.id]  = 5
+	dhCh_StaminaMax[$.id] = 5
+	dhCh_ManaMax[$.id]    = 0
+	dhCh_RageMax[$.id]    = 0
+	dhCh_EnergyMax[$.id]  = 0
+	
+	dhCh_Agi[$.id]  = 1 &!Agility      - Evasion
+	dhCh_Cha[$.id]  = 1 &!Charisma     - Dialogue choices + shop prices
+	dhCh_Int[$.id]  = 1 &!Intelligence - Magic dmg
+	dhCh_Lore[$.id] = 1 &!Lore         - Puzzle answers + crit(if P lore > E lore)?
+	dhCh_Luck[$.id] = 1 &!Luck         - Loot + crit
+	dhCh_Per[$.id]  = 1 &!Perception   - Find/Alert chance + crit
+	dhCh_Str[$.id]  = 1 &!Strength     - Phys dmg
+	
+	dhCh_Defense[$.id]    = 0
+	dhCh_DmgMin[$.id]     = 0
+	dhCh_DmgMax[$.id]     = 0
+	dhCh_CritMod[$.id]    = 100 &! Percentage modifier (critDmg = dmg * (critMod/100))
+	dhCh_CritChance[$.id] = 5   &! Percentage chance of hitting a crit
+	
+	!! Damage Bonuses (Totals from weapons/accessories)
+	dhCh_DmgPhys[$.id]   = 0
+	dhCh_DmgPoison[$.id] = 0
+	dhCh_DmgFire[$.id]   = 0
+	dhCh_DmgEarth[$.id]  = 0
+	dhCh_DmgMetal[$.id]  = 0
+	dhCh_DmgWater[$.id]  = 0
+	dhCh_DmgWood[$.id]   = 0
+	
+	!! Resistances (Totals from armor/accessories)
+	dhCh_ResPhys[$.id]   = 0
+	dhCh_ResPoison[$.id] = 0
+	dhCh_ResFire[$.id]   = 0
+	dhCh_ResEarth[$.id]  = 0
+	dhCh_ResMetal[$.id]  = 0
+	dhCh_ResWater[$.id]  = 0
+	dhCh_ResWood[$.id]   = 0
+	
+end
+
+
+--- DH_Character ---------------------------------
+

+ 83 - 0
locations/DH_Classes.qsrc

@@ -0,0 +1,83 @@
+# DH_Classes
+if $ARGS[0] = 'Init':
+end
+
+if $ARGS[0] = 'ChangeClass':
+	$.character = $ARGS[1]
+	$.newClass  = $ARGS[2]
+	
+	!! Needs a RESULT
+	if $.newClass = '' or $.character = '': exit & end
+	
+	!! Check class requirements
+	gs 'DH_Classes', $.newClass
+	_canUseClass = True
+	IF FUNC('DH_Races', 'CanUseClass', $dhCh_RaceFull[$.character], $.newClass) = False: _canUseClass = False
+	!! More requirements...
+	IF _canUseClass = False: exit
+	
+	!! Get old stats
+	gs 'DH_Classes', $dhCh_Class[$.character]
+	
+	!! Reset stats
+	dhCh_Agi[$.character]  -= dhCl_Agi
+	dhCh_Cha[$.character]  -= dhCl_Cha
+	dhCh_Int[$.character]  -= dhCl_Int
+	dhCh_Lore[$.character] -= dhCl_Lore
+	dhCh_Luck[$.character] -= dhCl_Luck
+	dhCh_Perd[$.character] -= dhCl_Per
+	dhCh_Str[$.character]  -= dhCl_Str
+	
+	!! Get new stats
+	gs 'DH_Classes', $.newClass
+	
+	$dhCh_Class[$.character] = $dhCl_Class
+	
+	dhCh_Agi[$.character]  += dhRc_Agi
+	dhCh_Cha[$.character]  += dhRc_Cha
+	dhCh_Int[$.character]  += dhRc_Int
+	dhCh_Lore[$.character] += dhRc_Lore
+	dhCh_Luck[$.character] += dhRc_Luck
+	dhCh_Perd[$.character] += dhRc_Per
+	dhCh_Str[$.character]  += dhRc_Str
+	
+end
+
+if $ARGS[0] = 'Brute':
+	$dhRc_Class = 'Brute'
+	
+	dhRc_Health  = 10
+	dhRc_Stamina = 10
+	dhRc_Mana    = 0
+	
+	dhRc_Agi  = 1
+	dhRc_Cha  = 0
+	dhRc_Int  = 0
+	dhRc_Lore = 0
+	dhRc_Luck = 0
+	dhRc_Per  = 1
+	dhRc_Str  = 2
+end
+
+if $ARGS[0] = 'Trickster':
+	$dhRc_Class = 'Trickster'
+	
+	dhRc_Health  = 7
+	dhRc_Stamina = 3
+	dhRc_Mana    = 10
+	
+	dhRc_Agi  = 0
+	dhRc_Cha  = 1
+	dhRc_Int  = 2
+	dhRc_Lore = 1
+	dhRc_Luck = 0
+	dhRc_Per  = 0
+	dhRc_Str  = 0
+end
+
+if $ARGS[0] = 'Pickpocket':
+	
+end
+
+--- DH_Classes ---------------------------------
+

+ 28 - 0
locations/DH_Functions.qsrc

@@ -0,0 +1,28 @@
+# DH_Functions
+
+!! String Format
+if $ARGS[0] = 'FormatStr':
+	$.FUNC_formatStr  = $ARGS[1]
+	$.FUNC_params_[0] = $ARGS[2]
+	
+	_FUNC_i = 0
+	:Loop DH_Functions_FormatStr_Params
+	if _FUNC_i < ARRSIZE('$ARGS') - 2:
+		$.FUNC_params_[_FUNC_i] = $ARGS[_FUNC_i + 2]
+		_FUNC_i += 1
+		jump 'Loop DH_Functions_FormatStr_Params'
+	end
+	
+	_FUNC_i = 0
+	:Loop DH_Functions_FormatStr_Replace
+	if _FUNC_i < ARRSIZE('$.FUNC_params_'):
+		$.FUNC_formatStr = $REPLACE($.FUNC_formatStr, '{<<_FUNC_i>>}', $.FUNC_params_[_FUNC_i])
+		_FUNC_i += 1
+		jump 'Loop DH_Functions_FormatStr_Replace'
+	end
+	
+	$RESULT = $.FUNC_formatStr
+end
+
+--- DH_Functions ---------------------------
+

+ 109 - 0
locations/DH_Gear_Heads.qsrc

@@ -0,0 +1,109 @@
+# DH_Gear_Head
+!! I have to carry an array of all the different item strings
+!! so they can be iterated over and/or randomly chosen from
+!! e.g. for loot or shop items
+
+if $ARGS[0] = 'GetRequired':
+	$.character = $ARGS[1]
+	$.item = $ARGS[2]
+	
+	gs 'DH_Gear_Head', $.item, 'GetRequired'
+	
+	_isMeetsReq = True
+	if     dhCh_Level[$.character] != dhReq_Level : _isMeetsReq = False
+	
+	elseif dhCh_Agi[$.character]   != dhReq_Agi   : _isMeetsReq = False
+	elseif dhCh_Cha[$.character]   != dhReq_Cha   : _isMeetsReq = False
+	elseif dhCh_Int[$.character]   != dhReq_Int   : _isMeetsReq = False
+	elseif dhCh_Lor[$.character]   != dhReq_Lor   : _isMeetsReq = False
+	elseif dhCh_Luc[$.character]   != dhReq_Luc   : _isMeetsReq = False
+	elseif dhCh_Per[$.character]   != dhReq_Per   : _isMeetsReq = False
+	elseif dhCh_Str[$.character]   != dhReq_Str   : _isMeetsReq = False
+	
+	end
+	
+	RESULT = _isMeetsReq
+end
+
+if     $ARGS[0] = 'SimpleWoodenHelmet':
+	if $ARGS[1] = 'GetRequired':
+		dhReq_Level = 0
+		dhReq_Agi = 0
+		dhReq_Cha = 0
+		dhReq_Int = 0
+		dhReq_Lor = 0
+		dhReq_Luc = 0
+		dhReq_Per = 0
+		dhReq_Str = 0
+		exit
+	end
+	
+	$dhArm_Name = 'Simple Wooden Helmet'
+	dhArm_Grade = 1
+	dhArm_Defense = 5
+	dhArm_DurMax = 8
+	dhArm_ResFire = -80
+	dhArm_ResEarth = 0
+	dhArm_ResMetal = 0
+	dhArm_ResWater = 0
+	dhArm_ResWood = 10
+	dhArm_EnExp = 0
+
+elseif $ARGS[0] = 'EpicWoodenHelmet':
+	if $ARGS[1] = 'GetRequired':
+		dhReq_Level = 5
+		dhReq_Agi = 0
+		dhReq_Cha = 0
+		dhReq_Int = 0
+		dhReq_Lor = 0
+		dhReq_Luc = 0
+		dhReq_Per = 0
+		dhReq_Str = 0
+		exit
+	end
+	
+	$dhArm_Name = 'Epic Wooden Helmet'
+	dhArm_Grade = 3
+	dhArm_Defense = 15
+	dhArm_DurMax = 12
+	dhArm_ResFire = -50
+	dhArm_ResEarth = 10
+	dhArm_ResMetal = 0
+	dhArm_ResWater = 5
+	dhArm_ResWood = 25
+	dhArm_EnExp = 5
+
+else
+	!! Unknown Item so reset stats
+	if $ARGS[1] = 'GetRequired':
+		dhReq_Level = 0
+		dhReq_Agi = 0
+		dhReq_Cha = 0
+		dhReq_Int = 0
+		dhReq_Lor = 0
+		dhReq_Luc = 0
+		dhReq_Per = 0
+		dhReq_Str = 0
+		exit
+	end
+	
+	$dhArm_Name   = 'Epic Wooden Helmet'
+	dhArm_Grade   = 0
+	dhArm_Defense = 0
+	dhArm_DurMax  = 0
+	
+	dhArm_ResFire  = 0
+	dhArm_ResEarth = 0
+	dhArm_ResMetal = 0
+	dhArm_ResWater = 0
+	dhArm_ResWood  = 0
+	
+	dhArm_EnExp = 0
+end
+
+!! Equip error helmet if trying to equip an unknown head-gear?
+gs 'DH_Player', 'UnequipGear', 'Head'
+
+--- DH_Gear_Head ---------------------------------
+
+

+ 772 - 0
locations/DH_Inventory.qsrc

@@ -0,0 +1,772 @@
+# DH_Inventory
+!! Format for variables is Variable[CharacterInv_ItemType]
+!!~~ Checks
+	!!~~ Check if inventory exists
+	!!if $.character = '' or ARRPOS($dhInv_, $.character) = -1:
+	!!	$RESULT = $DhInv_Msg_['InventoryFull']
+	!!	jump 'AutoKill '
+	!!end
+	!!~~#
+	
+!!~~#
+
+if $ARGS[0] = 'Init':
+	!!~~ Gear Slots
+	$DhInv_ArmSlot_[0] = 'Head'
+	$DhInv_ArmSlot_[1] = 'Suit'
+	$DhInv_ArmSlot_[2] = 'Chest'
+	$DhInv_ArmSlot_[3] = 'Legs'
+	$DhInv_ArmSlot_[4] = 'Gloves'
+	$DhInv_ArmSlot_[5] = 'Feet'
+	$DhInv_ArmSlot_[6] = 'ShoulderL'
+	$DhInv_ArmSlot_[7] = 'ShoulderR'
+	$DhInv_ArmSlot_[8] = 'Cloak'
+	$DhInv_ArmSlot_[9] = 'Wings'
+	$DhInv_ArmSlot_[10] = 'Shield'
+	
+	$DhInv_WepSlot_[0] = 'MainHand'
+	$DhInv_WepSlot_[1] = 'Offhand'
+	
+	$DhInv_AccSlot_[0] = 'RingL'
+	$DhInv_AccSlot_[1] = 'RingR'
+	$DhInv_AccSlot_[2] = 'Necklace'
+	$DhInv_AccSlot_[3] = 'Earrings'
+	!!~~#
+	
+	!!~~ Item Grades
+	$DhInv_Grade_[0] = 'Junk'      &! Grey
+	$DhInv_Grade_[1] = 'Common'    &! White/Black (depends on bg)
+	$DhInv_Grade_[2] = 'Uncommon'  &! Green
+	$DhInv_Grade_[3] = 'Rare'      &! Blue
+	$DhInv_Grade_[4] = 'Epic'      &! Purple
+	$DhInv_Grade_[5] = 'Legendary' &! Orange
+	$DhInv_Grade_[6] = 'Godlike'   &! Red
+	$DhInv_Grade_[7] = 'Cheat'     &! Pink
+	!!~~#
+	
+	!!~~ Messages
+	$DhInv_Msg_['Error']           = 'Something went wrong. Contact WinkyFace on <a href="tfgamessite.com">tfgamessite.com</a>'
+	$DhInv_Msg_['ReqsNotMet']      = 'You do not meet the requirements to equip this item.'
+	$DhInv_Msg_['InventoryFull']   = 'There are too many items in ''{0}''''s Inventory!'
+	$DhInv_Msg_['NoInventory']     = 'No Inventory exists for the character ''{0}''!'
+	$DhInv_Msg_['InventoryExists'] = 'An Inventory for the character ''{0}'' already exists!'
+	$DhInv_Msg_['InvalidSlot']     = 'No Equipment Slot by the name of ''{0}'' exists!'
+	!!~~#
+	
+	DhInv_DefSlots = 8 &!The default number of slots for any Inventory
+end
+
+if $ARGS[0] = 'NewInventory':
+	$.character = $ARGS[1]
+	.slots = iif(ARGS[2] > 0, ARGS[2], DhInv_DefSlots)
+	
+	!! Check if inventory exists
+	if ARRPOS($dhInv_, $.character) ! -1:
+		$RESULT = FUNC('DH_Functions', 'FormatStr', $DhInv_Msg_['InventoryExists'], $.character)
+		exit
+	end
+	
+	!! Create the inventory
+	$dhInv_[] = $.character
+	dhInv_Slots[$.character + 'Inv'] = .slots
+	
+	_i = 0
+	:Loop DH_Inventory_NewInventory_GenerateSlots
+	if _i < dhInv_Slots[$.character + 'Inv']
+		$dhInv_Slot[$.character + 'Inv_Slot' + _i] = 'Empty'
+		_i += 1
+		jump 'Loop DH_Inventory_NewInventory_GenerateSlots'
+	end
+	
+	gs 'DH_Inventory', 'Unequip', $.character, 'All'
+	gs 'DH_Inventory', 'RemoveItem', $.character, 'All'
+	
+end
+
+if $ARGS[0] = 'DeleteInventory':
+	!! Check if inventory exists
+	if ARRPOS($dhInv_, $.character) = -1:
+		$RESULT = FUNC('DH_Functions', 'FormatStr', $DhInv_Msg_['NoInventory'], $.character)
+		exit
+	end
+	
+	$.character = $ARGS[1]
+	_invPos = ARRPOS('$dhInv_', $.character)
+	
+	!!~~ Kill Slots
+	_i = 0
+	_slotStart = 0
+	:Loop DH_Inventory_DeleteInventory_GetSlotStart
+	if _i < _invPos:
+		_slotStart += dhInv_Slots[$dhInv_[_invPos] + 'Inv']
+		_i += 1
+		jump 'Loop DH_Inventory_DeleteInventory_GetSlotStart'
+	end
+	
+	_i = 0
+	:Loop DH_Inventory_DeleteInventory_KillSlots
+	if _i < dhInv_Slots[$.character + 'Inv']
+		KILLVAR '$dhInv_Slot', (_slotStart + _i)
+		_i += 1
+		jump 'Loop DH_Inventory_DeleteInventory_KillSlots'
+	end
+	
+	KILLVAR 'dhInv_Slots', _invPos
+	!!~~#
+	
+	_ArmorSlots = _invPos * ARRSIZE('$DhInv_ArmSlot_')
+	_WeaponSlots = _invPos * ARRSIZE('$DhInv_WepSlot_')
+	!!~~ Kill Equip Slots
+	KILLVAR 'dhEqA_Name_', (_invPos * _ArmorSlots)
+	KILLVAR 'dhEqA_Name_', (_invPos * _ArmorSlots) + 1
+	KILLVAR 'dhEqA_Name_', (_invPos * _ArmorSlots) + 2
+	KILLVAR 'dhEqA_Name_', (_invPos * _ArmorSlots) + 3
+	KILLVAR 'dhEqA_Name_', (_invPos * _ArmorSlots) + 4
+	KILLVAR 'dhEqA_Name_', (_invPos * _ArmorSlots) + 5
+	KILLVAR 'dhEqA_Name_', (_invPos * _ArmorSlots) + 6
+	KILLVAR 'dhEqA_Name_', (_invPos * _ArmorSlots) + 7
+	KILLVAR 'dhEqA_Name_', (_invPos * _ArmorSlots) + 8
+	KILLVAR 'dhEqA_Name_', (_invPos * _ArmorSlots) + 9
+	KILLVAR 'dhEqA_Name_', (_invPos * _ArmorSlots) + 10
+	KILLVAR 'dhEqW_Name_', (_invPos * _WeaponSlots)
+	KILLVAR 'dhEqW_Name_', (_invPos * _WeaponSlots) + 1
+	!!~~#
+	
+	!!~~ Kill Durability
+	KILLVAR 'dhEqA_Dur_', (_invPos * _ArmorSlots)
+	KILLVAR 'dhEqA_Dur_', (_invPos * _ArmorSlots) + 1
+	KILLVAR 'dhEqA_Dur_', (_invPos * _ArmorSlots) + 2
+	KILLVAR 'dhEqA_Dur_', (_invPos * _ArmorSlots) + 3
+	KILLVAR 'dhEqA_Dur_', (_invPos * _ArmorSlots) + 4
+	KILLVAR 'dhEqA_Dur_', (_invPos * _ArmorSlots) + 5
+	KILLVAR 'dhEqA_Dur_', (_invPos * _ArmorSlots) + 6
+	KILLVAR 'dhEqA_Dur_', (_invPos * _ArmorSlots) + 7
+	KILLVAR 'dhEqA_Dur_', (_invPos * _ArmorSlots) + 8
+	KILLVAR 'dhEqA_Dur_', (_invPos * _ArmorSlots) + 9
+	KILLVAR 'dhEqA_Dur_', (_invPos * _ArmorSlots) + 10
+	KILLVAR 'dhEqW_Dur_', (_invPos * _WeaponSlots)
+	KILLVAR 'dhEqW_Dur_', (_invPos * _WeaponSlots) + 1
+	!!~~#
+	
+	!!   Kill Inventory
+	KILLVAR 'dhInv_', _invPos
+	
+end
+
+if $ARGS[0] = 'Equip':
+	$.character  = $ARGS[1]
+	$.slotType   = $ARGS[2]
+	$.itemName   = $ARGS[3]
+	$.durability = $ARGS[4]
+	
+	!! Check if inventory exists
+	if ARRPOS($dhInv_, $.character) = -1:
+		$RESULT = FUNC('DH_Functions', 'FormatStr', $DhInv_Msg_['NoInventory'], $.character)
+		exit
+	end
+	
+	$_GearSlot = $.character + 'Inv_' + $.slotType
+	
+	if     ARRPOS('$DhInv_ArmSlot_', $.slotType) ! -1:
+		if     $.slotType = 'Head'      :
+			!! Do I need a free slot?
+			if $dhEqA_Name_[$.character + 'Inv_Head'] ! 'Empty':
+				!! Do I have a free slot?
+				if FUNC('DH_Inventory', 'HasFreeSlots', $.character) = False:
+					$RESULT = FUNC('DH_Functions', 'FormatStr', $DhInv_Msg_['InventoryFull'], $.character)
+					exit
+				end
+				
+				!! Free slot so unequip!
+				FUNC('DH_Inventory', 'Unequip', $.character, 'Head')
+			end
+			
+			!! Equip!
+			gs 'DH_Gear_Heads', $.itemName
+			$dhEqA_Name_[$.character + 'Inv_' + $.slotType] = $dhArm_Name
+			$dhEqA_Dur_[$.character + 'Inv_' + $.slotType] = iif($.durability > 0, $.durability, $dhArm_DurMax)
+			jump 'DH_Inventory_Equip_AddArmorStats'
+		
+		elseif $.slotType = 'Suit'      :
+			_slotsToFree = 0
+			if $dhEqA_Name_[$.character + 'Inv_Suit']  ! 'Empty': _slotsToFree = 1
+			else 
+				if $dhEqA_Name_[$.character + 'Inv_Chest'] ! 'Empty': _slotsToFree += 1 & end
+				if $dhEqA_Name_[$.character + 'Inv_Legs']  ! 'Empty': _slotsToFree += 1 & end
+			end
+			
+			!! If 0 slotsToFree, nothing is equipped
+			if _slotsToFree > 0:
+				if FUNC('DH_Inventory', 'HasFreeSlots', $.character, _slotsToFree) = False:
+					$RESULT = FUNC('DH_Functions', 'FormatStr', $DhInv_Msg_['InventoryFull'], $.character)
+					exit
+				end
+				
+				FUNC('DH_Inventory', 'Unequip', $.character, 'Suit')
+				FUNC('DH_Inventory', 'Unequip', $.character, 'Chest')
+				FUNC('DH_Inventory', 'Unequip', $.character, 'Legs')
+			end
+			
+			gs 'DH_Gear_Suits', $.itemName
+			$dhEqA_Name_[$.character + 'Inv_' + $.slotType] = $dhArm_Name
+			$dhEqA_Dur_[$.character + 'Inv_' + $.slotType] = iif($.durability > 0, $.durability, $dhArm_DurMax)
+			jump 'DH_Inventory_Equip_AddArmorStats'
+		
+		elseif $.slotType = 'Chest'     :
+			!! Do I need a free slot?
+			if $dhEqA_Name_[$.character + 'Inv_Chest'] ! 'Empty' or $dhEqA_Name_[$.character + 'Inv_Suit'] ! 'Empty':
+				!! Do I have a free slot?
+				if FUNC('DH_Inventory', 'HasFreeSlots', $.character) = False:
+					$RESULT = FUNC('DH_Functions', 'FormatStr', $DhInv_Msg_['InventoryFull'], $.character)
+					exit
+				end
+				
+				!! Free slot so unequip!
+				FUNC('DH_Inventory', 'Unequip', $.character, 'Suit')
+				FUNC('DH_Inventory', 'Unequip', $.character, 'Chest')
+			end
+			
+			!! Equip!
+			gs 'DH_Gear_Chests', $.itemName
+			$dhEqA_Name_[$.character + 'Inv_' + $.slotType] = $dhArm_Name
+			$dhEqA_Dur_[$.character + 'Inv_' + $.slotType] = iif($.durability > 0, $.durability, $dhArm_DurMax)
+			jump 'DH_Inventory_Equip_AddArmorStats'
+		
+		elseif $.slotType = 'Legs'      :
+			!! Do I need a free slot?
+			if $dhEqA_Name_[$.character + 'Inv_Legs'] ! 'Empty' or $dhEqA_Name_[$.character + 'Inv_Suit'] ! 'Empty':
+				!! Do I have a free slot?
+				if FUNC('DH_Inventory', 'HasFreeSlots', $.character) = False:
+					$RESULT = FUNC('DH_Functions', 'FormatStr', $DhInv_Msg_['InventoryFull'], $.character)
+					exit
+				end
+				
+				!! Free slot so unequip!
+				FUNC('DH_Inventory', 'Unequip', $.character, 'Suit')
+				FUNC('DH_Inventory', 'Unequip', $.character, 'Legs')
+			end
+			
+			!! Equip!
+			gs 'DH_Gear_Legs', $.itemName
+			$dhEqA_Name_[$.character + 'Inv_' + $.slotType] = $dhArm_Name
+			$dhEqA_Dur_[$.character + 'Inv_' + $.slotType] = iif($.durability > 0, $.durability, $dhArm_DurMax)
+			jump 'DH_Inventory_Equip_AddArmorStats'
+		
+		elseif $.slotType = 'Gloves'    :
+			!! Do I need a free slot?
+			if $dhEqA_Name_[$.character + 'Inv_Gloves'] ! 'Empty':
+				!! Do I have a free slot?
+				if FUNC('DH_Inventory', 'HasFreeSlots', $.character) = False:
+					$RESULT = FUNC('DH_Functions', 'FormatStr', $DhInv_Msg_['InventoryFull'], $.character)
+					exit
+				end
+				
+				!! Free slot so unequip!
+				FUNC('DH_Inventory', 'Unequip', $.character, 'Gloves')
+			end
+			
+			!! Equip!
+			gs 'DH_Gear_Gloves', $.itemName
+			$dhEqA_Name_[$.character + 'Inv_' + $.slotType] = $dhArm_Name
+			$dhEqA_Dur_[$.character + 'Inv_' + $.slotType] = iif($.durability > 0, $.durability, $dhArm_DurMax)
+			jump 'DH_Inventory_Equip_AddArmorStats'
+		
+		elseif $.slotType = 'Feet'      :
+			!! Do I need a free slot?
+			if $dhEqA_Name_[$.character + 'Inv_Feet'] ! 'Empty':
+				!! Do I have a free slot?
+				if FUNC('DH_Inventory', 'HasFreeSlots', $.character) = False:
+					$RESULT = FUNC('DH_Functions', 'FormatStr', $DhInv_Msg_['InventoryFull'], $.character)
+					exit
+				end
+				
+				!! Free slot so unequip!
+				FUNC('DH_Inventory', 'Unequip', $.character, 'Feet')
+			end
+			
+			!! Equip!
+			gs 'DH_Gear_Feet', $.itemName
+			$dhEqA_Name_[$.character + 'Inv_' + $.slotType] = $dhArm_Name
+			$dhEqA_Dur_[$.character + 'Inv_' + $.slotType] = iif($.durability > 0, $.durability, $dhArm_DurMax)
+			jump 'DH_Inventory_Equip_AddArmorStats'
+		
+		elseif $.slotType = 'ShoulderL' :
+			!! Do I need a free slot?
+			if $dhEqA_Name_[$.character + 'Inv_ShoulderL'] ! 'Empty':
+				!! Do I have a free slot?
+				if FUNC('DH_Inventory', 'HasFreeSlots', $.character) = False:
+					$RESULT = FUNC('DH_Functions', 'FormatStr', $DhInv_Msg_['InventoryFull'], $.character)
+					exit
+				end
+				
+				!! Free slot so unequip!
+				FUNC('DH_Inventory', 'Unequip', $.character, 'ShoulderL')
+			end
+			
+			!! Equip!
+			gs 'DH_Gear_Shoulders', $.itemName
+			$dhEqA_Name_[$.character + 'Inv_' + $.slotType] = $dhArm_Name
+			$dhEqA_Dur_[$.character + 'Inv_' + $.slotType] = iif($.durability > 0, $.durability, $dhArm_DurMax)
+			jump 'DH_Inventory_Equip_AddArmorStats'
+		
+		elseif $.slotType = 'ShoulderR' :
+			!! Do I need a free slot?
+			if $dhEqA_Name_[$.character + 'Inv_ShoulderR'] ! 'Empty':
+				!! Do I have a free slot?
+				if FUNC('DH_Inventory', 'HasFreeSlots', $.character) = False:
+					$RESULT = FUNC('DH_Functions', 'FormatStr', $DhInv_Msg_['InventoryFull'], $.character)
+					exit
+				end
+				
+				!! Free slot so unequip!
+				FUNC('DH_Inventory', 'Unequip', $.character, 'ShoulderR')
+			end
+			
+			!! Equip!
+			gs 'DH_Gear_Shoulders', $.itemName
+			$dhEqA_Name_[$.character + 'Inv_' + $.slotType] = $dhArm_Name
+			$dhEqA_Dur_[$.character + 'Inv_' + $.slotType] = iif($.durability > 0, $.durability, $dhArm_DurMax)
+			jump 'DH_Inventory_Equip_AddArmorStats'
+		
+		elseif $.slotType = 'Cloak'     :
+			!! Do I need a free slot?
+			if $dhEqA_Name_[$.character + 'Inv_Cloak'] ! 'Empty' or $dhEqA_Name_[$.character + 'Inv_Wings'] ! 'Empty':
+				!! Do I have a free slot?
+				if FUNC('DH_Inventory', 'HasFreeSlots', $.character) = False:
+					$RESULT = FUNC('DH_Functions', 'FormatStr', $DhInv_Msg_['InventoryFull'], $.character)
+					exit
+				end
+				
+				!! Free slot so unequip!
+				FUNC('DH_Inventory', 'Unequip', $.character, 'Cloak')
+				FUNC('DH_Inventory', 'Unequip', $.character, 'Wings')
+			end
+			
+			!! Equip!
+			gs 'DH_Gear_Cloaks', $.itemName
+			$dhEqA_Name_[$.character + 'Inv_' + $.slotType] = $dhArm_Name
+			$dhEqA_Dur_[$.character + 'Inv_' + $.slotType] = iif($.durability > 0, $.durability, $dhArm_DurMax)
+			jump 'DH_Inventory_Equip_AddArmorStats'
+		
+		elseif $.slotType = 'Wings'     :
+			!! Do I need a free slot?
+			if $dhEqA_Name_[$.character + 'Inv_Wings'] ! 'Empty' or $dhEqA_Name_[$.character + 'Inv_Cloak'] ! 'Empty':
+				!! Do I have a free slot?
+				if FUNC('DH_Inventory', 'HasFreeSlots', $.character) = False:
+					$RESULT = FUNC('DH_Functions', 'FormatStr', $DhInv_Msg_['InventoryFull'], $.character)
+					exit
+				end
+				
+				!! Free slot so unequip!
+				FUNC('DH_Inventory', 'Unequip', $.character, 'Wings')
+				FUNC('DH_Inventory', 'Unequip', $.character, 'Cloak')
+			end
+			
+			!! Equip!
+			gs 'DH_Gear_Wings', $.itemName
+			$dhEqA_Name_[$.character + 'Inv_' + $.slotType] = $dhArm_Name
+			$dhEqA_Dur_[$.character + 'Inv_' + $.slotType] = iif($.durability > 0, $.durability, $dhArm_DurMax)
+			jump 'DH_Inventory_Equip_AddArmorStats'
+		
+		elseif $.slotType = 'Shield'    :
+			_offHandOnly = True
+			_needsFreeSlot = False
+			if     $dhEqA_Name_[$.character + 'Inv_Shield']   ! 'Empty': _needsFreeSlot = True 
+			elseif $dhEqW_Name_[$.character + 'Inv_Offhand']  ! 'Empty': _needsFreeSlot = True
+			elseif $dhEqW_Name_[$.character + 'Inv_MainHand'] ! 'Empty':
+				if FUNC('DH_Gear_Weapons', 'IsOneHanded', $dhEqW_Name_[$.character + 'Inv_MainHand']) = False:
+					_needsFreeSlot = True
+					_offHandOnly = False
+				end
+			end
+			
+			if _needsFreeSlot:
+				if FUNC('DH_Inventory', 'HasFreeSlots', $.character) = False:
+					$RESULT = FUNC('DH_Functions', 'FormatStr', $DhInv_Msg_['InventoryFull'], $.character)
+					exit
+				end
+				
+				if _offHandOnly:
+					FUNC('DH_Inventory', 'Unequip', $.character, 'Shield')
+					FUNC('DH_Inventory', 'Unequip', $.character, 'Offhand')
+				else
+					FUNC('DH_Inventory', 'Unequip', $.character, 'MainHand')
+				end
+			end
+			
+			gs 'DH_Gear_Shields', $.itemName
+			$dhEqA_Name_[$.character + 'Inv_' + $.slotType] = $dhArm_Name
+			$dhEqA_Dur_[$.character + 'Inv_' + $.slotType] = iif($.durability > 0, $.durability, $dhArm_DurMax)
+			jump 'DH_Inventory_Equip_AddArmorStats'
+		end
+		
+	elseif ARRPOS('$DhInv_WepSlot_', $.slotType) ! -1:
+		if     $.slotType = 'MainHand' :
+			!! Check if main equipped
+			if     $dhEqW_Name_[$.character + 'Inv_MainHand'] ! 'Empty':
+				!! Check if 2 handed
+				if FUNC('DH_Gear_Weapons', 'IsOneHanded', $dhEqW_Name_[$.character + 'Inv_MainHand']) = False:
+					!! Check if shield or offhand equipped
+					if     $dhEqW_Name_[$.character + 'Inv_Offhand'] ! 'Empty': _needsFreeSlot = True
+					elseif $dhEqW_Name_[$.character + 'Inv_Shield']  ! 'Empty': _needsFreeSlot = True
+					end
+					
+					!! Unequip shield/offhand
+					if _needsFreeSlot:
+						FUNC('DH_Inventory', 'Unequip', $.character, 'Offhand')
+						FUNC('DH_Inventory', 'Unequip', $.character, 'Shield')
+					end
+				end
+				
+				!! Unequip main
+				FUNC('DH_Inventory', 'Unequip', $.character, 'MainHand')
+			
+			else
+				!! Check if 2 handed
+				if FUNC('DH_Gear_Weapons', 'IsOneHanded', $dhEqW_Name_[$.character + 'Inv_MainHand']) = False:
+					!! Check if shield or offhand equipped
+					if     $dhEqW_Name_[$.character + 'Inv_Offhand'] ! 'Empty': _needsFreeSlot = True
+					elseif $dhEqW_Name_[$.character + 'Inv_Shield']  ! 'Empty': _needsFreeSlot = True
+					end
+					
+					!! Unequip shield/offhand
+					if _needsFreeSlot:
+						FUNC('DH_Inventory', 'Unequip', $.character, 'Offhand')
+						FUNC('DH_Inventory', 'Unequip', $.character, 'Shield')
+					end
+				end
+			end
+			
+			!! Unequip shield/offhand
+			if _needsFreeSlot:
+				FUNC('DH_Inventory', 'Unequip', $.character, 'Offhand')
+				FUNC('DH_Inventory', 'Unequip', $.character, 'Shield')
+			end
+			
+			gs 'DH_Gear_Weapons', $.itemName
+			$dhEqW_Name_[$.character + 'Inv_' + $.slotType] = $dhWep_Name
+			$dhEqW_Dur_[$.character + 'Inv_' + $.slotType] = iif($.durability > 0, $.durability, $dhWep_DurMax)
+			jump 'DH_Inventory_Equip_AddWeaponStats'
+		
+		elseif $.slotType = 'Offhand'  :
+			_offHandOnly = True
+			_needsFreeSlot = False
+			if     $dhEqW_Name_[$.character + 'Inv_Offhand']  ! 'Empty': _needsFreeSlot = True
+			elseif $dhEqA_Name_[$.character + 'Inv_Shield']   ! 'Empty': _needsFreeSlot = True 
+			elseif $dhEqW_Name_[$.character + 'Inv_MainHand'] ! 'Empty':
+				if FUNC('DH_Gear_Weapons', 'IsOneHanded', $dhEqW_Name_[$.character + 'Inv_MainHand']) = False:
+					_needsFreeSlot = True
+					_offHandOnly = False
+				end
+			end
+			
+			if _needsFreeSlot:
+				if FUNC('DH_Inventory', 'HasFreeSlots', $.character) = False:
+					$RESULT = FUNC('DH_Functions', 'FormatStr', $DhInv_Msg_['InventoryFull'], $.character)
+					exit
+				end
+				
+				if _offHandOnly:
+					FUNC('DH_Inventory', 'Unequip', $.character, 'Offhand')
+					FUNC('DH_Inventory', 'Unequip', $.character, 'Shield')
+				else
+					FUNC('DH_Inventory', 'Unequip', $.character, 'MainHand')
+				end
+			end
+			
+			gs 'DH_Gear_Weapons', $.itemName
+			$dhEqW_Name_[$.character + 'Inv_' + $.slotType] = $dhWep_Name
+			$dhEqW_Dur_[$.character + 'Inv_' + $.slotType] = iif($.durability > 0, $.durability, $dhWep_DurMax)
+			jump 'DH_Inventory_Equip_AddWeaponStats'
+		end
+		
+	else
+		$RESULT = FUNC('DH_Functions', 'FormatStr', $DhInv_Msg_['InvalidSlot'], $.slotType)
+		exit
+	end
+	
+	!!~~ Add Armor stats
+	:DH_Inventory_Equip_AddArmorStats
+		dhCh_Health  += dhArm_Health
+		dhCh_Stamina += dhArm_Stamina
+		dhCh_Mana    += dhArm_Mana
+		
+		dhCh_Agi  += dhArm_Agi
+		dhCh_Cha  += dhArm_Cha
+		dhCh_Int  += dhArm_Int
+		dhCh_Lore += dhArm_Lore
+		dhCh_Luck += dhArm_Luck
+		dhCh_Per  += dhArm_Per
+		dhCh_Str  += dhArm_Str
+		
+		dhCh_Defense += dhArm_Defense
+		
+		dhCh_ResPhys   += dhArm_ResPhys
+		dhCh_ResPoison += dhArm_ResPoison
+		dhCh_ResFire   += dhArm_ResFire
+		dhCh_ResEarth  += dhArm_ResEarth
+		dhCh_ResMetal  += dhArm_ResMetal
+		dhCh_ResWater  += dhArm_ResWater
+		dhCh_ResWood   += dhArm_ResWood
+		
+		dhCh_EnExp += dhArm_EnExp
+		exit
+	!!~~#
+	
+	!!~~ Add Weapon stats
+	:DH_Inventory_Equip_AddWeaponStats
+		dhCh_Health  += dhWep_Health
+		dhCh_Stamina += dhWep_Stamina
+		dhCh_Mana    += dhWep_Mana
+		
+		dhCh_Agi  += dhWep_Agi
+		dhCh_Cha  += dhWep_Cha
+		dhCh_Int  += dhWep_Int
+		dhCh_Lore += dhWep_Lore
+		dhCh_Luck += dhWep_Luck
+		dhCh_Per  += dhWep_Per
+		dhCh_Str  += dhWep_Str
+		
+		dhCh_DmgMin     += dhWep_DmgMin
+		dhCh_DmgMax     += dhWep_DmgMax
+		dhCh_CritMod    += dhWep_CritMod
+		dhCh_CritChance += dhWep_CritChance
+		
+		dhCh_DmgPhys   += dhWep_DmgPhys
+		dhCh_DmgPoison += dhWep_DmgPoison
+		dhCh_DmgFire   += dhWep_DmgFire
+		dhCh_DmgEarth  += dhWep_DmgEarth
+		dhCh_DmgMetal  += dhWep_DmgMetal
+		dhCh_DmgWater  += dhWep_DmgWater
+		dhCh_DmgWood   += dhWep_DmgWood
+		
+		dhCh_EnExp += dhWep_EnExp
+		exit
+	!!~~#
+end
+
+if $ARGS[0] = 'Unequip':
+	$.character = $ARGS[1]
+	$.slotType = $ARGS[2]
+	
+	!! Check if inventory exists
+	if ARRPOS('$dhInv_', $.character) ! -1:
+		$RESULT = FUNC('DH_Functions', 'FormatStr', $DhInv_Msg_['NoInventory'], $.character)
+		exit
+	end
+	
+	!! Check if there is enough space to unequip items
+	if FUNC('DH_Inventory', 'HasFreeSlots', $.character):
+		$RESULT = FUNC('DH_Functions', 'FormatStr', $DhInv_Msg_['InventoryFull'], $.character)
+		exit
+	end
+	
+	$_GearSlot = $.character + 'Inv_' + $.slotType
+	
+	if     $.slotType = 'All':
+		FUNC('DH_Inventory', 'Unequip', $.character, 'Armor'  )
+		FUNC('DH_Inventory', 'Unequip', $.character, 'Weapons')
+	
+	elseif $.slotType = 'Armor':
+		FUNC('DH_Inventory', 'Unequip', $.character, 'Head'     )
+		FUNC('DH_Inventory', 'Unequip', $.character, 'Chest'    )
+		FUNC('DH_Inventory', 'Unequip', $.character, 'Legs'     )
+		FUNC('DH_Inventory', 'Unequip', $.character, 'Gloves'   )
+		FUNC('DH_Inventory', 'Unequip', $.character, 'Feet'     )
+		FUNC('DH_Inventory', 'Unequip', $.character, 'ShoulderL')
+		FUNC('DH_Inventory', 'Unequip', $.character, 'ShoulderR')
+		FUNC('DH_Inventory', 'Unequip', $.character, 'Cloak'    )
+		FUNC('DH_Inventory', 'Unequip', $.character, 'Wings'    )
+		FUNC('DH_Inventory', 'Unequip', $.character, 'Shield'   )
+				
+	elseif $.slotType = 'Weapons':
+		FUNC('DH_Inventory', 'Unequip', $.character, 'MainHand')
+		FUNC('DH_Inventory', 'Unequip', $.character, 'Offhand' )
+		
+	elseif ARRPOS($DhInv_ArmSlot_, $.slotType) ! -1:
+		!! If the armor slot is already empty, don't bother re-emptying it
+		if $dhEqA_Name_[$_GearSlot] = 'Empty':
+			$RESULT = FUNC('DH_Functions', 'FormatStr', $DhInv_Msg_['EmptySlot'], $.character, $.slotType)
+			exit
+		end
+		!!~~ Get Armor stats
+		if     $.slotType = 'Head'      : gs 'DH_Gear_Heads',     $dhEqA_Name_[$_GearSlot]
+		elseif $.slotType = 'Suit'      : gs 'DH_Gear_Suits',     $dhEqA_Name_[$_GearSlot]
+		elseif $.slotType = 'Chest'     : gs 'DH_Gear_Chests',    $dhEqA_Name_[$_GearSlot]
+		elseif $.slotType = 'Legs'      : gs 'DH_Gear_Legs',      $dhEqA_Name_[$_GearSlot]
+		elseif $.slotType = 'Gloves'    : gs 'DH_Gear_Gloves',    $dhEqA_Name_[$_GearSlot]
+		elseif $.slotType = 'Feet'      : gs 'DH_Gear_Feet',      $dhEqA_Name_[$_GearSlot]
+		elseif $.slotType = 'ShoulderL' : gs 'DH_Gear_Shoulders', $dhEqA_Name_[$_GearSlot]
+		elseif $.slotType = 'ShoulderR' : gs 'DH_Gear_Shoulders', $dhEqA_Name_[$_GearSlot]
+		elseif $.slotType = 'Cloak'     : gs 'DH_Gear_Cloaks',    $dhEqA_Name_[$_GearSlot]
+		elseif $.slotType = 'Wings'     : gs 'DH_Gear_Wings',     $dhEqA_Name_[$_GearSlot]
+		elseif $.slotType = 'Shield'    : gs 'DH_Gear_Shields',   $dhEqA_Name_[$_GearSlot]
+		end
+		!!~~#
+		
+		!!~~ Remove stats from character
+		dhCh_Health  -= dhArm_Health
+		dhCh_Stamina -= dhArm_Stamina
+		dhCh_Mana    -= dhArm_Mana
+		
+		dhCh_Agi  -= dhArm_Agi
+		dhCh_Cha  -= dhArm_Cha
+		dhCh_Int  -= dhArm_Int
+		dhCh_Lore -= dhArm_Lore
+		dhCh_Luck -= dhArm_Luck
+		dhCh_Per  -= dhArm_Per
+		dhCh_Str  -= dhArm_Str
+		
+		dhCh_Defense -= dhArm_Defense
+		
+		dhCh_ResPhys   -= dhArm_ResPhys
+		dhCh_ResPoison -= dhArm_ResPoison
+		dhCh_ResFire   -= dhArm_ResFire
+		dhCh_ResEarth  -= dhArm_ResEarth
+		dhCh_ResMetal  -= dhArm_ResMetal
+		dhCh_ResWater  -= dhArm_ResWater
+		dhCh_ResWood   -= dhArm_ResWood
+		
+		dhCh_EnExp -= dhArm_EnExp
+		!!~~#
+		
+		!!   Pass Armor to Inventory
+		gs 'DH_Inventory', 'AddItem', 'Armor', $dhEqA_Name_[$_GearSlot], dhEqA_Dur_[$_GearSlot]
+		
+		!! Remove Armor from Armor Slot
+		$dhEqA_Name_[$_GearSlot] = 'Empty'
+		dhEqA_Dur_[$_GearSlot]   = 0
+		
+	elseif ARRPOS($DhInv_WepSlot_, $.character) ! -1:
+		!! If the weapon slot is already empty, don't bother re-emptying it
+		if $dhEqW_Name_[_GearSlot] = 'Empty':
+			$RESULT = FUNC('DH_Functions', 'FormatStr', $DhInv_Msg_['EmptySlot'], $.character, $.slotType)
+			exit
+		end
+		
+		!! Get Weapon stats
+		gs 'DH_Gear_Weapons', $dhEqW_Name_[$_GearSlot]
+		
+		!!~~ Remove stats from character
+		dhCh_Health  -= dhWep_Health
+		dhCh_Stamina -= dhWep_Stamina
+		dhCh_Mana    -= dhWep_Mana
+		
+		dhCh_Agi  -= dhWep_Agi
+		dhCh_Cha  -= dhWep_Cha
+		dhCh_Int  -= dhWep_Int
+		dhCh_Lore -= dhWep_Lore
+		dhCh_Luck -= dhWep_Luck
+		dhCh_Per  -= dhWep_Per
+		dhCh_Str  -= dhWep_Str
+		
+		dhCh_DmgMin     -= dhWep_DmgMin
+		dhCh_DmgMax     -= dhWep_DmgMax
+		dhCh_CritMod    -= dhWep_CritMod
+		dhCh_CritChance -= dhWep_CritChance
+		
+		dhCh_DmgPhys   -= dhWep_DmgPhys
+		dhCh_DmgPoison -= dhWep_DmgPoison
+		dhCh_DmgFire   -= dhWep_DmgFire
+		dhCh_DmgEarth  -= dhWep_DmgEarth
+		dhCh_DmgMetal  -= dhWep_DmgMetal
+		dhCh_DmgWater  -= dhWep_DmgWater
+		dhCh_DmgWood   -= dhWep_DmgWood
+		
+		dhCh_EnExp -= dhWep_EnExp
+		!!~~#
+		
+		!! Pass Weapon to Inventory
+		gs 'DH_Inventory', 'AddItem', $dhEqW_Name_[$_GearSlot], $dhEqW_Dur_[$_GearSlot]
+		
+		!! Remove Weapon from Armor Slot
+		$dhEqW_Name_[$_GearSlot] = 'Empty'
+		dhEqW_Dur_[$_GearSlot]   = 0
+	end
+end
+
+if $ARGS[0] = 'AddItem':
+	$.character = $ARGS[1]
+	$.itemType  = $ARGS[2]
+	$.itemName  = $ARGS[3]
+	$.slotNo    = $ARGS[4]
+	
+	!! Check if inventory exists
+	if ARRPOS('$dhInv_', $.character) ! -1:
+		$RESULT = FUNC('DH_Functions', 'FormatStr', $DhInv_Msg_['NoInventory'], $.character)
+		exit
+	end
+	
+	!! Check if there is enough space to unequip items
+	if FUNC('DH_Inventory', 'HasFreeSlots', $.character):
+		$RESULT = FUNC('DH_Functions', 'FormatStr', $DhInv_Msg_['InventoryFull'], $.character)
+		exit
+	end
+	
+	
+	
+end
+
+if $ARGS[0] = 'RemoveItem':
+	if ARRPOS($dh_Inventories, $ARGS[1]) ! -1: exit & end
+	
+	$.character = $ARGS[1]
+	$.itemType = $ARGS[2]
+	$.itemName = $ARGS[3]
+	$.slotNo = $ARGS[4]
+	
+end
+
+if $ARGS[0] = 'AddMoney':
+	if ARRPOS($dh_Inventories, $ARGS[1]) ! -1: exit & end
+	
+end
+
+if $ARGS[0] = 'RemoveMoney':
+	if ARRPOS($dh_Inventories, $ARGS[1]) ! -1: exit & end
+	
+end
+
+if $ARGS[0] = 'GetFreeSlots':
+	!! Returns the number of free slots in inventory
+	!! If inventory does not exist, returns 0
+	
+	$.character = $ARGS[1]
+	if ARRPOS($dhInv_, $.character) = -1:
+		RESULT = 0
+		jump 'AutoKill DH_Inventory_GetFreeSlots'
+	end
+	
+	_i = 0
+	_slotStart = 0
+	:Loop DH_Inventory_GetFreeSlots_GetSlotStart
+	if _i < _invPos:
+		_slotStart += dhInv_Slots[$dhInv_[_invPos] + 'Inv']
+		_i += 1
+		jump 'Loop DH_Inventory_GetFreeSlots_GetSlotStart'
+	end
+	
+	_i = 0
+	_freeSlots = 0
+	:Loop DH_Inventory_GetFreeSlots
+	if _i < dhInv_Slots[$.character + 'Inv_']:
+		if dhInv_Slot[_slotStart + _i] = 'Empty': _freeSlots += 1 & end
+		jump 'Loop DH_Inventory_GetFreeSlots'
+	end
+	
+	RESULT = _freeSlots
+	
+end
+
+if $ARGS[0] = 'HasFreeSlots':
+	!!$ARGS[1] = character
+	!! ARGS[2] = free slots to check for
+	RESULT = iif(FUNC('DH_Inventory', 'GetFreeSlots', $ARGS[1]) >= MAX(1, ARGS[2]), True, False)
+end
+
+!! TODO: Each inventory should have a currency associated with it
+!! Perhaps a special currency as well
+
+
+--- DH_Inventory ---------------------------------
+

+ 57 - 0
locations/DH_Main.qsrc

@@ -0,0 +1,57 @@
+# DH_Main
+!!! A variable beginning with a capital letter should not be changed at will.
+!!! A variable ending with an underscore represents it as a list of items.
+	!!! A variable without an underscore isn''t necessarily not an array
+	!!! Just that it isn''t a straight list
+	!!! e.g. dhCh_Level[] is an array but it''s more like the var belongs to the array member
+	!!!      rather than var value belongs to the array member e.g. dhCh_Chars[] 
+
+!!TODO: Change functions to return true or false, handle messages within func.
+
+minut += 1
+gs 'stat'
+
+if $ARGS[0] = 'Init':
+	True = -1
+	False = 0
+	
+	gs 'DH_QuestManager', 'Init'
+	
+	Dh_InitFin = True
+end
+
+if $ARGS[0] = '':
+	IF Dh_InitFin = 0: gs 'DH_Main', 'Init'
+	
+	dh_HasCharacter = 0
+	if dh_HasCharacter = 0:
+		'Welcome to Dungeon Hunter!'
+		'Let''s get started by creating your character.'
+		ACT 'Start': gt 'DH_Main', 'Start'
+	else
+		'Welcome back to Dungeon Hunter!'
+		ACT 'Play': gt 'DH_Main', 'Play'
+	end
+	
+	
+	ACT 'Options': gt 'DH_Main', 'Options'
+	ACT 'Exit Game': gt 'Komp', 'start'
+	
+end
+
+if $ARGS[0] = 'Start':
+	dh_HasCharacter = 1
+	
+	dhQst_Started['NewBeginnings'] = False
+	gs 'DH_QuestManager', 'Start', 'NewBeginnings'
+	
+	ACT 'Leave': gt 'Komp', 'start'
+end
+
+if $ARGS[0] = 'test':
+	
+end
+
+--- DH_Main ---------------------------------
+
+

+ 9 - 0
locations/DH_Player.qsrc

@@ -0,0 +1,9 @@
+# DH_Player
+
+if $ARGS[0] = '':
+	''
+end
+
+
+--- DH_Player ---------------------------------
+

+ 122 - 0
locations/DH_QuestManager.qsrc

@@ -0,0 +1,122 @@
+# DH_QuestManager
+
+if $ARGS[0] = 'Init':
+	$DhQst_List_[0] = 'NewBeginnings'
+	
+	$DhQst_Msg_['NoQuest']         = 'NoQuest:No Quest by the name of ''{0}'' exists.'
+	$DhQst_Msg_['QuestStarted']    = 'QuestStarted:''{0}'' has already been started.'
+	$DhQst_Msg_['QuestComplete']   = 'QuestComplete:''{0}'' has already been completed.'
+	$DhQst_Msg_['QuestNotStarted'] = 'QuestNotStarted:''{0}'' has not been started yet.'
+	
+	$dhQst_Current = ''
+end
+
+if $ARGS[0] = 'Start':
+	$.questName = $ARGS[1]
+	'yoyooyoyoyy;'
+	
+	!! Check if quest exists
+	if ARRPOS('$DhQst_List_', $.questName) = -1:
+		'SPOKED'
+		$RESULT = FUNC('DH_Functions', 'FormatStr', $dhQst_Msg_['NoQuest'], $.questName)
+		exit
+	end
+	
+	
+	if $dhQst_Started[$.questName] = False:
+		$RESULT = 'Quest Started'
+		'hubababbababababab'
+		gt 'DH_Quest_<<$.questName>>', 'Start'
+	else
+		'YARE YARE'
+		$RESULT = FUNC('DH_Functions', 'FormatStr', $dhQst_Msg_['QuestStarted'], $.questName)
+		exit
+	end
+end
+
+if $ARGS[0] = 'Restart':
+	$.questName = $ARGS[1]
+	
+	!! Check if quest exists
+	if ARRPOS('$DhQst_List_', $.questName) = -1:
+		$RESULT = FUNC('DH_Functions', 'FormatStr', $dhQst_Msg_['NoQuest'], $.questName)
+		exit
+	end
+	
+	if $dhQst_Started[$.questName] = True:
+		gt 'DH_Quest_<<$.questName>>', 'Start'
+	else
+		$RESULT = FUNC('DH_Functions', 'FormatStr', $dhQst_Msg_['QuestNotStarted'], $.questName)
+		exit
+	end
+end
+
+if $ARGS[0] = 'Continue':
+	$.questName = $ARGS[1]
+	
+	!! Check if quest exists
+	if ARRPOS('$DhQst_List_', $.questName) = -1:
+		$RESULT = FUNC('DH_Functions', 'FormatStr', $dhQst_Msg_['NoQuest'], $.questName)
+		exit
+	end
+	
+	!! Check if quest has been started yet
+	if $dhQst_Started[$.questName] = False:
+		$RESULT = FUNC('DH_Functions', 'FormatStr', $dhQst_Msg_['QuestNotStarted'], $.questName)
+		exit
+	end
+	
+	if $dhQst_Finished[$.questName] = False:
+		gt 'DH_Quest_<<$.questName>>', $dhQst_Progress[$.questName]
+	else
+		$RESULT = FUNC('DH_Functions', 'FormatStr', $dhQst_Msg_['QuestComplete'], $.questName)
+		exit
+	end
+end
+
+if $ARGS[0] = 'Next':
+	$.questName = $ARGS[1]
+	
+	!! Check if quest exists
+	if ARRPOS('$DhQst_List_', $.questName) = -1:
+		$RESULT = FUNC('DH_Functions', 'FormatStr', $dhQst_Msg_['NoQuest'], $.questName)
+		exit
+	end
+	
+	!! Check if quest has been started yet
+	if $dhQst_Started[$.questName] = False:
+		$RESULT = FUNC('DH_Functions', 'FormatStr', $dhQst_Msg_['QuestNotStarted'], $.questName)
+		exit
+	end
+	
+	!! Check if next quest exists
+	
+	
+	if $dhQst_Finished[$.questName] = False:
+		gt 'DH_Quest_<<$.questName>>', $dhQst_NextQst[$.questName]
+	else
+		$RESULT = FUNC('DH_Functions', 'FormatStr', $dhQst_Msg_['QuestComplete'], $.questName)
+		exit
+	end
+end
+
+if $ARGS[0] = 'Complete':
+	$.questName = $ARGS[1]
+	
+	!! Check if quest exists
+	if ARRPOS('$DhQst_List_', $.questName) = -1:
+		$RESULT = FUNC('DH_Functions', 'FormatStr', $dhQst_Msg_['NoQuest'], $.questName)
+		exit
+	end
+	
+	if $dhQst_Finished[$.questName] = False:
+		$dhQst_Started[$.questName] = True
+		gt 'DH_Quest_<<$.questName>>', 'Complete'
+	else
+		$RESULT = FUNC('DH_Functions', 'FormatStr', $dhQst_Msg_['QuestComplete'], $.questName)
+		exit
+	end
+end
+
+--- DH_QuestManager ---------------------------------
+

+ 130 - 0
locations/DH_Quest_NB.qsrc

@@ -0,0 +1,130 @@
+# DH_Quest_NewBeginnings
+$dhQst_Current = 'NewBeginnings'
+
+if $ARGS[0] = 'Start':	
+	$dhQst_Title['NewBeginnings'] = 'New Beginnings'
+	
+	$dhQst_Started['NewBeginnings']  = True
+	$dhQst_Finished['NewBeginnings'] = False
+	
+	$dhQst_QstLine['NewBeginnings_0'] = 'So Cold'
+	$dhQst_QstLine['NewBeginnings_1'] = 'Alive?'
+	$dhQst_QstLine['NewBeginnings_2'] = 'Part3'
+	
+	$dhQst_Progress['NewBeginnings'] = ''
+	
+	gt 'DH_Quest_<<$dhQst_Current>>', 'So Cold'
+end
+
+if $ARGS[0] = 'Complete':
+	$dhQst_Finished['NewBeginnings'] = True
+end
+
+if $ARGS[0] = 'So Cold':
+	$dhQst_Progress['<<$dhQst_Current>>'] = $ARGS[0]
+	
+	'It all starts with a shiver. The shiver wakes you up, and, all of a sudden, you feel. You feel cold. So cold.'
+	'Then the pain sets in. The shiver makes you hit the ground, and the ground hurts! It hurts so much.'
+	'But that''s all there is, cold and pain. Pain and cold.'
+	'No, that isn''t right. There''s one more feeling. But it''s slipping away. Fast.'
+	'Oh! Another feeling, is it... laughter? Right, you feel like laughing! Haha, that''s right, the one slipping away is your sanity. Haha.'
+	'Desperately, you try to latch onto something. Anything. Oh, your name! Err... What was your name, again?'
+	
+	$act_GetName = {
+		$_playerName = input("What was my name?")
+		$_playerName = iif($_playerName = '', 'Ash', $_playerName) &! Default name.
+		!! Check if valid name
+		
+		FUNC('DH_Character', 'Delete', 'Player')
+		FUNC('DH_Character', 'Create', 'Player', $_playerName)
+		
+		gt 'DH_Quest_NewBeginnings', 'Alive?'
+	}
+	
+	ACT 'My name..?': DYNAMIC $act_GetName
+	ACT 'Exit Game': gt 'Komp', 'start'
+end
+
+if $ARGS[0] = 'Alive?':
+	$dhQst_Progress['<<$dhQst_Current>>'] = $ARGS[0]
+	
+	!!TODO: Give a different response for special names
+	$_specialNameMsg = 'Yes. Your name was <<$_playerName>>. Not that it matters though, you''re already half-mad, after all.'
+	$_specialNameMsg_[0] = 'WinkyFace ;)'
+	
+	if     $_playerName = 'WinkyFace': $_specialNameMsg = $_specialNameMsg_[0] & end
+	
+	$_specialNameMsg
+	'Really, if it weren''t for that incessant ringing, you''d have long lost your- Wait, ringing..?'
+	'A burst of white light appears, the ringing gets louder and you finally feel. You feel alive.'
+	'You struggle to open your eyes just a bit wider, but the more you see, the more pain you feel. And the more your head aches.'
+	'Without warning you feel something drop onto your left eye. The sudden attack makes you flinch, and you knock your head against something hard.'
+	'Mentally, you shout in pain, but all that escapes your parched throat is a weak groan.'
+	'When you open your eyes once again, the left''s vision is slightly red, and you feel a wetness just above your brow.'
+	'Reaching up you find your hand covered in blood. A head injury, is it the cause of your amnesia? Or something else...'
+	'You try looking around but there''s too much dust. On top of is a wooden beam, did it fall from the ceiling?'
+	'You are trapped.'
+	
+	!! Warrior
+	_pushBeamCount = 0
+	act 'Attempt to push the beam.':
+		_pushBeamCount += 1
+		if     _pushBeamCount = 3 and dhCh_Str['Player'] = 1:
+			'Despite your pain, you clench your teeth hard, and hope for the best in what can only be described as a retarded decision.'
+			'But against all odds, you succeed! It''s hard to believe it, and even you''re not quite sure where you pulled that last ounce of strength from, but you did it.'
+			'With haste, you push the sturdy beam off of you, freeing yourself from captivity.'
+			
+			gs 'DH_Classes', 'ChangeClass', 'Player', 'Warrior'
+			
+			CLA
+			ACT 'Stand Up': gt 'DH_Quest_NewBeginnings', 'Path of the Warrior'
+		
+		elseif _pushBeamCount = 1 and dhCh_Str['Player'] >= 2:
+			'You didn''t notice it before but you feel... strong. Powerful. Nothing can get in your way!'
+			'It must be some sort of miracle, an huge feat of strength, but with a single hand you pick up and toss the heavy beam across the room.'
+			'The large movement causes more destruction in your surroundings, but you simply don''t care.'
+			'When a loosened stone block falls towards you, you just knock it away with a casual swipe.'
+			'You''re not sure why, but you get the feeling you''d look even cooler with a pair of Sunglasses right now.'
+			'With the beam gone, you''ve freed yourself from captivity.'
+			
+			gs 'DH_Classes', 'ChangeClass', 'Player', 'Warrior'
+			
+			CLA
+			ACT 'Stand Up': gt 'DH_Quest_NewBeginnings', 'Path of the Warrior'
+		
+		elseif _pushBeamCount = 100:
+			'They say perseverance is also a type of strength, and it seems to be true.'
+			'Through sheer effort, you manage to push the wooden beam off of you, freeing yourself from captivity.'
+			''
+			'Strength + 1'
+			
+			gs 'DH_Character', 'AddStat', 'Player', 'Strength', 1
+			gs 'DH_Classes', 'ChangeClass', 'Player', 'Warrior'
+			
+			CLA
+			ACT 'Stand Up': gt 'DH_Quest_NewBeginnings', 'Path of the Warrior'
+		
+		else
+			'You attempt to push the beam away.'
+		end
+	end
+	
+	!! Ranger
+	_waitDustCount = 0
+	ACT 'Wait for the dust to settle.': gt 'Komp', 'start'
+	
+	!! Mage
+	_shoutHelpCount = 0
+	ACT 'You could also try calling for help.': gt 'Komp', 'start'
+	
+	ACT 'Exit Game': gt 'Komp', 'start'
+end
+
+if $ARGS[0] = 'Path of the Warrior':
+	$dhQst_Progress['<<$dhQst_Current>>'] = $ARGS[0]
+	'I AM WARRIOR'
+end
+
+
+--- DH_Quest_NewBeginnings ---------------------------------
+

+ 213 - 0
locations/DH_Quest_NewBeginnings.qsrc

@@ -0,0 +1,213 @@
+# DH_Quest_NewBeginnings
+$dhQst_Current = 'NewBeginnings'
+
+if $ARGS[0] = 'Start':	
+	$dhQst_Title['NewBeginnings'] = 'New Beginnings'
+	
+	$dhQst_Started['NewBeginnings']  = True
+	$dhQst_Finished['NewBeginnings'] = False
+	
+	$dhQst_QstLine['NewBeginnings_0'] = 'So Cold'
+	$dhQst_QstLine['NewBeginnings_1'] = 'Alive?'
+	$dhQst_QstLine['NewBeginnings_2'] = 'Part3'
+	
+	$dhQst_Progress['NewBeginnings'] = ''
+	
+	gt 'DH_Quest_<<$dhQst_Current>>', 'So Cold'
+end
+
+if $ARGS[0] = 'Complete':
+	$dhQst_Finished['NewBeginnings'] = True
+end
+
+if $ARGS[0] = 'So Cold':
+	$dhQst_Progress['<<$dhQst_Current>>'] = $ARGS[0]
+	
+	'It all starts with a shiver. The shiver wakes you up, and, all of a sudden, you feel. You feel cold. So cold.'
+	'Then the pain sets in. The shiver makes you hit the ground, and the ground hurts! It hurts so much.'
+	'But that''s it. Just you, the cold, and the pain. It''s almost like a fairytale!'
+	'No, that isn''t right. There''s one more feeling. But it''s slipping away. Fast.'
+	'Oh! Another feeling, is it... laughter? Right, you feel like laughing! Haha, that''s right, the one slipping away is your sanity. Haha.'
+	'Desperately, you try to latch onto something. Anything. Oh, your name! Err... What was your name, again?'
+	
+	$act_GetName = {
+		$_playerName = input("What was my name?")
+		$_playerName = iif($_playerName = '', 'Ash', $_playerName) &! Default name.
+		!! Check if valid name
+		
+		FUNC('DH_Character', 'Delete', 'Player')
+		FUNC('DH_Character', 'Create', 'Player', $_playerName)
+		
+		gt 'DH_Quest_NewBeginnings', 'Alive?'
+	}
+	
+	ACT 'My name..?': DYNAMIC $act_GetName
+end
+
+if $ARGS[0] = 'Alive?':
+	$dhQst_Progress['<<$dhQst_Current>>'] = $ARGS[0]
+	
+	!!TODO: Give a different response for special names
+	$_specialNameMsg = 'Yes. Your name was <<$_playerName>>. Not that it matters though, you''re already half-mad, after all.'
+	$_specialNameMsg_[0] = 'WinkyFace ;)'
+	
+	if     $_playerName = 'WinkyFace': $_specialNameMsg = $_specialNameMsg_[0] & end
+	
+	$_specialNameMsg
+	'Really, if it weren''t for that incessant ringing, you''d have long lost your- Wait, ringing..?'
+	'A burst of white light appears, the ringing gets louder and you finally feel. You feel alive.'
+	'You struggle to open your eyes just a bit wider, but the more you see, the more pain you feel. And the more your head aches.'
+	'Without warning you feel something drop onto your left eye. The sudden attack makes you flinch and knock your head.'
+	'Mentally, you shout in pain, but all that escapes your parched throat is a weak groan.'
+	'When you open your eyes once again, the left''s vision is slightly red, and you feel a wetness just above your brow.'
+	'Reaching up you find your hand covered in blood. A head injury, is it the cause of your amnesia? Or something else...'
+	'You try looking around but there''s too much dust. On top of is a wooden beam, did it fall from the ceiling?'
+	'You are currently trapped.'
+	''
+	
+	!! Brute
+	_pushBeamCount = 0
+	act 'Attempt to push the beam.':
+		_pushBeamCount += 1
+		if     _pushBeamCount = 3 and dhCh_Str['Player'] = 1:
+			''
+			'Despite your pain, you clench your teeth hard, and hope for the best in what can only be described as a retarded decision.'
+			'But against all odds, you succeed! It''s hard to believe it, and even you''re not quite sure where you pulled that last ounce of strength from, but you did it.'
+			'With haste, you push the sturdy beam off of you, freeing yourself from captivity.'
+			
+			CLA
+			ACT 'Stand Up': xgt 'DH_Quest_NewBeginnings', 'Path of the Brute'
+		
+		elseif _pushBeamCount = 1 and dhCh_Str['Player'] >= 2:
+			'You didn''t notice it before but you feel... strong. Powerful. Nothing can get in your way!'
+			'It must be some sort of miracle, an huge feat of strength, but with a single hand you pick up and toss the heavy beam across the room.'
+			'The large movement causes more destruction in your surroundings, but you simply don''t care.'
+			'When a loosened stone block falls towards you, you just knock it away with a casual swipe.'
+			'You''re not sure why, but you get the feeling you''d look even cooler with a pair of Sunglasses right now.'
+			'With the beam gone, you''ve freed yourself from captivity.'
+			
+			CLA
+			ACT 'Stand Up': xgt 'DH_Quest_NewBeginnings', 'Path of the Brute'
+		
+		elseif _pushBeamCount = 100:
+			''
+			'They say perseverance is also a type of strength, and it seems to be true.'
+			'Through sheer effort alone, you manage to push the wooden beam off of you, freeing yourself from captivity.'
+			''
+			'Strength + 1'
+			
+			dhCh_Str['Player'] += 1
+			
+			CLA
+			ACT 'Stand Up': xgt 'DH_Quest_NewBeginnings', 'Path of the Brute'
+		
+		else
+			'You attempt to push the beam away.'
+		end
+	end
+	
+	!! Pickpocket
+	_waitDustCount = 0
+	act 'Wait for the dust to settle.':
+		_waitDustCount += 1
+		if     _waitDustCount = 3 and dhCh_Per['Player'] = 1:
+			''
+			'The best choice in any situation is to understand your predicament. Knowledge is power, after all.'
+			'With that in mind, you wait.'
+			'Finally, the dust settles and you can make out some of your surroundings.'
+			''
+			
+			gs 'DH_Classes', 'ChangeClass', 'Player', 'Pickpocket'
+			
+			CLA
+			ACT 'Stand Up': gt 'DH_Quest_NewBeginnings', 'Path of the Pickpocket'
+		
+		elseif _waitDustCount = 1 and dhCh_Per['Player'] >= 2:
+			''
+			'a'
+			
+			gs 'DH_Classes', 'ChangeClass', 'Player', 'Pickpocket'
+			
+			CLA
+			ACT 'Stand Up': gt 'DH_Quest_NewBeginnings', 'Path of the Pickpocket'
+		
+		elseif _waitDustCount = 100:
+			''
+			'a'
+			''
+			'Agility + 1'
+			
+			dhCh_Per['Player'] += 1
+			gs 'DH_Classes', 'ChangeClass', 'Player', 'Pickpocket'
+			
+			CLA
+			ACT 'Stand Up': gt 'DH_Quest_NewBeginnings', 'Path of the Pickpocket'
+		
+		else
+			'You wait for the dust to settle a bit...'
+		end
+		
+	end
+	
+	!! Trickster
+	_shoutHelpCount = 0
+	act 'You could also try calling for help.':
+		_shoutHelpCount += 1
+		if     _shoutHelpCount = 3 and dhCh_Int['Player'] = 1:
+			''
+			'a'
+			''
+			
+			gs 'DH_Classes', 'ChangeClass', 'Player', 'Trickster'
+			
+			CLA
+			ACT 'Stand Up': gt 'DH_Quest_NewBeginnings', 'Path of the Trickster'
+		
+		elseif _shoutHelpCount = 1 and dhCh_Int['Player'] >= 2:
+			''
+			'a'
+			
+			gs 'DH_Classes', 'ChangeClass', 'Player', 'Trickster'
+			
+			CLA
+			ACT 'Stand Up': gt 'DH_Quest_NewBeginnings', 'Path of the Trickster'
+		
+		elseif _shoutHelpCount = 100:
+			''
+			'a'
+			''
+			'Intellect + 1'
+			
+			dhCh_Int['Player'] += 1
+			gs 'DH_Classes', 'ChangeClass', 'Player', 'Trickster'
+			
+			CLA
+			ACT 'Stand Up': gt 'DH_Quest_NewBeginnings', 'Path of the Trickster'
+		
+		else
+			'You call for help but get no response.'
+		end
+		
+	end
+end
+
+if $ARGS[0] = 'Path of the Brute':
+	$dhQst_Progress['<<$dhQst_Current>>'] = $ARGS[0]
+	'Your head still aches, but you steel yourself and take a step forward.'
+	'You eventually make it out of the dust and reach a set of metal bars.'
+	'"Is this a... prison? I'm... a prisoner?", you think.'
+	'Absurd! How could a musclehead like you become a prisoner? But that''s how it seems, and looking farther, there are many other prison cells with various figures inside.'
+	'"If only I hadn''t lost my memories!", you cry. Your frustrations only mount as your head begins to pound louder and louder when trying to recall anything.'
+	'Your rage finally hits a breaking point when the pounding drowns out the rest of your thoughts. And without thought there is only instinct.'
+	'Your body moves on its own, grabs the sturdy iron bars in front of you and rips the entire door from its hinges!'
+	''
+	
+	gs 'DH_Classes', 'ChangeClass', 'Player', 'Brute'
+	
+	'You''ve unlocked the Brute class!'
+	
+end
+
+
+--- DH_Quest_NewBeginnings ---------------------------------
+

+ 118 - 0
locations/DH_Races.qsrc

@@ -0,0 +1,118 @@
+# DH_Races
+if $ARGS[0] = 'Init':
+end
+
+if $ARGS[0] = 'ChangeRace':
+$.newRace   = $ARGS[1]
+	$.character = $ARGS[2]
+	
+	IF $.newRace = '' or $.character = '': exit
+	
+	!! Get old stats
+	gs 'DH_Races', $dhCh_RaceFull[$.character]
+	
+	!! Reset stats
+	dhCh_Agi[$.character]  -= dhRc_Agi
+	dhCh_Cha[$.character]  -= dhRc_Cha
+	dhCh_Int[$.character]  -= dhRc_Int
+	dhCh_Lore[$.character] -= dhRc_Lore
+	dhCh_Luck[$.character] -= dhRc_Luck
+	dhCh_Perd[$.character] -= dhRc_Per
+	dhCh_Str[$.character]  -= dhRc_Str
+	
+	!! Get new stats
+	gs 'DH_Races', $.newRace
+	
+	$dhCh_RaceFull[$.character] = $dhRc_RaceFull
+	$dhCh_Race[$.character]     = $dhRc_Race
+	$dhCh_SubRace[$.character]  = $dhRc_SubRace
+	$dhCh_Gender[$.character]   = $dhRc_Gender
+	
+	dhCh_Agi[$.character]  += dhRc_Agi
+	dhCh_Cha[$.character]  += dhRc_Cha
+	dhCh_Int[$.character]  += dhRc_Int
+	dhCh_Lore[$.character] += dhRc_Lore
+	dhCh_Luck[$.character] += dhRc_Luck
+	dhCh_Perd[$.character] += dhRc_Per
+	dhCh_Str[$.character]  += dhRc_Str
+	
+end
+
+!! FUNC('DH_Races', 'CanUseClass', 'RaceFull', 'Class')
+if $ARGS[0] = 'CanUseClass':
+	$.raceFull = $ARGS[1]
+	$.class = $ARGS[2]
+	
+	IF $.raceFull = '': RESULT = True & exit
+	IF $.class = '':    RESULT = False & exit
+	
+	!! Get class lock
+	gs 'DH_Races', $.raceFull
+	if ARRPOS($dhRc_ClassLock, $.class) == -1:
+		RESULT = True
+	else:
+		RESULT = False
+	end
+	
+end
+
+if $ARGS[0] = 'HumanMale':
+	$dhRc_RaceFull = 'HumanMale'
+	$dhRc_Race     = 'Human'
+	$dhRc_SubRace  = 'Human'
+	$dhRc_Gender   = 'Male'
+	
+	KILLVAR 'dhRc_ClassLock'
+	$dhRc_ClassLock[0] = ''
+	
+	dhRc_Agi  = 5
+	dhRc_Cha  = 7
+	dhRc_Int  = 5
+	dhRc_Lore = 5
+	dhRc_Luck = 5
+	dhRc_Per  = 3
+	dhRc_Str  = 6
+end
+
+if $ARGS[0] = 'HumanFemale':
+	$dhRc_RaceFull = 'HumanFemale'
+	$dhRc_Race     = 'Human'
+	$dhRc_SubRace  = 'Human'
+	$dhRc_Gender   = 'Female'
+	
+	KILLVAR 'dhRc_ClassLock'
+	$dhRc_ClassLock[0] = ''
+	
+	dhRc_Agi  = 5
+	dhRc_Cha  = 7
+	dhRc_Int  = 5
+	dhRc_Lore = 5
+	dhRc_Luck = 5
+	dhRc_Per  = 3
+	dhRc_Str  = 4
+end
+
+if $ARGS[0] = 'ElfMale':
+	
+end
+
+if $ARGS[0] = 'ElfFemale':
+	
+end
+
+if $ARGS[0] = 'DwarfMale':
+	
+end
+
+if $ARGS[0] = 'DwarfFemale':
+	
+end
+
+if $ARGS[0] = 'Dragonkin':
+	
+end
+
+
+
+--- DH_Races ---------------------------------
+

+ 13 - 0
locations/KILLVARS.qsrc

@@ -0,0 +1,13 @@
+# KILLVARS
+
+_i = 0 &!AutoKill -d
+:killvarsLoop
+if _i < ARRSIZE('$ARGS'):
+	KILLVAR '<<$ARGS[_i]>>'
+	_i += 1
+	jump 'killvarsLoop'
+end
+
+KILLVAR '_i'
+
+--- KILLVARS ------------------------

+ 2 - 0
locations/Komp.qsrc

@@ -64,6 +64,8 @@ if $ARGS[0] = 'brows':
 
 		act 'Search for cable TV services (1:00)':gt 'Komp', 'kabtv'
 		act 'Play an online game':gt 'KGstart'
+		act 'Play Dungeon Hunter': gt 'DH_Main'
+		
 		if bankAccount > 0: act 'Visit your bank, maybe to purchase more online time': gt 'Komp', 'bank'
 
 		if shantfoto > 0:act 'Find the girl you took photos of in the park on "Assbook"':gt 'Komp', 'foto'

+ 1 - 1
userDefineLang.xml

@@ -61,4 +61,4 @@
             <WordsStyle name="DELIMITERS8" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
         </Styles>
     </UserLang>
-</NotepadPlus>
+</NotepadPlus>