Jump to content
  • 0

Help in Scripting


Yuuuu

Question

I am trying to hack the Heath values of enemies in the game Evertale. It has 2 rounds with 4 enemies each. 

Currently I`m having problems with this current script, as it does change the value of, for example, enemy 2, but when they are attacked their health goes back to full.. (only that one enemy)

I`ve tried having the values frozen in a manner that it can not increase, but the biggest problem with feezing the numbers is that the game crashes when the fight is over.

If someone knows a way to add a detection to see if the health value has increased so then it can replace the value to "1" again. 

 

if gg.isVisible(true) then 
    gg.setVisible(false) 
end
    gg.clearResults()
    goto START
    ::START::

menu=gg.choice({'First Round' , 'Second Round'})


if menu==2 then    
    
    
    --I plan on using the script for other stages where the enemies are different, that is the reason for gg.prompt
    data = gg.prompt({[1]='1', [2]='1', [3]='1', [4]='1'}, {[1]='14343', [2]='15806', [3]='19836', [4]='13647'}) -- 1 to 4 are the Health Values

    gg.searchNumber(data[1], gg.TYPE_DWORD, false, gg.SIGN_EQUAL, 0, -1)
            gg.getResults(100)
                gg.editAll('1', gg.TYPE_DWORD)
                    gg.clearResults()

    gg.searchNumber(data[2], gg.TYPE_DWORD, false, gg.SIGN_EQUAL, 0, -1)
            gg.getResults(100)
                gg.editAll('1', gg.TYPE_DWORD)
                    gg.clearResults()

    gg.searchNumber(data[3], gg.TYPE_DWORD, false, gg.SIGN_EQUAL, 0, -1)
            gg.getResults(100)
                gg.editAll('1', gg.TYPE_DWORD)
                    gg.clearResults()

    gg.searchNumber(data[4], gg.TYPE_DWORD, false, gg.SIGN_EQUAL, 0, -1)
            gg.getResults(100)
                gg.editAll('1', gg.TYPE_DWORD)
                    gg.clearResults()

    print('Script ended.')
end
    if menu==1 then

    data = gg.prompt({[1]='1', [2]='1', [3]='1', [4]='1'}, {[1]='21807', [2]='12274', [3]='23055', [4]='15793', [5]='1'}) 

    gg.searchNumber(data[1], gg.TYPE_DWORD, false, gg.SIGN_EQUAL, 0, -1)
            gg.getResults(100)
                gg.editAll('1', gg.TYPE_DWORD)
                    gg.clearResults()

    gg.searchNumber(data[2], gg.TYPE_DWORD, false, gg.SIGN_EQUAL, 0, -1)
            gg.getResults(100)
                gg.editAll('1', gg.TYPE_DWORD)
                    gg.clearResults()

    gg.searchNumber(data[3], gg.TYPE_DWORD, false, gg.SIGN_EQUAL, 0, -1)
            gg.getResults(100)
                gg.editAll('1', gg.TYPE_DWORD)
                    gg.clearResults()

    gg.searchNumber(data[4], gg.TYPE_DWORD, false, gg.SIGN_EQUAL, 0, -1)
            gg.getResults(100)
                gg.editAll('1', gg.TYPE_DWORD)
                    gg.clearResults()

    print('Script ended.')
    end

 

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

if the game is on the server side, there is no way to modify it, as any edition will force synchronization and the edited memory will be dumped. and the amounts due will be loaded in another memory location.

Link to comment
Share on other sites

2 hours ago, Lenn1 said:

if the game is on the server side, there is no way to modify it, as any edition will force synchronization and the edited memory will be dumped. and the amounts due will be loaded in another memory location.

maybe i didnt make that clear before, my bad, but i already can change the health value. What i wanted was a script for simple automation of the process of searching the number and replacing it. 
my biggest problem with the script is that 1 enemy always puts his health back to max in the second round. I hoped for some sort of either "freeze in range" with a button to be able to unfreeze it, or some way to automatically check if the value changes from 1 to a value that is higher than one (their max health) so that the script could turn the value back to 1.

Link to comment
Share on other sites

Use the script recording tool in the game guardian app, it is very practical!
then you open the .lua file and copy the main code to your custom script with menus and bla bla bla.
the tool freezes, saves and restores the values.
after that just "study" the codes and see how the LUA works

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.