Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Cabal Online
You last visited: Today at 02:05

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

Advertisement



identifier for unique id

Discussion on identifier for unique id within the Cabal Online forum part of the MMORPGs category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Nov 2008
Posts: 224
Received Thanks: 17
identifier for unique id

in order for me to properly store any default values such as your nation when to activate spy mode i need some sort of value that is unique to the character such as char id or something else related to that.

anyone care to offer insight?

PHP Code:
int tempnat = *(DWORD*)(ADDR_BASE+A_NATION);

void Start(){
    while (
1){
        if(
GetKeyState(VK_F9) < 0){
            if(
spy == 0){
                
spy 1;
            }else if(
spy == 1){
                
spy 0;
            }
            
Sleep(1000);
        }
        if(
spy == 1){
            
DWORD NATION = *(DWORD*)ADDR_BASE;*(DWORD*)(NATION+A_NATION) = 3;
        }else if(
spy == 0){
            
DWORD NATION = *(DWORD*)ADDR_BASE;*(DWORD*)(NATION+A_NATION) = tempnat;
        }
    }

this is my sample code to enable "spy". what i want this to do is the tempnat var will store your "real" nation, so when you toggle it goes to gm and then tempnat. its semi working but its going to no nation which i believe the var is being taken when the game loads up and thus does not have a char to be used. So i need a check in my code that would detect that a character is being used.
syndrah is offline  
Old 10/16/2012, 00:22   #2
 
кev's Avatar
 
elite*gold: 0
Join Date: Aug 2012
Posts: 130
Received Thanks: 184
Quote:
Originally Posted by syndrah View Post
this is my sample code to enable "spy". what i want this to do is the tempnat var will store your "real" nation, so when you toggle it goes to gm and then tempnat. its semi working but its going to no nation which i believe the var is being taken when the game loads up and thus does not have a char to be used. So i need a check in my code that would detect that a character is being used.
A hackish way would be to grab the value before you first modify it. There's naturally no nation value when the DLL is attached.

Alternatively you could poll the game state to (re)initialize the value every time you switch characters etc.

..Or switch to GM nation only temporarily, which is what I do. Save the nation > set it to GM > sleep few seconds > restore.

BTW, why on earth are you constantly writing the nation value regardless if it has changed or not?
кev is offline  
Thanks
1 User
Old 10/16/2012, 01:47   #3
 
elite*gold: 0
Join Date: Nov 2008
Posts: 224
Received Thanks: 17
Quote:
Originally Posted by кev View Post
A hackish way would be to grab the value before you first modify it. There's naturally no nation value when the DLL is attached.

Alternatively you could poll the game state to (re)initialize the value every time you switch characters etc.

..Or switch to GM nation only temporarily, which is what I do. Save the nation > set it to GM > sleep few seconds > restore.

BTW, why on earth are you constantly writing the nation value regardless if it has changed or not?
yes i noticed that too that the value ios being written constantly. ill change it around. i tried to store it as a temp value when i activate it, but couldnt get it to work right, the value kept getting ..."lost"...?

ill update my code in a bit and let you know how it went.

also kev can you calrify what you mean by poll?
syndrah is offline  
Old 10/16/2012, 12:16   #4
 
кev's Avatar
 
elite*gold: 0
Join Date: Aug 2012
Posts: 130
Received Thanks: 184
Quote:
Originally Posted by syndrah View Post
yes i noticed that too that the value ios being written constantly. ill change it around. i tried to store it as a temp value when i activate it, but couldnt get it to work right, the value kept getting ..."lost"...?
For example; initially set the tempnat to -1. When you activate the nation change, check if tempnat's -1 and if it is, read the nation value into tempnat. But like I said, that's a tad hackish.

Quote:
Originally Posted by syndrah View Post
also kev can you calrify what you mean by poll?
There's an address which holds the current gamestate (pre-login, server / char selection, in-game, etc). I don't have the address nor the pattern to give you right now but I'm pretty sure it's mentioned somewhere around this forum. You simply check it's value periodically and use it to reinitialize tempnat every time it goes from char select to in-game.

Plus some nuances. Instead of int, bools or bool[] work better for simple toggle flags, even if just for clarity's sake. And toggling is more readable with spy = !spy instead of that 5 line if-else.
кev is offline  
Thanks
1 User
Old 10/19/2012, 19:43   #5
 
elite*gold: 0
Join Date: Nov 2008
Posts: 224
Received Thanks: 17
hi kev, thanks for your input.

im still trying to store in your "real" nation but it wont work.....it keep getting 0 or null...

PHP Code:
tempnat = *(DWORD*)(ADDR_BASE+A_NATION); 
the address base and nation address is correct as i use it to toggle, it just goes back to no nation instead of cap/proc
syndrah is offline  
Old 10/20/2012, 10:14   #6
 
кev's Avatar
 
elite*gold: 0
Join Date: Aug 2012
Posts: 130
Received Thanks: 184
Quote:
Originally Posted by syndrah View Post
hi kev, thanks for your input.

im still trying to store in your "real" nation but it wont work.....it keep getting 0 or null...

PHP Code:
tempnat = *(DWORD*)(ADDR_BASE+A_NATION); 
the address base and nation address is correct as i use it to toggle, it just goes back to no nation instead of cap/proc
Your writes work fine but read doesn't because you're doing 'address-of-base + offset = value' instead of 'address-contained-in-base + offset = value'. There's a difference in pointer arithmetic of your reads and writes - compare them and you'll see the bug.
кev is offline  
Old 10/22/2012, 22:20   #7
 
elite*gold: 0
Join Date: Nov 2008
Posts: 224
Received Thanks: 17
got it to work my way

PHP Code:
DWORD TNAT = *(DWORD*)ADDR_BASE;
tempnat = *(DWORD*)(TNAT+A_NATION); 
syndrah is offline  
Old 10/24/2012, 02:47   #8
 
кev's Avatar
 
elite*gold: 0
Join Date: Aug 2012
Posts: 130
Received Thanks: 184
Quote:
Originally Posted by syndrah View Post
got it to work my way

PHP Code:
DWORD TNAT = *(DWORD*)ADDR_BASE;
tempnat = *(DWORD*)(TNAT+A_NATION); 
And you missed the point.
кev is offline  
Old 10/24/2012, 02:52   #9
 
elite*gold: 0
Join Date: Nov 2008
Posts: 224
Received Thanks: 17
can you show, im not quite getting what you mean.
syndrah is offline  
Reply


Similar Threads Similar Threads
MOONBOX MAP IDENTIFIER
03/23/2008 - Conquer Online 2 - 2 Replies
cant find one can someone help me please...
item identifier
01/28/2007 - Conquer Online 2 - 6 Replies
ok can someone help me find a item identifier that my computer can actually find. cause ive found a few item identifiers but then when i clik open the file it always says,"windows can not find." and im like wtf, so please help me.text2schild.php?smilienummer=1&text=thanx' border='0' alt='thanx' />



All times are GMT +2. The time now is 02:05.


Powered by vBulletin®
Copyright ©2000 - 2024, 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 ©2024 elitepvpers All Rights Reserved.