View unanswered posts | View active topics
|
Page 1 of 1
|
[ 12 posts ] |
|
| Author |
Message |
|
nevalon
|
Post subject: What is "who" reference on 0xA9 (SendCharList) pac Posted: Tue Mar 07, 2006 7:54 am |
|
Joined: Tue Mar 07, 2006 7:28 am Posts: 39 Location: Poland
|
|
As in topic... What is "who" reference at 0xA9 packet? We use:
exported function blabla (who, byref packet)
and what is "who" reference? I need to get the acct reference which will login on this packet, and I don't know how... Or if not account I need to have CProps of PCs on this account.
_________________ Sorry for my English... I don't know it well.
|
|
| Top |
|
 |
|
Firedancer
|
Post subject: Re: What is "who" reference on 0xA9 (SendCharList) Posted: Wed Mar 08, 2006 5:28 am |
|
Joined: Fri Feb 03, 2006 6:32 am Posts: 104 Location: Austria
|
nevalon wrote: As in topic... What is "who" reference at 0xA9 packet? We use: exported function blabla (who, byref packet) and what is "who" reference? I need to get the acct reference which will login on this packet, and I don't know how... Or if not account I need to have CProps of PCs on this account.
in most scripts that come with pol, "who" references to the player/gm activating the command (e.g. by typing the .command or dclicking an item) It's thus a player-object-reference.
Most devs have come to take over this habbit.
Does this answer your question?
|
|
| Top |
|
 |
|
nevalon
|
Post subject: Posted: Wed Mar 08, 2006 5:55 am |
|
Joined: Tue Mar 07, 2006 7:28 am Posts: 39 Location: Poland
|
Yeah, i know it, i'm POLScripter for some years  . I know what is "who" in most scripts. but in this exported function of this not-common packet "who" reference is not player-object-reference. It's something else, and i'm asking devs what it is ;]
_________________ Sorry for my English... I don't know it well.
|
|
| Top |
|
 |
|
CWO
|
Post subject: Posted: Wed Mar 08, 2006 6:47 am |
|
Joined: Sat Feb 04, 2006 5:49 pm Posts: 772 Location: Chicago, IL USA
|
|
If its not a character reference, then most likely, its only a connection reference so you can bounce back packets to that person.
|
|
| Top |
|
 |
|
nevalon
|
Post subject: Posted: Wed Mar 08, 2006 7:49 am |
|
Joined: Tue Mar 07, 2006 7:28 am Posts: 39 Location: Poland
|
|
hmm, ok, so any idea how I may get CProps of pcs on logged-in acct via this packet?? I need to change pc.name -> GetObjProperty(pc, "name") to send it to client as a name of char to choose to play...
_________________ Sorry for my English... I don't know it well.
|
|
| Top |
|
 |
|
Firedancer
|
Post subject: Posted: Wed Mar 08, 2006 12:20 pm |
|
Joined: Fri Feb 03, 2006 6:32 am Posts: 104 Location: Austria
|
|
| Top |
|
 |
|
nevalon
|
Post subject: Posted: Wed Mar 08, 2006 2:07 pm |
|
Joined: Tue Mar 07, 2006 7:28 am Posts: 39 Location: Poland
|
|
You see, I'm working on my naming system for my shard.
Here are some facts abt my naming system:
1. If you see another player first time, you see "Unknown person [Race]" (in paperdoll, in status bar, in Tooltip, when player arrives, with AllNames, etc, etc).
2. When you get his status bar, you may change his name (as you may do it with tamed animals) - but you don't change his name at all, you only change a dictionary CProp on your character, like CProp[his.serial] := "New name"; and after that you see that character as "New name [Race]".
3. When you create your character, your character CProp "name" := character.name and character.name := choosen race string. It's antibug system, if any player find a bug to see real name he see only race string.
4. But if we have races at char.name, so when we log in we se at Character List (sent via 0xA9 packet): "Human", "Dwarf", etc.
End it is that what I need. I need to change them to CProp "name". But "who" reference is not anything usuall, so i don't know how to reffer to acct, so to chars on acct, so to the CProps too.
PS. Really sorry for my English, I hope you understand what I mean.
_________________ Sorry for my English... I don't know it well.
|
|
| Top |
|
 |
|
MontuZ
|
Post subject: Posted: Wed Mar 08, 2006 2:56 pm |
|
Joined: Fri Feb 10, 2006 8:08 am Posts: 327 Location: Myrtle Beach, South Carolina
|
Quote: Characters/Starting Locations [0xA9]
Characters / Starting Locations (Variable # of bytes) BYTE cmd BYTE[2] blockSize BYTE # of characters Following repeated 5 times BYTE[30] character name BYTE[30] character password BYTE number of starting locations Following for as many locations as you have BYTE locationIndex (0-based) BYTE[31] town (general name) BYTE[31] exact name
Don't know if you are aware of that.
|
|
| Top |
|
 |
|
nevalon
|
Post subject: Posted: Wed Mar 08, 2006 3:02 pm |
|
Joined: Tue Mar 07, 2006 7:28 am Posts: 39 Location: Poland
|
|
Unreal I know where can I find packet reference. But it's not my question. When you try to hook the packet, in exported function you've got two incoming parameters: (who, byref packet). I'm not talking abt packet. I'm talking abt "who", which in other packets to CharRef to which send the packet. It can't be CharRef here, because you haven't choosen which character would you play when server sends packet 0xA9 to you.
_________________ Sorry for my English... I don't know it well.
|
|
| Top |
|
 |
|
CWO
|
Post subject: Posted: Wed Mar 08, 2006 3:59 pm |
|
Joined: Sat Feb 04, 2006 5:49 pm Posts: 772 Location: Chicago, IL USA
|
|
It seems like you're hooking a hard system... You're better off hooking the SendASCII packet (0x1C) which is the name of the person being sent to the player. That way, when you check "who" you are checking the person seeing the name (this is where you get the CProp) and there is a 32-bit INT (The serial) of the person the name is being displayed over) inside the packet. Make sure to check this is a PC though of course with SystemFindObjectBySerial. Then send away. If 0x1C's reference is to a PC and the prop for the person's name isnt found, then make the name Unknown... ect.
Its rough to try and change the name of the person because remember at the char selection screen, they'll just see Unknown Player[Race] in all 5 of their spots.
|
|
| Top |
|
 |
|
nevalon
|
Post subject: Posted: Wed Mar 08, 2006 4:14 pm |
|
Joined: Tue Mar 07, 2006 7:28 am Posts: 39 Location: Poland
|
|
Uhh, you don't understand me. The naming system is nearly done. The one thing with which I've got troubles is this packet, because it sends (systemly...) char.name and i need to send GetObjProperty(char, "name") instead. Only that. I hook 0x1C packet anyway, of course, for that system, Everything done. Everything except login - you say hooking hard-system... So is there any way to get exactly in hooking-function of 0xA9 packet that prop? Or my players when they log in to the server will see races of their chars instead names (and only when logging in)?
_________________ Sorry for my English... I don't know it well.
|
|
| Top |
|
 |
|
CWO
|
Post subject: Posted: Wed Mar 08, 2006 4:36 pm |
|
Joined: Sat Feb 04, 2006 5:49 pm Posts: 772 Location: Chicago, IL USA
|
|
try Print(CStr(who));
see if it shows in the console what type of ref it is...
|
|
| Top |
|
 |
|
Page 1 of 1
|
[ 12 posts ] |
|
Who is online |
Users browsing this forum: No registered users and 0 guests |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum
|
|