• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

[JASS] Chat system

Status
Not open for further replies.
Level 3
Joined
Sep 18, 2004
Messages
45
Ever wonde rhow people amke trigger slike setname-bob then u say -hi and it says Bob:hi well now you know!
Player - Player 1 (Red) types a chat message containing setname- as A substring

This establishes the chat message and must be set as a substring.

Now condition:

(Substring((Entered chat string), 1, 8)) Equal to setname-

.

Actions:

Set CharName_Player1 = ((|cffFF0000 + (Substring((Entered chat string), 9, 119))) + (: + |r))

.

Now make a new trigger named it chat 1.

Event:

Player - Player 1 (Red) types a chat message containing - as A substring

We only need just the symbol we established the name in for this one, in this example it's the -

Condition:

(Substring((Entered chat string), 1, 1)) Equal to -

yep just like the naming event, however for the actual chat we only need 1 digit, so set the substring to 1, 1 to establish we are using only 1 digit.

Actions:

Game - Display to (All players) the text: (CharName_Player1 + (Substring((Entered chat string), 2, 126)))

Now the MRP cheat system will work! have fun with your new High tech MRP chat system
 
umm...
........
..................
.............................

This has nothing to do with JASS. :?

This is just a simple trigger that any intermediate+ triggerer should know.
 
Status
Not open for further replies.
Back
Top