View previous topic :: View next topic |
Author |
Message |
samuri25404 Grandmaster Cheater Reputation: 7
Joined: 04 May 2007 Posts: 955 Location: Why do you care?
|
Posted: Wed Jun 06, 2007 3:51 pm Post subject: Another Minesweeper Script |
|
|
Ok, I'm back again with another Minesweeper script. I'm really not sure what the point of it is, but I'll explain it as it goes. If there's anything wrong with my script, please tell me, I'm just here to learn.
Code: |
[enable]
alloc(Time,256) //Blah blah blah
alloc(Chicken,256)
label(Time)
label(Chicken)
01002FF5: //The address of the time
jmp Time
nop
Time:
mov [0100579C],10 //Move 10 into the value of Time
cmp [0100579C],0 //Compare it to 0
call Chicken //Call Chicken (I'm trying to learn about this function
jmp 01002FF5 //Which is the whole point of this script, I don't know
//If I used it right here
Chicken:
dec [0100579C] //Decrease the time
cmp [0100579C],0 //Compare it to 0
jne Chicken //If it's not equal, then jmp back to the beggining of Chicken
ret //Otherwise, return to where you were in the last script, after
//call Chicken
[disable]
dealloc(Time) //Blah blah blah
dealloc(Chicken)
01002FF5:
inc [0100579C] //Original opcode
|
Ok, I'm not sure if I was using Call and Ret correctly. If this isn't correct, what should I do instead?
|
|
Back to top |
|
|
onvoloper Master Cheater Reputation: 0
Joined: 05 Jul 2006 Posts: 294
|
Posted: Wed Aug 08, 2007 8:45 pm Post subject: |
|
|
This isn't the correct section for this. This is for tutorials asm not questions. Ask questions in the generalgamehacking section i think
|
|
Back to top |
|
|
me Grandmaster Cheater Reputation: 2
Joined: 24 Jun 2004 Posts: 733 Location: location location
|
Posted: Wed Aug 08, 2007 9:48 pm Post subject: |
|
|
onvoloper is right this needs to be in general game hacking
still since I'm posting
Time:
mov [0100579C],10 //Move 10 into the value of Time
cmp [0100579C],0 //Compare it to 0
your moving 10 into [0100579C] then immediatley comparing it to 0
well it wont be 0 cos you just put 10 in it..... so you should leave the cmp line out and just go straight to the call chicken...
also you are jumping back to the instruction that calls your code so you will jump back into your code and be stuck in an infinite loop instead of continuing in the minesweeper code .....
call Chicken //Call Chicken (I'm trying to learn about this function
jmp 01002FF5 //Which is the whole point of this script, I don't know
//If I used it right here
01002FF5: //The address of the time
jmp Time .....
so you need to jmp to the address of the code after 01002ff5... in other words the next instruction after the jmp to your code cave...
I posted a script somewhere on the forum with a 5 second count using script, deleted the script of my pc tho..
still you should be able to work it out from here, if not ask in the general programming section
_________________
|
|
Back to top |
|
|
bach12345 Cheater Reputation: 0
Joined: 25 Aug 2007 Posts: 33 Location: right behind you!
|
Posted: Mon Nov 05, 2007 8:38 pm Post subject: |
|
|
nice job anyways. you could use some improvement. (i have used cheat engine for 2 years.)
_________________
advanced cheater(i really am......really.) |
|
Back to top |
|
|
Bannedjsin95 Grandmaster Cheater Supreme Reputation: 0
Joined: 11 Oct 2007 Posts: 1499
|
Posted: Sat Dec 08, 2007 12:40 pm Post subject: |
|
|
instead of using the counter, add the addy to your ct, right click the addy and click what accesses it
find the ones with jmp functions and switch it
there are also inc functions, which you can switch to dec but it will goto -192312318 or something. or you can just switch it to cmp, but there are more addies inc'ing it
i sux at the cmp function
_________________
|
|
Back to top |
|
|
atom0s Moderator Reputation: 198
Joined: 25 Jan 2006 Posts: 8517 Location: 127.0.0.1
|
Posted: Sun Dec 09, 2007 1:36 am Post subject: |
|
|
I'd probably set it up a little different, like this:
Code: | [ENABLE]
alloc(TimeCave,1024)
label(back)
label(TimeCheck)
label(JmpBack)
TimeCave:
mov [0100579C], 10 // Set Time To 10 (hex)
TimeCheck:
cmp [0100579C], 0 // Compare Time To 0
je JmpBack // Jmp Back If Equal
dec [0100579C] // If Not Equal Subtract 1
jmp TimeCheck // Jump Back And Check Again
JmpBack:
jmp back // Jump Back To Original Code
01002FF5:
jmp TimeCave // Jump To Time Cave
nop // Nop Left-over Byte
back:
[DISABLE]
01002FF5:
inc [0100579C]
dealloc(TimeCave) |
_________________
- Retired. |
|
Back to top |
|
|
Clairenix Grandmaster Cheater Reputation: 5
Joined: 19 Dec 2007 Posts: 715
|
Posted: Thu Dec 20, 2007 2:06 am Post subject: |
|
|
nice i like it
|
|
Back to top |
|
|
Overload Master Cheater Reputation: 0
Joined: 08 Feb 2008 Posts: 293
|
Posted: Thu Apr 03, 2008 9:40 pm Post subject: |
|
|
Wiccaan wrote: | I'd probably set it up a little different, like this:
Code: | [ENABLE]
alloc(TimeCave,1024)
label(back)
label(TimeCheck)
label(JmpBack)
TimeCave:
mov [0100579C], 10 // Set Time To 10 (hex)
TimeCheck:
cmp [0100579C], 0 // Compare Time To 0
je JmpBack // Jmp Back If Equal
dec [0100579C] // If Not Equal Subtract 1
jmp TimeCheck // Jump Back And Check Again
JmpBack:
jmp back // Jump Back To Original Code
01002FF5:
jmp TimeCave // Jump To Time Cave
nop // Nop Left-over Byte
back:
[DISABLE]
01002FF5:
inc [0100579C]
dealloc(TimeCave) |
|
just because of this script, i actually understand ASM a lot more
_________________
Blog
Quote: | Rhys says:
you can be my maid
Rhys says:
ill buy you a french maid outfit
Tyler says:
Sounds good
Rhys says:
ill hold you to that |
|
|
Back to top |
|
|
Chase Payne Grandmaster Cheater Reputation: 1
Joined: 20 Mar 2008 Posts: 533
|
Posted: Thu Apr 03, 2008 11:50 pm Post subject: |
|
|
Please Check Date On Forums before posting.... And I also have a question... If I write scripts.... were's the option to add them to trainers >.<
|
|
Back to top |
|
|
Labyrnth Moderator Reputation: 9
Joined: 28 Nov 2006 Posts: 6285
|
Posted: Fri Apr 04, 2008 6:01 am Post subject: |
|
|
In the same way you add an address you found to a trainer.
Difference is it is just toggle it on trainer instead of set value.
_________________
|
|
Back to top |
|
|
Chase Payne Grandmaster Cheater Reputation: 1
Joined: 20 Mar 2008 Posts: 533
|
Posted: Fri Apr 04, 2008 1:01 pm Post subject: |
|
|
So I'm guessing in the script I register the symbol and then add Chillidog or something into the trainer?
Code: | registersymbol(Chillidog) |
|
|
Back to top |
|
|
Labyrnth Moderator Reputation: 9
Joined: 28 Nov 2006 Posts: 6285
|
Posted: Fri Apr 04, 2008 1:21 pm Post subject: |
|
|
Chase Payne wrote: | So I'm guessing in the script I register the symbol and then add Chillidog or something into the trainer?
Code: | registersymbol(Chillidog) |
|
umm your way off,
write the script, have it in the cheat table. make a trainer.
_________________
|
|
Back to top |
|
|
Chase Payne Grandmaster Cheater Reputation: 1
Joined: 20 Mar 2008 Posts: 533
|
Posted: Mon Apr 28, 2008 11:18 pm Post subject: |
|
|
I think the minesweeper script ehs trying to run is this...
Code: | alloc(newmem,2048) //2kb should be enough
label(returnhere)
label(originalcode)
label(exit)
01002FF5:
jmp newmem
nop
returnhere:
/*
Here's an explanation of what this script does.
First the address of time is 0100579c
so the objective is to make it reset every time
it hits 10
Which we start with compare [time],#10
*/
newmem:
cmp [0100579c],#10 //Compare time to 10
jl 010002EC // If it's lower than 10.. jump to 010002EC
jnb 010003AC // If it's above ten Jump to 010003AC the jmp instruction will work here too
//jmp 010003AC .. read above ^^^^^^^^^^^^
010002EC:
inc [0100579c] // Increase the time.
jmp returnhere // This jumps back to base to repeat the script over and over.
010003AC:
sub [0100579c],#10 // when jnb is executed, it comes to here because the time went to 10 or above
// Which subtracts the time by 10... resulting back to zero.
originalcode:
//inc [0100579c]
exit:
jmp returnhere |
This will help a few people so that's why I posted it.
Since the ones above made it go to 1 then to 0.
Last edited by Chase Payne on Tue Apr 29, 2008 10:10 am; edited 2 times in total |
|
Back to top |
|
|
Symbol I'm a spammer Reputation: 0
Joined: 18 Apr 2007 Posts: 5094 Location: Israel.
|
Posted: Tue Apr 29, 2008 4:33 am Post subject: |
|
|
Chase Payne, this code will overwrite some bytes, make a Code Cave.
Samurai, you made an infinite loop:
alloc(Time,256)
alloc(Chicken,256)
//You don't need labels, they will just fuck up the script if there's also allocated memory with the same name
01002FF5: //The address of the time
call Time //Call instead jmp codecave+jmp label (or jmp codecave+jmp xxxx)
nop
Time:
//mov [0100579C],10 //Mov time to 0x10 (16)
//Comment out, you'll see why soon.
//cmp [0100579C],0 //Uselsss
call Chicken
//jmp 01002FF5 //And jump back to the same address, to jmp code cave, to call chicken to jmp back to the same address, to jmp code cave...
jmp
ret
Chicken:
dec [0100579C] //Decrase
//cmp [0100579C],0 //Compare. Useless now.
//jne Chicken //Jump to chicken immediatly, this will reach 0 before you will even blink.
//I commented it so it will call "Time" and then "Chicken" only once, when 01002FF5 is accessed.
ret //And return before you even blink.
[disable]
dealloc(Time)
dealloc(Chicken)
01002FF5:
inc [0100579C]
Well, this topic is old. you probably solved this long ago.
This script should decrase the time by one every time 01002FF5 is accessed. (1 second?)
|
|
Back to top |
|
|
Chase Payne Grandmaster Cheater Reputation: 1
Joined: 20 Mar 2008 Posts: 533
|
Posted: Tue Apr 29, 2008 8:17 am Post subject: |
|
|
I did use a code cave.... ya this topic was solved logn ago, but some people learn by looking at what everyone else is talking about.
Edit I see what you mean... I fixed it
|
|
Back to top |
|
|
|