System Advanced Chat System

Reaction score
341
Here is a chat system that i made that displays the text as a game message. Credits to PitzerMike for making the needed files And to shadow1500 for his tutorial on hiding messages. But i made the system.



How to install :
  1. Download This
  2. Extract it to your Warcraft III Directory
  3. Run WorldEdit,open your map, and go to Game Interface.
  4. Change [All], [Allies], [Observers], [Referees] and [Private] to a lots of spaces.


JASS:

scope ACS initializer Init

globals
    private boolean array Show // Dont Modify
    private string array Colors
    private constant real Time = 10 // How long to display the message for.
    private constant string Message = "-"
    private constant string Squelch = "Squelch"
    private constant string unSquelch = "Unsquelch"
    private constant string MsgUnquelch = "|c00808080You have Unsquelched " // Unsquelched
    private constant string MsgSquelch = "|c00808080You have Squelched " // Squelched
    private constant string Error1 = "|c00808080You cannot Squelch yourself "
    private constant string plist = "plist" 
endglobals

private function playerlist takes nothing returns nothing
    local integer i = 0
    local player p = GetTriggerPlayer()
    loop
      exitwhen i > 12
       if GetPlayerSlotState(Player(i)) == PLAYER_SLOT_STATE_PLAYING then
         if GetPlayerController(Player(i)) == MAP_CONTROL_USER then
          call DisplayTimedTextToPlayer(p, 0.00, 0.00, Time, Colors[GetPlayerId(Player(i))] + GetPlayerName(Player(i)))
         endif
       endif
       set i = i + 1
    endloop
endfunction

private function ACS_Setups takes nothing returns nothing
    local integer i = 0
    local integer i2 = 0
    set Colors[0] = "|c00FF0303" // Player 1
    set Colors[1] = "|c000042FF" // Player 2
    set Colors[2] = "|c001CE6B9" // Player 3
    set Colors[3] = "|c00540081" // Player 4
    set Colors[4] = "|c00FFFC01" // Player 5
    set Colors[5] = "|c00FEBA0E" // Player 6
    set Colors[6] = "|c0020C000" // Player 7
    set Colors[7] = "|c00E55BB0" // Player 8
    set Colors[8] = "|c00959697" // Player 9
    set Colors[9] = "|c007EBFF1" // Player 10
    set Colors[10] = "|c00106246" // Player 11
    set Colors[11] = "|c004E2A04" // Player 12
    loop
    exitwhen i2 > 12
    loop
      exitwhen i > 12
      set Show[i2 + i] = true
      set i = i + 1
    endloop
    set i2 = i2 + 1
    endloop
endfunction

private function Actions takes nothing returns nothing
    local integer i = 0
    loop
      exitwhen i > 11
      if Show[GetPlayerId(GetTriggerPlayer()) + i] == true then
       call DisplayTimedTextToPlayer(Player(i), 0.00, 0.00, Time, Colors[GetPlayerId(GetTriggerPlayer())] + GetPlayerName(GetTriggerPlayer()) + "|r : " + GetEventPlayerChatString())
       set i = i + 1
      endif
    endloop
endfunction
private function unsquelch takes nothing returns nothing
    local integer i = 0
    local string s = GetEventPlayerChatString()
    local player p = GetTriggerPlayer()
    loop
      exitwhen i > 12
      if SubString(s, StringLength(Message + unSquelch + " "), StringLength(s)) == GetPlayerName(Player(i)) then
        set Show[GetPlayerId(p) + i] = true   
        call DisplayTimedTextToPlayer(p, 0.00,0.00, Time, MsgUnquelch + GetPlayerName(Player(i)))
      elseif StringCase(SubString(s, StringLength(Message + unSquelch + " "), StringLength(s)), false) == StringCase(GetPlayerName(Player(i)), false) then
        set Show[GetPlayerId(p) + i] = true    
        call DisplayTimedTextToPlayer(p, 0.00,0.00, Time, MsgUnquelch + GetPlayerName(Player(i)))
      elseif StringCase(SubString(s, StringLength(Message + unSquelch + " "), StringLength(s)), true) == StringCase(GetPlayerName(Player(i)), true) then
        set Show[GetPlayerId(p) + i] = true 
        call DisplayTimedTextToPlayer(p, 0.00,0.00, Time, MsgUnquelch + GetPlayerName(Player(i)))
      endif
      
      set i = i + 1
    endloop
    set s = null
    set p = null
endfunction

private function squelch takes nothing returns nothing
    local integer i = 0
    local string s = GetEventPlayerChatString()
    local player p = GetTriggerPlayer()
    
    if SubString(s, StringLength(Message + Squelch + " "), StringLength(s)) == GetPlayerName(p) then
       call DisplayTimedTextToPlayer(p, 0.00,0.00, Time, Error1)
       return
    elseif StringCase(SubString(s, StringLength(Message + Squelch + " "), StringLength(s)), false) == StringCase(GetPlayerName(p), false) then
       call DisplayTimedTextToPlayer(p, 0.00,0.00, Time, Error1)
       return
    elseif StringCase(SubString(s, StringLength(Message + Squelch + " "), StringLength(s)), true) == StringCase(GetPlayerName(p), true) then
       call DisplayTimedTextToPlayer(p, 0.00,0.00, Time, Error1)
       return
    endif
    
    loop
      exitwhen i > 12
      if SubString(s, StringLength(Message + Squelch + " "), StringLength(s)) == GetPlayerName(Player(i)) then
        set Show[GetPlayerId(p) + i] = false    
        call DisplayTimedTextToPlayer(p, 0.00,0.00, Time, MsgSquelch + GetPlayerName(Player(i)))
      elseif StringCase(SubString(s, StringLength(Message + Squelch + " "), StringLength(s)), false) == StringCase(GetPlayerName(Player(i)), false) then
        set Show[GetPlayerId(p) + i] = false 
        call DisplayTimedTextToPlayer(p, 0.00,0.00, Time, MsgSquelch + GetPlayerName(Player(i)))
      elseif StringCase(SubString(s, StringLength(Message + Squelch + " "), StringLength(s)), true) == StringCase(GetPlayerName(Player(i)), true) then
        set Show[GetPlayerId(p) + i] = false 
        call DisplayTimedTextToPlayer(p, 0.00,0.00, Time, MsgSquelch + GetPlayerName(Player(i)))
      endif
      
      set i = i + 1
    endloop
    set s = null
    set p = null
endfunction

private function Init takes nothing returns nothing
    local trigger t = CreateTrigger(  )
    local integer i = 0
    loop
      exitwhen i > 11
       call TriggerRegisterPlayerChatEvent( t, Player(i), "", false )
       set i = i + 1
    endloop
    call TriggerAddAction( t, function Actions )
    set t = CreateTrigger()
    call TriggerRegisterTimerEvent( t, 0.00, false )
    call TriggerAddAction( t, function ACS_Setups )
    set t = CreateTrigger()
    set i = 0
    loop
      exitwhen i > 11
       call TriggerRegisterPlayerChatEvent( t, Player(i), Message + Squelch , false )
       set i = i + 1
    endloop
    call TriggerAddAction( t, function squelch )
    set t = CreateTrigger()
    set i = 0
    loop
      exitwhen i > 11
       call TriggerRegisterPlayerChatEvent( t, Player(i), Message + unSquelch , false )
       set i = i + 1
    endloop
    call TriggerAddAction( t, function unsquelch )
    set t = null
    set t = CreateTrigger()
    set i = 0
    loop
      exitwhen i > 11
       call TriggerRegisterPlayerChatEvent( t, Player(i), Message + plist , false )
       set i = i + 1
    endloop
    call TriggerAddAction( t, function playerlist )
    set t = null
endfunction

endscope
 
Reaction score
341
Haha , its just more modifieable ( spelled right?? ) im still not fully done with it , i could use some new ideas for features. And how does it look familiar , from where?
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • WildTurkey WildTurkey:
    is there a stephen green in the house?
    +1
  • The Helper The Helper:
    What is up WildTurkey?
  • The Helper The Helper:
    Looks like Google fixed whatever mistake that made the recipes on the site go crazy and we are no longer trending towards a recipe site lol - I don't care though because it motivated me to spend alot of time on the site improving it and at least now the content people are looking at is not stupid and embarrassing like it was when I first got back into this like 5 years ago.
  • The Helper The Helper:
    Plus - I have a pretty bad ass recipe collection now! That section of the site is 10 thousand times better than it was before
  • The Helper The Helper:
    We now have a web designer at my job. A legit talented professional! I am going to get him to redesign the site theme. It is time.
  • Varine Varine:
    I got one more day of community service and then I'm free from this nonsense! I polished a cop car today for a funeral or something I guess
  • Varine Varine:
    They also were digging threw old shit at the sheriff's office and I tried to get them to give me the old electronic stuff, but they said no. They can't give it to people because they might use it to impersonate a cop or break into their network or some shit? idk but it was a shame to see them take a whole bunch of radios and shit to get shredded and landfilled
  • The Helper The Helper:
    whatever at least you are free
  • Monovertex Monovertex:
    How are you all? :D
    +1
  • Ghan Ghan:
    Howdy
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?

      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