• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[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