Table of Contents

Introduction

This is a simple client-side perl script which will pray and cast a healing spell alternately until your character has maximum grace and hit points.

Requirements

Code

#!/usr/bin/perl
use warnings;
use strict;
require "./subs.pl"; # get some subs to use
$| = 1;
 
# check grace
# if less than max
#   bring grace to max
# check hp
# if less than max
#   invoke a healing spell
# start over unless both are max
 
while(1){
    my @hp = request_line('stat hp');
    my( $grace, $maxgrace ) = @hp[4,5];
    while( $grace < $maxgrace ){
        issue('use_skill praying');
        @hp = request_line('stat hp');
        ( $grace, $maxgrace ) = @hp[4,5];
    }
    @hp = request_line('stat hp');
    my( $hp, $maxhp ) = @hp[0,1];
    if( $hp < $maxhp ){
        issue('invoke medium healing');
        @hp = request_line('stat hp');
        ( $hp, $maxhp ) = @hp[0,1];
    }
    @hp = request_line('stat hp');
    ( $grace, $maxgrace ) = @hp[4,5];
    last unless $hp < $maxhp or $grace < $maxgrace;
}
draw(3, "All healed!");

Notes & Comments

References