| View previous topic :: View next topic |
| Author |
Message |
oyyzj Cheater
Reputation: 0
Joined: 21 May 2011 Posts: 46
|
Posted: Mon Dec 19, 2016 7:52 am Post subject: Question for a script |
|
|
Hello. Is it possible to write a script to look at two or more adresses's value? And if the values are true then set a third adress value to 100 ??
example:
ePSXe.exe+B6FD90 = FE9C ( only inside battle mode, otherwise value changes when out of battle, in a dialoge etc.)
and
ePSXe.exe+B6FD86 = 0006 ( only when inside battle and stay idle, otherwise it changes like above or when attack, use skill etc)
if the value of above are true then
set
ePSXe.exe+B6FDB6 = 0064 ( if freeze game will crash the moment you use limit break skill, that is why only set to value. at the moment you attack ePSXe.exe+B6FD86's value will change, so it won't crash)
Those adresses are static because it is an emulator game.
|
|
| Back to top |
|
 |
Dark Byte Site Admin
Reputation: 471
Joined: 09 May 2003 Posts: 25833 Location: The netherlands
|
Posted: Mon Dec 19, 2016 8:59 am Post subject: |
|
|
something like this:
| Code: |
{$lua}
if t then
t.destroy()
t=nil
end
{$asm}
[enable]
{$lua}
if not syntaxcheck then
t=createTimer()
t.Interval=100
t.OnTimer=function()
local v1=readInteger('ePSXe.exe+B6FD90') & 0xffff;
local v2=readInteger('ePSXe.exe+B6FD86') & 0xffff;
if ((v1==0xfe9c) and (v2==0x0006)) then
local v3=wordToByteTable(0x64)
writeBytes('ePSXe.exe+B6FDB6',v3)
end
end
t.Enabled=true
end
[disable]
|
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
| Back to top |
|
 |
oyyzj Cheater
Reputation: 0
Joined: 21 May 2011 Posts: 46
|
Posted: Mon Dec 19, 2016 12:42 pm Post subject: |
|
|
Thank you for reply.
So it only works with a lua script? or can i just use auto assemble for this?
|
|
| Back to top |
|
 |
Dark Byte Site Admin
Reputation: 471
Joined: 09 May 2003 Posts: 25833 Location: The netherlands
|
Posted: Mon Dec 19, 2016 12:44 pm Post subject: |
|
|
this is an auto assembe script with some lua additions. You can just plug it in there
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
| Back to top |
|
 |
oyyzj Cheater
Reputation: 0
Joined: 21 May 2011 Posts: 46
|
Posted: Mon Dec 19, 2016 4:28 pm Post subject: |
|
|
is it possible to add or function between if ((v1==0xfe9c) and (v2==0x0006))
like: if ((v1==0xfe9c) or (v3==0x0004) and (v2==0x0006))
or i have to write it like: if ((v1==0xfe9c) and (v2==0x0006)) or if ((v3==0x0004) and (v2==0x0006)) ??
|
|
| Back to top |
|
 |
Dark Byte Site Admin
Reputation: 471
Joined: 09 May 2003 Posts: 25833 Location: The netherlands
|
Posted: Mon Dec 19, 2016 4:43 pm Post subject: |
|
|
just watch where you put the ()'s but yes. the first case will work.
e.g:
((v1==0xfe9c) or (v3==0x0004)) and (v2==0x0006)
is different from
(v1==0xfe9c) or ((v3==0x0004) and (v2==0x0006))
it's all up to you on what you want
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
| Back to top |
|
 |
oyyzj Cheater
Reputation: 0
Joined: 21 May 2011 Posts: 46
|
Posted: Mon Dec 19, 2016 5:04 pm Post subject: |
|
|
Thanks for this ((v1==0xfe9c) or (v3==0x0004)) and (v2==0x0006)
i have test it on 1 character and it works. But it doesn't work well with a team that has 4 characters inside. I made 4 scripts for each character position 1, when activated only the last activated will set value to 0x64.
Is it because the timer built in ??
EDIT: I think I got this. I just deleted this part and all 4 scripts works well together:
{$lua}
if t then
t.destroy()
t=nil
end
{$asm}
|
|
| Back to top |
|
 |
Dark Byte Site Admin
Reputation: 471
Joined: 09 May 2003 Posts: 25833 Location: The netherlands
|
Posted: Mon Dec 19, 2016 6:48 pm Post subject: |
|
|
if you use different scripts, use different timer names. e.g t2, t3, t4 (else you can't disable them)
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
| Back to top |
|
 |
oyyzj Cheater
Reputation: 0
Joined: 21 May 2011 Posts: 46
|
Posted: Tue Dec 20, 2016 1:04 am Post subject: |
|
|
Can I get some more instructions about the example v3=WordToByteTable(0x00) please.
How does it look like when you write for:
Word
Dword
Integer
just for future preferences.
Thank you
|
|
| Back to top |
|
 |
|