• 🏆 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!

Name Spoofer {-name [desired name], like in Polar Escape}

Status
Not open for further replies.

Kenji.1484

K

Kenji.1484

Hi, could somebody please tell me how to make a Name Spoofer trigger like in the Polar Escape series where you type -name [desired name] in the chat box?

Thank you very much!
 

Kenji.1484

K

Kenji.1484

It's supposed to change your name by typing "-name [enter desired name]". ^^
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
  • Untitled Trigger 005
    • Events
      • Player - Player 1 (Red) types a chat message containing -name as A substring
    • Conditions
    • Actions
      • Player - Set name of (Triggering player) to (Substring((Entered chat string), 7, (Length of (Entered chat string))))
Typing
-name Mike
will change your name to Mike.

You could limit player name to changing that (Length of (Entered chat string) to 21 for example.

If you type
Mike -name
Your name will be
name

So it doesn't matter where the -name is. I think there's a way to check whether it is at the beginning or not.

EDIT:

  • Untitled Trigger 005
    • Events
      • Player - Player 1 (Red) types a chat message containing -name as A substring
    • Conditions
    • Actions
      • Set Temp_String_2 = (Substring((Entered chat string), 1, 5))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Temp_String_1 Equal to Temp_String_2
        • Then - Actions
          • Player - Set name of (Triggering player) to (Substring((Entered chat string), 7, (Length of (Entered chat string))))
        • Else - Actions
Create Temp_String_1 and set it's value to -name.
 

Kenji.1484

K

Kenji.1484

Thank you very much!
+Rep! :)

Oh, it's "Temp_String_1 Not Equal to Temp_String_2", well it only worked for me when I did that. ^^
 
Last edited by a moderator:

Kenji.1484

K

Kenji.1484

Strange, it doesn't work, even if I add that action. :(
 

Kenji.1484

K

Kenji.1484

Okay, it works now. :)
I'm not sure what exactly I did wrong, but I think it's something to do with Temp_String_2's value being <Empty String> instead of None. ^^

Anyhow, thank you very much Maker. :)
 
Status
Not open for further replies.
Top