Page 1 of 3

Perfect World bot & multi-client

Posted: Wed Mar 05, 2008 6:09 pm
by Administrator
You must have MicroMacro 0.96C or above to run this bot

This is for the Malaysian / European client only.
This bot includes:
  • Auto-potion and auto-sit
    Auto-pick
    Minimized botting
    Multi-client fix
    Full, newest experimental build of MicroMacro -- needed for this bot.
Steps:
  • Extract MicroMacro
    Configure pw.profile1.lua and/or pw.profile2.lua
    Log into PW and open micromacro.exe
    Run the script pw.lua
    Select your profile (and window, if multi-client)
    Create a monster list
    Start the bot
Download extract the attachment (pw.bot.zip) into your micromacro/scripts folder, then go to micromacro/scripts/ and open pw.profile1.lua in notepad. This is your settings file for profile 1 (there's 2 profiles -- this is for keeping different settings for 2 clients). Change all the hotkeys, the potion use amounts (if you want), and buff timers. The "buffs" are anything you want to have cast/use every x seconds (or minutes). Profile 1, for example, is setup to use pet food and pet heal. If you don't know what something in the profiles do, then read the comments.

Now open and log into PW. Then open micromacro/micromacro.exe. Type "pw.lua" (without quotes) into the prompt and press enter. It should now ask you for a profile, just press 1 on your keyboard to select profile 1 (not the numpad--those don't work). Now go back to PW and select a monster, then press INSERT. You should see on the MicroMacro window that it has added it to the list. Keep doing this for each monster. You should add the aggressive monsters first (as it'll give them higher priority in your attack list). Once you are done, press the HOME key and everything should be fully automated from here on in. You can press the END button to pause.

You'll notice your client's window name change to something like "Element Client [12345678]". This adds a unique ID to the window's title, which allows you to A) open a second client, and B) tell which window is which if you want to open a second client.


Multi-Client botting
You can now open a second PW client, and a second MicroMacro. First make sure that profile 2 is configured the way you want (you COULD use profile 1 if it has the same desired settings). Now that you have more than 1 client open, MicroMacro detects that and asks you to choose which window to attach to. Choose the one that doesn't have the unique ID in the window title already.
1 : Element Client
2 : Element Client [ID: 12345678]

^ Example, you'd want to press 1 here. Additionally, the resume/pause keys will be PAGE UP and PAGE DOWN if you loaded profile 2. If MicroMacro terminates improperly, the window name may get stuck with the [ID: xxxxxx]. This is fine. You can still attach to that window. Just use the ID to make sure you are attaching to the window you want.

Now be careful guys. Within 1 day, my friend has been bothered by a GM twice, and I have received a visit once.

If you have problems, POST YOUR LOG.TXT in the micromacro folder or I can't help you. If it's a bunch of memory read or write errors, just the first few will be sufficient.

Re: Perfect World bot & multi-client

Posted: Thu Mar 06, 2008 7:19 am
by 3cmSailorfuku
Unfortunatly I don't have Shaiya but this release looks very nice.
* Attached input now allows sending to non-focused or minimized windows.
Does it work yet? Amazing then, now I just wish I would play a game where I could apply micromacro to ;)
Now be careful guys. Within 1 day, my friend has been bothered by a GM twice, and I have received a visit once. I'm still working on a warning method that will make a beep when a GM is trying to talk to you.
I'm not sure if it could work fast enough, but you can keep track of the names who whispered to you by looking for specify strings, like CheatEngine can do it for example. By using a RegEx you could invoke a beep by the things you filtered.

A socket solution would be fine, but thats alot of work to optimize it for micromacro. Maybe it's because I hate coding things with sockets, too hard for me. :x

Re: Perfect World bot & multi-client

Posted: Thu Mar 06, 2008 1:02 pm
by m3m0
After I select those monsters and press Home key I get this:
WARNING: Failure reading memory from 0x9ED8C8 at 0x3c0883bd in memoryReadUIntPtr(). Error code 299
Finding target... FAIL!

Re: Perfect World bot & multi-client

Posted: Thu Mar 06, 2008 4:44 pm
by Administrator
They just patched, so there's a new client out. That means the addresses will have changed.

Re: Perfect World bot & multi-client

Posted: Fri Mar 14, 2008 2:43 pm
by badburn2003
i am playing in PW philippines can you pls teach me how to change or how to locate the pointer values for our server? i am very noob at this so can you pls help me figure this out... thanks.. more power to you...

Re: Perfect World bot & multi-client

Posted: Wed Mar 19, 2008 8:43 am
by tbs10
hi, i am currently using the script however it seems that i only can use a skill, even when i make a combo and put it on the f2 key but still the same it only use a single skill to attack mobs. Any idea how to solve this problem

Re: Perfect World bot & multi-client

Posted: Wed Mar 19, 2008 8:56 am
by Administrator
That's a problem with PW itself. Although you should be able to use a combo (lead with a skill, then use normal attack). You would just have to edit the script to prevent it from spamming the F2 key (hence, recasting the skill).

Change

Code: Select all

function fight()
  while( have_target() ) do
    keyboardPress(attack_key);

    if( (HP / MaxHP * 100) < HP_potion_use ) then use_hp_potion() end
    if( (MP / MaxMP * 100) < MP_potion_use ) then use_mp_potion() end

    yrest(1000);
  end

  pickup_items();
end
To

Code: Select all

function fight()
  keyboardPress(attack_key);
  while( have_target() ) do

    if( (HP / MaxHP * 100) < HP_potion_use ) then use_hp_potion() end
    if( (MP / MaxMP * 100) < MP_potion_use ) then use_mp_potion() end

    yrest(1000);
  end

  pickup_items();
end
You're just moving the call to keyboardPress() outside of the loop.

Re: Perfect World bot & multi-client

Posted: Wed Mar 19, 2008 8:01 pm
by tbs10
thanks bro for the advice, had try but it can't seems to work, after i change it, it only give out my first skills and stay there without any attack anymore.

Re: Perfect World bot & multi-client

Posted: Tue Mar 25, 2008 1:44 am
by badburn2003
can someone give us the valurs for perfect world ph sa that it will work. i think this is a great bot and i think it will world on pw-ph we just need the values to make it work

Re: Perfect World bot & multi-client

Posted: Fri Apr 18, 2008 8:14 pm
by Zephyr
elverion

I am trying to change the staticbase_ptr = in the pw.lua file so that i can try this on a private server. Using Art-Money I found 0325BCA8 as the pointer. Is this all I need or is there more information that I need to look for? I just want to make sure, was reading the MPC forums and noticed a post or two talking about other values.


Thanks

Zeph

Re: Perfect World bot & multi-client

Posted: Sat Apr 19, 2008 6:28 pm
by Administrator
Was that found to be the pointer, or the address? Since you're using ArtMoney, I'm going to assume this is only an address.

I'd actually recommend using Cheat Engine for this. First start by finding the address for your HP. Then right click the address in the address list, and select "Find what accesses this address." The debugger will be attached, and shortly after, you will see some information pop up in the opcode accessed list window. If you cycle through a couple of these, you will see one (or more) of them labled as "Copy Memory" on the right hand side, below the buttons. Select that opcode, and click More Information.

You'll see a red line that looks something like this:

Code: Select all

>>004217F5 - mov [eax+32],450 
I'm going off memory here, so it should just be something similar to that.
So far, we know that the offset will be 0x450. It *should* still be 450 for you, but that might not always be the case. Sometimes, offsets change.

Now you'll see something that says: The value of the pointer needed to find this address is probably 00A2D08C. Remember this. Go back to the main Cheat Engine window, and start a new scan. Search for 00A2D08C (or whatever the probable address was) as a 4 byte hex value. Do whatever you must to locate the correct address. By doing this, you will have correctly found your pointer. That is, the found address + previous offset (450).

Well, that's step 1. If your offset was different, update it in the script. Step 2 will actually be pretty easy. In fact, it's almost exactly the same as step 1. The only difference is that you are finding a pointer to the pointer you just found, rather than a pointer to the HP address. Start by right clicking it, and using "Find what accesses this address", then you will follow the exact same steps, and plug these in as your staticbase_ptr and staticbase_offset.

Yes, it's a lot of work, but it needs to be done this way because of how PW was programmed. You must use a double pointer to access the true location of each value.

Re: Perfect World bot & multi-client

Posted: Sat Apr 19, 2008 7:33 pm
by Zephyr
Thanks Elverion

That was actually fairly simple. Only took about 5 mins to do.

The staticbase_ptr ended up being 0x0325BC88. It was the second step I was missing. As for the offsets, they are the same.


Thanks Again

Zeph

*Edit: Spoke a little soon. Seems targetid is different. So now just working on that part.

Re: Perfect World bot & multi-client

Posted: Sun Apr 20, 2008 7:57 pm
by Zephyr
Elverion

Any suggestions on finding the offset for the target ID? I tried both Artmoney and CheatEngine. What I found was 0xA08(w/ CE) & 2565(w/ AM). The script will not target, but does show an address being added to the monster list. If manual targeting is used the script will attack only.

I am going to start from scratch and see if I end up with the same static pointer. Any further tips would be great.

Thanks

Zeph

Re: Perfect World bot & multi-client

Posted: Mon Apr 21, 2008 5:17 am
by Administrator
What class are you? If not using a magic class, make a skill combo that will first cast some spell, and then use regular attack. If you only use the regular attack, it doesn't want to work. I'm not sure why.

As for the targeting issue, I'm not entirely sure. First try targeting a monster, and copy it's ID from the value of the target address in ArtMoney. Now, select a different monster, then paste the value back into ArtMoney. Does it revert the target back to the first targeted monster?

Re: Perfect World bot & multi-client

Posted: Mon Apr 21, 2008 11:03 pm
by Zephyr
Well played with it some more tonight. seems my pointers are right. offsets seem to be the same again too. I have tried magic and a ranged class with combo skills
here is what I have so far.

staticbase_ptr = 0x0325BC88;
staticbase_offset = 0x20;
charptr_addr = 0; -- no idea if this is suppose to change
targetid_offset = 2566; -- 2565 - 2568 seem to be the offset for target. but 2565 goes to a value of 3 while the others goto 0 when nothing is targeted.
HP_offset = 1104;
MaxHP_offset = 1144;
MP_offset = 1108;
MaxMP_offset = 1148;

I have a feeling it might be something simple, but this is my first time really using tools like CE or ArtMoney.
Also, though it may not mean anything, I was playing around with freezing the values on the target address. If i did it while targeted on a mob and clicked another mob it would switch back to the one I froze the value for. But if I select myself or clear the target it does nothing.

Re: Perfect World bot & multi-client

Posted: Tue Apr 22, 2008 4:56 am
by Administrator
Could you try using all of the different target offsets? Perhaps it will then behave correctly. It may be that they have patched the previous method, and a new one needs to be hacked into place.

Re: Perfect World bot & multi-client

Posted: Tue Apr 22, 2008 6:33 pm
by kev2000
what are the new addresses?

Re: Perfect World bot & multi-client

Posted: Wed Apr 23, 2008 1:51 am
by Zephyr
I checked myself one more time. I even tried on the actual server and not the private one doing all the same steps. And I was able to get it to work. So might be something with the modded exe they used.


kev2000,

for the actual server hosted by cubizone the address should look like so.

staticbase_ptr = 0x00903804;

Re: Perfect World bot & multi-client

Posted: Wed Apr 23, 2008 3:06 am
by kev2000
awesome! ty very much! i couldnt get my bot to target the monsters so hopefully this will work!

Ok, i went back and looked and thats what i had. When i got to press insert when targeting a monster it will not add it to the directory. these are my addresses.

staticbase_ptr = 0x00903804;
staticbase_offset = 0x20;
charptr_addr = 0;
targetid_offset = 0x450;

HP_offset = 1104;
MaxHP_offset = 1144;
MP_offset = 1108;
MaxMP_offset = 1148;

the bot will attack the moster if it is highlighted but wont find the next one.

Re: Perfect World bot & multi-client

Posted: Wed Apr 23, 2008 7:19 am
by Administrator
So is your problem that pressing INSERT doesn't add the monster to your monster list, or that it won't cycle targets from your monster list?