everlastnmn
01-02-2010, 07:49 PM
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
#!/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 :)
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.