[Crossfire-wiki] [Crossfire DokuWiki] page added: user:mhoram:scripts:protect
no-reply_wiki at metalforge.org
no-reply_wiki at metalforge.org
Mon Feb 19 15:36:29 CST 2007
A page in your DokuWiki was added or changed. Here are the details:
Date : 2007/02/19 15:36
User : mhoram
Edit Summary: created
====== Introduction ======
This is a very simple perl script that casts a series of protection spells on your character, keeping grace at max throughout. Adjust the list of protection spells to include the ones you want to cast.
====== Requirements ======
* Perl
* [[subs.pl]]
====== Code ======
<code perl>
#!/usr/bin/perl
use warnings;
use strict;
require "./subs.pl"; # get some subs to use
$| = 1; # unbuffered output
# The 'null' at the end is a simple way to make sure you're fully
# graced up when this finishes.
for my $type (qw( cold electricity poison confusion magic null )){
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];
}
issue("invoke protection from $type");
}
draw(3, "All protected!");
</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:protect
--
This mail was generated by DokuWiki at
http://wiki.metalforge.net/
More information about the crossfire-wiki
mailing list