Queries

General discussion of Warcraft 3. Threads may may be posted here if they don't fit into the other sections.

Moderator: Cheaters

User avatar
Risugami
Senior Member
Posts: 134
Joined: September 25th, 2011, 1:15 pm
Title: Slacking

Re: Queries

Post by Risugami »

naturesfury wrote:erm...it checks to see if the substring is "-gold " plus, if the last one was counted....you couldn't select just one character o.o
SubString("wheee",0,1)="w"
SubStringBJ("wheee",1,1)="w"
the bj just subtracts one from the 2nd argument so they are essentially equivalent
You made me confused. BJ means Blizzard JASS, it makes things easier. So I prefer to use SubString instead of SubStringBJ. Like what Nuuby said, SubString is a native. And also, natives are more efficient than BJs.

On the little tutorial I posted earlier, I meant in GUI. The way strings work in GUI. Because GUI is made to be easy. And JASS has no reason to be made easy. I didn't meant about SubStringBJ and SubString. If you do not know. GUI uses BJs, and BJs are made to make things easier. I know it sounds confusing. Just saying, GUI is different from JASS.

GUI = 1st character = 1
JASS = 1st character = 0

It's the same what you said in SubStringBJ. It -1 the 2nd argument. And in GUI. It uses SubStringBJ, that's why the first character is "1" in GUI.
Nuuby wrote:So should we have a guide on all commonly used natives or are some just hard to understand. Or at least those used in the common cheat packs around here.
You can try. It'll take a lot time and work though.
Image Image
(Made by: Risugami) | Risugami's Signature Workshop

"As a young boy, I was taught in high school that hacking was cool. - Kevin Mitnick"
naturesfury
Forum Spammer
Posts: 610
Joined: March 30th, 2009, 9:02 pm

Re: Queries

Post by naturesfury »

o.o ur missing my point.....ik all that......but
im talking about the last argument, the end number SubString(string,start,THIS!!! end)
im saying that that character isnt counted
so its hello not hellot in the example i gave a few posts back

dont even know why i included the bj =/ but whatever...
User avatar
Risugami
Senior Member
Posts: 134
Joined: September 25th, 2011, 1:15 pm
Title: Slacking

Re: Queries

Post by Risugami »

Oh well as far as I know it will select hellot. But it will select hello in GUI.

This thread got way to spammy lol. I mean, the thread starter disappeared.
Image Image
(Made by: Risugami) | Risugami's Signature Workshop

"As a young boy, I was taught in high school that hacking was cool. - Kevin Mitnick"
Apple
Forum Staff
Posts: 1470
Joined: November 3rd, 2010, 10:48 am
Title: Best Player
Location: Singapore

Re: Queries

Post by Apple »

This thread is not for you to debate and changing subjects ^^
Request a map? Follow the rulesHERE
Request templateHERE
Please, do not PM me.
On the side note, I'm still playing vampirism speed on malaysia room, occasionally in Garena. Bcuz too lazy to find out where else I can play them.
User avatar
Risugami
Senior Member
Posts: 134
Joined: September 25th, 2011, 1:15 pm
Title: Slacking

Re: Queries

Post by Risugami »

I didnt, what are you talking about? It's still about SubString and strings, still on topic. Not trying to be rude but. You just disappeared, and wondered lol. Anyways, the thread got spammy. Just sayin. What's wrong with that?
Image Image
(Made by: Risugami) | Risugami's Signature Workshop

"As a young boy, I was taught in high school that hacking was cool. - Kevin Mitnick"
User avatar
haxorico
Super Moderator
Posts: 3195
Joined: February 24th, 2009, 1:31 pm
Location: JEW LAND
Been thanked: 1 time

Re: Queries

Post by haxorico »

Bump from a month back.

I just happened to step on this thread and rad it all. And I just really have to point out several stuff.

1)
SubString(s2s,0,6)=="-gold "
The example above is not counting the next character. Lets go to your example-tutorial and Ill explain why.
- g o l d <space>
0 1 2 3 5 6
That is exacly that. If it would have counted the next character. Lets say I used: "-gold 10" you were saying that "SubString(s2s,0,6)=="-gold "" is a false statemant. as it is NOT equals to "-gold " it is equal to "-gold 1" and thus the command wouldn't work. So I just wanted to clear this out.

2) SubString vs SubStringBJ
As you said, in GUI the counting starts from 1, it is just more logical to people who don't understand it so good. Same is happening with player number. in the GUI it shows player red as player 1, while in jass it is player 0. People who never coded before see it as a more logical thinking (check the first page for proof, you had to explain it starts from 0) - It is just to make things easier.
Now lets review what we do with SubStringBJ.

After writing our code using the GUI. The code is converted into jass.
Now you said (for example) to get the first 2 letters from a string, in the GUI converted it to SubStringBJ(string,1,2)
which turns to the following native
SubString(string,1-1,2)
So 1-1 = 0. We got the same result in both our cases (YAY!)

3) GUI is NOT different from JASS. Blizzard don't expect all map-makers to be coders. There is a big difference. So what they did is the GUI system. You tell the map what you want to do. And it converts itself to a code. GUI is not a language, its in interface (Graphical User Interface)
So don't compare the 2.
Image
Spoiler:
(02:24:09)

Code: Select all

ChatBot: FatherSpace logs into the Chat.
(02:24:28) Lanaya: Gtfo ken.
(02:24:33) ChatBot: FatherSpace logs out of the Chat.
(02:24:40) Lanaya: Thought so. bitch.
(02:24:44) ChatBot: FatherSpace logs into the Chat.
(02:24:48) FatherSpace: Can I come back yet?
(02:24:51) Lanaya: What'd i say earlier.
(02:24:51) Lanaya: No.
(02:24:58) FatherSpace: Let's try this...
(02:25:01) ChatBot: Lanaya has been logged out (Kicked).

Code: Select all


(14:33:51) 2Pac: Do you know what'S so funny?
(14:34:01) Lanaya: No, please show me.
(14:34:07) 2Pac: This.
(14:34:09) ChatBot: Lanaya has been logged out (Kicked).
(14:34:10) 2Pac: 

Code: Select all

(14:35:59) haxorico: No one will belive me if I say "I got this song from 2pac on MSN" lolz ^^
(14:36:02) Lanaya: lolz.
(14:36:16) 2Pac: I AIN'T DEAD FFS.
(14:36:26) 2Pac: I'm a living legend, y'now.
(14:37:17) haxorico: why is 2Pac a legend?
(14:37:28) Lanaya: He's the worse rapper evar.

Code: Select all

(15:42:51) Lanaya: can i suck , . . .

Code: Select all

(13:55:21) ChatBot: 2Pac rolls 1d100 and gets 1.
(13:55:21) ChatBot: haxorico rolls 1d2 and gets 2.
(13:55:27) haxorico: owned?

Code: Select all

GeorgeMots: xplain what happens in SP. Why cant you save?
dast.-:i need play with 2 players

Code: Select all

(21:53:08) (673237): plzplzplz, im sorry about before.
(21:53:26) FatherSpace: I'm sorry you were born.
(21:53:31) ChatBot: (673237) has been logged out (Kicked).

Code: Select all

(10:08:02) Bartimaeus: you do know run I youtube channel for my favorite music, right?