[GUI or JASS] CP commands [ 7 out 7 problems fixed! ] thanks

General talk about editing, cheating, and deprotecting maps.

Moderator: Cheaters

User avatar
haxorico
Super Moderator
Posts: 3197
Joined: February 24th, 2009, 1:31 pm
Location: JEW LAND
Been thanked: 1 time

[GUI or JASS] CP commands [ 7 out 7 problems fixed! ] thanks

Post by haxorico »

i rad the FAQ and i downloaded the cheat map.

edit: ill just write my troubles here. and mark in green the stuff i have working now

the lumber trigger - FIXED - thanks to UndeadxAssassin and Hillo
Spoiler:
Trigger Name - JEWS LUMBER
Events

Code: Select all

Player - Player 1 (Red) types a chat message containing -lumber as a substring
Conditions

Code: Select all

((Triggering player) is in jews_group) Equal to True
(Substring((Enterd chat string),1,5)) Equal to -lumber
Actions

Code: Select all

Player - Add (Integer((Substring((Entered chat string), 6, 20))))) to (Triggering player) Current lumber
the gold commands has the same stuff. only the -lumber was changed to -gold in all places. yet the gold command works and the lumber command doesnt work. why is that? - FIXED
the invul trigger - FIXED thanks to Syre
Spoiler:
Trigger name - JEW INVUL
Events

Code: Select all

     Player - Player 1 (Red) types a chat message containing  -invul as An exact match
Conditions

Code: Select all

     ((Triggering player) is in jews_group) Equal to True
Actions

Code: Select all

     Unit Group - Pick every unit in (Units currently selected by (Triggering player)) and do (Actions)
          Loop
		       Unit - Make (Picked unit) Invulnerable
well i pick the unit. write -invul and nothing happens =\ why is that? it suposed to make the picked invularable aint it?
The Food Trigger - FIXED - thanks to lanaya
Spoiler:
Trigger name - JEW FOOD
Events

Code: Select all

     Player - Player 1 (Red) Types a chat message containing -food as A substring
Conditions

Code: Select all

     ((Triggering player) is in jews_group) Equal to True
	 (Substring((Entered chat string),1,5))Equal to -food
Actions

Code: Select all

     Player - Add (integer((Substring((Entered chat string) 6,9)))))to (Triggering player) Food max
well i did same thing as in the lumber and gold function. yet it doesnt work. =\ any ideas why?
the activator trigger - FIXED - Thanks to FatherSpace
Spoiler:
EVENT

Code: Select all

Player - Player 1 (Red) types a chat message containing JEW PAWAH! as an exact match
Conditions

Code: Select all

((Triggering player) is in jews_group] Not  equal to True
actions

Code: Select all

Player Group - Add (Triggering player) to jews_group
Game - Display to jews_group the text: (name of (triggering player))
well in this trigger the red types the activator. and gets the cheats on. but how will i make other players get it aswell only when they write? do i have to do an event for each and every player? and then i have to do the same in each and every trigger?
the -hp / -mp command - FIXED - thanks to my brain
Spoiler:
Trigger name - JEW HP
Events

Code: Select all

      Player - Player 1 (Red) types a chat message containing -hp as A Substring
Conditions

Code: Select all

     
     (Substring((Entered chat string),1,3)) Equal to -hp
     ((Triggering player) is in jews_group) Equal to True
Actions

Code: Select all

     Unit Group - Pick every unit in (Units currently selected by (Triggering player)) and do (Actions)
	      Loop - Actions
		       Unit - Set life of (Picked unit) to (Real((Substring((Entered chat string),4,14))))
doesnt matter what i write after the -hp / -mp it sets them to 0
-mp 9000 = makes my MP 0
-hp 1337 = kills me (0 hp)
those numbers are just examples. it happens with all numbers

if u dunno GUI but u know JASS. here is the command after convert.

Code: Select all

function Trig_JEW_HP_Conditions takes nothing returns boolean
    if ( not ( SubStringBJ(GetEventPlayerChatString(), 1, 3) == "-hp" ) ) then
        return false
    endif
    if ( not ( IsPlayerInForce(GetTriggerPlayer(), udg_jews_group) == true ) ) then
        return false
    endif
    return true
endfunction

function Trig_JEW_HP_Func002A takes nothing returns nothing
    call SetUnitLifeBJ( GetEnumUnit(), S2R(SubStringBJ(GetEventPlayerChatString(), 4, 124)) )
endfunction

function Trig_JEW_HP_Actions takes nothing returns nothing
    call ForGroupBJ( GetUnitsSelectedAll(GetTriggerPlayer()), function Trig_JEW_HP_Func002A )
endfunction

function InitTrig_JEW_HP takes nothing returns nothing
    local integer i2i = 0
    set gg_trg_JEW_HP = CreateTrigger(  )
    loop
    exitwhen i2i>11
    call TriggerRegisterPlayerChatEvent( gg_trg_JEW_HP, Player(i2i), "-hp", false )
    set i2i=i2i+1
	endloop
    call TriggerAddCondition( gg_trg_JEW_HP, Condition( function Trig_JEW_HP_Conditions ) )
    call TriggerAddAction( gg_trg_JEW_HP, function Trig_JEW_HP_Actions )
endfunction
the -revive command - FIXED - thanks to a friend on MSN :D
Spoiler:

Code: Select all

Trigger name - JEW REVIVE

Event
     Player 1 (Red) Types -revove as An exact match
Conditions
     ((Triggering player) is in jews_group) Equal to True
Actions
     Unit Group - Pick every iunit in (Units currently selected by (Triggering player)) and do (Actions
	      Loop - Actions
		       Hero - Instantly revive (Revivable Hero) at (Center oof (Current camera bounds)), Hide revival graphics
well i kill my hero. and i see it at the tavern. its revivable if i click on him. he will be revived. but the trigger doesnt work =\
here is the trigger in jass

Code: Select all

function Trig_JEW_REVIVE_Conditions takes nothing returns boolean
    if ( not ( IsPlayerInForce(GetTriggerPlayer(), udg_jews_group) == true ) ) then
        return false
    endif
    return true
endfunction

function Trig_JEW_REVIVE_Actions takes nothing returns nothing
    call ReviveHeroLoc( GetRevivableUnit(), GetPlayerStartLocationLoc(GetTriggerPlayer()), false )
endfunction

//===========================================================================
function InitTrig_JEW_REVIVE takes nothing returns nothing
    set gg_trg_JEW_REVIVE = CreateTrigger(  )
    call TriggerRegisterPlayerChatEvent( gg_trg_JEW_REVIVE, Player(0), "-revive", true )
    call TriggerAddCondition( gg_trg_JEW_REVIVE, Condition( function Trig_JEW_REVIVE_Conditions ) )
    call TriggerAddAction( gg_trg_JEW_REVIVE, function Trig_JEW_REVIVE_Actions )
endfunction

the -disco command! - FIXED - by my brain!
Spoiler:
Trigger name - JEW DISCO

Code: Select all

Events
	 Player - Player 1 (Red) types a chat message containig -disco as An exact match
Conditions
     ((Triggering player) is in jews_group) Equal to True
Actions
     For each (Integer A) from 1 to 13, do (Actions)
	      Loop - Actions
		       Player - Change color of (Triggering player) to (Color of (Player((Integer A)))), Chaging color of existing units
but it changes my color to black immediately and i want it to keep changing colors. like untill i say -stop or smthing.
Last edited by haxorico on August 19th, 2009, 10:14 pm, edited 20 times in total.
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: 2119
Joined: June 22nd, 2008, 10:11 pm
Title: Worst human for 4eva
Location: Mostly USEast

Re: [GUI] CP commands

Post by UndeadxAssassin »

I think the problem is here

Code: Select all

(Substring((Enterd chat string),1,5)) Equal to -lumber
The numbers 1,5 mean the number of characters it counts. It works for "-gold" because -gold has 5 characters (it counts the dash).

Change the 5 to a 7 and it should work.

Also change the 6 to 8 and 20 to 22 in here:

Code: Select all

Player - Add (Integer((Substring((Entered chat string), 6, 20))))) to (Triggering player) Current lumber
Basically:

Code: Select all

(Substring((Enterd chat string),1,7)) Equal to -lumber

Code: Select all

Player - Add (Integer((Substring((Entered chat string), 8, 22))))) to (Triggering player) Current lumber
(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!
Sevion
Junior Member
Posts: 44
Joined: April 12th, 2007, 2:43 am
Location: STALKER!!!

Re: [GUI] CP commands

Post by Sevion »

You don't need the second condition.

The event filters out any other commands.
"Sticks and stones may break my bones, but words will never hurt me!" Ouch! MY ARM!! YOU BROKE MY ARM!!
User avatar
haxorico
Super Moderator
Posts: 3197
Joined: February 24th, 2009, 1:31 pm
Location: JEW LAND
Been thanked: 1 time

Re: [GUI] CP commands

Post by haxorico »

thanks. it works :D

but food command is allso in the length of gold. why doesnt it work?

here is the food command
Trigger name - JEW FOOD
Events

Code: Select all

     Player - Player 1 (Red) Types a chat message containing -food as A substring
Conditions

Code: Select all

     ((Triggering player) is in jews_group) Equal to True
	 (Substring((Entered chat string),1,5))Equal to -food
Actions

Code: Select all

     Player - Add (integer((Substring((Entered chat string) 6,9)))))to (Triggering player) Food max
edit:

well the more i make commands the more problems i get. so ill just update my troubles in the 1st post.
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
Syre
Forum Staff
Posts: 506
Joined: November 17th, 2008, 3:49 pm

Re: [GUI] CP commands

Post by Syre »

Code: Select all

Player - Player 1 (Red) types a chat message containing  -invul as An exact 
I just tested this, and it works fine. You just made a reallyyyy simple, yet sometimes hard to spot, mistake that is throwing it off. You see, you added an extra space just before the -, so the code never goes through.
Image
User avatar
haxorico
Super Moderator
Posts: 3197
Joined: February 24th, 2009, 1:31 pm
Location: JEW LAND
Been thanked: 1 time

Re: [GUI] CP commands

Post by haxorico »

Syre wrote:

Code: Select all

Player - Player 1 (Red) types a chat message containing  -invul as An exact 
I just tested this, and it works fine. You just made a reallyyyy simple, yet sometimes hard to spot, mistake that is throwing it off. You see, you added an extra space just before the -, so the code never goes through.
lol a bloody space :D thanks mate.

any help for other 2 questions?
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?
Black-Hole
Forum Fanatic
Posts: 315
Joined: October 16th, 2007, 7:32 pm

Re: [GUI] CP commands [ 4 out 5 problems fixed! ]

Post by Black-Hole »

I don't think you can change the Max HP without Jass. You can set it but I'm peaty sure thats a Percentage of the maximum HP that the unit has.
User avatar
haxorico
Super Moderator
Posts: 3197
Joined: February 24th, 2009, 1:31 pm
Location: JEW LAND
Been thanked: 1 time

Re: [GUI] CP commands [ 4 out 5 problems fixed! ]

Post by haxorico »

Black-Hole wrote:I don't think you can change the Max HP without Jass. You can set it but I'm peaty sure thats a Percentage of the maximum HP that the unit has.
im not trying to gain MORE hp.
ill try to put it on a diffrent way.

saying u 2000 maximum HP.
and ur after a combat with ur hero and u have 200hp left.
so u dont want to heal ur hp to complition coz it will be odd like "wtf how did u heal so fast?"
so u set ur CURRENT hp to 500 by the -hp 500 command. but for me it sets the CURRENT hp to 0 no matter what i write after it..

this command is avilable at JJ's CP aswell u can see a command calld -hp in there
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
haxorico
Super Moderator
Posts: 3197
Joined: February 24th, 2009, 1:31 pm
Location: JEW LAND
Been thanked: 1 time

Re: [GUI or JASS] CP commands [ 5 out 7 problems fixed! ]

Post by haxorico »

bump :<
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?
Sevion
Junior Member
Posts: 44
Joined: April 12th, 2007, 2:43 am
Location: STALKER!!!

Re: [GUI or JASS] CP commands [ 6 out 7 problems fixed! ]

Post by Sevion »

Add a wait after the change color.

It's changing instantly.
"Sticks and stones may break my bones, but words will never hurt me!" Ouch! MY ARM!! YOU BROKE MY ARM!!