EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Quests::Q&A (https://www.eqemulator.org/forums/forumdisplay.php?f=599)
-   -   Buff Bot (https://www.eqemulator.org/forums/showthread.php?t=30231)

everlastnmn 01-02-2010 07:49 PM

Buff Bot
 
Anyone have a script for a buff bot that is free and dosen't charge money for buffs ?

I tried to edit a $$ bot buffer and can't seem to get it working. I'm looking possibly for one that <=45 for certain buffs and >=46 for certain buffs.

Thanks in advance.

trevius 01-02-2010 10:21 PM

Have you tried using GeorgeS' Quest Editor tool? It has some premade quest examples and one of them happens to be a decent Buff Bot script I believe.

Secrets 01-02-2010 11:16 PM

Code:

#!/usr/bin/perl
 
# Level => (Cost, Buff set)
# Hash is iterated over, and as soon as player level is >= to hash level,
# cost is applied
# offers same buffs regardless of level
my %pbuffs =
(
        65 => { cost => 1000, set => 'high' },
        55 => { cost => 500,  set => 'general' },
        45 => { cost => 450,  set => 'general' },
        30 => { cost => 300,  set => 'general' },
        15 => { cost => 150,  set => 'general' },
        0  => { cost => 0,    set => 'general' }
);

# Buff sets. Referenced by pbuffs, changed for donator zone
my %buffset =
(
        general => [1598, 1776, 1693, 1939, 3692, 356, 3299, 13],
        high    => [2112, 2517, 2570, 1939, 3467, 5317, 3299, 13]
);

# Returns pbuff value for level
# Args: level
sub getpb
{
        my $level = shift;

        foreach $key (reverse sort keys %pbuffs)
        {
                if ($level >= $key)
                {
                        return $pbuffs{$key};
                }
        }
}

# Casts buffs given a name
# Args: array of spells
sub castspells
{
        foreach $spell (@_)
        {
                quest::selfcast($spell);
        }
}

# Returns buff set for level
sub getbuffset
{
        return @{$buffset{getpb(shift)->{'set'}}};
}

sub EVENT_SAY
{
        my $saylink1 = quest::saylink("buffs");

        my @buffs = getbuffset($ulevel);

        if ($text =~ /hail/i)
        {
                quest::say("If you want some [$saylink1] just let me know.");
        }
        elsif ($text =~ /buffs/i)
                {
                        castspells(@buffs);
                       

                                quest::say("Here you go $name!");
                }
       
}

I didn't bother changing half the things here from my old buffbot on x5, but... yeah.

everlastnmn 01-03-2010 01:53 AM

...
 
Did some edits, but this is exactly what I was looking for thanks :)


All times are GMT -4. The time now is 08:42 AM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.