daily pastebin goal
55%
SHARE
TWEET

testpathing

Henrybk Jan 17th, 2018 55 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package testpathing;
  2.  
  3. use strict;
  4. use Plugins;
  5. use Log qw(debug message warning error);
  6.  
  7. return unless
  8. Plugins::register('testpathing', 'testpathing', \&on_unload);
  9.  
  10. my $chooks = Commands::register(
  11.       ['testit', "testpathing", \&commandHandler]
  12.    );
  13.  
  14. sub on_unload {
  15.    Commands::unregister($chooks);
  16. }
  17.  
  18. sub commandHandler {
  19.     my $pathfinding = new PathFinding;
  20.     my $testfield = new Field(name => 'prontera');
  21.     my $teststart = {
  22.         x => 155,
  23.         y => 150,
  24.     };
  25.     my $testend = {
  26.         x => 155,
  27.         y => 155,
  28.     };
  29.     $pathfinding->reset(
  30.         field => $testfield,
  31.         start => $teststart,
  32.         dest => $testend);
  33.     my $ret = $pathfinding->runcount;
  34. }
  35.  
  36. return 1;
RAW Paste Data
Top