top of page
tier 1: change values

useful for increasing mana gain per kill, reduce xp table, increase skill level cap. Increase salvage value, decrease upgrade cost

step 1: find the Script. For example. Script > com > games > ingame > logic > calculator  from GemCraft Chapter 0 and GemCraft Labyrinth.

step 2: press the edit button

step 3: edit the value

step 4: save and test run

tier 2: change operation

useful for some common GemCraft Cheats like creating gems and banishment, building, spells add mana and monster waves gets lower hp each subsequent waves and upgrade skill adds skill point.

example 1: GemCraft Chasing shadows - talisman fragments

step1: go to entity > TalismanFragment > public function TalismanFragment line 57

step2:

before: this.upgradeLevel = new ENumber(Math.min(pUpgradeLevel,[2,3,4,5,6,7,7,8,8,9,9][Math.floor(this.rarity.g() / 10)]));

after: this.upgradeLevel = new ENumber(Math.max(pUpgradeLevel,[2,3,4,5,6,7,7,8,8,9,9][Math.floor(this.rarity.g() / 10)]));

step3: test run the game

result: all fragments gets upgraded to

max*(if you have not increase their max levels)

for free(0 shadow cores)

 

tier 3: Using P-code
the way it shows P-code vs. ActionScript
pushbyte 1
add
+1
adding segment
pushbyte 2
multiply
*2
multiply segment
subtract segment
pushbyte 3
subtract
-3
divide segment
/2
static values
 
 
 
 
 
 
 
 
pushbyte 0
pushbyte 1
pushbyte 2
0
1
2
changing value of a variable to a value of another variable
getlocal_0
getlocal_0
getproperty Qname(PackageNamespace(""),"val1")
initproperty Qname(PackageNamespace(""),"val2")
this.val2 = this.val1
changing value of a variable based on other variable

getlocal_0
getlocal_0
getproperty
Qname(PackageNamespace(""),"EXP")
pushbyte 4
add

getlocal_0
getproperty
Qname(PackageNamespace(""),"EXPMax")
subtract
initproperty
Qname(PackageNamespace(""),"EXP")

this.EXP = this.EXP + 4 - this.EXPMax
an example of combined operation
pushbyte 5
subtract
pushbyte 1
add
pushbyte 4
multiply
-5 + 1 * 4
pushbyte 4
subtract
pushbyte 6
add
pushbyte 7
multiply
-4+6* 7
(4 + 4) + 4

pushbyte 4
pushbyte 4
add
multiply
pushbyte 4
add

changing value of a variable to a value of another variable register mode


Push register1 "EXP" register1 "EXPMax"
GetMember
SetMember

 

this.EXP = this.EXPMax
this.EXP = this.EXP - this.EXPMax + 1 * this.LVL;
Push register1 "EXP" register1 "EXP"
GetMember

Push register1 "EXPMax"
GetMember

Subtract
Push 1 register1 "LVL"
GetMember

Multiply
Add
SetMember
changing value of a variable based on other variable register mode
 list
Pcode warning: newarray must be the amount of things in the list, newarray Amount of things in this list
pushbyte 0
pushbyte 1
pushbyte 2
pushbyte 3
newarray 4
[1,2,3,4]
pushbyte 1
pushbyte 2
pushbyte 4
pushbyte 8
newarray 4
[1,2,4,8]

Math.min()

Math.max()

Math.min(_loc1_,_loc2_)
getlex Qname(PackageNamespace(""),"Math")
getlocal 1
getlocal 2
callproperty Qname(PachageNamespace(""), "min") 2

 Math.max(500,GV.ppd.getWizLevel()) * 0.054

can be found in GC2CS com > ingame >  IngamePopulator determining shadow core drop rate by wizard level

getlex Qname(PackageNamespace(""),"Math")
pushshort 500
getlex Qname(PackageNamespace("com.giab.games.gc2.global"),"GV")
getproperty Qname(PackageNamespace(""),"ppd")
callproperty Qname(PackageNamespace(""),"getWizLevel") 0
callproperty
Qname(PackageNamespace(""),"max") 2
pushdouble 0.054
multiply

tier 4: manual deobfuscation

remove jumps in P-code

how to hack and save Binnary data (JPEXS FFDEC)

after hacking, step 1 click save button below the script and the SWF data save 2 or more times 1 for script 1 for SWF Data.

step 2 make sure the screen is on the scripts you hacked. and press save on top

step 3 click anywhere beyond this binnary data and press save again.

​

in a heavliy OBFUSCATED (more than one ways)

unjump 1.png
unjump 2.png
unjump aa.png

remove "kill n" in p-code

unhide code.png

remove unwanted control flow using P-code editor

remove unnesscessary control flow 1.png
remove unnesscessary control flow 2.png

converting in p-code edit.

​

pushtrue

iftrue ofsxxxx

​

into

​

jump ofsxxxx

​

may result in revealing more part of the code or remove

​

while(true)

{

  //any instructions hare

}

​

no new errors shall be made except for typing errors and anti-tempers [cursed treasure 2] and [Kings Island 2],

bottom of page