turok255
New Member
- Reaction score
- 30
Im "trying" to make a banking system for somone whos making an rpg and I can't find a better way of doing this (I know theres probably a way of doing this in 1 trigger.) But this way would require a trigger for each item slot.
Code:
Bank Item
Events
Player - Player 1 (Red) types a chat message containing -bank 1 as An exact match
Player - Player 2 (Blue) types a chat message containing -bank 1 as An exact match
Player - Player 3 (Teal) types a chat message containing -bank 1 as An exact match
Player - Player 4 (Purple) types a chat message containing -bank 1 as An exact match
Player - Player 5 (Yellow) types a chat message containing -bank 1 as An exact match
Player - Player 6 (Orange) types a chat message containing -bank 1 as An exact match
Player - Player 7 (Green) types a chat message containing -bank 1 as An exact match
Player - Player 8 (Pink) types a chat message containing -bank 1 as An exact match
Player - Player 9 (Gray) types a chat message containing -bank 1 as An exact match
Player - Player 10 (Light Blue) types a chat message containing -bank 1 as An exact match
Player - Player 11 (Dark Green) types a chat message containing -bank 1 as An exact match
Player - Player 12 (Brown) types a chat message containing -bank 1 as An exact match
Conditions
Actions
Unit Group - Pick every unit in (Units owned by (Triggering player)) and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Picked unit) is A Hero) Equal to True
Then - Actions
Set Hero = (Picked unit)
Else - Actions
Hero - Drop the item from slot 1 of Hero
Set Item_Dropped = (Last dropped item)
Item - Move Item_Dropped to (Random point in Item Region <gen>)