Warcraft III resources & community, 2003–2006 · archived

GetPlayerColorCode

not rated
Submitted by AltSubmitterConversion0 downloads
Returns the text color code for the player's default color. Doesn't support neutral players yet. Player3's color might be a little off -- couldn't find a code labeled teal, so I used turqoise.

Source

function GetPlayerColorCode takes player whichPlayer returns string
    if ( whichPlayer == Player(0) ) then
        return "|c00FF0000"
    endif
    if ( whichPlayer == Player(1) ) then
        return "|c000000FF"
    endif
    if ( whichPlayer == Player(2) ) then
        return "|c0040E0D0"
    endif
    if ( whichPlayer == Player(3) ) then
        return "|c00A020F0"
    endif
    if ( whichPlayer == Player(4) ) then
        return "|c00FFFF00"
    endif
    if ( whichPlayer == Player(5) ) then
        return "|c00FFA500"
    endif
    if ( whichPlayer == Player(6) ) then
        return "|c0000FF00"
    endif
    if ( whichPlayer == Player(7) ) then
        return "|c00FFC0CB"
    endif
    if ( whichPlayer == Player(8) ) then
        return "|c00BEBEBE"
    endif
    if ( whichPlayer == Player(9) ) then
        return "|c00ADD8E6"
    endif
    if ( whichPlayer == Player(10) ) then
        return "|c00006400"
    endif
    if ( whichPlayer == Player(11) ) then
        return "|c00A52A2A"
    endif
    return null
endfunction

Comments

0

No comments.