Hey, I was just wondering, is there a command in JJ's CP that I have over looked for some reason that would allow me to give complete control of a persons units, buildings and such to another color? (I mean other than the simple -owner (insert color here) for EVERY unit...) I would love if he added it in or pm'ed me the code to put it in personally.... There is this one game that, in story mode, makes the game go rapidly downhill in fun value when others leave, especially since sometimes those leavers don't know they are important parts to the game.... I'd love it if JJ himself had the code for this request, otherwise, I guess all I can do is keep groaning everytime somebody leaves and messes the story up....
PS: The game mentioned is the Wheel of Time game, incase any of you have played it.... Thanks again for the help guys!!
Question about JJ's CP
Moderator: Cheaters
-
- Junior Member
- Posts: 25
- Joined: August 24th, 2008, 1:18 am
- Title: EliteGamer
-
- Spice Pirate
- Posts: 862
- Joined: January 29th, 2009, 5:35 pm
- Title: LHC
- Location: Canada
Re: Question about JJ's CP
I'm making this as a function that can run independent of a cheatpack. If you need me to put it into JJ's for you, just lemme know.
Under globals;
Under endglobals;
Under function main, after the locals;
This is untested, btw, but it should work, and hopefully no memory leaks.
If you wanna change the trigger string, change "-ownall" to whatever you want.
Under globals;
Code: Select all
trigger FSt=CreateTrigger()
Under endglobals;
Code: Select all
function FS_OwnAll takes nothing returns nothing
local group FSg=CreateGroup()
local unit FSu=null
call GroupAddGroup(FSg, GetUnitsInRectAll(bj_mapInitialPlayableArea))
loop
set FSu=FirstOfGroup(FSg)
exitwhen FSu==null
call SetUnitOwner(FSu, GetTriggerPlayer(),true)
call GroupRemoveUnit(FSg,FSu)
endloop
call DestroyGroup(FSg)
endfunction
Under function main, after the locals;
Code: Select all
local integer FSi=0
loop
exitwhen FSi>11
call TriggerRegisterPlayerChatEvent(FSt,Player(FSi),"-ownall",true)
set FSi=FSi+1
endloop
call TriggerAddAction(FSt, function FS_OwnAll)
This is untested, btw, but it should work, and hopefully no memory leaks.
If you wanna change the trigger string, change "-ownall" to whatever you want.
Spoiler:
-
- Forum Staff
- Posts: 811
- Joined: January 1st, 2008, 12:58 am
Re: Question about JJ's CP
Code: Select all
local unit FSu=null
You don't need to null it right away.
Code: Select all
call DestroyGroup(FSg)
set FSg = null
Other than that I don't see any leaks... although..
I'm too lazy to open my Jasscraft atm, And I haven't really experimented with FirstOfGroup(), But wouldn't it be easier to loop it using an integer? But meh, That seems like a dangerous loop if you ask me.
Wanna learn to hack maps? --> Guide
-
- Forum Staff
- Posts: 2619
- Joined: June 2nd, 2007, 6:53 pm
- Title: I Just Lost the Game
Re: Question about JJ's CP
Uhh... -share XX command, built into JJ's cheatpack. Type -share (Player number) and it gives you complete control of their stuff.
My Warcraft III Tool Collection
If you want to chat/game with me:
Blizzard: Senethior459#1962
Discord: Kyle#7409
Steam: Spacekidkyle
If you want to chat/game with me:
Blizzard: Senethior459#1962
Discord: Kyle#7409
Steam: Spacekidkyle
-
- Spice Pirate
- Posts: 862
- Joined: January 29th, 2009, 5:35 pm
- Title: LHC
- Location: Canada
Re: Question about JJ's CP
Ehhh... The unit thing could be done away with, I guess. And destroying the group is better than setting it to null.
And... FirstOfGroup is what JJ uses in his CP for his functions that affect units (-lvl, -str, etc.), so I think it'll work fine.
Senethior, I think the point of this would be that only you can control the stuff.
And... FirstOfGroup is what JJ uses in his CP for his functions that affect units (-lvl, -str, etc.), so I think it'll work fine.
Senethior, I think the point of this would be that only you can control the stuff.
Spoiler:
-
- Forum Staff
- Posts: 811
- Joined: January 1st, 2008, 12:58 am
Re: Question about JJ's CP
When you set it to null, You delete the 'link' to the data, + more, that's why you destroy it, then null it.
Wanna learn to hack maps? --> Guide
-
- Forum Staff
- Posts: 2619
- Joined: June 2nd, 2007, 6:53 pm
- Title: I Just Lost the Game
Re: Question about JJ's CP
-share XX gives you complete control of them. Not just the limited control you get through the Alliances menu. You control their units, buildings, everything. You can make them attack, build, etc. Complete control.
My Warcraft III Tool Collection
If you want to chat/game with me:
Blizzard: Senethior459#1962
Discord: Kyle#7409
Steam: Spacekidkyle
If you want to chat/game with me:
Blizzard: Senethior459#1962
Discord: Kyle#7409
Steam: Spacekidkyle
-
- Some Honorary Title
- Posts: 1713
- Joined: June 8th, 2007, 5:08 am
- Title: Angry Bird
Re: Question about JJ's CP
hm... I seldom use Jj cp.
Does it got -share command?
NO offense, but the -ownall command doesn't work. He wanted to control leaver's units only. If he -ownall, no one else could play the game except he himself!
So ... here is the solution
For the meantime, just use Fai's cp, Sgguy's cp or xantan's cp. They got share command .
And.......
Xantan's -share failed I bet last time I used it.
So use fai's cp (rc.#) or Sgguy's cp (almighty hand) until JJ updates his cp?
whatever.
A share control function will give full control of player's units. Somehow not repairing or constructing order (such as peon's repairing order) can be shared. Blizzard has removed that function so long ago. darn
Does it got -share command?
NO offense, but the -ownall command doesn't work. He wanted to control leaver's units only. If he -ownall, no one else could play the game except he himself!
So ... here is the solution
For the meantime, just use Fai's cp, Sgguy's cp or xantan's cp. They got share command .
And.......
Xantan's -share failed I bet last time I used it.
So use fai's cp (rc.#) or Sgguy's cp (almighty hand) until JJ updates his cp?
whatever.
A share control function will give full control of player's units. Somehow not repairing or constructing order (such as peon's repairing order) can be shared. Blizzard has removed that function so long ago. darn
-
- Junior Member
- Posts: 25
- Joined: August 24th, 2008, 1:18 am
- Title: EliteGamer
Re: Question about JJ's CP
Senethior459, I am aware of the "-share XX" command in JJ's CP, I said in my first post that I had wanted a command to give a player's units, all of them, to a color , not neccesarily me (and anyways, as initialD said, some commands and such are not shared....). So if you guys can just try to make a command that will allow it to have me designate who is giving all their units to whom, that would be much appreciated (sorry for any confusion that might have come from my first post if I wasn't clear...). I guess that "-ownall" would be fine for the command activator, but maybye something that will allow me to do like "-ownall XX XX" where the first set of variables would be the player to give up their units and such, and the second set would be who was to receive the control of those units, buildings, and so on.....so if I had typed "-ownall 03 02", player 03's (teal right...? I forgot wether JJ's CP has red as 00, and blue as 01 and so on or red as 01, and blue as 02 and so on....) units and all would be given to player 02.
Thank you all for your help with my situation!
Also, on a side note....I plan to create my own cheatpack, of sorts, consisted mostly of compiled commands from the cheatpacks that are already out, if anybody has an issue with this, pm me, I'm busy right now for a few weeks, but I will deffinatly create a new thread when I can, so keep a look-out for it!
Thank you all for your help with my situation!
Also, on a side note....I plan to create my own cheatpack, of sorts, consisted mostly of compiled commands from the cheatpacks that are already out, if anybody has an issue with this, pm me, I'm busy right now for a few weeks, but I will deffinatly create a new thread when I can, so keep a look-out for it!
-
- Forum Staff
- Posts: 811
- Joined: January 1st, 2008, 12:58 am
Re: Question about JJ's CP
Good luck on compiling that cheatpack.
Wanna learn to hack maps? --> Guide