[Add CP] Dark Invasion 2 v2.10 (wiped save code)

For fulfilled maps that most likely don't work on the latest patch (1.24 or later).

Moderator: Cheaters

Fiddle
Newcomer
Posts: 19
Joined: April 8th, 2007, 3:28 pm

[Add CP] Dark Invasion 2 v2.10 (wiped save code)

Post by Fiddle »

I simply wanted single player and a cheat pack inserted into this map, there have been previous versions done, but the save code was wiped since 2.10, so I'd appreciate it if someone could re-do it. There might be anti-cheats in the map, so do test it before you post please.

This is a link to the map: http://www.epicwar.com/maps/86632/

And at the least, i want -gold, -lumber, -copy, -kill, and -tele to work.

Thanks!
User avatar
Bartimaeus
Tyrannical Drama Queen
Posts: 4430
Joined: November 19th, 2007, 5:05 am
Been thanked: 2 times

Re: [Add CP] Dark Invasion 2 v2.10 (wiped save code)

Post by Bartimaeus »

Please include what happens when you try to play single player next time you request a map that needs it enabled, (special messages, etc), thanks.

Trying to do this right now. (edit) I can get the cheat pack to work, along with single player save...but when I type -gold 50000, it resets my gold back to what it was.
Fiddle
Newcomer
Posts: 19
Joined: April 8th, 2007, 3:28 pm

Re: [Add CP] Dark Invasion 2 v2.10 (wiped save code)

Post by Fiddle »

I don't know why people can't find what's up with it, but I'm pretty sure you guys don't get why I can't get cheatpacks inserted...

Anyways, the gold and lumber are stored in variables. Not sure if they appear the same to you but for me, it's found easily through seeing this trigger (which supposedly is a function to add gold, that's probably called whenever you finish a quest or something):
Spoiler:

Code: Select all

function OOooOoOO takes player p,integer oo0ooO0,boolean OOooO00O returns nothing
local integer id=GetPlayerId(p)
local integer OO0OOOoO=GetPlayerState(p,PLAYER_STATE_RESOURCE_GOLD)+oo0ooO0
local multiboarditem oo0Ooo0=MultiboardGetItem(O0oO0[id],31,1)
local sound OOooOo0O
if OOooO00O then
set OOooOo0O=CreateSound("Abilities\\Spells\\Items\\ResourceItems\\ReceiveGold.wav",false,true,true,10,10,null)
call AttachSoundToUnit(OOooOo0O,O0Oo00O[id])
call SetSoundVolume(OOooOo0O,127)
call StartSound(OOooOo0O)
set OOooOo0O=null
call DestroyEffect(AddSpecialEffectTarget("UI\\Feedback\\GoldCredit\\GoldCredit.mdl",O0Oo00O[id],"origin"))
call oooOoo0(O0Oo00O[id],"+"+I2S(oo0ooO0)+" gold",255,215,0,.022,.03,2.,1.5)
endif
if OO0OOOoO>999999 then
set OO0OOOoO=999999
endif
call SetPlayerState(p,PLAYER_STATE_RESOURCE_GOLD,OO0OOOoO)
set o0OooOO[id]=GetPlayerState(p,PLAYER_STATE_RESOURCE_GOLD)
call MultiboardSetItemValue(oo0Ooo0,"|cffFBEC5D"+I2S(OO0OOOoO)+"|r")
call MultiboardReleaseItem(oo0Ooo0)
set oo0Ooo0=null
endfunction
In case you don't want to read it, o0OooOO[id] is the variable storing gold. You can find the variable storing lumbar similarly, perhaps by performing a search for something like =GetPlayerState(p,PLAYER_STATE_RESOURCE_LUMBER).

Again, if the variables do appear the same for you, then this is the variable for lumber that I found: o0Ooo0O[id]

Thanks again, since I always end up with a problem when trying to insert whole triggers or edit large parts of code(such as an error when trying to host or start the map).

For anyone else trying to do this, the single player can be enabled(I've done this myself before) by searching for bj_isSinglePlayer(there's only two occurrences of this line in the entire code) and changing the second occurrence of this line to be the same. It should look like this:
Spoiler:

Code: Select all

set oO0oo00=oO0oo00+1
endloop
set bj_isSinglePlayer=false
set bj_rescueSound=CreateSoundFromLabel("Rescue",false,false,false,10000,10000)
set bj_questDiscoveredSound=CreateSoundFromLabel("QuestNew",false,false,false,10000,10000)
set bj_questUpdatedSound=CreateSoundFromLabel("QuestUpdate",false,false,false,10000,10000)
set bj_questCompletedSound=CreateSoundFromLabel("QuestCompleted",false,false,false,10000,10000)
User avatar
Bartimaeus
Tyrannical Drama Queen
Posts: 4430
Joined: November 19th, 2007, 5:05 am
Been thanked: 2 times

Re: [Add CP] Dark Invasion 2 v2.10 (wiped save code)

Post by Bartimaeus »

I already know how to enable single player, I got the cheat pack in succesfully, and I figured that the gold/lumber was stored in variables, and when it's either constantly setting it that much until it gets an okay from another trigger to add gold, and then it sets it to that constantly. Or when it's changed without the okay from another trigger.

Unfortunately, I don't really know JASS, so I am unsure how to force the okay.
Fiddle
Newcomer
Posts: 19
Joined: April 8th, 2007, 3:28 pm

Re: [Add CP] Dark Invasion 2 v2.10 (wiped save code)

Post by Fiddle »

I'm not sure how it does it, but I am VERY sure that it just checks if the current gold is equal to the gold stored in the variable, and if it isn't, then it changes the current gold to the value in the variable. So all you need to do is change the value in the variable along with the current gold.
User avatar
Bartimaeus
Tyrannical Drama Queen
Posts: 4430
Joined: November 19th, 2007, 5:05 am
Been thanked: 2 times

Re: [Add CP] Dark Invasion 2 v2.10 (wiped save code)

Post by Bartimaeus »

The names of the variables/triggers name is even worse than Vexorian's. It all looks the same.

Example: oo0ooO0, OO0OOOoO, OOooOo0O, O0Oo00O are all different variables. It's nearly impossible to remember anything when going from trigger to trigger.
initialD
Some Honorary Title
Posts: 1713
Joined: June 8th, 2007, 5:08 am
Title: Angry Bird

Re: [Add CP] Dark Invasion 2 v2.10 (wiped save code)

Post by initialD »

Fiddle wrote:I don't know why people can't find what's up with it, but I'm pretty sure you guys don't get why I can't get cheatpacks inserted...

not JASS information we need.
We just need you to tell us what happens when you try to save the game in single player.
Eg. : a text appears saying that "you can't save" or such.

As for the anti cheats. It won't be hard since you only want 4 cheats. Disabling an anticheats doesn't really that hard.

Just I can't do it now. My connection stuck in between my country and germans. Even replying to this topic took me 10 mins. (believe it or not!)

Maybe someone else will do it. Or when my connection is fixed. Probably not. :p
User avatar
Bartimaeus
Tyrannical Drama Queen
Posts: 4430
Joined: November 19th, 2007, 5:05 am
Been thanked: 2 times

Re: [Add CP] Dark Invasion 2 v2.10 (wiped save code)

Post by Bartimaeus »

initialD wrote:
Fiddle wrote:I don't know why people can't find what's up with it, but I'm pretty sure you guys don't get why I can't get cheatpacks inserted...

not JASS information we need.
We just need you to tell us what happens when you try to save the game in single player.
Eg. : a text appears saying that "you can't save" or such.

As for the anti cheats. I won't be hard since you only want 4 cheats. Disabling an anticheats doesn't really that hard.

Just I can't do it now. My connection stuck in between my country and germans. Even replying to this topic took me 10 mins. (believe it or not!)
We already got past the single player & getting the cheats in the map.

And the anti cheats are actually pretty good, believe it or not. The second best I've seen. The first was MM&M.
initialD
Some Honorary Title
Posts: 1713
Joined: June 8th, 2007, 5:08 am
Title: Angry Bird

Re: [Add CP] Dark Invasion 2 v2.10 (wiped save code)

Post by initialD »

yeah. I cracked "dark invasion I" before. Can't just remove the anticheats. There was another checking-system , checking if the anticheats is working right. So gotta disable both systems before you can crack it.

Somehow, I don't think it's wise to spend so much time on an anticheats system. People'll crack it anyway.
storyyeller
Senior Member
Posts: 178
Joined: February 15th, 2009, 9:08 pm

Re: [Add CP] Dark Invasion 2 v2.10 (wiped save code)

Post by storyyeller »

If the mapmakers were really devious, they would just make a script to automatically add heavily obfuscated, highly complex anticheat functions.

Put in some dummy functions that appear to do stuff but are really called from triggers that never execute, make every function have side effects that alter global variables, make liberal use of hash functions etc.
If you could automate it, you wouldn't even have to worry about wasting your own time writing the anti-cheats (well more then once anyway. You still have to do it the first time when you make the program itself).