Problem with looking at players

shandlia
14 Sept 2006, 20:49
I want to create a command where you can look at yourself or another player and see who they are as well as race and features.

The strings are Name, race, gender, hair and eyes.

tried command look #@Name# with a print message of You see #Name#. A #gender# #race# with #eyes# eyes and #hair# hair.

Also tried adding @ ex: #@Name# ect. Neither of these worked.

when trying to test I get I can't see that anywhere. Am I completely on the wrong track?

paul_one
14 Sept 2006, 22:22
Yes and no.. You're using strings, instead of properties..
Are you using object properties?

If so, try:
#(name):eyes#
This says object "#name#" and property "eyes"..

I'll see if I can mock up a quick demo while I'm waiting for a WoW update to fail for the upteenth time (this time in safe-mode.. Otherwise known as "uber-gay-and-slow-mode").

[EDIT]
Done:
person_desc.asl, here:
http://www.compwhizz.freeserve.co.uk/asldemos/

shandlia
15 Sept 2006, 00:19
Using strings because its the player I want to see not an object. Do I need to create an object and place it on the player yet invisible? If so how do I give it the look the player chooses for themselves since I wont know what those are until the player creates it?

paul_one
15 Sept 2006, 00:44
You could give the player a "self" object.
So, 'look at self' is actually looking at the object self :) ...

And have "myself" as an alt.

Or, you could just use the game object..
#game:eyes#
#game:whatever#

You can set object properties, by using this:
command <change #me#> {
property <game;one=#me#>
msg <WOW! the game's property 'one' is now #game:one#>

shandlia
20 Sept 2006, 01:51
ok finally got it where upon creation a self object is created and the player can look at themselves and see what they are supposed. However, I still can't get it to where another player can look at them. How do I give an object that is created in game an alias or alt? When another player looks at this person all they see "X is another player." Is there someway to override that and just change what they see there?

Elexxorine
20 Sept 2006, 17:15
add a command:

command <look at #@thing#> {
if property <#thing#; netplayer> then {
msg <#@thing# is a level #(thing):level# #(thing):sex# #(thing):class# #(thing):race#, with #(thing):eyecolour# coloured eyes and #(thing):haircolour# #(thing):hairlength# hair.>
}
else exec <look at #@thing#; normal>
}


just change the message to any other thing you want, done.

Arbutus
13 Oct 2006, 18:59
In a multiplayer Quest game, a player object is created and named sequentially by order of player login, eg. player1, player2, player3...
QuestNet Server lists the alias of the player object as the login name, eg. player1's alias is "Bob" but you need to use $name(player1)$ to get it.

So when you verify that you're looking at a netplayer object (another player), you then need to reference that player's "self object" and get the info from that.

command <look at #@thing#> {
if property <#thing#; netplayer> then {
set string <selfObject; selfObject$name(#thing#)$>
if real <#selfObject#> then msg <#@thing# is a level #(selfObject):level# #(selfObject):race#...>
else msgto <0;Could not find selfObject '#selfObject#'>
}
else exec <look at #@thing#; normal>
}


object selfObjectBob has the following properties:
race="Orc"
level="2"
The self object can be visible/hidden, available or not. IF REAL just checks to see if it is defined somewhere in the game.

> look at Bob
[list]["Bob" is an alias for the object player1]
[player1 is a netplayer]
[selfObject="selfObjectBob"]
[assuming selfObjectBob exists][/list:u]
Bob is a level 2 Orc...