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.
What is "who" reference on 0xA9 (SendCharList) pac
-
Firedancer
- Grandmaster Poster
- Posts: 104
- Joined: Fri Feb 03, 2006 6:32 am
Re: What is "who" reference on 0xA9 (SendCharList)
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.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.
Most devs have come to take over this habbit.
Does this answer your question?
-
Firedancer
- Grandmaster Poster
- Posts: 104
- Joined: Fri Feb 03, 2006 6:32 am
ahh - sorry my bad on my last post, should have more closely read what you wrote *slaps head* - still. I must admit I still don't quite get though what you're after.nevalon wrote: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...
I've now checked out packet 0xA9
http://kec.cz/tartaros/steamengine/uplo ... lock&id=40
and for example
http://gonzo.kiev.ua/guide/node122.html
maybe those links help you figure the syntax,... but trying to get the account data? what exactly are you after?
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.
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.
Don't know if you are aware of that.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
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.
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.
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.
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)?