Advertisement
Guest User

Untitled

a guest
Nov 9th, 2017
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 0.86 KB | None | 0 0
  1.  
  2. use strict;
  3. use Plugins;
  4. use Log qw( warning message error );
  5. use Globals;
  6. use Actor;
  7. use Misc;
  8. use Network::DirectConnection;
  9. use Network::Send;
  10. use Utils;
  11. use Commands;
  12. use Task::CalcMapRoute;
  13.  
  14. my $myHooks = Plugins::addHooks(   
  15.     ['packet/npc_talk_continue', \&fix_AutoTalk_NPCs]
  16. );
  17.  
  18.  
  19. sub fix_AutoTalk_NPCs {
  20.     my ($self, $args) = @_;
  21.     my $name = getNPCName($args->{ID});
  22.     return unless (($name =~ /Guarda/ && $field->baseName eq 'aldebaran') || ($name =~ /Gaeho/ && $field->baseName eq 'payon'));
  23.     #return unless ( eq 57008);
  24.     unless ($config{autoTalkCont}) {
  25.         #message TF("Plugin Auto-continuing talking\n",), "npc";
  26.         message ("Plugin Auto-continuing talking\n",), "npc";
  27.         $messageSender->sendTalkContinue($args->{ID});
  28.         # This time will be reset once the NPC responds
  29.         $ai_v{npc_talk}{time} = time + $timeout{'ai_npcTalk'}{'timeout'} + 5;
  30.     }
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement