How do you write a script for ce?

10/11/2009 10:20 bloombloom244#1
(excuse me btw, I'm a noob just trying to learn >.< )


Some scripts like skill hack and vac go into specific csv and change their like information and files...


Well I'm trying to edit a certain file, but how would I go about doing that in a 2moons folder? I tried looking on the cheatengine site but its all so confusing a bit... like what do edx and eax do? and can they lead me into the right direction to a specific folder and line that i want to fix? if so how?

say i want to edit a certain line.. how can i set it up so that cheatengine can edit that certain line or even find that certain line in general?

like for skill hacks (winhex ones posted all over this forums, and yeah i do have the scripts already) im looking at it and i know exactly what to edit in the csv, but i dont get how they do it in the script? its random numbers. o-o

Any help would be appreciated (even a link). :o thanks :mofo:

**remember all concerning 2moons folder
10/11/2009 10:24 bottomy#2
Do you mean how do you write a script from scratch? or just make edits to already made scripts?
10/11/2009 10:47 bloombloom244#3
Quote:
Originally Posted by bottomy View Post
Do you mean how do you write a script from scratch? or just make edits to already made scripts?
I don't mind ... either one is fine.. i just need a general direction using cheat engine with this game first ._.

MOSTLY edits because i need to edit my vac hack but im not sure what affects what. :/
10/11/2009 11:10 bottomy#4
Well most scripts people have put what each pointer/register is for.
for instance the Vac script (this just taken from 6Drako9's vac script [Only registered and activated users can see links. Click Here To Register...])
Code:
//mov [ecx+00],00000000 //DwInfoIndex
  mov [ecx+04],0000004B //DwExploreRange
  mov [ecx+08],0000004B //DwSight
  mov [ecx+0C],0000004B //DwPersuitRange
//mov [ecx+10],00000000 //DwAvoidRange
  mov [ecx+14],00000000 //DwExploreStandDelay
//mov [ecx+18],00000000 //DwExploreMoveDelay
//mov [ecx+1C],00000000 //DwStandDelay
  mov [ecx+20],000001F4 //DwMoveDelay
//mov [ecx+24],00000000 //DwFollowMyMasterRange
//mov [ecx+28],00000000 //DwStopMasterNear
//mov [ecx+2C],00000000 //DwWarpMyMasterRange
//mov [ecx+30],00000000 //DwCallTeamPossibelHP
//mov [ecx+34],00000000 //DwCallTeamCount
//mov [ecx+38],00000000 //DwBlockNFirstAttack
//mov [ecx+3C],00000000 //dwCallTeamCell
  mov [ecx+40],000000FA //dwFollowTarget
  mov [ecx+44],00000000 //dwSpecialAttackStartHP
  mov [ecx+48],00000000 //dwSpecialMeleeAttackRate
  mov [ecx+4C],00000000 //dwSpecialRangeAttackRate
  mov [ecx+50],00000000 //DwPowerAttacjStartHP
  mov [ecx+54],00000000 //dwPowerMeleeAttackProbable
  mov [ecx+58],00000000 //dwPowerRangeAttackProbable
//mov [ecx+5C],00000000 //DwUnderAttackAggro
  mov [ecx+60],00000000 //DwMeleeAttackRangeInAggro
  mov [ecx+64],00000000 //DwRangeAttackRangeInAggro
  mov [ecx+68],000003E8 //DwSightInAggro
//mov [ecx+6C],00000000 //DwDefeatAggro
//mov [ecx+70],00000000 //DwBlockedAggro
//mov [ecx+74],00000000 //DwSlideAggro
//mov [ecx+78],00000000 //DwHealAggro
//mov [ecx+7C],00000000 //DwMasterUnderAttackAggro
//mov [ecx+80],00000000 //DwMasterDefeatAggro
//mov [ecx+84],00000000 //DwMasterBlockingAggro
//mov [ecx+88],00000000 //DwMasterSlideAggro
//mov [ecx+8C],00000000 //DwCOmplusionUnderAttackAggro
  mov [ecx+90],00000063 //dwMaxSummonsMonsterCount
  mov [ecx+94],00000000 //dwReSummonsMonsterTick
  mov [ecx+98],00000000 //dwMaxSummonsMonsterRange
  mov [ecx+9C],00000000 //dwSummonsStartPcCount
//mov [eax+A0],00000000 //PatternType
hes listed what each pointer is doing, so say you want to make mobs closer to you. In .csv you would change DwMoveDelay, so for CE since hes said which one is DwMoveDelay we know what pointer to edit the value of, so we want say 300 instead of 500 just change

mov [ecx+20],000001F4 //DwMoveDelay
to
mov [ecx+20],0000012C //DwMoveDelay

if you want to add more things to a script besides values of the commands listed in the script or making a script for scratch you'll need to learn asm.
10/11/2009 16:43 bloombloom244#5
That definitely helps.. I'm not sure if you know how to answer this but, how do you know you have to change it to 1F4 to 12C ? o_o.
Thanks so much I see ...
What I'm also wondering is how did he find those pointer values? He created them or are they like set in stone? o_o.


Here's also another question... for my vac I use

Quote:
originalcode:
mov edx,[eax+1c]
mov [ecx+20],edx

mov edx,540 // Dwmove delay of monsters. You can make it higher or lower than 540.
mov dword ptr [eax+1C],edx
This value is directly editable, but yours was through like changing a letter, how is this possible?






ALSOOOOOOO. I have this a different like number for my dmove delay in the pointer.

Quote:
//mov [eax+1C],00000064//DwMoveDelay eax+1C
10/11/2009 21:27 lordcthulu#6
Is there anywhere to learn how to make the scripts form scratch? I'm just fine with programming and asm, just not familiar with cheat engine.
10/11/2009 23:01 bottomy#7
Quote:
Originally Posted by lordcthulu View Post
Is there anywhere to learn how to make the scripts form scratch? I'm just fine with programming and asm, just not familiar with cheat engine.

well if its just the making the script, you should be able to work it out from looking at others. but if its actually finding the values etc. i don't think theres a tut (least not in this section), maybe ill make a tut on how though if i do it'll be through ollydbg mainly since i don't know much about CE.




Quote:
Originally Posted by bloombloom244 View Post
That definitely helps.. I'm not sure if you know how to answer this but, how do you know you have to change it to 1F4 to 12C ? o_o.
Thanks so much I see ...
What I'm also wondering is how did he find those pointer values? He created them or are they like set in stone? o_o.


Here's also another question... for my vac I use

Quote:
originalcode:
mov edx,[eax+1c]
mov [ecx+20],edx

mov edx,540 // Dwmove delay of monsters. You can make it higher or lower than 540.
mov dword ptr [eax+1C],edx
This value is directly editable, but yours was through like changing a letter, how is this possible?






ALSOOOOOOO. I have this a different like number for my dmove delay in the pointer.

Quote:
//mov [eax+1C],00000064//DwMoveDelay eax+1C


the 1F4 and 12C are hex numbers, so 1F4 = 500 and 12C = 300. as for your vac being different, it's still hex value unless CE takes decimal values but then you would get an error when you try hex xd. also your script you showed there i dont know why they used two commands to do what could be done in one, since using the two uses more bytes also.
03/25/2013 21:14 iCraziE#8
This is an old post I know :D but im curious.. how do you find the pointers to the csv files?