HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Storing a string that is completely different each time you type it...

02-24-2003, 10:38 PM#1
FyreDaug
Which command is it to get a chat message to be stored into a variable no matter what it is? It always starts as ' S ' incase that helps.

Appreciated.
02-24-2003, 11:16 PM#2
FyreDaug
Help?
02-24-2003, 11:19 PM#3
DaKaN
i dont understand exactly what you are looking for.. the varible type?
02-24-2003, 11:21 PM#4
FyreDaug
You did it for your password thing, you type something in, and no matter what it is, it is stored into a string variable.
02-24-2003, 11:23 PM#5
DaKaN
ya, string varible and use the substring and give it a postion to store from

since the password was a set legnth i did a for loop that took the string and strored it peice by peice, its in the GetEnteredCode trigger

the GUI trigger is substring (entered chat string, X,Y) where x and y are starting chars and ending chars in the string

example "Take This Line"

substring (EnteredChatString, 3,7) would get you "ke th" from that string
02-24-2003, 11:26 PM#6
Tearsong
Sorry to get off topic but no one else would answer my query...

Could you do this to change a characters name in game? Without creating countless custom units with different names?
02-24-2003, 11:27 PM#7
FyreDaug
I understand that part, but could it be done simpler? My password is 30characters long (including dashes) and I don't want to store each thing individually. What can I use to start the trigger without using entered chat string = THE WHOLE PASSWORD
Can I start it off like if the chat string entered is -S (as part of the code) or something, it will start the trigger. Using 10 digits as my code, would this work?
-S1234567890
Typing that in, would it start the trigger because the event is -S to start it?
I need a simple method to start the trigger, then store the rest.
02-24-2003, 11:29 PM#8
DaKaN
units names are stored in the wts file (warcraft text strings) and the editor refers to them as "STRING 22" or whatever. I tried a very times to edit the file directly and make it a varible and at map int set the name of the varible to the players name or something, but it doenst work, just causes the game to crash.

actualy ALL text strings are stored in this file, if you enter text, its stored here, map description, number of players, map name, unit names, game text, everything
02-24-2003, 11:32 PM#9
DaKaN
yes fyre, thats how i did my code, the password must start with a D and end with a N other wise the entered chat is ignored

the first code of that trigger is a IF THEN ELSE if substring enteredchatstring 1,1 is = to D and 18,18 is N then do nothign else return

thats the failsafe to ignore junk or normal entered player messages

you can take the substring of 1,2 and if its = to "-S" that would work also, remember its case sensitive
02-24-2003, 11:35 PM#10
FyreDaug
Okay, so can I just put as an event
Entered chat string = " -S " as a substring

Even while the whole entered chat string could be -S1234567890 ?

This is where I get lost, because if you define a substring anywhere else it requires the location of it in a specific string, this is just telling it that -S is a substring, but of what?
02-24-2003, 11:50 PM#11
RodOfNOD
Tearsong
Fighter

Registered: Feb 2003
Location:
Posts: 90
Sorry to get off topic but no one else would answer my query...

Could you do this to change a characters name in game? Without creating countless custom units with different names?


RESPONSE:

For my risk game i had to create 42 x 2 custom units one for each country and card.... it is sad but u have to since the name is hardcoded.

geocities.com/rodofnod2003
02-25-2003, 12:04 AM#12
FyreDaug
Nevermind, I got it to work a different way.

Thanks anyways Dakan.

Ps. Thanks for the inspiration to write my own password code (Which works with my custom stats and stuff, and the security system works too)

ALSO: Does anyone know the minimum amount of letter/characters and the max for an account on bnet? I want this security to be flawless and then add in encryption so it's also hack proof.