Guest User

Untitled

a guest
May 20th, 2018
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.92 KB | None | 0 0
  1. automacro WARP_AGIT {
  2. pm /agit/i
  3. call {
  4. do sl 27 166 84
  5. pause 1
  6. do warp aru_gld
  7. release WARP_AGIT
  8. do chat create "Horn"
  9. do sit
  10. }
  11. }
  12.  
  13.  
  14. automacro START_WARPER {
  15. console /Your Coordinates/
  16. call {
  17. pause 2
  18. do sl 27 166 84
  19. pause 1
  20. do warp aru_gld
  21. release START_WARPER
  22. do chat create "Horn"
  23. do sit
  24. }
  25. }
  26.  
  27.  
  28. automacro GEM_COUNT {
  29. pm /gem/i
  30. call {
  31. [
  32. $playerName = $.lastpm
  33. $gemCount = @invamount(Blue Gemstone);
  34. $weight = $.weight
  35. $maxWeight = $.maxweight
  36. ]
  37.  
  38. $weightPercent = round(@eval($weight / $maxWeight) * 100)
  39.  
  40. do pm "$playerName" $gemCount ::: $weightPercent%
  41. }
  42. }
  43.  
  44. automacro DROP_GEM {
  45. pm /drop/i
  46. call {
  47. $gemIndex = @inventory(Blue Gemstone);
  48.  
  49. do drop $gemIndex 10
  50. }
  51. }
  52.  
  53.  
  54.  
  55.  
  56. ###########################
  57. ## PERL SUB-ROUTINES
  58. ###########################
  59.  
  60.  
  61. ##--------------------------------------------------
  62. ## Returns the floor value (Convert to integer)
  63. ## Param: (number)
  64. ##--------------------------------------------------
  65. sub round {
  66. my ($param) = shift;
  67. return int($param);
  68. }
  69.  
  70.  
  71. ##--------------------------------------------------
  72. ## Returns the Guild Name of the player number
  73. ## Param: (playerNumber)
  74. ##--------------------------------------------------
  75. sub getGuildName {
  76. my $index = shift;
  77. my $guildName = $players{$playersID[$index]}->{guild} ? $players{$playersID[$index]}->{guild}{name} : "none";
  78. return $guildName
  79. }
  80.  
  81.  
  82. ##--------------------------------------------------
  83. ## Returns 1 if the second parameter is found in the list (first parameter)
  84. ## param: (list, value)
  85. ##--------------------------------------------------
  86. sub existsInList {
  87. my ($list, $val) = @_;
  88. return 0 if ($val eq "");
  89. my @array = split / *, */, $list;
  90. $val = lc($val);
  91. foreach (@array) {
  92. s/^\s+//;
  93. s/\s+$//;
  94. s/\s+/ /g;
  95. next if $_ eq "";
  96. return 1 if lc eq $val;
  97. }
  98. return 0;
  99. }
Add Comment
Please, Sign In to add comment