Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Perfect World
You last visited: Today at 18:45

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

Advertisement



Some Questions

Discussion on Some Questions within the Perfect World forum part of the MMORPGs category.

Reply
 
Old 12/01/2011, 00:48   #16
 
elite*gold: 0
Join Date: Jul 2011
Posts: 57
Received Thanks: 8
Okay, thanks for the help.
boredsauce is offline  
Old 12/01/2011, 07:40   #17
 
Interest07's Avatar
 
elite*gold: 0
Join Date: Mar 2010
Posts: 862
Received Thanks: 575
Did I never tell you about the hell that is direct3d?

I really thought I uploaded it before though... but here it is again:

Quote:
Originally Posted by dumbfck View Post
Well... I never actually tried building his source for the d38 stuff, so I thought I'd install the DXSDK. I've now given up with that stupid ****** idea lol. I'm probably just being thick... I installed it, pointed VS at the include / library / etc directories. Some of the header files were present in the installation but a whole bunch were not (the d3dx* files). I added a bunch manually but that just spawned more errors exponentially. I'm not personally interested in using this stuff, so I'm sorry but I'm not going to waste any more rage trying to get the SDK installed.
Interest07 said I could post his sources, but I'm not sure which are which now 'cause it was a long time ago. Hopefully he'll see this and upload the appropriate files :P

Having a really bad day, so I'm going to go and smash my Win7 box to a million pieces now.

Sorry I wasn't much help.
Attached Files
File Type: rar PWdll.rar (28.2 KB, 2 views)
Interest07 is offline  
Thanks
2 Users
Old 12/01/2011, 08:48   #18
 
elite*gold: 0
Join Date: Jul 2011
Posts: 57
Received Thanks: 8
This should help me with hooking d3d and more. I'll look over the code tomorrow.



Thanks a ton!
boredsauce is offline  
Old 12/02/2011, 10:03   #19
 
Smurfin's Avatar
 
elite*gold: 0
Join Date: Oct 2008
Posts: 1,243
Received Thanks: 670
how if you have the item eye of the jungle or eye of observation that can display ppl's stats, does the informations come from the same memory address ?
Smurfin is offline  
Old 12/02/2011, 10:17   #20
 
elite*gold: 10
Join Date: Sep 2010
Posts: 400
Received Thanks: 233
When you use an eye of observation, a useItem packet is sent. The server checks that you actually have that item in your inventory and if so, returns some additional information about the target player when you query their info.
If you have the jungle thing, as long as it's equipped the server will send that information along with the usual stuff. Like what Swoosh said about client / server architecture in the other thread... There is no tricking it.
The vital part is the server side check for the items. The stuff you see in your inventory is just a visual to show you what you have stored in the server database.

And to answer your question, I would expect that your target's info would be stored in the same offsets as your own info is stored in (but for their player struct of course). Never actually used one of those items but it would make sense.
dumbfck is offline  
Old 12/02/2011, 10:37   #21
 
elite*gold: 0
Join Date: Jul 2011
Posts: 57
Received Thanks: 8
The entity struct contains all the available info on the target. I don't know what's all available clientside yet without special items. The only information I'm displaying ATM is basic stuff, hp / mp / lvl. I'm not all that interested in the specifics either ATM.


BTW, my simple overlay using Interest07's stuff is working out just fine. I kinda figured I'd need to do something using Patrik/bobbysing/whoever else's FindPattern function.



Time to get working on a winamp control and faction manager
boredsauce is offline  
Old 12/02/2011, 23:53   #22
 
Smurfin's Avatar
 
elite*gold: 0
Join Date: Oct 2008
Posts: 1,243
Received Thanks: 670
Quote:
Originally Posted by dumbfck View Post
When you use an eye of observation, a useItem packet is sent. The server checks that you actually have that item in your inventory and if so, returns some additional information about the target player when you query their info.
If you have the jungle thing, as long as it's equipped the server will send that information along with the usual stuff. Like what Swoosh said about client / server architecture in the other thread... There is no tricking it.
The vital part is the server side check for the items. The stuff you see in your inventory is just a visual to show you what you have stored in the server database.

And to answer your question, I would expect that your target's info would be stored in the same offsets as your own info is stored in (but for their player struct of course). Never actually used one of those items but it would make sense.
ohh I see, I think I got the picture of how it relates with the server-client side thing.

can we get player information based on target selected ? other than using player/npc struct list. I think it once worked in older client version, I could find the address of a selected target's HP/MP in CE, I used to peep other ppl's hp using that method when there wasn't much info on player/npc struct list at that time, but later it stopped working.

I think boredsauce also looking for the same thing or the other way around, me asking the same thing as he is
Smurfin is offline  
Old 12/03/2011, 21:46   #23
 
Sᴡoosh's Avatar
 
elite*gold: 20
Join Date: May 2009
Posts: 1,290
Received Thanks: 325
To display player HP, do a linear search through Player array, then get the data from the entry whoos ID matches your target ID.

Cheers
Sᴡoosh is offline  
Thanks
1 User
Old 12/04/2011, 01:49   #24
 
Smurfin's Avatar
 
elite*gold: 0
Join Date: Oct 2008
Posts: 1,243
Received Thanks: 670
thanks for the input, that should really do the trick
Smurfin is offline  
Old 12/04/2011, 08:57   #25
 
elite*gold: 0
Join Date: Jul 2011
Posts: 57
Received Thanks: 8
Quote:
Originally Posted by Smurfin View Post
ohh I see, I think I got the picture of how it relates with the server-client side thing.

can we get player information based on target selected ? other than using player/npc struct list. I think it once worked in older client version, I could find the address of a selected target's HP/MP in CE, I used to peep other ppl's hp using that method when there wasn't much info on player/npc struct list at that time, but later it stopped working.

I think boredsauce also looking for the same thing or the other way around, me asking the same thing as he is


I already had the player info I needed, I just had trouble with the D3D hooking.

If you want the hp and stuff you need to cycle through the playerlist checking the UIDs until its the same as the one selected.

Example (untested)
Code:
player_t *PlayerForUID( DWORD UID )
{
	for( int i = 0; i < numPlayers; ++i )
	{
		player_t *p = PlayerForNum( i );
		if( !p ) continue;

		if( p->UID == UID ) return p;
	}

	return NULL;
}

Hope that made sense. 2 am and tired xD
boredsauce is offline  
Thanks
1 User
Old 02/16/2012, 05:36   #26
 
elite*gold: 0
Join Date: Jul 2011
Posts: 57
Received Thanks: 8
Heya.


I converted the d3d class to d3d9. Mostly did find/replace, but did try to change a few functions that didn't exist in d3d9 anymore. Finally got it to compile without error, but the overlay doesn't display ingame, and sometimes crashes when entering the world.


The way I see it, there's 2 possible things wrong here:
1. I fucked up when replacing d3d8 functions with d3d9,
2. Structures are out of date.



According to dumbfcks post, the sendPacket function is now at 0x63AA80, and the base is 0xA521C0.



Does you have / intend to update the structures? Or do you have any suggestions on what I do next?


EDIT:
Right, so converting from dx8 to dx9 wasn't nearly as hard as I thought it would be.

Just did find/replace on most of the stuff. For drawing text, you don't need the Begin() and End() stuff anymore, just DrawText.
Code:
pFont->DrawTextA( NULL, text, -1, &Rectangle, 0, color );
Also removed calls to SetVertexShader() and used SetFVF instead.
Code:
	//pDevice->SetVertexShader( NULL /*D3DFVF_XYZRHW | D3DFVF_DIFFUSE | D3DFVF_TEX1*/); 
	pDevice->SetFVF( D3DFVF_XYZRHW | D3DFVF_DIFFUSE | D3DFVF_TEX1 );
No longer using CreateImageSurface(). Using CreateOffscreenPlainSurface() now:

Code:
	//pDevice->CreateImageSurface(surfDesc.Width, surfDesc.Height, surfDesc.Format, &pCleanSurface);
	pDevice->CreateOffscreenPlainSurface( surfDesc.Width, surfDesc.Height, surfDesc.Format, D3DPOOL_MANAGED , &pCleanSurface, NULL );
Replaced CopyRects() with UpdateSurface():
Code:
	//pDevice->CopyRects(pCleanSurface, NULL, 0, pTexSurface, NULL);
	pDevice->UpdateSurface( pCleanSurface, NULL, pTexSurface, NULL );
Code:
	//pDevice->CopyRects(pSurface, pSrcRect, 1, pTexSurface, &destPoint);
	pDevice->UpdateSurface( pSurface, pSrcRect, pTexSurface, &destPoint );

Think that about sums up my changes. I don't know much about D3D programming, but it seems to work so w/e. xD

Below are the d3d changes I've made that I'm not sure about:
boredsauce is offline  
Old 02/16/2012, 09:10   #27
 
Interest07's Avatar
 
elite*gold: 0
Join Date: Mar 2010
Posts: 862
Received Thanks: 575
the game using 9 now? bah
Interest07 is offline  
Old 02/16/2012, 09:18   #28
 
elite*gold: 0
Join Date: Jul 2011
Posts: 57
Received Thanks: 8
Yup. They added it with the patch yesterday.
boredsauce is offline  
Old 02/16/2012, 23:10   #29
 
Interest07's Avatar
 
elite*gold: 0
Join Date: Mar 2010
Posts: 862
Received Thanks: 575
Quote:
Originally Posted by boredsauce View Post
Yup. They added it with the patch yesterday.
sucks, I'll have to update my autopotter then i guess
Interest07 is offline  
Old 02/17/2012, 01:00   #30
 
Smurfin's Avatar
 
elite*gold: 0
Join Date: Oct 2008
Posts: 1,243
Received Thanks: 670
does that mean we'll see some improvement in framerates now that the game is using dx9, especially in TW or in a crowded area.

isn't dx9 already old for today or even at pw's launch date a few years ago ?

is there any way I can replace older pw verison's engine with the engine used in PWI Descent and leave other files unchanged ?
Smurfin is offline  
Reply




All times are GMT +2. The time now is 18:45.


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.