[Trigger] Simple (I Hope) Problem needs fix

Status
Not open for further replies.
Level 8
Joined
Jun 1, 2008
Messages
341
Basically I need a multiboard that keeps track of all cooldowns, As a spell is cast the cooldown for that spell is added to the multiboard. I need to insure that the cooldowns are in order of lowest cooldown time remaining at the top and longest time at the bottom. So can someone make this system for me?
 
Level 37
Joined
Mar 6, 2006
Messages
9,243
This organizes a real array from smallest to largest:

  • SortRealArray
    • Events
      • Player - Player 1 (Red) types a chat message containing sort as An exact match
    • Conditions
    • Actions
      • For each (Integer B) from 0 to 4, do (Actions)
        • Loop - Actions
          • For each (Integer A) from 0 to 4, do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • RealArraySort[(Integer A)] Greater than RealArraySort[((Integer A) + 1)]
                • Then - Actions
                  • Set RealTemp = RealArraySort[((Integer A) + 1)]
                  • Set RealArraySort[((Integer A) + 1)] = RealArraySort[(Integer A)]
                  • Set RealArraySort[(Integer A)] = RealTemp
                • Else - Actions
My array size is 6, indexes from 0 to 5. So set the FOR loops to go from 0 to YourArraySize-1. If you want to sort 12 real numbers, then set them to 11.
 
Status
Not open for further replies.
Top