• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!

[Trigger] Splitting money when player leaves

Status
Not open for further replies.
Level 13
Joined
Oct 27, 2008
Messages
1,176
  • red quits
    • Events
      • Player - Player 1 (Red) leaves the game
    • Conditions
    • Actions
      • Player - Add (4 / (Player 1 (Red) Current gold)) to Player 2 (Blue) Current gold
      • Player - Add (4 / (Player 1 (Red) Current gold)) to Player 3 (Teal) Current gold
      • Player - Add (4 / (Player 1 (Red) Current gold)) to Player 4 (Purple) Current gold
      • Player - Add (4 / (Player 1 (Red) Current gold)) to Player 5 (Yellow) Current gold
Would that work yes or no?
 
Level 28
Joined
Mar 25, 2008
Messages
2,955
  • Actions
    • Custom script: set bj_wantDestroyGroup = true
    • Unit Group - Pick every unit in (Units in (Playable map area) owned by (Triggering player)) and do (Actions)
      • Loop - Actions
        • Player - Add (Point-value of (Picked unit)) to (Triggering player) Current gold
        • Unit - Kill (Picked unit)
    • Player Group - Pick every player in (All players matching ((((Matching player) controller) Equal to User) and (((Matching player) slot status) Equal to Plays))) and do (Actions)
      • Loop - Actions
        • Player - Add (((Triggering player) Current Gold) / ((Number of players in (All players matching ((((Matching player) controller) Equal to User) and (((Matching player) slot status) Equal to Plays))) - 0)) to (Picked player) Current Gold
    • Set QuittersGold = ((Triggering player) Current Gold)
    • Leaderboard - Remove (Triggering player) from (Last created leaderboard)
    • Player Group - Remove (Triggering player) from Defenders
    • Game - Display to (All players) the text: ((Name of (Triggering player)) + has left the game)
    • Game - Display to (All players) the text: ((All players receive + ((String((QuittersGold / (Number of players in (All players matching ((((Matching player) controller) Equal to User) and (((Matching player) slot status) Equal to Plays))))))) + gold)) + from the leaving player)
    • Player - Set (Triggering player) Current gold to 0
 
Status
Not open for further replies.
Top