Werid? o.o

General talk about editing, cheating, and deprotecting maps.

Moderator: Cheaters

naturesfury
Forum Spammer
Posts: 610
Joined: March 30th, 2009, 9:02 pm

Werid? o.o

Post by naturesfury »

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
User avatar
UndeadxAssassin
Grammar King
Posts: 2115
Joined: June 22nd, 2008, 10:11 pm
Title: Worst human for 4eva
Location: Mostly USEast

Re: Werid? o.o

Post by UndeadxAssassin »

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.
(20:53:52) Bartimaeus: Thank you, Jen.
(20:53:56) Bartimaeus: Truly, you are wise.


(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!
owner123
Super Moderator
Posts: 1943
Joined: February 3rd, 2009, 11:28 pm

Re: Werid? o.o

Post by owner123 »

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.
User avatar
UndeadxAssassin
Grammar King
Posts: 2115
Joined: June 22nd, 2008, 10:11 pm
Title: Worst human for 4eva
Location: Mostly USEast

Re: Werid? o.o

Post by UndeadxAssassin »

For the record, JJ's cheatpack uses substring for the activator.

Code: Select all

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


Fai's too.
(20:53:52) Bartimaeus: Thank you, Jen.
(20:53:56) Bartimaeus: Truly, you are wise.


(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!
owner123
Super Moderator
Posts: 1943
Joined: February 3rd, 2009, 11:28 pm

Re: Werid? o.o

Post by owner123 »

Nevermind then =\
naturesfury
Forum Spammer
Posts: 610
Joined: March 30th, 2009, 9:02 pm

Re: Werid? o.o

Post by naturesfury »

hmmm your first explanation might be right o.o

for the second, it used to work before =/
User avatar
haxorico
Super Moderator
Posts: 3190
Joined: February 24th, 2009, 1:31 pm
Location: JEW LAND

Re: Werid? o.o

Post by haxorico »

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: Select all

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: Select all

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: Select all

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: 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?
naturesfury
Forum Spammer
Posts: 610
Joined: March 30th, 2009, 9:02 pm

Re: Werid? o.o

Post by naturesfury »

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?
User avatar
haxorico
Super Moderator
Posts: 3190
Joined: February 24th, 2009, 1:31 pm
Location: JEW LAND

Re: Werid? o.o

Post by haxorico »

LAN Names? Care to give an example?
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?
User avatar
UndeadxAssassin
Grammar King
Posts: 2115
Joined: June 22nd, 2008, 10:11 pm
Title: Worst human for 4eva
Location: Mostly USEast

Re: Werid? o.o

Post by UndeadxAssassin »

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.
(20:53:52) Bartimaeus: Thank you, Jen.
(20:53:56) Bartimaeus: Truly, you are wise.


(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!