Any tutorial to make custom cheats easily?

General talk about editing, cheating, and deprotecting maps.

Moderator: Cheaters

User avatar
boiled_vodka
Member
Posts: 83
Joined: May 18th, 2009, 1:36 am

Any tutorial to make custom cheats easily?

Post by boiled_vodka »

Mostly, I'd like to make own cc of exp.
Like notd's -exp xxx or swat, dawn of the dead and extra save/load type of survival rpg(mostly they were about marine rpg fight against the virus, infected, parasite, alien etc) :(
I WANNA GET EASY EXP TO RANK UP!! ARGH
Write me one or more tutorials about making CC with nice images please :]
User avatar
Ken
Spice Pirate
Posts: 862
Joined: January 29th, 2009, 5:35 pm
Title: LHC
Location: Canada

Re: Any tutorial to make custom cheats easily?

Post by Ken »

There's no simple way to do it for any map... But these general steps should help you. Also, this tutorial is written assuming you know basic JASS, and are capable of making your own triggers through JASS.

1) Identify and list things you can do that will grant you exp. Make sure to also record messages that are displayed at this time (annotate where colour changes occur, the colour itself isn't important)
2) Open the .j file for the map and search the messages you recorded.
NOTE: Only search for a section that's between two colour changes. Colour changes are done by "|cffRRGGBB" or "|r", so unless you know exactly what was used for it, your search will fail.
3) You should end up with a function that is sorta like this:

Code: Select all

function somefunc takes something returns probably nothing
local player p = GetTriggerPlayer() // If not specified in the function parameters
local integer i = GetPlayerId(p) // As above
set exp_array[i] = exp_array[i] + 5
call DisplayTextToPlayer(p, 0, 0, "Earned 5 experience.")
endfunction


IF: The function takes a player and an amount to increase by, create a trigger like this:

Code: Select all

function yourfunc takes nothing returns nothing
local player p = GetTriggerPlayer()
local integer i = GetPlayerId(p)
local string s = GetEventPlayerChatString()
local integer exp = SubString(s,4,8) // Assuming exp goes from 0-9999
call somefunc(p,exp) // Should be function name of the one you found, use proper parameters
endfunction

function main takes nothing returns nothing
//locals
local integer i2i = 0
local trigger t2t = CreateTrigger()
loop
exitwhen i2i > 11
call TriggerRegisterPlayerChatEvent(t2t,Player(i2i),"-exp ", false)
set i2i=i2i+1
endloop
call TriggerAddAction(t2t, function yourfunc)


OTHERWISE: Create a similar function as what I made above, but change this line:

call somefunc(p,exp)

To:

set exp_array[i]=exp_array[i]+exp

Obviously replacing exp_array with whatever the name of the array in the map would be.

Some maps require a function to be called that will generate and display your code. You should add a call to that in your function after changing your experience, as well as (if that function doesn't) displaying your code to you.

Hopefully this post helps you. If you need any clarification or help (aside from doing the entire thing for you) then just ask.
Last edited by Ken on October 22nd, 2009, 9:26 pm, edited 1 time in total.
Spoiler:
xkiska wrote:BARTIMEAUS is more understandable then u
Senethior459 wrote:Wow, Dream Theatre reminds me of Dragonforce, but with real skill.
Ozzapoo wrote:We laughed, we cried. Trashed.
FatherSpace: You don't find smart chicks hawt?
GeorgeMots: not anymore, im fed up with that kind of girls
FatherSpace: lol
FatherSpace: What happened?
GeorgeMots: most smart girls find out that i date/do/see other girls....
FatherSpace: ...
FatherSpace: So monogamy is your enemy?
Bartimaeus: Hmm, well, I hope my sister hasn't been kidnapped.
FatherSpace: What happened, Bart?
Bartimaeus: She walked out of the house saying that she was going over to some friends, and it's been like two hours, and my mom is trying to get a hold of her, which she's been unable to.
Bartimaeus: I can also hear three car alarms going off.
GeorgeMots: how old is she?
Bartimaeus: I haven't a clue. Probably 17.
UndeadxAssassin: wut
AbusivePie: You don't know how old your sister is?
Bartimaeus: Nope.
UndeadxAssassin: Epic fail
GeorgeMots: is she cute??
Bartimaeus: So, uh, how about you get into the Christmas spirit and put that avatar on before I do it myself and take away your bloody avatar-changin' rights?
UndeadxAssassin: If I thought of a random one...
UndeadxAssassin: Like....
UndeadxAssassin: I'll get back to you on that
[=ryCgg=]
Senior Member
Posts: 152
Joined: October 5th, 2009, 7:31 am
Title: Taiwan, Singapore
Location: Here!? XD

Re: Any tutorial to make custom cheats easily?

Post by [=ryCgg=] »

I think something wrong on the function main part....?

Code: Select all

function yourfunc takes nothing returns nothing
local player p = GetTriggerPlayer()
local integer i = GetPlayerId(p)
local string s = GetEventPlayerChatString()
local integer exp = SubString(s,4,8) // Assuming exp goes from 0-9999
call somefunc(p,exp) // Should be function name of the one you found, use proper parameters
endfunction

function main takes nothing returns nothing
//locals
local integer i2i = 0
local trigger t2t = CreateTrigger()
loop
exitwhen i2i > 11
call TriggerRegisterPlayerChatEvent(t,Player(i2i),"-exp ", false)
set i2i=i2i+1
endloop
call TriggerAddAction(t, function yourfunc)


Undeclared variable t?
Correct me if I'm wrong.
User avatar
Ken
Spice Pirate
Posts: 862
Joined: January 29th, 2009, 5:35 pm
Title: LHC
Location: Canada

Re: Any tutorial to make custom cheats easily?

Post by Ken »

Sorry. Named trigger t2t, but called it with t.

Try what I have there now.
Spoiler:
xkiska wrote:BARTIMEAUS is more understandable then u
Senethior459 wrote:Wow, Dream Theatre reminds me of Dragonforce, but with real skill.
Ozzapoo wrote:We laughed, we cried. Trashed.
FatherSpace: You don't find smart chicks hawt?
GeorgeMots: not anymore, im fed up with that kind of girls
FatherSpace: lol
FatherSpace: What happened?
GeorgeMots: most smart girls find out that i date/do/see other girls....
FatherSpace: ...
FatherSpace: So monogamy is your enemy?
Bartimaeus: Hmm, well, I hope my sister hasn't been kidnapped.
FatherSpace: What happened, Bart?
Bartimaeus: She walked out of the house saying that she was going over to some friends, and it's been like two hours, and my mom is trying to get a hold of her, which she's been unable to.
Bartimaeus: I can also hear three car alarms going off.
GeorgeMots: how old is she?
Bartimaeus: I haven't a clue. Probably 17.
UndeadxAssassin: wut
AbusivePie: You don't know how old your sister is?
Bartimaeus: Nope.
UndeadxAssassin: Epic fail
GeorgeMots: is she cute??
Bartimaeus: So, uh, how about you get into the Christmas spirit and put that avatar on before I do it myself and take away your bloody avatar-changin' rights?
UndeadxAssassin: If I thought of a random one...
UndeadxAssassin: Like....
UndeadxAssassin: I'll get back to you on that
User avatar
boiled_vodka
Member
Posts: 83
Joined: May 18th, 2009, 1:36 am

Re: Any tutorial to make custom cheats easily?

Post by boiled_vodka »

I guess I need to learn jass more and over..
It was alot easier me to make triggers w/ WE but not with jass program :S