Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- automacro WARP_AGIT {
- pm /agit/i
- call {
- do sl 27 166 84
- pause 1
- do warp aru_gld
- release WARP_AGIT
- do chat create "Horn"
- do sit
- }
- }
- automacro START_WARPER {
- console /Your Coordinates/
- call {
- pause 2
- do sl 27 166 84
- pause 1
- do warp aru_gld
- release START_WARPER
- do chat create "Horn"
- do sit
- }
- }
- automacro GEM_COUNT {
- pm /gem/i
- call {
- [
- $playerName = $.lastpm
- $gemCount = @invamount(Blue Gemstone);
- $weight = $.weight
- $maxWeight = $.maxweight
- ]
- $weightPercent = round(@eval($weight / $maxWeight) * 100)
- do pm "$playerName" $gemCount ::: $weightPercent%
- }
- }
- automacro DROP_GEM {
- pm /drop/i
- call {
- $gemIndex = @inventory(Blue Gemstone);
- do drop $gemIndex 10
- }
- }
- ###########################
- ## PERL SUB-ROUTINES
- ###########################
- ##--------------------------------------------------
- ## Returns the floor value (Convert to integer)
- ## Param: (number)
- ##--------------------------------------------------
- sub round {
- my ($param) = shift;
- return int($param);
- }
- ##--------------------------------------------------
- ## Returns the Guild Name of the player number
- ## Param: (playerNumber)
- ##--------------------------------------------------
- sub getGuildName {
- my $index = shift;
- my $guildName = $players{$playersID[$index]}->{guild} ? $players{$playersID[$index]}->{guild}{name} : "none";
- return $guildName
- }
- ##--------------------------------------------------
- ## Returns 1 if the second parameter is found in the list (first parameter)
- ## param: (list, value)
- ##--------------------------------------------------
- sub existsInList {
- my ($list, $val) = @_;
- return 0 if ($val eq "");
- my @array = split / *, */, $list;
- $val = lc($val);
- foreach (@array) {
- s/^\s+//;
- s/\s+$//;
- s/\s+/ /g;
- next if $_ eq "";
- return 1 if lc eq $val;
- }
- return 0;
- }
Add Comment
Please, Sign In to add comment