Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Nox Lua Mana script

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
7spawn
How do I cheat?
Reputation: 0

Joined: 25 Nov 2012
Posts: 8

PostPosted: Tue Jun 30, 2015 5:44 am    Post subject: Nox Lua Mana script Reply with quote

Hello.

First of all i want to say huge thanx to DarkByte for great tool, and samuri25404 for his A Very In Depth Tutorial on Auto Assembler.
Now i understand much more. Hacking with CE is really not difficult, when you understand these things

I am not asking to do everything for me, no, i want to understand how can i do it by myself, and here i need your help.

I have an idea of slow mana replenish in the Nox game.
For now, it is not only idea.
What i know for now:
- 6 and 8 lvls of official tutorial. (7, with code injection is still difficult for me)
- I can find right pointer in CE in tutorial of 4 byte type
- very basic understanding of code injection (but A Very In Depth Tutorial on Auto Assembler made things easier to understand)
- a desire to learn new things.

    What do i have:
  1. A slow iteration of the value by 1, every 0.1 seconds. I have already found this code
    Code:

    require "socket"

    function sleep(sec)
        socket.select(nil, nil, sec)
    end
    maxmana = 76
    i = 0
    repeat
    print(i) -- Incrementing value
    sleep(0.1)
    i = i + 1
    until i == maxmana


  2. Reading value of the maxmana from the file, that was previosly written to it by another lua script, that was plugged it into game.
    I am doing this these way because every lvlup - character has new value of maximum mana, and i don't want to watch over this value over and over again and change it manually in CE code. I have found my way to transmit current maxmana value to the maxmana.txt file.

    So, open file and read value

    Code:

    function readfile()
        local contents = ""
        local file = io.open("maxmana.txt", "r" ) -- open for read-only
        if (file) then
            -- read all contents of file into a string
            contents = file:read()
            file:close()
        else
            print("file not found")
        end
            print(path)
    end




    What i do not have:
  1. A right pointer, so i can manipulete right value of the mana, using lua script.
  2. The way to get and operate value of the pointer or just first dynamic adress with lua
    Under "operate" i mean using my lua script to increase current value of current mana, in the script it is "i" variable.

Description of the problem:
There are 2 adresses that affects on right value of mana (both can change it). And one have 1 byte, and second - 2 bytes type, not 4 like in tutorial.

Watch 1 screenshot below.

Ok, i will try to use breakpoint (F5) and see what accesses this adress.
Please notice, that window was not empty when i opened it. Somehow instruction appears instantly, even before i actual changed mana value in the game.

Watch 2 screenshot below.

Then change the value of mana

Watch 3 screenshot below.

Well now i dont know what to choose.
Because in tutorial there was
Code:
mov [edx,]eax

I assume that there are the reason why i dont see similar instruction is type of the value, that is 1 byte.
And there is no matter what in instruction i will open..

Watch 4 screenshot below.

They ALL have the same pointer adress that is 086654E0 for now.
And offset 4.

When i am trying to find this hex value i see next

Watch 5 screenshot below.

Too much values, most of them is dynamic, but some ~1000 or more is static.

HOW can i find out the right adress here?
When i am changing value in the game it is not helping, i am still have over 37 000 adresses.
I just need a right static pointer, so i could manipulate with it, using lua.



s1.png
 Description:
 Filesize:  34.04 KB
 Viewed:  5344 Time(s)

s1.png



s2.png
 Description:
 Filesize:  8.21 KB
 Viewed:  5344 Time(s)

s2.png



s3.png
 Description:
 Filesize:  14.04 KB
 Viewed:  5344 Time(s)

s3.png



s4.png
 Description:
 Filesize:  14.97 KB
 Viewed:  5344 Time(s)

s4.png



s5.png
 Description:
 Filesize:  34.8 KB
 Viewed:  5344 Time(s)

s5.png


Back to top
View user's profile Send private message
STN
I post too much
Reputation: 42

Joined: 09 Nov 2005
Posts: 2672

PostPosted: Tue Jun 30, 2015 11:54 am    Post subject: Reply with quote

Esi+4 or ebx depending on the instruction you chose. Read a pointer tutorial and find the pointer using the value in esi (or ebx). 4 bytes or 2 bytes doesn't make a difference. Or alternatively, learn code injection and write a script to inject the value you desire to the code.


I don't understand the obsession with lua people have these days, they don't understand the basics of gamehacking and concepts such as code injection/pointers or how the memory works to begin with and still, jump into writing lua scripts.

_________________
Cheat Requests/Tables- Fearless Cheat Engine
https://fearlessrevolution.com
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites