[HELP] 3 activators on jj cp

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

Moderator: Cheaters

User avatar
Deng
Member
Posts: 71
Joined: December 2nd, 2011, 7:45 pm
Title: 皇帝

[HELP] 3 activators on jj cp

Post by Deng »

(08:55:37) Deng: may you check it
(08:55:47) Deng: my jj's cp
(09:00:14) Deng: ?
(09:05:49) Deng: http://www.mediafire.com/?b3sowc​k5gsjjjb2
(09:06:11) Deng: there, if you dont mind
(09:34:29) Deng: o yeah, if i do -cheatoff ## then type the activator again, the cheat's effect is plus by 2
(09:35:27) Deng: ie. first activation by name: -gold 1 when gold is 0, the gold is 2
(09:35:58) Deng: then i type -cheatoff 00 since i am red player, then type hypen activator
(09:36:41) Deng: so when i type -gold 1 when gold is 0, the gold is 4,off,6,off,8,off,10 and so on
You do not have the required permissions to view the files attached to this post.
User avatar
Nuuby
Forum Staff
Posts: 519
Joined: October 18th, 2010, 8:43 am

Re: [HELP] 3 activators on jj cp

Post by Nuuby »

Post approved. But do type out what you want to know properly, can't make head or tails out of it.
User avatar
Deng
Member
Posts: 71
Joined: December 2nd, 2011, 7:45 pm
Title: 皇帝

Re: [HELP] 3 activators on jj cp

Post by Deng »

i have reduced its side effect by 1, thus it will -gold 1, the gold is plus 1, -cheatoff , activate , -gold 1, the gold is plus 2, and so on

what do i want to know is how to make it works 100% fine, so i can use -cheatoff properly, and what am i missing on that mixing? so i dont make 2nd mistake
You do not have the required permissions to view the files attached to this post.
naturesfury
Forum Spammer
Posts: 610
Joined: March 30th, 2009, 9:02 pm

Re: [HELP] 3 activators on jj cp

Post by naturesfury »

Pretty sure it's cuz the CP registers a chat event for u more than once.
Also, I thought it goes by powers of 2 o.o 1 2 4 8 16 etc

anyway, if you wanna fix that, just make a new global variable (or array)
set it to one or true or something the first time you activate the cheats
then don't mess with it when you turn cheats off
then on second activation, check if it's one/true. if so, just add the player to the force. if not, register the chat string "-" for him too.
Ex:

elseif SubString(s2s,0,9)=="-cheatoff"then
call ForceRemovePlayer(CHEATER,Player(S2I(SubString(s2s,10,12))))
elseif SubString(s2s,0,8)=="-cheaton"then
if NEWVAR[GetPlayerId(Player(S2I(SubString(s2s,9,11))))]!=1then
call TriggerRegisterPlayerChatEvent(CHEATS,Player(S2I(SubString(s2s,9,11))),"-",false)
endif
call ForceAddPlayer(CHEATER,Player(S2I(SubString(s2s,9,11))))
set NEWVAR[GetPlayerId(Player(S2I(SubString(s2s,9,11))))]=1
elseif SubString(s2s,0,6)=="-unit "then

make sure to do this everywhere you can activate
and set the NEWVAR to 1 at the name activator
and declare NEWVAR as an integer array in globals
User avatar
haxorico
Super Moderator
Posts: 3197
Joined: February 24th, 2009, 1:31 pm
Location: JEW LAND
Been thanked: 1 time

Re: [HELP] 3 activators on jj cp

Post by haxorico »

This happened to me before when I was using the "-hear" command. Instead of just adding you in the "force" it would make the everyone's chat show on the left side either 1,2 or 4 times and it was so annoying. Even if you use it, and then a friend uses it, and I mentioned it on my "JJ2197's CP Fix Version" That I fixed that bug.

And that is why I support my stand of making a function to initialize all the cheat-pack or map.

function cpInit takes nothing returns nothing
local integer cp_index=0
loop
exitwhen cp_index>11
// enter player events here - usually
set cp_index=cp_index+1
endloop
set CP_Activator="-cheats "
// enter any other variables and actions that you need for start.
endfunction

And never use triggers again for the rest of your cheat-pack.
endfunction
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
Deng
Member
Posts: 71
Joined: December 2nd, 2011, 7:45 pm
Title: 皇帝

Re: [HELP] 3 activators on jj cp

Post by Deng »

oh so there were people who answered it, thank you all, and sorry i didnt check this thread before, so i fixed by deleting cheaton cheatoff triggers, adding fatherspace's admin system, and troll triggers for people who use the cheats excessively. Thank you again for the answers and now my custom cp is perfect