PWI Eclipse changes

01/28/2015 14:54 denzjh#31
:D
Okie Guys!

Here they are! AutoIt scripts for:

Global Variables

GatherItem function OpCode

CasSkill function OpCode

Auto Path function OpCode

MoveTo function OpCode

Auto Path function OpCode

MoveTo Function OpCode

Inject OpCodes

Hex Converter

And lastly the Address Retriever (BTW this code is compiled into exe using Win 7 32-bit OS)

And to others who are pm-ing me, please stop it, it tickles...

Everything you wanted to know is already here.

Breast feeding are for babies!
Spoon feeding are for those who could not use spoon.

Thanks to Remmm and his resources, because of him I learned how to trace and make the CastSkill Function

And your welcum too guys! :cool:
01/28/2015 16:37 Remmm#32
The Internet can answer many questions, the main thing to know how to ask a question:rtfm: ;)



P.S. Sorry, my native language is Russian
01/28/2015 18:31 Stark77#33
Wow thank you again so much. Works like a charm :handsdown:

I followed this guide few days ago ([Only registered and activated users can see links. Click Here To Register...]) and without understanding everything i also got the function addresses, but had no clue how to use it.

So was your way to find those opcodes to search for the call address or is there another way like breakpoints? Did u use Olly or IDA to find them?
02/02/2015 03:52 Smurfin#34
Wow awesome snippets, I hope you guys still around when Eclipse hits PWIndo.

Looking at all those, I bet everything's changed now huh with this Eclipse patch, Wanmei wasn't joking about the engine overhaul then ? The gfx still looks pretty much the same though.

Is it gonna be that way now, using opcodes not memorywrite anymore ? or it's just easier that way. If using memorywrite like the old actionstruct, we can check the values within the structure to see if the character is idle or done doing something. For example if using GatherItem($ITEM_UNIQUE_ID, $ACTION_TYPE=0) , the character will move to the item and dig it, but what can we use for 'waiting' the action to complete ?
02/02/2015 05:29 Stark77#35
there is simple way to check if u perform an action like digging or moveing or attacking. the checkAction turns to 1 if u perform any action and is 0 if not.

Code:
baseAddress := ReadMemoryUint(realBaseAddress, processID) ;~ 0xD22C74
structurePointer := ReadMemoryUint(baseAddress + baseOffset, processID) ;~ 0x1C 
playerPointer := ReadMemoryUint(structurePointer + playerOffset, processID) ;~ 0x28
actionStruct := ReadMemoryUint(playerPointer + playerActionStructOffset, processID) ;~ 0x13EC
checkAction:= ReadMemoryUint(actionstruct+0x38,processID) ;~ same as 0x24
02/02/2015 11:41 denzjh#36
As for your checkAction or ActionFlag, just want to inform you these:

When using GatherItem function and your character is far from the resource,

1. The CheckAction/ActionFlag value will be 1 when your character will move towards the resource.
2. The CheckAction/ActionFlag value will be 0 when your character will stop moving as it arrives near the resource.
3. The CheckAction/ActionFlag value will be 1 when your character will start digging the resource.
4. The CheckAction/ActionFlag value will be 0 when your character is done gathering the resource.

This also happens when using CastSkill Function and your character's target is beyond the skill's range.

I suggest to check for checkAction/ActionFlag values twice before calling the said functions again.

For Example:


In my opinion, a better solution to check if your character is digging / channeling / casting, is by tracing their Progress Bar Flags.
(A.K.A. trace the gui struct). Because we can tell if your character would be still moving towards the target after calling the GatherItem / CastSkill functions if Progress Bar Flag is Off while Action Flag is On.

I'm currently Experimenting on this Function. I am trying to make a function that will return the value of EAX or DWORD PTR SS:[ESP+10] in 0x0049FF8E. But like I said, I'm not a software developer/computer programmer so, still stuck with my experiments (A.k.a multiple client crashes :p).


For casting skills, this how i check my bot if it is casting or not.
It returns the current skill pointer or 0 if not casting any skills.

02/02/2015 14:33 Smurfin#37
Ah I see, good to know that. Cos in the old ActionStructure I usually use 2things in there which have their values changed when doing something, one of them probably what you guys call ActionFlag.

As for the value changed to 0 shortly in between actions I use a delay like 1.5 seconds to sleep it off.

It looks like this for mine :
Dunno why I check it like twice in the function but once a function works I usually don't bother trimming it, it's a simple stupid way but it works with the annoying 1 0 1 0 behaviour for gathering resource for moving and actually dig it.

I hope big changes like this won't happen often, it's annoying rewriting everything :(
02/02/2015 18:05 Stark77#38
to wait till a skill is casted i check its cooldown:
Code:
skillCooldown := ReadMemoryUint(skillPointer + 0x10,processID)/1000
to check if a npc dialog is opened:
Code:
NPCOpened := ReadMemoryUint(playerPointer + 0xD9E, processID) ; write 1 here to disable the dialog window
----------------------------------------------------------------------------

here a little snipet to check for PMs (chatBase_offset := 0xD28948).
the older chat read functions didnt work for me :( ([Only registered and activated users can see links. Click Here To Register...])
so sadly $array[$counter][0] = _MemoryRead($pointer + $i * dec("1c") + 0x4, $PROCESS_INFORMATION, "Byte") is not returning the Chat Type anymore unless i do something wrong. to traverse the chat you can now use ChatBasePointer + i*0x24 + 0x8

detect pm snipet:
02/03/2015 08:41 WhoMoi#39
I am trying to figure out how to convert sending packets from AutoIT to C#. I working off of Interest07 post [Only registered and activated users can see links. Click Here To Register...]. I know nothing about AutoIt but I do know some .net and little of C#/C++ variants.

My goal is to figure out how to get the MoveTo or AutoPath to work. I figured I'd start easy with the GatherItem. I tried it several different ways but with no success.

One thing I do know is the "B9" on the second line. If you refer to the link, under the area where it says "//opcode for sending a packet private byte[] sendPacketOpcode = new byte[] ", it shows "B8" on the second line. I tried this both ways.

I tried to make it make the whole packet without using the "//opcode for sending a packet private byte[] sendPacketOpcode = new byte[] " area. Nothing.

Little help please?

Here is what I have at the moment.

Thanks
02/03/2015 16:54 Stark77#40
i am not an expert but maybe you should try to read this (snipets in c):
[Only registered and activated users can see links. Click Here To Register...]
02/04/2015 04:03 WhoMoi#41
Figured it out... Here is the snippet if anybody needs
02/04/2015 14:26 denzjh#42
Regular Attack on Target Function:


The OpCode for Searching the RegAttack Function Address is included.
:pimp:
02/05/2015 22:09 Smurfin#43
About AutoFollow , have anyone look into it ? it's one of the most useful thing for multiclienting, one button pressed and we can have all char follow our main.

AutoFollow is weird, I tried to check if it has a packet for doing that but there's nothing or maybe it's clientside.

Btw Stark777, what method do you use to sniff packets ? I use Interest07's MHS script, I wonder if it's still working with Eclipse patch.
02/06/2015 16:10 Stark77#44
i do it exactly like this:
[Only registered and activated users can see links. Click Here To Register...]

follow has no packet... it will just create a sequence of move packets so dont even try. easy way is just make a loop that reads your mains (x,y) and use the autopath every 1 (or 2) seconds to it.
02/06/2015 16:19 Remmm#45
sniff packets - "PW PacketListener"
[Only registered and activated users can see links. Click Here To Register...]

config.ini
Code:
[main]
BaseAddress = D22C74
GameRun = D23414
PacketSendFunction = 782fd0
HostPlayerStruct = 28
Name = 6d8
MagicNumber = 7