Solved Question about a while loop, memory reading/writing

Hexui Undetected CSGO Cheats Sinkicheat PUBG Cheat

mattthhdp

Newbie
Apr 5, 2014
3
102
0
Hey first of all sorry for my bad english but im a french guy from Quebec Canada so ;) Hi guys !

so my question is ....

i am learning with a game called Faster then Light, i have found everything i need ,and i have write my program

my question is, in the game (like every other game ....) they have ressource. i want to freeze the value to 100

is it better to loop

while ($hackon)
_memorywrite($resource = 100)
...
...
...
wend

or read the memory and when it change set it back to 100 ??
while ($hackon)
if _memoryread(ressource != 100) then
_memorywrite($resource = 100)
endif
...
...
...
wend
?

Hope that is clear lol !tx
 

Rake

Cesspool Admin
Administrator
Jan 21, 2014
12,118
78,998
2,392
its in autoit for now ;) but hey im learning C#, Dont know if that change something ?

is there a wait to use the Cpu wisely with this method ??, i know i can pu some delay (sleep(1000)) for 1 sec, but with this method the script halt, and i dont like it ... or ?

let's take the same example with my hp, the better is to alway have 100% hp but, if i alway go write into the memory, it's work but it's using like 20-25 % of the cpu. but putting some sleep in there will put a chance of dying (really low chance but still a chance)
you will find that even with Cheat Engine freezing your health, you can die if enough damage is done to you between writes
 

mattthhdp

Newbie
Apr 5, 2014
3
102
0
its in autoit for now ;) but hey im learning C#, Dont know if that change something ?

is there a wait to use the Cpu wisely with this method ??, i know i can pu some delay (sleep(1000)) for 1 sec, but with this method the script halt, and i dont like it ... or ?

let's take the same example with my hp, the better is to alway have 100% hp but, if i alway go write into the memory, it's work but it's using like 20-25 % of the cpu. but putting some sleep in there will put a chance of dying (really low chance but still a chance)
 
Last edited by a moderator:
Attention! Before you post:

Read the How to Ask Questions Guide
99% of questions are answered in the Beginner's Guide, do it before asking a question.

No Hack Requests. Post in the correct section.  Search the forum first. Read the rules.

How to make a good post:

  • Fill out the form correctly
  • Tell us the game name & coding language
  • Post everything we need to know to help you
  • Ask specific questions, be descriptive
  • Post errors, line numbers & screenshots
  • Post code snippets using code tags
  • If it's a large project, zip it up and attach it

If you do not comply, your post may be deleted.  We want to help, please make a good post and we will do our best to help you.

Community Mods