Request Help

General talk about editing, cheating, and deprotecting maps.

Moderator: Cheaters

User avatar
risker
Forum Staff
Posts: 351
Joined: June 8th, 2008, 3:05 am
Location: Australia

Request Help

Post by risker »

Well.. I want to use some of the triggers and commands from JJ's CP
Would someone mind quickly pulling it apart so i can see the
Function and triggers etc

Like the triggers and stuff for the function -gold xxx
Please and thankyou :)
grand
Member
Posts: 67
Joined: January 6th, 2008, 10:05 pm

Re: Request Help

Post by grand »

just look at the Map deprotection/Cheating section
User avatar
risker
Forum Staff
Posts: 351
Joined: June 8th, 2008, 3:05 am
Location: Australia

Re: Request Help

Post by risker »

How does that help...
User avatar
Bushido
Not an Admin, and Not Unique
Posts: 1880
Joined: March 1st, 2009, 12:30 pm
Title: Der Boss :D
Location: Germany

Re: Request Help

Post by Bushido »

well..it helped me a lot..
because I found this -> http://forum.wc3edit.net/map-deprotecti ... t2913.html <- stop being lazy and move your ass, lol
Download Senethior's tool package here!
Spoiler for Funny shit:
Kryptonyte wrote:Pew-pew, together, 2pac and I can take over the world. Muhahahahahaha.
Kryptonyte wrote:@2Pac, You're a G. Keep your pimp hand strong.
Kryptonyte wrote:anyways i gtg, PEACE, MR. ZOMG O SO PRO U RAWKZ0RZ SUM BoXZ()RZ

Code: Select all

(23:22:14) FatherSpace: BWAHAHA
(23:22:21) FatherSpace: I am 1337, you must fear my coolness.
(23:22:51) FatherSpace: I got bored, so I made a Python script so now whenever I open Terminal, I get a random haiku from here: http://www.smalltime.com/Haiku
(23:24:12) FatherSpace: afk... Killing myself. :(

Code: Select all

(03:52:56) ChatBot: (673237) logs into the Chat.
 (03:53:08) (673237): plzplzplz, im sorry about before.
 (03:53:26) FatherSpace: I'm sorry you were born.
(03:53:31) ChatBot: (673237) has been logged out (Kicked).

Code: Select all

(21:39:14) GeorgeMots: Jen are you there?
(21:39:44) 2Pac: ...lol?
(21:39:49) 2Pac: (21:22:22) ChatBot: UndeadxAssassin has been logged out (Timeout).
(21:39:52) GeorgeMots: w00t
(21:39:54) GeorgeMots: rofl
(21:39:58) GeorgeMots: *facepalm*
(21:39:59) 2Pac: you definetly fail
Get to know Bushido alias 2Pac alias King-Bushido!
grand
Member
Posts: 67
Joined: January 6th, 2008, 10:05 pm

Re: Request Help

Post by grand »

i pointed you in the right direction. all you have to do is use your eyes and read
User avatar
Senethior459
Forum Staff
Posts: 2618
Joined: June 2nd, 2007, 6:53 pm
Title: I Just Lost the Game

Re: Request Help

Post by Senethior459 »

http://forum.wc3edit.net/map-deprotecti ... t2913.html
Just look at the endglobals part. Ctrl+F, find "CheatUse". That's the function with all the cheats in it. Then, just find the command you want.
To show you, I'll break down the gold command.
The first part of it is this:
if SubString(s2s,0,6)=="-gold "then
That's basically checking if a player with the cheats enabled has typed "-gold"
And then, if it detects this, it does this, the next line:
call SetPlayerState(p2p,PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(p2p,PLAYER_STATE_RESOURCE_GOLD)+S2I(SubString(s2s,6,13)))
To make that easier:
call SetPlayerState
That part is setting the state of the player (these codes are all fairly self-explanatory), with the arguments in parentheses. If you open it in JassCraft, you can see what each of the arguments are supposed to be. If it won't appear for you, then just type in a parenthesis right after State, and a little popup box will appear to show you the arguments.
The first argument is the player whose state is being changed, and it is:
(p2p,
p2p is the person that triggered the cheat, the one who typed -gold.
The second argument:
PLAYER_STATE_RESOURCE_GOLD,
That's also simple. It's setting the gold of that player.
And the third argument (I'll break this up):
GetPlayerState(p2p,PLAYER_STATE_RESOURCE_GOLD)
GetPlayerState is just checking the player's state. It has p2p as the first argument, so it's checking p2p's state. The second argument is PLAYER_STATE_RESOURCE_GOLD, so it's checking their gold.
Then, at the end of the third argument of SetPlayerState is this:
+S2I(SubString(s2s,6,13)))
S2I converts a string to an integer. As an argument, it has SubString, which has its own arguments. The first of SubString's arguments is s2s, which is whatever is typed by the person that typed -gold. The second is the starting point of what it's checking in the string, and the second is the end point. It's checking characters 6 through 13 of what the player types. Basically, everything after -gold.

So, overall, it's setting p2p's gold to (whatever p2p's current gold is) plus (whatever numbers they typed after -gold).
Get it? The rest are fairly self-explanatory, and JassCraft can tell you what each argument is, too. If you need any more help understanding something, just post back!
My Warcraft III Tool Collection
If you want to chat/game with me:
Blizzard: Senethior459#1962
Discord: Kyle#7409
Steam: Spacekidkyle
User avatar
risker
Forum Staff
Posts: 351
Joined: June 8th, 2008, 3:05 am
Location: Australia

Re: Request Help

Post by risker »

Thanks i understand most of that but exactly how would you set someone as the "p2p" person?
I understand you'd need something to activate etc..

So can we use the cheatpack activator as an example?

Please and thankyou :)
User avatar
Senethior459
Forum Staff
Posts: 2618
Joined: June 2nd, 2007, 6:53 pm
Title: I Just Lost the Game

Re: Request Help

Post by Senethior459 »

p2p is a global variable that's called by function Cheatz. I can't find where it sets p2p, except as a local in multiple functions, but when it is set, it's set to this:
local player p2p=GetTriggerPlayer()
And it acts that way, even when it's called as a global in the function instead of set as a local.
My Warcraft III Tool Collection
If you want to chat/game with me:
Blizzard: Senethior459#1962
Discord: Kyle#7409
Steam: Spacekidkyle