Perfect World Bot PWI-Prophet Bot Recoded

08/21/2010 16:26 Interest07#241
OH right, I see why. I just downloaded the bot and looked at it...

line 65 it uses
$PROCESS_ID = WinGetProcess($APP_TITLE),
$PROCESS_INFORMATION = _MemoryOpen($PROCESS_ID)

which are based on the title of your client you pass in the .ini file.
However, these values are never used in the rest of the program.

instead at line 77 it does the following:
Global $PID = ProcessExists("elementclient.exe")
Global $MID = memopen($pid)

and it uses these values in the rest of the program. This means it will always pick the first elementclient.exe created. I'd suggest making $PID and $MID take on the values generated by the functions at line 65. Then having multiple copies of the bot with different titles in the .ini should work. (This is assuming those functions at line 65 function as intended of course, I don't know autoIt, so not sure about that.)

Global $PID = $PROCESS_ID
Global $MID = $PROCESS_INFORMATION

Sorry for not looking at the bot before suggesting things :o
08/21/2010 16:29 asaky#242
Quote:
Originally Posted by Interest07 View Post
OH right, I see why. I just downloaded the bot and looked at it...

line 65 it uses
$PROCESS_ID = WinGetProcess($APP_TITLE),
$PROCESS_INFORMATION = _MemoryOpen($PROCESS_ID)

which are based on the title of your client you pass in the .ini file.
However, these values are never used in the rest of the program.

instead at line 77 it does the following:
Global $PID = ProcessExists("elementclient.exe")
Global $MID = memopen($pid)

and it uses these values in the rest of the program. This means it will always pick the first elementclient.exe created. I'd suggest making $PID and $MID take on the values generated by the functions at line 65. Then having multiple copies of the bot with different titles in the .ini should work.

Sorry for not looking at the bot before suggesting things :o
You should edit it and try it yourself. Then pm the prophets if it works.
08/21/2010 16:58 Interest07#243
I don't have any of the required au3 files that are included at the beginning, so I can't try it. Just giving some advice on why the multiple copies don't work. I don't use bots myself so I'm not inclined to dig around for those au3 files either.

Oh well
08/21/2010 17:00 asaky#244
Quote:
Originally Posted by Interest07 View Post
I don't have any of the required au3 files that are included at the beginning, so I can't try it. Just giving some advice on why the multiple copies don't work. I don't use bots myself so I'm not inclined to dig around for those au3 files either.

Oh well
ok, thank you for the contribution.
08/21/2010 18:00 Interest07#245
okay, I couldn't resist and went for it anyway, it works:
change
Global $PID = ProcessExists("elementclient.exe")
into this: (i commented out the original so you can easily change it back when needed)
Global $PID = $PROCESS_ID ;ProcessExists("elementclient.exe")

then simply copy the bot folder as many times as you want bots running and change the titles of the respective bots clients in their ini files.

boy was it ever a pain to find that nomadmemory thing :p
08/21/2010 18:02 asaky#246
Quote:
Originally Posted by Interest07 View Post
okay, I couldn't resist and went for it anyway, it works:
change
Global $PID = ProcessExists("elementclient.exe")
into this: (i commented out the original so you can easily change it back when needed)
Global $PID = $PROCESS_ID ;ProcessExists("elementclient.exe")

then simply copy the bot folder as many times as you want bots running and change the titles of the respective bots in their ini files.
What line do I change? I will try this and report if it works or not :)
08/21/2010 18:05 Interest07#247
line 78: Global $PID = ProcessExists("elementclient.exe")

change to

Global $PID = $PROCESS_ID
08/21/2010 18:07 asaky#248
Quote:
Originally Posted by Interest07 View Post
line 78: Global $PID = ProcessExists("elementclient.exe")

change to

Global $PID = $PROCESS_ID
Alright man, will give it a try. What program do you use to edit the script I just use notepad :D
08/21/2010 18:14 Interest07#249
hehehe I use textpad lol.

Oh yeah, when giving the bots titles, make sure they are 'unique' (and also don't have anything else opened with the same title of course). The bot uses WinGetProcess($APP_TITLE) and the default title match will detect any title that contains whatever is in $APP_TITLE.

So if you have one bot titled "bot" and another titled "bot2", when it is searching for the title "bot" it might detect either of the two clients, as both titles contain "bot". Therefore it is best to name one "bot1", and the other "bot2" to prevent any such issues.
08/21/2010 18:16 asaky#250
Quote:
Originally Posted by Interest07 View Post
hehehe I use textpad lol.

Oh yeah, when giving the bots titles, make sure they are 'unique' (and also don't have anything else opened with the same title of course). The bot uses WinGetProcess($APP_TITLE) and the default title match will detect any title that contains whatever is in $APP_TITLE.

So if you have one bot titled "bot" and another titled "bot2", when it is searching for the title "bot" it might detect either of the two clients, as both titles contain "bot". Therefore it is best to name one "bot1", and the other "bot2" to prevent any such issues.
Mines, element client1 and element client2 lol using smurfins "RenameIT" App
08/21/2010 18:24 Interest07#251
hehe that should work :)

I use my own that automatically takes the characters names as title (or blank if no character is logged in). but as long as the names are totally unique you shouldn't have a problem. Otherwise put
Opt("WinTitleMatchMode", 3)
in the top of your code, it will force the titles to match exactly.
08/21/2010 18:30 asaky#252
Quote:
Originally Posted by Interest07 View Post
hehe that should work :)

I use my own that automatically takes the characters names as title (or blank if no character is logged in). but as long as the names are totally unique you shouldn't have a problem. Otherwise put
Opt("WinTitleMatchMode", 3)
in the top of your code, it will force the titles to match exactly.
I am gonna go on a limb here and say, yes it does work. But (yes there is a but) It is what I would call a duct tape fix. It needs some work and is not nearly user friendly I can now see a hole bunch of leachers crying because they cannot get it to work. Like when you select a mob on the target list, it looks like it adds the targets on both lists XD but when you run it you realize the names on the list are just for show and it doesn't actually attack them.

It is fraught with problems lol. But for the people who know what there doing it works. ;) I will not say that it is conclusive But it works with some tinkering.
08/21/2010 18:35 Interest07#253
Ahhh that's true, I didn't fully test it either. Just checked to see if the basics worked. Although for me it didn't seem to combine the mob lists, I'm gonna have to check again, had to figure out how the bot itself worked first lol :p

It's at least a temporary fix until someone makes it fully multiclient compatible :D
08/21/2010 18:38 asaky#254
Quote:
Originally Posted by Interest07 View Post
hehe that should work :)

I use my own that automatically takes the characters names as title (or blank if no character is logged in). but as long as the names are totally unique you shouldn't have a problem. Otherwise put
Opt("WinTitleMatchMode", 3)
in the top of your code, it will force the titles to match exactly.
Is that program uploaded to the forums?
08/21/2010 18:48 Interest07#255
No, it's not. I've never uploaded anything yet.

I'm not sure what problems you seem to be having with moblists though. I suppose you had both moblists open at the same time? I guess that could cause issues, as the bots won't know for which one you have pressed F11. But if you keep only the moblist open for the one you're adding to it should work fine. (similar with F9 for starting / stopping, it will think you pressed F9 for both bots, so they will both toggle start/stop at the same time. It would require some checking for window titles in those hotkey functions to get it working flawlessly. Same goes for resurrect and any other hotkeys there might be.

But yeah definitely not for the total leecher, it does require some attention/thinking :p