Macro Player Info (need help)

All about the macro plugin can be found in this forum. This forum is intended for the macro plugin only.

Moderator: Moderators

genuineopenkore
Plain Yogurt
Plain Yogurt
Posts: 52
Joined: 16 Jan 2011, 03:06
Noob?: Yes

Macro Player Info (need help)

#1 Post by genuineopenkore »

Code: Select all

automacro sample {
   pm "info"
   exclusive 1
   call {

   $jobID = @eval ($::players{$::playersID[$id]}->{jobID})
   $Baselvl = @eval ??????

 

	do log "$.lastpm" job id is = $jobID and base level is = $Baselvl

   }
}



can someone help me on how to make macro detect the players base level that pm'ed me?
or what is the eval code for my sample macro above?
thanks in advance.
EternalHarvest
Developers
Developers
Posts: 1798
Joined: 05 Dec 2008, 05:42
Noob?: Yes

Re: Macro Player Info (need help)

#2 Post by EternalHarvest »

Code: Select all

	#### Step 2: update actor information ####
	$actor->{ID} = $args->{ID};
	$actor->{jobID} = $args->{type};
	$actor->{type} = $args->{type};
	$actor->{lv} = $args->{lv};
still learning
Noob
Noob
Posts: 1
Joined: 13 Mar 2012, 19:53
Noob?: No

Re: Macro Player Info (need help)

#3 Post by still learning »

I'm also curious as to how to find someone's base lvl once they pm you. However, I'm not that familiar with this part :
EternalHarvest wrote:

Code: Select all

	#### Step 2: update actor information ####
	$actor->{ID} = $args->{ID};
	$actor->{jobID} = $args->{type};
	$actor->{type} = $args->{type};
	$actor->{lv} = $args->{lv};
where do put this? I've tried using pasting this to the macro itself and saved it in a variabl and made the bot pm me about the info but it didn't do anything. I really want to learn all of this but I still don't know where to find the information. :( Thanks in advance!
genuineopenkore
Plain Yogurt
Plain Yogurt
Posts: 52
Joined: 16 Jan 2011, 03:06
Noob?: Yes

Re: Macro Player Info (need help)

#4 Post by genuineopenkore »

thanks EternalHarvest
EternalHarvest wrote:

Code: Select all

	#### Step 2: update actor information ####
	$actor->{ID} = $args->{ID};
	$actor->{jobID} = $args->{type};
	$actor->{type} = $args->{type};
	$actor->{lv} = $args->{lv};
and how about the location of a player that pm you?

Code: Select all

$loc = @eval ($::players{$::playersID[$id]}->{????})

do log "$.lastpm" job id is = $jobID and base level is = $Baselvl and location is =  $loc
EternalHarvest
Developers
Developers
Posts: 1798
Joined: 05 Dec 2008, 05:42
Noob?: Yes

Re: Macro Player Info (need help)

#5 Post by EternalHarvest »

Code: Select all

do eval use Data::Dumper; Log::message Dumper $::players{$::playersID[$id]}
genuineopenkore
Plain Yogurt
Plain Yogurt
Posts: 52
Joined: 16 Jan 2011, 03:06
Noob?: Yes

Re: Macro Player Info (need help)

#6 Post by genuineopenkore »

EternalHarvest wrote:

Code: Select all

do eval use Data::Dumper; Log::message Dumper $::players{$::playersID[$id]}
thanks for your reply, but i have an error's with these code

Code: Select all

automacro samplelocation1 {
 pm "sample1"
   exclusive 1
   call {

   $loc = do eval use Data::Dumper; Log::message Dumper $::players{$::playersID[$id]}
 
   do log player's location pm'ed you is $loc

   }
}
console error
(From: xxxxxx) : sample1
[macro] automacro samplelocation1 triggered.
Error in 0: $loc = do eval use Data::Dumper; Log::message Dumper
$::players{$::playersID[$id]}
Warning: Ignoring Unknown Command in sub-line 1: (Log::message Dumper
$::players{$::playersID[$id]})

Unknown command 'log'. Please read the documentation for a list of commands.

Code: Select all

automacro samplelocation2 {
 pm "sample2"
   exclusive 1
   call {

   do eval use Data::Dumper; Log::message Dumper $::players{$::playersID[$id]}
 

   }
}
console error
(From: xxxxxx) : sample2
[macro] automacro samplelocation2 triggered.
syntax error at (eval 296) line 1, near "[]"


or is there another way to log the players location that pm my char?
Last edited by genuineopenkore on 16 Jul 2012, 17:51, edited 1 time in total.
EternalHarvest
Developers
Developers
Posts: 1798
Joined: 05 Dec 2008, 05:42
Noob?: Yes

Re: Macro Player Info (need help)

#7 Post by EternalHarvest »

You need to set $id in your macro, I've just used your own template to make an example.