[Crossfire-wiki] [Crossfire DokuWiki] page added: user:mhoram:scripts:healup
no-reply_wiki at metalforge.org
no-reply_wiki at metalforge.org
Mon Feb 19 15:47:15 CST 2007
A page in your DokuWiki was added or changed. Here are the details:
Date : 2007/02/19 15:47
User : mhoram
Edit Summary: created
====== 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 ======
* Perl
* [[subs.pl]]
====== Code ======
<code perl>
#!/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!");
</code>
====== Notes & Comments ======
====== References =======
* [[:user:mhoram|Mhoram's Page]]
* [[:Client Side Scripting]]
IP-Address : 206.71.197.56
Old Revision: none
New Revision: http://wiki.metalforge.net/doku.php/user:mhoram:scripts:healup
--
This mail was generated by DokuWiki at
http://wiki.metalforge.net/
More information about the crossfire-wiki
mailing list