DevTeam,
How do you obtain a characters coordinates?
For example, if I use macro plugin, I could easily get it by using the $.pos variable.
However, in the case of different player's coordinates, I really don't know or haven't read yet.
I think it would be analogous to kore's following algo.
So I have two cases,
one : following master, how does kore find his master through party?
two : a player went near me (player coordinates are displayed in pl) but how to obtain via functions?
Thanks, DevTeam. I'm still learning both Kore and Perl on Win32.
Character Position
Moderator: Moderators
-
- Developers
- Posts: 1798
- Joined: 05 Dec 2008, 05:42
- Noob?: Yes
Re: Character Position
Actor.pm:
Information on players is stored in instances of Actor::Player class.
Code: Select all
##
# Hash* $Actor->{pos}
#
# The position where this actor was, before its last movement.
# This is a reference to a hash, containing the items 'x' and 'y'.
##
# Hash* $Actor->{pos_to}
#
# The position where this actor is moving to, or (if the actor has finished moving),
# where it currently is. This is a reference to a hash, containing the items 'x' and 'y'.
Re: Character Position
What is the possible codes for that?EternalHarvest wrote:Actor.pm:Information on players is stored in instances of Actor::Player class.Code: Select all
## # Hash* $Actor->{pos} # # The position where this actor was, before its last movement. # This is a reference to a hash, containing the items 'x' and 'y'. ## # Hash* $Actor->{pos_to} # # The position where this actor is moving to, or (if the actor has finished moving), # where it currently is. This is a reference to a hash, containing the items 'x' and 'y'.
Re: Character Position
barakuda wrote:What is the possible codes for that?EternalHarvest wrote:Actor.pm:Information on players is stored in instances of Actor::Player class.Code: Select all
## # Hash* $Actor->{pos} # # The position where this actor was, before its last movement. # This is a reference to a hash, containing the items 'x' and 'y'. ## # Hash* $Actor->{pos_to} # # The position where this actor is moving to, or (if the actor has finished moving), # where it currently is. This is a reference to a hash, containing the items 'x' and 'y'.
Code: Select all
$x = @eval ($::players{$::playersID[$.lastMatch3]}->{pos_to}{x})
$y = @eval ($::players{$::playersID[$.lastMatch3]}->{pos_to}{y})
Re: Character Position
Not working$x = @eval ($::players{$::playersID[$.lastMatch3]}->{pos_to}{x})
$y = @eval ($::players{$::playersID[$.lastMatch3]}->{pos_to}{y})