Register for your free account! | Forgot your password?

You last visited: Today at 18:21

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

Advertisement



PWI GUI Mapper

Discussion on PWI GUI Mapper within the PW Hacks, Bots, Cheats, Exploits forum part of the Perfect World category.

Reply
 
Old   #1
 
elite*gold: 10
Join Date: Sep 2010
Posts: 400
Received Thanks: 234
PWI GUI Mapper

Hi folks,

Here's another tool that might prove useful for people who are just interested in disecting the game... If you just want to download bots and run them, you may as well leave now.

I'm currently working on a system to build custom in-game interfaces using the client's own mechanisms, so it was useful to me to investigate how the whole GUI system hangs together. Sometimes it's quicker to build a tool to investigate things for you than to spend weeks finding offsets, hence this little tool :P

In a nutshell, this tool will search the GUI base
Code:
[[[[baseCall]+0x1C]+0x18]+0x8]
for window objects, retrieving their offsets along with some information about them, plus information about their child objects, e.g., buttons, lists, labels, etc.



Run PWI, then launch this tool and it will list on the left all available GUI wndows in the client. Click on one of them and it will give you more information about the window. You can even open and close windows using the checkboxes next to the list of window objects hehe.
Be warned, trying to open some of them will crash the client... I'm not really too fussed about fixing that as it's only very few of them and they're windows that are not of interest to me.

That's about all there is to it - I won't go into details about how it works because it's fairly straightforward and you can just inspect the code if you're interested.
It's built with C# so you'll need Visual C# or Visual Studio to use it (Download or visual Studio 2010 Express - They're free and they kick AutoShit's arse )

I intend to build on it so that you can actually activate any control on any window via the tool's interface... Just not today lol.

Chances are the project might piss off your antivirus - I have crappy Avira on my Win7 box I tested this on and it kept telling me I had an infection even though I made the bloody thing - Hence I'm uploading the full source and not some dodgy .exe so you can inspect it. I was a little surprised as it only uses some process memory writes and doesn't even inject anything. I'm really not interested in stealing your precious facecock passwords and stuff, so if you don't trust it, don't download it. -(modified Swoosh quote... Thanks :P)

Oh... In another thread I kind of mentioned that it could open the console window. Well that was an inadvertant lie because I had accessed this during the building of this thing, but it's a slightly different approach to do that. As I'm generally a nice chap, I'll explain how to do that anyway lol.

If you want to play with the console stuff, you'll need
A utility to "send to command prompt" is quite useful too - I use for this (Crappy Avira even alerted this as an infection - It's safe)
So, download sPCK to a folder somewhere, then copy interfaces.pck from your perfect world element folder into the sPCK folder.

***IMPORTANT*** Make a backup of interfaces.pck in case you screw something up.

Right click sPCK.exe -> Send to command prompt.
Now, to extract the .pck file...
Code:
sPCK.exe -x interfaces.pck
This will generate a folder called interfaces.pck.files
Open interface.pck.files\interfaces\ingame-v1.dcf and find the line:
Code:
Version01\console.xml        0        0        0
and change it to
Code:
Version01\console.xml        0        0        1
Save the file and close it, then delete your interfaces.pck file (the one in your sPCK folder!!!) and run sPCK again
Code:
sPCK.exe -c interfaces.pck.files
This will repack the files into a .pck
Once that's completed, copy the interfaces.pck file back to your element folder and launch the client. Woohoo! You now have a console that you can play around with.

It will stay open and you can't unfocus it, so if you want to remove it, you need to reinstate your original interfaces.pck file. If I can be arsed, I might find the GUI offset to close it lol.... But I can't be arsed today.

The commands for the console are available in the configs.pck file (extract with sPCK again, look for console_cmd.txt) but for your pleasure, here is the list of commands: (don't include the quotes)
Code:
"d_cameramode"
"d_boundbox"
"d_rtdebug"
"d_npcid"
"d_runspeed"
"d_goto"
"d_fly"
"d_c2scmd"
"d_viewradius"
"d_relogin"
"d_skill"
"d_render_water"
"d_render_grass"
"d_render_forest"
"d_render_shadow"
"d_render_outline"
"d_turnaround"
"d_testdist"
"d_gfx"
"d_showpos"
"d_trnlayer"
"d_a3dstat"
"d_gamestat"
"d_treelod"
"d_fps"
"d_playerradius"
"d_showid"
"d_skipframe"
"d_modelupdate"
"d_minidump"
"d_settimeofday"
"d_getservertime"
"d_task"
"d_mipmapbias"
"d_trncull"
"d_gscmd"
"d_delcmd"
"d_title"
"d_namepos"
"d_createtime"
"d_lastlogintime"
"d_money"
"d_go"
"d_query"
"d_querynpc"
"d_theme"
"d_queryservice"
"d_uidebug"

// ========== GM commands ==========

"gm_kickout_role"
"gm_kickout_user"
"gm_list_user"
"gm_online_num"
"gm_restart_sev"
"gm_shutup_role"
"gm_shutup_user"
"gm_moveto_player"
"gm_callin_player"
"gm_broadcast"
"gm_showid"
"gm_forbid_role"
"gm_trigger_chat"
"gm_generate"
Obviously the GM ones wont work so don't bother trying them.
It's not particularly useful as such, but it's quite fun to play around with (d_boundbox looks quite cool ^^)
Well... I say it's not useful, but some of the commands there will display NPC / Player IDs above their heads - So that's very useful if you're looking for offsets etc.

Anyway - I hope someone finds it useful

Cheers.
Attached Files
File Type: zip guiMapper.zip (54.7 KB, 344 views)
dumbfck is offline  
Thanks
9 Users
Old 09/16/2011, 09:01   #2
 
Interest07's Avatar
 
elite*gold: 0
Join Date: Mar 2010
Posts: 862
Received Thanks: 576
Awesome, you 'finished' this project then

I'm quite curious about the adding your own windows to the gui thing. I'm not gonna continue with the d3d8 stuff for now if that proves possible, because it would be a much cleaner solution
Interest07 is offline  
Old 09/16/2011, 09:48   #3
 
elite*gold: 10
Join Date: Sep 2010
Posts: 400
Received Thanks: 234
Quote:
Originally Posted by Interest07 View Post
Awesome, you 'finished' this project then

I'm quite curious about the adding your own windows to the gui thing. I'm not gonna continue with the d3d8 stuff for now if that proves possible, because it would be a much cleaner solution
Well... Don't give up on yours just yet lol - So far, I can add my own window into the client just by copy / pasta / editing one of the existing xml files in interfaces\version1. Once it's added, I have to search for it in memory in order to show it. As for actually displaying useful information in it and making buttons work, etc - Well I really have no idea yet how well that's gonna work out because it will require injecting some probably quite substantial code into the client, including code to add it to the guiBase1 windows table.
I wouldn't particularly fancy writing all of the handler code in asm, so I'm gonna need to find a way to somehow compile some other language into usable code that can be injected... I'm very open to suggestions here xD.
Considering this might not be a particularly easy task, I'm not sure how practical this will be in an environment where you typically have to tweak code -> compile it -> inject it -> test it -> rinse and repeat.
Your D3D8 hooking might still be a much more suitable solution ^^
dumbfck is offline  
Old 09/16/2011, 11:34   #4
 
Interest07's Avatar
 
elite*gold: 0
Join Date: Mar 2010
Posts: 862
Received Thanks: 576
Quote:
Originally Posted by dumbfck View Post
Well... Don't give up on yours just yet lol - So far, I can add my own window into the client just by copy / pasta / editing one of the existing xml files in interfaces\version1. Once it's added, I have to search for it in memory in order to show it. As for actually displaying useful information in it and making buttons work, etc - Well I really have no idea yet how well that's gonna work out because it will require injecting some probably quite substantial code into the client, including code to add it to the guiBase1 windows table.
I wouldn't particularly fancy writing all of the handler code in asm, so I'm gonna need to find a way to somehow compile some other language into usable code that can be injected... I'm very open to suggestions here xD.
Considering this might not be a particularly easy task, I'm not sure how practical this will be in an environment where you typically have to tweak code -> compile it -> inject it -> test it -> rinse and repeat.
Your D3D8 hooking might still be a much more suitable solution ^^
Instead of compiling some code to obtain the asm to inject, why not just inject a dll with the code you need? Should at least save you the horror of asm
Interest07 is offline  
Old 09/16/2011, 11:53   #5
 
elite*gold: 10
Join Date: Sep 2010
Posts: 400
Received Thanks: 234
Good thinking... No idea how to do that, but hey - Something new to learn xD
dumbfck is offline  
Old 09/17/2011, 14:17   #6
 
elite*gold: 0
Join Date: Aug 2011
Posts: 57
Received Thanks: 13
Looks cool. Trying to figure out how it works. Thank you.
I have an autoIt dll injector somewhere. I could try to find it if you wish.
xoraxax is offline  
Old 09/17/2011, 14:33   #7
 
elite*gold: 0
Join Date: May 2010
Posts: 220
Received Thanks: 203
Nice, but ower my understandings
At this time, im willed to learn.

i program in the moment a tool to seek for items in catshops, thx to Interest07 Info and posting over it.
not really finish yet, but i had a lucky day testing it.
found in a catshop a primeval stone for 100k, sold him minutes later for 33m *lol*

maybe one day i can use ur info to make some "plugins" for the game, like autopot or autoasisst
amineurin is offline  
Old 09/17/2011, 18:39   #8
 
elite*gold: 10
Join Date: Sep 2010
Posts: 400
Received Thanks: 234
Quote:
Originally Posted by xoraxax View Post
Looks cool. Trying to figure out how it works. Thank you.
I have an autoIt dll injector somewhere. I could try to find it if you wish.
Thanks, but I try to avoid using AutoIt wherever possible hehe.
I might ask Interest07 how he did it for his AutoPot thing, as that didn't even seem to trigger my AV - which is a particularly fussy AV lol. I'm assuming he codecaved it maybe?

Quote:
Originally Posted by amineurin View Post
not really finish yet, but i had a lucky day testing it.
found in a catshop a primeval stone for 100k, sold him minutes later for 33m *lol*
Niiiiice! Wish I was lucky like that xD
dumbfck is offline  
Old 09/17/2011, 21:16   #9
 
Interest07's Avatar
 
elite*gold: 0
Join Date: Mar 2010
Posts: 862
Received Thanks: 576
The code for the dll injector, taken from . This is all you need to compile it (C++ code). After compiling you would need to put the injector together with a PWdll.dll in your ../element folder. The dll will need to contain a function called "Initialize", as the injector will call this function from the dll after loading it inside the elementclient.exe (via a codecave indeed).

Interest07 is offline  
Thanks
1 User
Old 09/18/2011, 13:18   #10
 
elite*gold: 0
Join Date: Aug 2011
Posts: 57
Received Thanks: 13


Working AutoIt injector. The thing i like with dll injection is that you do not have to use readProcessMemory or so on to get some data and you don't have to do any weird stuff to call some function
xoraxax is offline  
Thanks
1 User
Old 09/18/2011, 16:12   #11
 
elite*gold: 10
Join Date: Sep 2010
Posts: 400
Received Thanks: 234
Cool, thanks guys
dumbfck is offline  
Old 09/18/2011, 21:38   #12
 
Interest07's Avatar
 
elite*gold: 0
Join Date: Mar 2010
Posts: 862
Received Thanks: 576
here's the source for the dll
Attached Files
File Type: rar dllSource.rar (28.1 KB, 39 views)
Interest07 is offline  
Thanks
1 User
Old 09/20/2011, 23:54   #13
 
elite*gold: 0
Join Date: May 2010
Posts: 220
Received Thanks: 203
*erm* i really dont want do disturb you booth, since you are so silent im shure you work hard on the gui stuff
but would you be so nice to give me the number to send with the packet for refreshing the gold price ?

i dont get it with the mhs script to break the game from Interest07
try to set a break at the auction hall base adress, press the refresh button, but no popup goes up.
like in the description from Interest07.

ur foolish padawan
amineurin is offline  
Old 09/26/2011, 14:47   #14
 
elite*gold: 10
Join Date: Sep 2010
Posts: 400
Received Thanks: 234
Sorry, I forgot to answer this post last time I saw it >.>
I never actually got the packet for refreshing gold listings - I assume Interest did though as (I believe) he did some stuff with graphing the gold trends etc.

On another note, I found a better base offset for searching the window offsets in the GUI mapper. It can now find all the dialogue boxes, consoles, etc too.
Just replace Form1.cs from the package in the first post with this:

Enjoy
I'll hopefully be releasing the custom in-game GUI development kit soon
It's going rather nicely hehe.
dumbfck is offline  
Old 04/21/2012, 23:49   #15
 
elite*gold: 0
Join Date: May 2010
Posts: 220
Received Thanks: 203
erm is it possible to use own functions in this kind of menu ?
if yes, how would this work ?
build a dll and load it with the game or any other idea ?

its just a idea i have and im trying to get more info, before i start trying to realising.

im thinking of another hotkey bar in the game, like the two ones allready there.

the idea i have is:
make such a bar in game style
read icons from a ini file and use maybe png images
also read functions from ini file

like:
1 slot = health icon
1 function: send chat message to user xyz "heal me"
2 slot = another heal icon
2 function: send chat message to user xyz "heal selected $playername"
3 slot = buff icon
3 function: send chat message to user xyz "buff me"
and so on...

so u can command maybe a heal bot with chat commands and by using a ingame menu.

its just a idea and maybe here are ppl willed to discuss this
amineurin is offline  
Reply


Similar Threads Similar Threads
[B]30 e*q [S]Wc 3 Mapper
08/18/2011 - elite*gold Trading - 0 Replies
Hey Elitepvper' Ich hätte ne Idee für ne Warcraft 3 Melee Map, aber kann sie nicht umsetzen, weil ich zu blöd für den World Editor bin. Es soll eine Lan Map werden, 2 oder 4 Spieler. Jeder Startpunkt ist eingegrenzt durch Kluften oder sonstigem, Hauptsache man kommt von der Seite nicht rein. Der einzige Weg führt durch die Mitte, bis zu diesem Weg sind immer stärker werdende Mobs, sodass man seinen Hero gut leveln kann und sich gleichzeitig auf den Weg zum Gegner macht. In der Mitte ist...
[Suche] Mapper TuT
09/09/2010 - Flyff - 1 Replies
hi leute wollte mal fragen ob jemand zufällig ein ausfürliches tutorial zum mappen lernen kennt oder eins machen kann wollte nähmlich gerne das mappen lernen Mfg Malacha
Mapper.
03/27/2010 - Silkroad Online - 3 Replies
I was looking for a program so i can view the ISRO overworld map. I found a program called mapper_2_0_1. However i cannot find where i downloaded if from. I'm pretty sure It was from somewhere in these forums. I'm looking for a new version if in the case that it has been updated with the Alexandria portion of the map. Does anyone know of it? Or where it is? thx!
WoW-Mapper
12/28/2005 - World of Warcraft - 7 Replies
hiho leute ich hab da ne seite gefunden um der es sich um nen WOW-Mapper dreht... kan mir eienr sagen ob man hir die maps der PServer verändern kann ? hir ist die seite (hab sie über google gefunden als ich unter bilder WoW eingegeben habe) :D Klickt hir um auf die Seite zu kommen



All times are GMT +1. The time now is 18:21.


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