Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > .NET Languages
You last visited: Today at 11:23

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[C#] Simple Question

Discussion on [C#] Simple Question within the .NET Languages forum part of the Coders Den category.

Reply
 
Old   #1
 
iCraziE's Avatar
 
elite*gold: 0
Join Date: Jan 2010
Posts: 456
Received Thanks: 218
[C#] Simple Question

So im reading the memory, getting a value that is consistently changing and storing it in a variable, converting it to a string and displaying it for me to read.

This works fine, it displays the correct value whenever it changes.

My problem is this, I want to check if that value is decreasing or increasing.

Ive searched for an answer to this but everything I see only shows how to check if a value is decreasing/increasing if you manually set the value in the beginning and then do some work to change it.. My case is different because my value is never set by me, it is found outside of my program.

Any help or tips appreciated
iCraziE is offline  
Old 03/29/2015, 19:27   #2
 
Epanias's Avatar
 
elite*gold: 0
Join Date: Sep 2011
Posts: 41
Received Thanks: 18
Why don't you just save it in a variable, wait for some time and than save it in another variable and check if it increased/decreased?

Pseudocode:
Code:
int Var1 = YourMemoryReader.ReadInt();

System.Threading.Thread.Sleep(/*amount of time*/);

int Var2 = YourMemoryReader.ReadInt();

if (Var1 < Var2)
{
//has increased
}
else if (Var1 > Var2)
{
//has decreased
}
else
{
//still the same
}
Epanias is offline  
Old 03/30/2015, 21:47   #3
 
elite*gold: 15
Join Date: Aug 2012
Posts: 3,041
Received Thanks: 6,397
declare an array, store the old in ar[0] new one in ar[1]. so it will be:

Code:
//-->Form() ar[0] & ar[1] = 0

void(){
ar[0] = ar[1]
ar[1] = Read();
//do stuff until the text output to UI
if (ar[0] < ar[1]){//increased (will always increase on first time)}
else if(ar[1] < ar[0]){//decreased}
}
berkay2578 is offline  
Reply


Similar Threads Similar Threads
Really simple question
05/11/2011 - Conquer Online 2 - 5 Replies
Ok here it comes Did blue mouse quest already exist in 5060 or in the japanese conquer?
Simple Question
03/18/2010 - Last Chaos - 6 Replies
Does anybody who plays Last Chaos USA know what files the 3/16 patch changed or added? And/or does anybody know a way to view the patch files?
Simple Question Needs Simple Answer[If CR gone what bot we can use]
08/08/2008 - Cabal Online - 2 Replies
If CR is not free what BOT can we use in PH... Many players in Ph asking that question.... TY...
Simple Question
05/23/2008 - General Gaming Discussion - 0 Replies
Well i just have a HGL Account with registered Serial. Prob is: i dont have the DVD. Is there a client or sth. so i can try if i can login and play online? Or is there an other way to find out if i would be able to play online? I just want to know if it works and then i want to sell the account. Thank you in advice. //reijin



All times are GMT +1. The time now is 11:23.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.