HELP with TriggerRegisterPlayerChatEvent

General talk about editing, cheating, and deprotecting maps.

Moderator: Cheaters

User avatar
FireFistAce
Newcomer
Posts: 2
Joined: August 4th, 2008, 4:20 pm

HELP with TriggerRegisterPlayerChatEvent

Post by FireFistAce »

Hi. I am noob at jass so could someone please help me and tell me how the "call TriggerRegisterPlayerChatEvent(...)" works? Is it something like "Player(..) enters __ as an exact match"?

I wanna use it at e.x. -lvl xx and stuff like that but i dont know how...
initialD
Some Honorary Title
Posts: 1713
Joined: June 8th, 2007, 5:08 am
Title: Angry Bird

Re: HELP with TriggerRegisterPlayerChatEvent

Post by initialD »

why don't you just use a cheat pack we got?
Get one of them in the map cheating section.

anyway here is an example:

Code: Select all

call TriggerRegisterPlayerChatEvent(abc,Player(0),"-lvl",false)
abc is the trigger's name.
so you have to define it on the globals part.

Code: Select all

trigger abc=CreateTrigger()
Player could be 0-11. 0 is red, 1 is blue and so on.
Player(0) here means only player red will be able to use the trigger.

"-lvl" is the strings required.

so when player red type -lvl, it will run the trigger.

yeap, in this case "false" means no exact match required.
Because a player will need to type an integer behind -lvl,( eg. -lvl 5)
since -lvl 5 is not an exact string equal to -lvl, it won't run the trigger if you set it to "true"

p/s, just use a cheat pack we got. save up much time
:)
User avatar
FireFistAce
Newcomer
Posts: 2
Joined: August 4th, 2008, 4:20 pm

Re: HELP with TriggerRegisterPlayerChatEvent

Post by FireFistAce »

Thanks for the explanation but i dont wanna take things made by someone else. I wanna make my own cheats and enter them in a map cos the essential here is to learn basic things in jass. So i have another question. This thing (call TriggerRegisterPlayerChatEvent(abc,Player(0),"-lvl",false) will function anytime player 1 writes e.x. -lvl xx ,or will it "check" the chat every 0.01 seconds. And can i adjust it in other players too, cos i wont be at player red slot all the times!

PLEH! :shock:
initialD
Some Honorary Title
Posts: 1713
Joined: June 8th, 2007, 5:08 am
Title: Angry Bird

Re: HELP with TriggerRegisterPlayerChatEvent

Post by initialD »

it will check if the strings match the trigger everytime player 0 says somethings.
It will do the action when it matches, it will do nothing if it doesn't match.
so it could be laggy if there are too many triggers for one player.

how many cheats you want to insert exactly?

Just adjust the integer for player.
Player(0) = red
Player(1)= blue
and...etc......
3 Teal, 4 Purple, 5 Yellow, 6 Orange, 7 Green, 8 Pink,
9 Gray, 10 Lightblue, 11 Darkgreen and 12 Brown.

Just learn from Aero's pack version 1. It's simple and easy to be understood.