Register for your free account! | Forgot your password?

You last visited: Today at 19:40

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

Advertisement



WQ bot for PWI

Discussion on WQ bot for PWI within the PW Hacks, Bots, Cheats, Exploits forum part of the Perfect World category.

Reply
 
Old 03/22/2013, 08:16   #391
 
elite*gold: 0
Join Date: Oct 2010
Posts: 555
Received Thanks: 163
Already done. Please ignore. I just keep it for others that are interested

Quote:
Originally Posted by Interest07 View Post


4)

FlyGear: 0x069144B0
TransportMode: 0x06914568

We know the offset for transportmode is 0x608, so to get the offset for FlyGear we simply to the following calculation:

offset = FlyGearAddress - TransportModeAddress + 0x608 =
0x069144B0 - 0x06914568 + 0x608 = 0x550

Thank you very much for the much useful descriptions.

I searched now some hours and have a question to your calculation. How do you calculate:

I have now
0x1E8D7F90 (Flygear) - 0x1E8D7590 (transportmethod) + 0x688 (transportmethod offset)
If I enter this into the calculator programmer mode I come to 1088 but this seems to much different from the old offset 0x598.... And I don't know how to calculate this

For all interested: Li Mengpai ID is 2148550618

Update: It is correct. I converted your too. and this way I come this way to the same amount as you. So thank you very much and it seems to be correct xD
martmor is offline  
Thanks
1 User
Old 03/22/2013, 12:38   #392
 
elite*gold: 0
Join Date: Mar 2011
Posts: 3
Received Thanks: 2
still crashing ...any new update..
Mc_D is offline  
Old 03/23/2013, 11:56   #393
 
elite*gold: 0
Join Date: Oct 2010
Posts: 555
Received Thanks: 163
Quote:
still crashing ...any new update..
The CE Offsets are no problem as Interest07 wrote it here.

The problem is the IDA. I don't know why, but I do not find the thinks with IDA that Interest07 wrote. Maybe you can find them?
martmor is offline  
Old 03/23/2013, 14:31   #394
 
AlainProvist's Avatar
 
elite*gold: 0
Join Date: Aug 2012
Posts: 381
Received Thanks: 562
I gave a fast look into the code to get the part that makes pw crash but I'm completly lost with what happens. From what I get into the logs, pw crashes after we read the position of the player with getMoveMethod(). The coords given by the function seem correct but for some unknown reason pw crashes just after before the app reaches the next iteration of the main loop (for example trying to fly to the npc)...

I hate this language and more likely I hate the fact that I can't debug properly with breakpoints. So I won't loose a single minute on this again (last time made me really sick believe me TT). Good luck to the one that will try to fix the code. It could have been different if it was written in C or C++ but this **** language is totally brain drain when someone else than the original coder tries to understand the behavior of the code. Sorry guys ...
AlainProvist is offline  
Thanks
2 Users
Old 03/23/2013, 14:39   #395
 
Sᴡoosh's Avatar
 
elite*gold: 20
Join Date: May 2009
Posts: 1,290
Received Thanks: 326
Another autoit hater? Finally Autoit seems to be something like a religion on these forums. I think Interest even told people to go C# over autoit a while back... or was that dumbfck?

Anyhow, a memoryread isn't going to crash anything - injections cause crashes. Everything that uses createremotethread in this case. I'd guess isQuestAvaliable injection.
Sᴡoosh is offline  
Old 03/23/2013, 14:51   #396
 
AlainProvist's Avatar
 
elite*gold: 0
Join Date: Aug 2012
Posts: 381
Received Thanks: 562
OMG did'nt watched this part of the code x_x was supposing checkQuestPresent() call was just reading memory, not injecting anything... I was supposing the function was searching for a wq quest into the available quests list. Any offset wrong in the injection methode or the whole methode to get the quest has changed ?

from my ini:
questFunctionOffset=0x1130
questFunctionAddress=0x00778160

code injection:
func =
func = %func%60 ;PUSHAD
func = %func%B8%revQuestFunctionAddress% ;MOV EAX, questFunction
func = %func%8B0D%revBaseAddress% ;MOV ECX, DWORD PTR [baseAddress]
func = %func%8B491C ;MOV ECX, DWORD PTR [ECX+1C]
func = %func%8B49%revPlayerOffSet% ;MOV ECX, DWORD PTR [ECX+playerOffSet]
func = %func%8B89%revQuestFunctionOffset% ;MOV ECX, DWORD PTR [ECX+questFuncOffset]
func = %func%68%revQuestId% ;PUSH questId
func = %func%FFD0 ;CALL NEAR EAX
func = %func%A3%revReturnAddress% ;MOV DWORD PTR [returnAddress], EAX
func = %func%61 ;POPAD
func = %func%C3 ;RET
AlainProvist is offline  
Thanks
1 User
Old 03/23/2013, 15:36   #397
 
Sᴡoosh's Avatar
 
elite*gold: 20
Join Date: May 2009
Posts: 1,290
Received Thanks: 326
No clue, I don't use this injection. I'd guess address changed though.
Sᴡoosh is offline  
Old 03/23/2013, 16:48   #398
 
Interest07's Avatar
 
elite*gold: 0
Join Date: Mar 2010
Posts: 862
Received Thanks: 576
Quote:
Originally Posted by Sᴡoosh View Post
Another autoit hater? Finally Autoit seems to be something like a religion on these forums. I think Interest even told people to go C# over autoit a while back... or was that dumbfck?

Anyhow, a memoryread isn't going to crash anything - injections cause crashes. Everything that uses createremotethread in this case. I'd guess isQuestAvaliable injection.
I'm very much in favour of C# over this horrible language

C++ is also a lot better although I tend to get ****** off with cyclic header inclusions.
Interest07 is offline  
Thanks
1 User
Old 03/23/2013, 16:56   #399
 
AlainProvist's Avatar
 
elite*gold: 0
Join Date: Aug 2012
Posts: 381
Received Thanks: 562
I hate all languages that have non defined types and more likely non declared variables. Ahk has both + non case sensitive variable names. So when taking a code from someone else you have to guess what variable is already declared at a given step of the programm and what is still non declared and assigned. Simply for this you get a brain implosion after 30min of code reading...

About the original topic, I should have a fix for the soft in about 30min... I've replaced the code injection to get the quest id by my code that simply read the quest items and convert them to quest ids and then to npc ids (I was already using it in the previous version but only for the new npcs (31 to 36).


edit :
Damned inventory offsets seem to have changed :

local baseAddress := ReadMemory(realBaseAddress, theId)
local structurePointer := ReadMemory(baseAddress + baseOffset, theId) ;+0x1C
local playerPointer := ReadMemory(structurePointer + playerOffset, theId) ;+0x34
local inventoryPointer := ReadMemory(playerPointer + 0xD8C, theId) ;+0xD8C
local inventoryBase := ReadMemory(inventoryPointer + 0xC, theId) ;+0xC
local itemSlot := ReadMemory(inventoryBase + (slotIndex*4), theId)

playerPointer seems to be ok since player's position read through this pointer is correct. But hard coded offsets used here seem to be wrong. I'll expose them in the ini file later but I need the new offsets for now. Can anyone find them for me (I'm a noob in using CE ) ?
AlainProvist is offline  
Thanks
1 User
Old 03/23/2013, 19:28   #400
 
Interest07's Avatar
 
elite*gold: 0
Join Date: Mar 2010
Posts: 862
Received Thanks: 576
I'm very sorry what I'm putting you guys through. Would you prefer an excel sheet with a WQ bot in VBA code? I do still have that version around as well
Interest07 is offline  
Old 03/23/2013, 20:05   #401
 
AlainProvist's Avatar
 
elite*gold: 0
Join Date: Aug 2012
Posts: 381
Received Thanks: 562
lol sry if I hurt you with my last comments about the code cause it was not my intention . You did a great job by writing this bot and I wouldn't be capable to do the same prom scratch sincerely. What I told was about the language ahk and all those look alike.

About the fix, I'm still stuck at the inventory offset and probably the others under. I tried to find the offsets from the end by taking the quest object id of my own character at slot X and searching with CE this id in the memory. Found a lot of adresses that I offseted of -8 to try to get the address of the item slot. But I didn't found any valid slot...

edit : Nevermind finaly found the inventory base address
AlainProvist is offline  
Thanks
1 User
Old 03/23/2013, 20:43   #402
 
Sᴡoosh's Avatar
 
elite*gold: 20
Join Date: May 2009
Posts: 1,290
Received Thanks: 326
Interest, do post that excel bot, just for ***** and giggles When you told me about this back then I already found that to be a very funny idea
Sᴡoosh is offline  
Old 03/23/2013, 21:30   #403
 
AlainProvist's Avatar
 
elite*gold: 0
Join Date: Aug 2012
Posts: 381
Received Thanks: 562
Finally found the offset and fixed this bot
Enjoy !

(If someone could have told me that I would have lost another day for fixing this while I don't even play this game anymore I would have say bullshit. Seems my heart of programmer overtook my mind )

edit : removed dl link cause of a new version
AlainProvist is offline  
Thanks
1 User
Old 03/23/2013, 22:02   #404
 
AlainProvist's Avatar
 
elite*gold: 0
Join Date: Aug 2012
Posts: 381
Received Thanks: 562
Forgot to expose the 2 offsets in the ini... Here the version with exposed offsets.


edit : New fixed version 3.2.2 : fix the last volume depending the quest item and your level
Attached Files
File Type: rar FlyWQ 3.2.2.rar (219.6 KB, 793 views)
AlainProvist is offline  
Thanks
6 Users
Old 03/24/2013, 10:00   #405
 
Interest07's Avatar
 
elite*gold: 0
Join Date: Mar 2010
Posts: 862
Received Thanks: 576
Quote:
Originally Posted by AlainProvist View Post
lol sry if I hurt you with my last comments about the code cause it was not my intention . You did a great job by writing this bot and I wouldn't be capable to do the same prom scratch sincerely. What I told was about the language ahk and all those look alike.

About the fix, I'm still stuck at the inventory offset and probably the others under. I tried to find the offsets from the end by taking the quest object id of my own character at slot X and searching with CE this id in the memory. Found a lot of adresses that I offseted of -8 to try to get the address of the item slot. But I didn't found any valid slot...

edit : Nevermind finaly found the inventory base address
Nono, you're not hurting me with my comments. I completely agree that ahk is a horrible language and I think I admitted in the second post in this thread that the code was a mess. I'm actually quite amazed that people are fixing it still and admire the effort being put in.

I did find an old version of my excel bot, here's a screeny



I'm already ashamed of the other code I've been posting in this thread so I'm not gonna actually post all of this horrible mess, sadly it would be too much of an effort to make it work again as I'd actually have to download pwi patches n stuff :P

VBA is really an interesting language, as you can randomly choose to declare some variables and others you don't, it's case insensitive, but it does convert all variables of a certain name into the same case as they were declared the first time, even if they're in a completely different scope (and unrelated). Instead of returning a value from a function you actually set the function name equal to your return value. You call functions with brackets and methods without brackets to get that awesome consistency.

You do have a debugger though, which do in theory exist for ahk as well, so I'm not sure yet which is a 'better' (I should say less horrible) language to do anything non trivial in. I've attempted to write some OCR type program in ahk before, doing the heavy lifting in a c++ dll, but slowly all my code migrated into the dll because it was just easier that way. Ended up with some basic code for calling the dll and that was about it in the ahk file

I just have a soft spot for ahk because I wrote my first useful program in it (a ragnarok bot) and VBA is also special because for some reason non software companies LOVE excel tools, even things that really shouldn't be in excel.

Also my 'memory reader' in excel: (setting a variable type to pointer would automatically open up a new tab reading the memory that pointer points to)



sorry for hijacking my thread, just know a certain person loves fail ideas/code in programs
Interest07 is offline  
Thanks
4 Users
Reply




All times are GMT +1. The time now is 19:41.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

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