• 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.

[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
 
Level 4
Joined
Oct 2, 2004
Messages
128
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.
Top