PWI - Real Chat Filters - Remove red / system spam etc. AutoIt Code included

10/25/2011 18:40 amineurin#16
^^u can use dumfck chat filter for that.
check for private msg to ep, lets say for string like this: heal me
so ep know he had to heal, and the user to heal from username whispered.

but its more like this to do.
u have to read surrounded player around ep, get name and id.
then use interest07 packets for targeting player and send a key press vommand for ur healkey in ep.

but if player is out of range, ep cant target him.
u have to follow the char/squad to prevent the out of range.

a lot work, some testing and better make first a concept for this, good luck.
10/25/2011 22:47 dumbfck#17
Yeah it's not really something you could adapt from the chat filters stuff, however, you could possibly do it using some of the code from my [Only registered and activated users can see links. Click Here To Register...] code, using the method amineurin described above. That would probably be the simplest way - Detecting PMs should be quite easy to to do by checking the msgScope variable in the message struct. Then, as amineurin said, check the nearby players list, going through it until you find a name match, then get their ID, and use either the select target opcode that is in various places on this forum or use [Only registered and activated users can see links. Click Here To Register...] to select the target.
The tricky part might be deciphering what they're saying and if they actually want buffs... Some people might get pissed off if you overwrite one of their apothecary buffs with a cleric buff when they weren't actually asking for buffs :P
I guess you could use a secret keyword ;)

This is actually quite a good idea and one that I'd quite like to make, but I'm really busy with some other pretty big projects at the moment, sorry =[

Cheers.
10/26/2011 10:33 Interest07#18
Quote:
Originally Posted by dumbfck View Post
Yeah it's not really something you could adapt from the chat filters stuff, however, you could possibly do it using some of the code from my [Only registered and activated users can see links. Click Here To Register...] code, using the method amineurin described above. That would probably be the simplest way - Detecting PMs should be quite easy to to do by checking the msgScope variable in the message struct. Then, as amineurin said, check the nearby players list, going through it until you find a name match, then get their ID, and use either the select target opcode that is in various places on this forum or use [Only registered and activated users can see links. Click Here To Register...] to select the target.
The tricky part might be deciphering what they're saying and if they actually want buffs... Some people might get pissed off if you overwrite one of their apothecary buffs with a cleric buff when they weren't actually asking for buffs :P
I guess you could use a secret keyword ;)

This is actually quite a good idea and one that I'd quite like to make, but I'm really busy with some other pretty big projects at the moment, sorry =[

Cheers.
Just have it check the player for current buffs, so it won't overwrite any ;)

Can even have it autoBuff without whispering, just have it loops through all nearby players until it finds one lacking a certain buff. Then buff that person :cool:

Buffs are located at player + 0x368
buff count at player + 0x36C

Bufflist is a short[] with ids for the icon/buffs, you can also use it to see if you need to purify someone.

Here's an example for the ids:

10/26/2011 11:20 dumbfck#19
And if you know how to unpack the game .pck files, you can get that list of buffs from buff_str.txt in configs.pck - Might be useful if stuff gets updated, changed =]

Edit: Oh, and if you're a regex whore like me, you can split them all out using something like this:
Code:
(\d+)\s+"([^\n]+)
:P
10/26/2011 18:36 Interest07#20
Quote:
Originally Posted by dumbfck View Post
And if you know how to unpack the game .pck files, you can get that list of buffs from buff_str.txt in configs.pck - Might be useful if stuff gets updated, changed =]

Edit: Oh, and if you're a regex whore like me, you can split them all out using something like this:
Code:
(\d+)\s+"([^\n]+)
:P
lol, stop it :mad:
10/27/2011 09:59 hantuman#21
wow it look like dificult.. how we scan all people around us?
10/27/2011 14:19 dumbfck#22
From Merkada's post [Only registered and activated users can see links. Click Here To Register...], you can see some offsets for the player list - These are probably a little outdated now so you might need to increase some of the offsets a bit. I haven't done this for a while and I'm on my lunch break so don't have time to look into it right now...

Quote:
Originally Posted by Merkada View Post
PPL list (sorted) =-
Code:
PPL count    RBASE+0x1C+0x1C+0x20+0x14
PPL pointer    RBASE+0x1C+0x1C+0x20+0x88+(X*0x4)    X=PPL number (0 ... PPL count)
PPL X coord.    RBASE+0x1C+0x1C+0x20+0x88+(X*0x4)+0x3C    (400+X/10)    Float
PPL Y coord.    RBASE+0x1C+0x1C+0x20+0x88+(X*0x4)+0x44    (550+Y/10)    Float
PPL Z coord.    RBASE+0x1C+0x1C+0x20+0x88+(X*0x4)+0x40    (Z/10)        Float
PPL id        RBASE+0x1C+0x1C+0x20+0x88+(X*0x4)+0x46C
PPL lvl        RBASE+0x1C+0x1C+0x20+0x88+(X*0x4)+0x478
PPL cultivation    RBASE+0x1C+0x1C+0x20+0x88+(X*0x4)+0x47C
PPL current HP    RBASE+0x1C+0x1C+0x20+0x88+(X*0x4)+0x480
PPL current MP    RBASE+0x1C+0x1C+0x20+0x88+(X*0x4)+0x484
PPL max. HP    RBASE+0x1C+0x1C+0x20+0x88+(X*0x4)+0x4C0
PPL max. MP    RBASE+0x1C+0x1C+0x20+0x88+(X*0x4)+0x4C4
PPL name    RBASE+0x1C+0x1C+0x20+0x88+(X*0x4)+0x628+0x0    Text (Unicode)
PPL HP charm    RBASE+0x1C+0x1C+0x20+0x88+(X*0x4)+0x59C
PPL MP charm    RBASE+0x1C+0x1C+0x20+0x88+(X*0x4)+0x5A0
PPL cathop name    RBASE+0x1C+0x1C+0x20+0x88+(X*0x4)+0x724+0x0    Text (Unicode)
So with that, you'd do something like this:
(pseudocode)
Code:
for(i = 0 to PPL count)
{
     readString(baseAddr+0x1C+0x1C+0x20+0x88+(X*0x4)+0x628+0x0)
}
You might be able to find the latest offsets around here somewhere ;)

I know that the name offset is now 0x638 - not sure of the others.
10/28/2011 05:51 hantuman#23
dear dumfck,

can you explain what is 0x1C+0x1C+0x20+0x14? look like its different in my server..
and
Quote:
for(i = 0 to PPL count)
{
readString(baseAddr+0x1C+0x1C+0x20+0x88+(X*0x4)+0x 628+0x0)
}
using base addrs or real base addrs?
10/28/2011 09:51 dumbfck#24
I'm afraid you'll have to find it yourself... As for the base address, I mean the lower number - I normally refer to is as baseCall, i.e.
baseCall->baseAddress

One way you could start to trace the offsets for the player list is to open up the nearby players list (press T) and count how many players are there. Do a search in CE for that number then move somewhere else and repeat until you have one or two numbers left. That'll be the player count, which you should be able to trace back enough to find your server's equivalent of:
Code:
[[[[baseCall]+0x1C]+0x1C]+0x20]
Once you have the count, you should be able to do a 'find what accesses this address' operation in CE from which you should be able to find the function that traverses the player list.

I suppose alternatively you could find somewhere where there's only a couple of nearby people (if possible), do a search for their name, then trace that back to find the actual player list. Problem here is that their name will probably give three or more results.
Hope this helps.
10/28/2011 10:10 hantuman#25
big thanks to you dumfck.. I think I must find it myself, cause construction pwi and pw indo lil'bit different..

if I was lost, I'll ask you again :D

--------------edit--------------

I just search player list, and I got the address.. after that i 'find what writes this addrs' i got some result, and it bring me 1 offset.. i.e. esi+158.. I scan 'esi' address.. and got 3 addrs.. next i add addrs manualy the addrs I got from scan + pointer 158.. the addres i 'find what accesses this address' got nothing.. so idk how to get the structure.. am i wrong?

note: my testing character move from quiet place = 3 people to crowded place = 100++ people, the last scan 'find what accesses this address' still got nothing.. :(
10/28/2011 12:09 Sᴡoosh#26
Indo offset chain : Base +0x8+0x20+0x14
10/29/2011 13:11 hantuman#27
I test using the chain that swoosh give.. i code like this using autoIt

Code:
Global $OFFSET_PLAYERCOUNT[4]
$OFFSET_PLAYERCOUNT[1] = 8 
$OFFSET_PLAYERCOUNT[2] = 32 
$OFFSET_PLAYERCOUNT[3] = 20

Global $Count = _MemoryPointerRead($APP_REAL_BASEADDRESS, $PROCESS_INFORMATION, $OFFSET_PLAYERCOUNT)
and I print in label but got 0 result, in game I'm in crowded place..

------------edit-------------------
I'm sorry, I use Rbase.. I should use appBase,, my bad :(
-------------edit again------------
now I can scan people around me.. have ID's and name.. idk how to use interest07's sending packets..:(

now I can scan chat in chat box, but it give me ^FFFFFF<3><0><0><1.000000><> &_cera_&: wkwkwkkw

the player name was _cera_, how can I get his ID?:confused:
10/30/2011 16:53 dumbfck#28
You can't get the player's ID from the chat message stuff, which is why you need to scan the list of nearby players - Once you find that player's name in the list, you can get the player base offset for that player, then get their ID from that structure.
Interest's sending packets thread contains a fully working AutoIt program (almost... you need to change the line that says:
Code:
sendDeselectPacket($pid)
to
Code:
deselectTarget($pid)
then you just need to change the base address at the top of the code and the sendPacket function call address)
deselectTarget() is just a simple example to check that the program is working. Select a target in game, then run the program and it should deselect the target.
The third post in that thread (by lolkop) provides some AutoIt code with a regex to find the sendPacket function address - This should be the same accross all PW versions.
10/30/2011 19:26 hantuman#29
I know that.. my tools now can scan and buff people in radius.. but how can I get the name who whispered me? :confused:

yeah, now I get it.. my mistake was I don't synchronize the variable.. hehehe

but my tools still buggy, I don't have a parameter that other people got buffed.. EP still give buff whenever the people getting closed.. if people stand beside eP, EP always give buff..

btw, how can I filter faction that I give buff,, outside the filter in game.. I had rival / enemy in other faction.. I tried scan faction name using CE, but again still don't understand how to get the offset.. :confused:
10/30/2011 23:13 dumbfck#30
Sounds like there's a problem in your character selection code. If you're checking for a name, then extracting the ID, it should be cool as long as you ensure you select that player first (perhaps leave a small delay between selecting and buffing too). Perhaps your name check is defective and it's breaking your loop on the first nearby person? I really couldn't tell without seeing the code.
As for the faction stuff (lol btw :P) I'm afraid I've never really dug too deep to find the offsets for a player's faction - It doesn't seem to be in the player struct, unless I'm missing something silly. Perhaps someone else here knows the offsets?