View Single Post
  #3  
Old 11-13-2012, 08:57 AM
c0ncrete's Avatar
c0ncrete
Dragon
 
Join Date: Dec 2009
Posts: 719
Default

EVENT_TIMER doesn't export the $client object, so your conditional never passes.

you can try to dynamically name the timer in player.pl like this:

Code:
quest::settimer('checkbuffs|' . $client->GetName(), 10);
and then split up the $timer name into parts so you can get the client in EVENT_TIMER like this:

Code:
if ( $timer =~ /^checkbuffs|/ ) {
    my ($timer, $name) = split(/\|/, $timer);
    my $client = $entity_list->GetClientByName($name);
    # do whatever with $client here
}
EDIT:
changed delimiter to pipe (|) instead of underscore (_), as some character names may have underscores to indicate spaces.
also, i'm not sure if you're going to have access to the entity list in global_player.pl, so you might have to use it in each zone's player.pl instead.

EDIT AGAIN:
sheesh... i'm having all sorts of syntax issues this morning. i blame the cold weather...

Last edited by c0ncrete; 11-13-2012 at 09:45 AM.. Reason: corrected syntax
Reply With Quote