| View previous topic :: View next topic |
| Author |
Message |
sjl002 Master Cheater
Reputation: 0
Joined: 31 Aug 2013 Posts: 305
|
Posted: Thu Nov 19, 2015 8:14 pm Post subject: |
|
|
In your script
| Code: | [ENABLE]
// asm code here
{$lua}
-- Lua code here
{$asm}
// asm code here
[DISABLE]
// asm code here
{$lua}
-- Lua code here
{$asm}
// asm code here
|
What is the difference in lua script for enable and disable.
|
|
| Back to top |
|
 |
ParkourPenguin I post too much
Reputation: 155
Joined: 06 Jul 2014 Posts: 4774
|
Posted: Thu Nov 19, 2015 8:25 pm Post subject: |
|
|
The Lua part in the [ENABLE] section is run when you enable a script.
The Lua part in the [DISABLE] section is run when you disable a script.
Again, all the code I've posted (except for that) is meant to be put into the main Lua script window. You'll probably have to modify it if you want to put it into an AA script.
_________________
I don't know where I'm going, but I'll figure it out when I get there. |
|
| Back to top |
|
 |
sjl002 Master Cheater
Reputation: 0
Joined: 31 Aug 2013 Posts: 305
|
Posted: Thu Nov 19, 2015 8:56 pm Post subject: |
|
|
| You can bring a short example to me.
|
|
| Back to top |
|
 |
ParkourPenguin I post too much
Reputation: 155
Joined: 06 Jul 2014 Posts: 4774
|
Posted: Thu Nov 19, 2015 9:15 pm Post subject: |
|
|
Weak unit script:
| Code: | {$lua}
[ENABLE]
writeDouble(healthAddr,1)
[DISABLE]
writeDouble(healthAddr,100) |
Invincible unit script:
| Code: | {$lua}
[ENABLE]
local f = function()
writeDouble(healthAddr,100)
end
if freezeHealthT and freezeHealthT.destroy then freezeHealthT.destroy() end
freezeHealthT = createTimer(nil,true)
freezeHealthT.Interval = 50
freezeHealthT.OnTimer = f
[DISABLE]
if freezeHealthT and freezeHealthT.destroy then freezeHealthT.destroy() end
freezeHealthT = nil |
_________________
I don't know where I'm going, but I'll figure it out when I get there. |
|
| Back to top |
|
 |
sjl002 Master Cheater
Reputation: 0
Joined: 31 Aug 2013 Posts: 305
|
Posted: Thu Nov 19, 2015 9:32 pm Post subject: |
|
|
| in here does not require the asm codes
|
|
| Back to top |
|
 |
ParkourPenguin I post too much
Reputation: 155
Joined: 06 Jul 2014 Posts: 4774
|
Posted: Thu Nov 19, 2015 9:46 pm Post subject: |
|
|
Correct. That's if you want to put in any assembly into your script as well. Sometimes you do, sometimes you don't. It's optional.
Example:
| Code: | [ENABLE]
alloc(newmem,512)
// do whatever with that newmem
{$lua}
writeDouble(healthAddr,1)
{$asm}
[DISABLE]
dealloc(newmem)
{$lua}
writeDouble(healthAddr,100) |
_________________
I don't know where I'm going, but I'll figure it out when I get there. |
|
| Back to top |
|
 |
sjl002 Master Cheater
Reputation: 0
Joined: 31 Aug 2013 Posts: 305
|
Posted: Thu Nov 19, 2015 9:55 pm Post subject: |
|
|
| Do some scripts such as [label(exit)label,(returnhere),...]have not require(need)?
|
|
| Back to top |
|
 |
ParkourPenguin I post too much
Reputation: 155
Joined: 06 Jul 2014 Posts: 4774
|
Posted: Thu Nov 19, 2015 9:57 pm Post subject: |
|
|
It depends on what those scripts do.
If you're making a code cave, then yes, most of that stuff is required. If you're just overriding memory (e.g. changing a sub to an add), then no, that stuff isn't required.
_________________
I don't know where I'm going, but I'll figure it out when I get there. |
|
| Back to top |
|
 |
sjl002 Master Cheater
Reputation: 0
Joined: 31 Aug 2013 Posts: 305
|
Posted: Thu Nov 19, 2015 10:09 pm Post subject: |
|
|
I'm realized.
If we want in down script Instead of value 1 put max health script. for example this script for max health [fld dword ptr [ecx+48]].
| Code: | | writeDouble(healthAddr,1) |
Last edited by sjl002 on Thu Nov 19, 2015 10:26 pm; edited 2 times in total |
|
| Back to top |
|
 |
ParkourPenguin I post too much
Reputation: 155
Joined: 06 Jul 2014 Posts: 4774
|
Posted: Thu Nov 19, 2015 10:15 pm Post subject: |
|
|
I don't know what you're asking. What is [ecx+48]? Health? MaxHealth? And what do you want to do with that?
_________________
I don't know where I'm going, but I'll figure it out when I get there. |
|
| Back to top |
|
 |
sjl002 Master Cheater
Reputation: 0
Joined: 31 Aug 2013 Posts: 305
|
Posted: Thu Nov 19, 2015 10:24 pm Post subject: |
|
|
| this script for max health.I want value go to max.
|
|
| Back to top |
|
 |
ParkourPenguin I post too much
Reputation: 155
Joined: 06 Jul 2014 Posts: 4774
|
Posted: Thu Nov 19, 2015 10:26 pm Post subject: |
|
|
You can just put it to whatever the max is.
| Code: | {$lua}
[ENABLE]
writeDouble(healthAddr,999)
[DISABLE]
writeDouble(healthAddr,100) |
_________________
I don't know where I'm going, but I'll figure it out when I get there. |
|
| Back to top |
|
 |
sjl002 Master Cheater
Reputation: 0
Joined: 31 Aug 2013 Posts: 305
|
Posted: Thu Nov 19, 2015 10:34 pm Post subject: |
|
|
This means that only should put the X value in down script.
| Code: | | writeDouble(healthAddr,999) |
What is this script work(do)?
|
|
| Back to top |
|
 |
sjl002 Master Cheater
Reputation: 0
Joined: 31 Aug 2013 Posts: 305
|
Posted: Sat Nov 21, 2015 11:53 am Post subject: |
|
|
| help please please.
|
|
| Back to top |
|
 |
ParkourPenguin I post too much
Reputation: 155
Joined: 06 Jul 2014 Posts: 4774
|
Posted: Sat Nov 21, 2015 12:07 pm Post subject: |
|
|
From main.lua:
| Quote: | | writeDouble(address,value) : Writes a double precision floating point to the specified address. Returns true on success |
The address is just some integer, like I had posted in a previous script.
_________________
I don't know where I'm going, but I'll figure it out when I get there. |
|
| Back to top |
|
 |
|