wc3edit.net

United Warcraft 3 map hacking!
It is currently April 26th, 2024, 10:53 pm

All times are UTC




Post new topic Reply to topic  [ 24 posts ]  Go to page 1, 2, 3  Next
Author Message
 Post subject: Werid? o.o
PostPosted: October 14th, 2011, 9:47 pm 
Offline
Forum Spammer

Joined: March 30th, 2009, 9:02 pm
Posts: 682
Ok -.- I noticed two things.....anyone wanna verify for me?

1) case sensativity.... even if you do call TriggerRegisterPlayerChatEvent(trigger,Player(0),"-werid",true) -Weird works as does all variations -WEiRD -WeirD -wEiRd etc but if you add spaces (even one) after it, it doesnt trigger it....

2) in lan,
if GetPlayerName(Player(zzz))=="myname"then
call do something
endif
doesnt do that something =/
had to type in the activator to test... (this is JJCP if it matters....which i doubt cuz i tried with my CP too)
I think it has something to do with the GetPlayerName but when i did
call DisplayTextToPlayer(display string GetPlayerName(GetTriggeringPlayer())
it showed me my name

*note: syntax may be wrong....didnt rly bother to check/do it right


Top
 Profile  
 
 Post subject: Re: Werid? o.o
PostPosted: October 15th, 2011, 12:17 am 
Offline
Grammar King
User avatar

Joined: June 22nd, 2008, 10:11 pm
Posts: 2410
Location: Mostly USEast
Title: Worst human for 4eva
Seriously....werid?...

On another note, that's because triggerregisterplayerchatevent isn't case sensitive (as opposed to something like substring) , but when you type true at the end, it has to be an exact match, whereas with false, it just has to be partial.

As for the second part, did you set/loop zzz?
I don't know how names for LAN works, either, but that might be a problem, too.

_________________
Quote:
(20:53:52) Bartimaeus: Thank you, Jen.
(20:53:56) Bartimaeus: Truly, you are wise.


Quote:
(23:44:12) Bartimaeus: I was in pubic school until middle school...


Learn how to extract and read RAW Codes here!

Need help? Click here and ask your question!


Top
 Profile  
 
 Post subject: Re: Werid? o.o
PostPosted: October 15th, 2011, 12:27 am 
Offline
Super Moderator

Joined: February 3rd, 2009, 11:28 pm
Posts: 2394
naturesfury wrote:
Ok -.- I noticed two things.....anyone wanna verify for me?

1) case sensativity.... even if you do call TriggerRegisterPlayerChatEvent(trigger,Player(0),"-werid",true) -Weird works as does all variations -WEiRD -WeirD -wEiRd etc but if you add spaces (even one) after it, it doesnt trigger it....

2) in lan,
if GetPlayerName(Player(zzz))=="myname"then
call do something
endif
doesnt do that something =/
had to type in the activator to test... (this is JJCP if it matters....which i doubt cuz i tried with my CP too)
I think it has something to do with the GetPlayerName but when i did
call DisplayTextToPlayer(display string GetPlayerName(GetTriggeringPlayer())
it showed me my name

*note: syntax may be wrong....didnt rly bother to check/do it right

Could have sworn TriggerRegisterPlayerChatEvent was case sensitive. Know how on cheatpacks -CHEATS<><> won't work but -Cheats<><> does?
And ofcourse it doesn't work if you add a space.. it's completely different text then. It's like saying "if I type -weird it works but it does not work if I add a A to the end of the message."
JASS/GUI text events have always been a gray topic for me. IIRC it is not case sensitive if done in GUI, but is if done in JASS.

Ya, it's not gonna do anything in LAN because you can choose your name in lan. That's my explanation at least. Although I don't know how savecodes work on LAn if that's true as I'm pretty sure it checks your code with your name to see if it really is yours.


Top
 Profile  
 
 Post subject: Re: Werid? o.o
PostPosted: October 15th, 2011, 12:37 am 
Offline
Grammar King
User avatar

Joined: June 22nd, 2008, 10:11 pm
Posts: 2410
Location: Mostly USEast
Title: Worst human for 4eva
For the record, JJ's cheatpack uses substring for the activator.

Code:
if SubString(GetEventPlayerChatString(),0,100)==Activator and not IsPlayerInForce(p2p,CHEATER) then


Fai's too.

_________________
Quote:
(20:53:52) Bartimaeus: Thank you, Jen.
(20:53:56) Bartimaeus: Truly, you are wise.


Quote:
(23:44:12) Bartimaeus: I was in pubic school until middle school...


Learn how to extract and read RAW Codes here!

Need help? Click here and ask your question!


Top
 Profile  
 
 Post subject: Re: Werid? o.o
PostPosted: October 15th, 2011, 12:39 am 
Offline
Super Moderator

Joined: February 3rd, 2009, 11:28 pm
Posts: 2394
Nevermind then =\


Top
 Profile  
 
 Post subject: Re: Werid? o.o
PostPosted: October 15th, 2011, 12:40 am 
Offline
Forum Spammer

Joined: March 30th, 2009, 9:02 pm
Posts: 682
hmmm your first explanation might be right o.o

for the second, it used to work before =/


Top
 Profile  
 
 Post subject: Re: Werid? o.o
PostPosted: October 15th, 2011, 1:26 am 
Offline
Super Moderator
User avatar

Joined: February 24th, 2009, 1:31 pm
Posts: 3815
Location: JEW LAND
TriggerRegisterPlayerChatEvent is NOT case sensitive, and as said by UndeadXAssasin, the TRUE at the end meaning its an exact match. If you look at JJ's CP it says False at the end, and the string is "-". So each time you write a word that contains the character "-" it checks for your cheats.

On another note. GUI is not case-sensitive because it uses TriggerRegisterPlayerChatEvent for EVERY single command. Thats why it takes 20 triggers for 20 commands, while if you know jass you can do it in 1 trigger (like JJ's CP does).

Now for substring. Lets look at the following code.
Code:
function X takes nothing returns nothing
local string chat="-Gold"
local string command="-gold"
if chat==commands then
//give gold
endif
endfunction

Lets say that you entered the word "-Gold" (the variable called "chat") it won't match the command as it is "-gold" even if logicaly G=g, its a computer, and it sees the following:
Code:
if "-Gold"=="-gold" then

You can see they are NOT a match. So how do we fix the problem? Well JASS has a built in command if you want it NOT case-sensitive.
Code:
function X takes nothing returns nothing
local string chat=StringCase("-Gold",false)
local string command="-gold"
if chat==commands then
//give gold
endif
endfunction

What StringCase does, it takes a string (first paramter) and turns all its characters to either upper (true) or lower (false) case characters (second parameter). So now "-Gold" is set to "-gold".

Hope that clears things out.

_________________
Image
Spoiler:
(02:24:09)
Code:
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:

(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:
(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:
(15:42:51) Lanaya: can i suck , . . .

Code:
(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:
GeorgeMots: xplain what happens in SP. Why cant you save?
dast.-:i need play with 2 players

Code:
(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:
(10:08:02) Bartimaeus: you do know run I youtube channel for my favorite music, right?


Top
 Profile  
 
 Post subject: Re: Werid? o.o
PostPosted: October 15th, 2011, 3:28 am 
Offline
Forum Spammer

Joined: March 30th, 2009, 9:02 pm
Posts: 682
lol....ik you're trying to help out....but I don't think you said anything the others didnt xD except stringcase but you already told me that

know anything about lan names?


Top
 Profile  
 
 Post subject: Re: Werid? o.o
PostPosted: October 15th, 2011, 9:08 am 
Offline
Super Moderator
User avatar

Joined: February 24th, 2009, 1:31 pm
Posts: 3815
Location: JEW LAND
LAN Names? Care to give an example?

_________________
Image
Spoiler:
(02:24:09)
Code:
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:

(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:
(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:
(15:42:51) Lanaya: can i suck , . . .

Code:
(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:
GeorgeMots: xplain what happens in SP. Why cant you save?
dast.-:i need play with 2 players

Code:
(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:
(10:08:02) Bartimaeus: you do know run I youtube channel for my favorite music, right?


Top
 Profile  
 
 Post subject: Re: Werid? o.o
PostPosted: October 15th, 2011, 2:13 pm 
Offline
Grammar King
User avatar

Joined: June 22nd, 2008, 10:11 pm
Posts: 2410
Location: Mostly USEast
Title: Worst human for 4eva
He's talking about when you try to use name activator in LAN. It won't work, apparently. Although, it's strange because it should work if he has the case and everything correct.

_________________
Quote:
(20:53:52) Bartimaeus: Thank you, Jen.
(20:53:56) Bartimaeus: Truly, you are wise.


Quote:
(23:44:12) Bartimaeus: I was in pubic school until middle school...


Learn how to extract and read RAW Codes here!

Need help? Click here and ask your question!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 24 posts ]  Go to page 1, 2, 3  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 22 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group

phpBB SEO


Privacy Policy Statement
Impressum (German)