• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

Hex2Dec

Status
Not open for further replies.
How can I convert Hx to Dec according to this table?

551_1.gif
 
  • HtD Init
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set String_Array_x[0] = 0
      • Set String_Array_x[1] = 1
      • Set String_Array_x[2] = 2
      • Set String_Array_x[3] = 3
      • Set String_Array_x[4] = 4
      • Set String_Array_x[5] = 5
      • Set String_Array_x[6] = 6
      • Set String_Array_x[7] = 7
      • Set String_Array_x[8] = 8
      • Set String_Array_x[9] = 9
      • Set String_Array_x[10] = A
      • Set String_Array_x[11] = B
      • Set String_Array_x[12] = C
      • Set String_Array_x[13] = D
      • Set String_Array_x[14] = E
      • Set String_Array_x[15] = F
  • Hex to Dec
    • Events
      • Player - Player 1 (Red) types a chat message containing <Empty String> as A Sub-String
    • Conditions
    • Actions
      • Set String_x = (Entered chat string)
      • Set Integer_x = 0
      • Set Integer_y = 1
      • Set Boolean_x = False
      • For each (Integer A) from 1 to (Length of (Entered chat string)), do (Actions)
        • Loop - Aktionen
          • For each (Integer B) from 0 to 15, do (Actions)
            • Loop - Aktionen
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • 'IF'-Conditions
                  • (Substring(String_x, (Length of String_x), (Length of String_x))) Equal to String_Array_x[(Integer B)]
                  • Boolean_x Equal to False
                • 'THEN'-Actions
                  • Set Integer_x = (Integer_x + ((Integer B) x Integer_y))
                  • Set Boolean_x = True
                • 'ELSE'-Actions
          • Set Integer_y = (Integer_y x 16)
          • Set String_x = (Substring(String_x, 1, ((Length of String_x) - 1)))
          • Set Boolean_x = False
      • Game - Display to (All players) the text: (String(Integer_x))
 
Status
Not open for further replies.
Back
Top