Jump to content
  • 0

Read values from addresses and press space bar if under 100.000


tortor

Question

Hi everybody,

I would like to write a lua script that reads the values of the three addresses (96A06B34, 96A06B50, 96A06B6C) and presses the Space bar if neither of them is above 100.000. If any value of the three addresses is above 100.000, the script should notify me and stop. Is this even possible with lua or do I need to write a python/C script? Sorry I am a complete newbie and would like to learn how to write such a script.

Many Thanks and a great day!

Unbenannt.PNG

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

1 hour ago, tortor said:

Hi everybody,

I would like to write a lua script that reads the values of the three addresses (96A06B34, 96A06B50, 96A06B6C) and presses the Space bar if neither of them is above 100.000. If any value of the three addresses is above 100.000, the script should notify me and stop. Is this even possible with lua or do I need to write a python/C script? Sorry I am a complete newbie and would like to learn how to write such a script.

I dont even know what you r trying. 

t={}
t[1]={}
t[1].address=0x96A06B34
t[1].flags = 4
t[2]={}
t[2].address=0x96A06B50
t[2].flags= 4
t[3]={}
t[3].address=0x96A06B6C
t[3].flags=4
t = gg.getValues(t)
for i,v in ipairs(t) do
  if v.value > 100000 then
    hi = string.format('%16x', v.address)
    return print('Value of address '..hi..' is greater than 100000') end
end
print('Not greater than 100000')

 

 

Link to comment
Share on other sites

Thanks for your quick answer,

The aim is to rob dungeons, they have three slots with gems

1. if there is no gem worth 100.000 or more, the script should press the space bar in order to skip to the next dungeon

2. if there is a gem worth 100.000 or more, the script should stop and make a sound  

 

can I include the output of pressing the space bar on the keyboard?

 

Link to comment
Share on other sites

6 hours ago, tortor said:

the script should press the space bar in order to skip to the next dungeon

I really dont understand why pressing space bar and what for. You should explain more or make a short video. 

6 hours ago, tortor said:

can I include the output of pressing the space bar on the keyboard?

Writing letter to a file is possible in lua. 

But i dont know how write letters in front of user in realtime without any file. Its possible for python(autogui). 

So You should change the output. 

Link to comment
Share on other sites

Thank you all for your replies.

I will try my luck with Python then. I Just wasn't sure how to select the game process within the nox process thats why I switched to lua.

Btw: Found a video of somebody doing the exact same thing (you can see the golden gems in the last dungeon which are worth more than 100.000).

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.