Sell
Events
Unit - A unit Pawns an item (to shop)
Conditions
((Owner of (Selling unit)) slot status) Equal to Has left the game
Actions
Wait 0.05 seconds
Set Payda = (Number of players in (All allies of (Triggering player)))
Set Gold = ((Triggering player) Current gold)
Player - Set (Triggering player) Current gold to 0
Set GoldToGive = (Gold / Payda)
Player Group - Pick every player in (All allies of (Triggering player)) and do (Actions)
Loop - Actions
Player - Add GoldToGive to (Picked player) Current gold
Sell
Events
Unit - A unit Pawns an item (to shop)
Conditions
((Owner of (Selling unit)) slot status) Equal to Has left the game
Actions
Wait 0.01 seconds
Set Payda = (Number of players in (All players matching (((((Matching player) slot status) Equal to Is playing) and (((Matching player) controller) Equal to User)) and (((Matching player) is an ally of (Owner of (Triggering unit))) Equal to True))))
Set Gold = ((Owner of (Selling unit)) Current gold)
Player - Set (Owner of (Selling unit)) Current gold to 0
Set GoldToGive = (Gold / Payda)
Player Group - Pick every player in (All players matching (((((Matching player) is an ally of (Owner of (Triggering unit))) Equal to True) and (((Matching player) controller) Equal to User)) and (((Matching player) slot status) Equal to Is playing))) and do (Actions)
Loop - Actions
Player - Add GoldToGive to (Picked player) Current gold
Set Gold = 0
Set GoldToGive = 0
Set Payda = 0