help with script lock plz

Ask for Help on Using the Language With Memory Hacking Software

Moderators: g3nuin3, SpeedWing, WhiteHat, mezzo

help with script lock plz

Postby troy » Tue Oct 07, 2008 4:21 pm

i made mhs table addres:
1.blood=game.exe+50
2.bloodbase=game.exe+60

q:how to script to make on hotkey pressing so blood=bloodbase in table?
give exmple plz.thx . sorry bad english
troy
I Have A Few Questions
 
Posts: 7
Joined: Tue Oct 07, 2008 4:09 pm

Postby L. Spiro » Tue Oct 07, 2008 9:19 pm

It is not necessary to make a script to lock these.

Just add both addresses to the list such that one is A and one is B, then make 2 Hotkeys such that Hotkey0 locks A and unlocks B, and Hotkey1 unlocks A and locks B.


L. Spiro
Our songs remind you of songs you’ve never heard.
User avatar
L. Spiro
L. Spiro
 
Posts: 3122
Joined: Mon Jul 17, 2006 10:14 pm
Location: Tokyo, Japan

Postby WhiteHat » Wed Oct 08, 2008 1:33 am

Maybe, this is what he wants (?):

Code: Select all
VOID Lock ( MHS_ADDRESS aAddress, INT iItemSize )
{
   extern DWORD e_dBlood     = { "", aAddress };       // Blood = game.exe+0x50
   extern DWORD e_dBloodBase = { "", aAddress+0x10 };  // BloodBase = game.exe+0x60
   
   if ( e_dBlood < e_dBloodBase ){
      e_dBlood = e_dBloodBase;
   }
}


CMIIW on script errors...
.. to boldly go where no eagle has gone before...
User avatar
WhiteHat
Elang Djawa
 
Posts: 1059
Joined: Fri Jul 21, 2006 12:49 pm
Location: Away for a while...

Postby L. Spiro » Wed Oct 08, 2008 12:22 pm

Most likely that is what he wants. I am jetlagged.


L. Spiro
Our songs remind you of songs you’ve never heard.
User avatar
L. Spiro
L. Spiro
 
Posts: 3122
Joined: Mon Jul 17, 2006 10:14 pm
Location: Tokyo, Japan

Postby troy » Wed Oct 15, 2008 8:20 pm

yes the script i wants.my thanks you!
questions done
troy
I Have A Few Questions
 
Posts: 7
Joined: Tue Oct 07, 2008 4:09 pm

Re: help with script lock plz

Postby radical dreamer » Wed Jan 20, 2010 2:05 pm

I've never used the script function before now, and I was having difficulty understanding how to use this information for my particular situation, and WhiteHat gave me this solution:

VOID Lock ( MHS_ADDRESS aAddress, INT iItemSize )
{
extern SHORT MMHPos = { "", aAddress }; // MMHPos = zsnesw.exe+0x32BE45
extern SHORT CycleHPos = { "", aAddress + 0x2F0 }; // CycleHPos = zsnesw.exe+0x32C135

MMHPos = CycleHPos; // Directly Lock MMHPos to CycleHPos
}

With this, I now understand how it is supposed to work, but it is not working for me. I may be doing something wrong, here's what I'm doing:

Right click on my MMHPos code, hit "Modify Selected".
Then I go to the Script Lock tab, and I paste that script in there, and press "OK".
The script doesn't give me a compile error. So I look at my addresses in MHS, and compare the two. CycleHPos should be copying the value of MMHPos to itself, but it isn't.

Am I missing a step?
Image
My PSN ID: radicldreamr
User avatar
radical dreamer
I Have A Few Questions
 
Posts: 8
Joined: Sun Dec 20, 2009 1:35 am
Location: USA

Re: help with script lock plz

Postby L. Spiro » Wed Jan 20, 2010 5:15 pm

CycleHPos is not copying MMHPos. MMHPos is copying CycleHPos.

And you need to activate the script lock when you close the dialog.


L. Spiro
Our songs remind you of songs you’ve never heard.
User avatar
L. Spiro
L. Spiro
 
Posts: 3122
Joined: Mon Jul 17, 2006 10:14 pm
Location: Tokyo, Japan

Re: help with script lock plz

Postby radical dreamer » Wed Jan 20, 2010 5:38 pm

Oh ok I see, need to switch it around CycleHPos = MMHPos.

In any case, I'm unsure on how to activate the script lock. If you mean to check the box "use script to apply lock", then I have done that, and it doesn't activate.

*EDIT*
Wait, it's working now. I think flipping those two around did the trick. :-)
Thank you both!
Image
My PSN ID: radicldreamr
User avatar
radical dreamer
I Have A Few Questions
 
Posts: 8
Joined: Sun Dec 20, 2009 1:35 am
Location: USA


Return to Help

Who is online

Users browsing this forum: No registered users and 1 guest

cron