- Joined
- Dec 23, 2008
- Messages
- 82
This bag system doesnt work right and idk why. when you have a bag in your inventory and you acquire an item, it will store the item in a hashtable where you can locate it again with the bag. when you use the bag its supposed 2 give the items that were stored, to the hero that used the bag, it just wont give the items back. PLZ HELP. thx in return and +rep
-
Init
-

Events
-


Map initialization
-
-

Conditions
-

Actions
-


Hashtable - Create a hashtable
-


Set T97Hash = (Last created hashtable)
-
-
-
Bag Use
-

Events
-


Unit - A unit Uses an item
-
-

Conditions
-


(Item-type of (Item being manipulated)) Equal to Bag
-
-

Actions
-


Set HandleConverter = (Key (Item being manipulated))
-


For each (Integer SlotCheck) from 1 to (Load 6 of HandleConverter from T97Hash), do (Actions)
-



Loop - Actions
-




Hero - Give (Load SlotCheck of HandleConverter in T97Hash) to (Hero manipulating item)
-
-
-


Item - Set charges remaining in (Item being manipulated) to 0
-


Hashtable - Save 0 as 6 of HandleConverter in T97Hash
-
-
-
Acquire Item
-

Events
-


Unit - A unit Acquires an item
-
-

Conditions
-


(Item-type of (Item being manipulated)) Not equal to Bag
-
-

Actions
-


For each (Integer SlotCheck) from 1 to 6, do (Actions)
-



Loop - Actions
-




If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-





If - Conditions
-






And - All (Conditions) are true
-







Conditions
-








(Item-type of (Item carried by (Hero manipulating item) in slot SlotCheck)) Equal to Bag
-








(Charges remaining in (Item carried by (Hero manipulating item) in slot SlotCheck)) Less than 5
-
-
-
-





Then - Actions
-






Set HandleConverter = (Key (Item carried by (Hero manipulating item) in slot SlotCheck))
-






Item - Set charges remaining in (Item carried by (Hero manipulating item) in slot SlotCheck) to ((Charges remaining in (Item carried by (Hero manipulating item) in slot SlotCheck)) + 1)
-






Hashtable - Save (Charges remaining in (Item carried by (Hero manipulating item) in slot SlotCheck)) as 6 of HandleConverter in T97Hash
-






Hashtable - Save 1 as 7 of HandleConverter in T97Hash
-
-





Else - Actions
-
-
-
-


If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-



If - Conditions
-




(Load 7 of HandleConverter from T97Hash) Equal to 1
-
-



Then - Actions
-




Hashtable - Save Handle Of(Item being manipulated) as (Load 6 of HandleConverter from T97Hash) of HandleConverter in T97Hash
-




Hero - Drop (Item being manipulated) from (Hero manipulating item)
-




Item - Hide (Last dropped item)
-




Hashtable - Save 0 as 7 of HandleConverter in T97Hash
-
-



Else - Actions
-
-
-




