[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