Income Leaderboard

NightMagi

Member
Reaction score
5
Im using a income system, that i foud on this forum, triggers are:

Trigger:
  • Income
    • Events
      • Unit - A unit enters (Playable map area)
    • Conditions
      • ((Triggering unit) is A structure) Equal to False
    • Actions
      • If ((Unit-type of (Entering unit)) Equal to Peon) then do (Set Income[(Player number of (Owner of (Entering unit)))] = (Income[(Player number of (Owner of (Entering unit)))] + 1)) else do (Do nothing)
      • If ((Unit-type of (Entering unit)) Equal to Grunt) then do (Set Income[(Player number of (Owner of (Entering unit)))] = (Income[(Player number of (Owner of (Entering unit)))] + 2)) else do (Do nothing)
      • Skip remaining actions
      • Set Income[(Player number of (Owner of (Entering unit)))] = (Income[(Player number of (Owner of (Entering unit)))] + (Point-value of (Entering unit)))


Trigger:
  • Incomeadd
    • Events
      • Time - Every 20.00 seconds of game time
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 10, do (Actions)
        • Loop - Actions
          • Player - Add Income[(Integer A)] to (Player((Integer A))) Current gold


Trigger:
  • IncomeReport
    • Events
      • Time - Every 20.00 seconds of game time
      • Player - Player 1 (Red) types a chat message containing -income as An exact match
      • Player - Player 2 (Blue) types a chat message containing -income as An exact match
      • Player - Player 3 (Teal) types a chat message containing -income as An exact match
      • Player - Player 4 (Purple) types a chat message containing -income as An exact match
      • Player - Player 5 (Yellow) types a chat message containing -income as An exact match
      • Player - Player 6 (Orange) types a chat message containing -income as An exact match
      • Player - Player 7 (Green) types a chat message containing -income as An exact match
      • Player - Player 8 (Pink) types a chat message containing -income as An exact match
      • Player - Player 9 (Gray) types a chat message containing -income as An exact match
      • Player - Player 10 (Light Blue) types a chat message containing -income as An exact match
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Triggering player) Equal to (Triggering player)
        • Then - Actions
          • Game - Display to (Player group((Triggering player))) the text: (Income: + (String(Income[(Player number of (Triggering player))])))
        • Else - Actions
          • For each (Integer A) from 1 to 10, do (Actions)
            • Loop - Actions
              • Game - Display to (Player group((Player((Integer A))))) the text: (Income: + (String(Income[(Integer A)])))


i need a leaderboard for this system. Someone please help! :)
 

takethat

Active Member
Reaction score
12
Board = Multiboard variable, this is initialization
Code:
Board
    Events
        Time - Elapsed game time is 1.00 seconds
    Conditions
    Actions
        Multiboard - Create a multiboard with 3 columns and 9 rows, titled Income
        Set Board = (Last created multiboard)
        Multiboard - Set the text for Board item in column 1, row 1 to Name
        Multiboard - Set the text for Board item in column 2, row 1 to Gold Income
        Multiboard - Set the text for Board item in column 3, row 1 to Lumber Income
        For each (Integer A) from 1 to 9, do (Actions)
            Loop - Actions
                Multiboard - Set the display style for Board item in column 1, row (Integer A) to Show text and Hide icons
                Multiboard - Set the display style for Board item in column 2, row (Integer A) to Show text and Hide icons
                Multiboard - Set the display style for Board item in column 3, row (Integer A) to Show text and Hide icons
                Multiboard - Set the width for Board item in column 1, row (Integer A) to 9.00% of the total screen width
                Multiboard - Set the width for Board item in column 2, row (Integer A) to 5.00% of the total screen width
                Multiboard - Set the width for Board item in column 3, row (Integer A) to 5.00% of the total screen width
                Multiboard - Set the text for Board item in column 1, row ((Integer A) + 1) to (Name of (Player((Integer A))))
                Multiboard - Set the text for Board item in column 2, row ((Integer A) + 1) to 0
                Multiboard - Set the text for Board item in column 3, row ((Integer A) + 1) to 0
        Multiboard - Show Board
        Multiboard - Show all multiboards

I lazy type 1 or make 1 in world editor so i just copy n paste, this multiboard included lumber income... if you dont want lumber income, remove all action related to column 3

Code:
Player - Add TotalIncome[Income_integer] to (Player(Income_integer)) Current gold
Player - Add Total_Lumber[Income_integer] to (Player(Income_integer)) Current lumber
Multiboard - Set the text for Board item in column 2, row (Income_integer + 1) to (String(TotalIncome[Income_integer]))
Multiboard - Set the text for Board item in column 3, row (Income_integer + 1) to (String(Total_Lumber[Income_integer]))

PS: the 2nd code is needed when you give gold/lumber to player.
 

Turtlehead91

New Member
Reaction score
0
NightMagi!
I have been looking for a decent Income system for a few days. Yours is short and easy. i can't wait to get home and change my nonesense to this! Thanks.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top