Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Bots

Development::Bots Forum for bots.

Reply
 
Thread Tools Display Modes
  #1  
Old 07-20-2009, 06:13 PM
Krugus
Sarnak
 
Join Date: Dec 2005
Location: the Void
Posts: 40
Default Bot Quest Script

Ok I was just sitting around yesterday and an Idea hit me.

Why not add the bot commands via saylinks to a quest script and put them in the templates folder? Since all the saylinks does is make you say the #bot command there was really very little scripting needed for it. Granted I'm just a newbie and I'm still at my crawling stages when it comes to perl scripting...

Here is what I have so far:

Code:
#Bot Event Script
#Just Hail and click!
#Most of the bot commands are listed here if you see one missing click the #bot help to find the missing command.

sub EVENT_SAY
{
my $help = quest::saylink("help");
my $general = quest::saylink("general");
my $bh = quest::saylink("#bot help");
my $bhc = quest::saylink("#bot help create");
my $bla = quest::saylink("#bot list all");
my $bu = quest::saylink("#bot update");
my $bga = quest::saylink("#bot group add");
my $bgr = quest::saylink("#bot group remove");
my $bgof = quest::saylink("#bot group order follow");
my $bgog = quest::saylink("#bot group order guard");
my $bgoa = quest::saylink("#bot group order attack");
my $bil = quest::saylink("#bot inventory list");
my $bgs = quest::saylink("#bot group summon");
my $bst = quest::saylink("#bot summon");
my $class = quest::saylink("class");
my $bmez = quest::saylink("#bot ai mez");
my $bplk = quest::saylink("#bot picklock");
my $bcup = quest::saylink("#bot cure poison");
my $bcud = quest::saylink("#bot cure disease");
my $bcuc = quest::saylink("#bot cure curse");
my $bcub = quest::saylink("#bot cure blindness");
my $bbme = quest::saylink("#bot bindme");
my $btrk = quest::saylink("#bot track");
my $btclm = quest::saylink("#bot target calm");
my $bil = quest::saylink("#bot inventory list");
my $bgs = quest::saylink("#bot group summon");
my $bst = quest::saylink("#bot summon");
my $bevc = quest::saylink("#bot evac");
my $brez = quest::saylink("#bot resurrectme");
my $bcorp = quest::saylink("#bot corpse summon");
my $blre = quest::saylink("#bot lore");
my $bsowr = quest::saylink("#bot sow regular");
my $bsowg = quest::saylink("#bot sow group");
my $bsoww = quest::saylink("#bot sow wolf");
my $binvs = quest::saylink("#bot invis");
my $blevi = quest::saylink("#bot levitate");
my $brune = quest::saylink("#bot runeme");
my $bshk = quest::saylink("#bot shrinkme");
my $bend = quest::saylink("#bot endureb");
my $bchr = quest::saylink("#bot charm");
my $bdire = quest::saylink("#bot dire charm");
my $bpetr = quest::saylink("#bot pet remove");
my $bdgl = quest::saylink("List Druid Gate Locations");
my $bwgl = quest::saylink("List Wizard Gate Locations");
my $bdgkar = quest::saylink("#bot gate karana");
my $bdgcom = quest::saylink("#bot gate commons");
my $bdgtox = quest::saylink("#bot gate tox");
my $bdgbut = quest::saylink("#bot gate butcher");
my $bdglav = quest::saylink("#bot gate lava");
my $bdgro = quest::saylink("#bot gate ro");
my $bdgfee = quest::saylink("#bot gate feerrott");
my $bdgste = quest::saylink("#bot gate steamfont");
my $bdgmis = quest::saylink("#bot gate misty");
my $bdgwak = quest::saylink("#bot gate wakening");
my $bdgice = quest::saylink("#bot gate iceclad");
my $bdgdiv = quest::saylink("#bot gate divide");
my $bdgcob = quest::saylink("#bot gate cobalt");
my $bdgcomb = quest::saylink("#bot gate combines");
my $bdgsur = quest::saylink("#bot gate surefall");
my $bdggri = quest::saylink("#bot gate grimling");
my $bdgtwi = quest::saylink("#bot gate twilight");
my $bdgdaw = quest::saylink("#bot gate dawnshroud");
my $bdgnex = quest::saylink("#bot gate nexus");
my $bdgsto = quest::saylink("#bot gate stonebrunt");
my $bdgblo = quest::saylink("#bot gate bloodfields");
my $bdgeme = quest::saylink("#bot gate emerald");
my $bdgsky = quest::saylink("#bot gate skyfire");
my $bdgwos = quest::saylink("#bot gate wos");
my $bmage = quest::saylink("#bot magepet earth");
my $bmagw = quest::saylink("#bot magepet water");
my $bmaga = quest::saylink("#bot magepet air");
my $bmagf = quest::saylink("#bot magepet fire");
my $bmagm = quest::saylink("#bot magepet monster");
my $other = quest::saylink("other");
my $braid = quest::saylink("#bot raid help");
my $bsvr = quest::saylink("#bot saveraid");
my $bspnr = quest::saylink("#bot spawnraid");
my $bgprd = quest::saylink("#bot groupraid");
my $barch = quest::saylink("#bot archery");
my $bwgfay = quest::saylink("#bot gate fay");
my $bwgnk = quest::saylink("#bot gate nk");
my $bwgwk = quest::saylink("#bot gate wk");
my $bwghate = quest::saylink("#bot gate hateplane");
my $bwgair = quest::saylink("#bot gate airplane");
my $brstp = quest::saylink("#bot resist poison");
my $brstd = quest::saylink("#bot resist disease");
my $brstf = quest::saylink("#bot resist fire");
my $brstc = quest::saylink("#bot resist cold");
my $brstm = quest::saylink("#bot resist magic");

 if($text =~ /Hail/i)
	{
	quest::say("Do you need $help $name?");
	}
 if($text =~ /help/i)
	{
	quest::say("Do you need help with $general, $class or $other commands ");
	}
 if($text =~ /general/i)
	{
	quest::say("$bh, $bhc, $bla");
	quest::say("$bu, $bil");
	quest::say("$bga(target), $bgr(target)");
	quest::say("$bgs or $bst(target)");
	quest::say("$bgof(target)");
	quest::say("$bgog(target)");
	quest::say("$bgoa(target)");
	quest::say("Or can I $help you with something else?");	
	}
if($text =~ /class/i)
	{
	quest::say("$bmez(target)");
	quest::say("$bplk(target & stand right on door)");
	quest::say("$bcup, $bcud, $bcuc");
	quest::say("$bcub, $bbme, $btrk");
	quest::say("$btclm, $bevc, $brez");
	quest::say("$bcorp, $blre");
	quest::say("$bsowr, $bsowg, $bsoww");
	quest::say("$binvs, $blevi");
	quest::say("$brune, $bshk, $bend");
	quest::say("$bchr, $bdire, $bpetr");
	quest::say("$bdgl, $bwgl");
	quest::say("$bmage, $bmagw");
	quest::say("$bmaga, $bmagf, $bmagm");
	quest::say("$brstm, $brstp, $brstd");
	quest::say("$brstf, $brstc");
	quest::say("Or can I $help you with something else?");	
	}
if($text =~ /other/i)
	{
	quest::say("$braid, $bsvr");
	quest::say("$bspnr, $bgprd, $barch");
	quest::say("Or can I $help you with something else?");	
	}
if($text =~ /List Druid Gate Locations/i)
	{	
	quest::say("$bdgkar, $bdgcom");
	quest::say("$bdgtox, $bdgbut");
	quest::say("$bdglav, $bdgro");
	quest::say("$bdgfee, $bdgste");
	quest::say("$bdgmis, $bdgwak");
	quest::say("$bdgice, $bdgdiv");
	quest::say("$bdgcob, $bdgcomb");
	quest::say("$bdgsur, $bdggri");
	quest::say("$bdgtwi, $bdgdaw");
	quest::say("$bdgnex, $bdgsto");
	quest::say("$bdgblo, $bdgeme");
	quest::say("$bdgsky, $bdgwos");
	quest::say("Or can I $help you with something else?");	
	}
if($text =~ /List Wizard Gate Locations/i)
	{
	quest::say("$bdgcom, $bdgtox");
	quest::say("$bdgro, $bdgwak");
	quest::say("$bdgice, $bdgdiv");
	quest::say("$bdgcob, $bdgcomb");
	quest::say("$bdggri, $bdgtwi");
	quest::say("$bdgdaw, $bdgnex");
	quest::say("$bdgsto, $bdgblo");
	quest::say("$bdgeme, $bdgsky");
	quest::say("$bdgwos, $bwgfay");
	quest::say("$bwgnk, $bwgwk");
	quest::say("$bwghate, $bwgair");
	quest::say("Or can I $help you with something else?");	
	}
}
Here are some screens of it in action:










It works but the only problem so far is: You would need one for each BOT. Yikes! Works great on small servers like mine where there are only a few people.

One problem I did run into with Bots having quests is if I try to use the bots NPCID (999138.pl) it will not work but if I use their name (Zargoth.pl) it works just fine.
The bot quest script is located in the templates folder. Not sure where to go from here? Any thoughts?
Reply With Quote
  #2  
Old 07-20-2009, 06:52 PM
WildcardX
Developer
 
Join Date: Apr 2003
Posts: 589
Default

Looks great! FNW was talking to me about this idea earlier this spring. He also believed the bot system could be integrated via quest files. And it does make sense to the small personal server. not just because of its simplicity, but as it stands, the quest interface is the closest thing the server code has to a SDK to expand the system unless you dig into the code itself.
__________________
Read my developer notes at my blog.

Quote:
If it's not on IRC, it ain't l33t!
Reply With Quote
  #3  
Old 07-20-2009, 09:07 PM
Krugus
Sarnak
 
Join Date: Dec 2005
Location: the Void
Posts: 40
Default Bot Quest Script

Thanks

I'm wondering though. If we have a player.pl that we can put in a zone or template... why not a bot.pl ?

Hrmmm stuff to think about.

Anyways I found a few more commands I forgot (Invis, see invis and undead invis) and raid commands are not saylinked yet. The bot will list them atm.

Code:
#Bot Event Script
#Just Hail and click!
#Most of the bot commands are listed here if you see one missing click the #bot help to find the missing command.

sub EVENT_SAY
{
my $help = quest::saylink("help");
my $general = quest::saylink("general");
my $bh = quest::saylink("#bot help");
my $bhc = quest::saylink("#bot help create");
my $bla = quest::saylink("#bot list all");
my $bu = quest::saylink("#bot update");
my $bga = quest::saylink("#bot group add");
my $bgr = quest::saylink("#bot group remove");
my $bgof = quest::saylink("#bot group order follow");
my $bgog = quest::saylink("#bot group order guard");
my $bgoa = quest::saylink("#bot group order attack");
my $bil = quest::saylink("#bot inventory list");
my $bgs = quest::saylink("#bot group summon");
my $bst = quest::saylink("#bot summon");
my $class = quest::saylink("class");
my $bmez = quest::saylink("#bot ai mez");
my $bplk = quest::saylink("#bot picklock");
my $bcup = quest::saylink("#bot cure poison");
my $bcud = quest::saylink("#bot cure disease");
my $bcuc = quest::saylink("#bot cure curse");
my $bcub = quest::saylink("#bot cure blindness");
my $bbme = quest::saylink("#bot bindme");
my $btrk = quest::saylink("#bot track");
my $btclm = quest::saylink("#bot target calm");
my $bil = quest::saylink("#bot inventory list");
my $bgs = quest::saylink("#bot group summon");
my $bst = quest::saylink("#bot summon");
my $bevc = quest::saylink("#bot evac");
my $brez = quest::saylink("#bot resurrectme");
my $bcorp = quest::saylink("#bot corpse summon");
my $blre = quest::saylink("#bot lore");
my $bsowr = quest::saylink("#bot sow regular");
my $bsowg = quest::saylink("#bot sow group");
my $bsoww = quest::saylink("#bot sow wolf");
my $binvs = quest::saylink("#bot invis live");
my $blevi = quest::saylink("#bot levitate");
my $brune = quest::saylink("#bot runeme");
my $bshk = quest::saylink("#bot shrinkme");
my $bend = quest::saylink("#bot endureb");
my $bchr = quest::saylink("#bot charm");
my $bdire = quest::saylink("#bot dire charm");
my $bpetr = quest::saylink("#bot pet remove");
my $bdgl = quest::saylink("List Druid Gate Locations");
my $bwgl = quest::saylink("List Wizard Gate Locations");
my $bdgkar = quest::saylink("#bot gate karana");
my $bdgcom = quest::saylink("#bot gate commons");
my $bdgtox = quest::saylink("#bot gate tox");
my $bdgbut = quest::saylink("#bot gate butcher");
my $bdglav = quest::saylink("#bot gate lava");
my $bdgro = quest::saylink("#bot gate ro");
my $bdgfee = quest::saylink("#bot gate feerrott");
my $bdgste = quest::saylink("#bot gate steamfont");
my $bdgmis = quest::saylink("#bot gate misty");
my $bdgwak = quest::saylink("#bot gate wakening");
my $bdgice = quest::saylink("#bot gate iceclad");
my $bdgdiv = quest::saylink("#bot gate divide");
my $bdgcob = quest::saylink("#bot gate cobalt");
my $bdgcomb = quest::saylink("#bot gate combines");
my $bdgsur = quest::saylink("#bot gate surefall");
my $bdggri = quest::saylink("#bot gate grimling");
my $bdgtwi = quest::saylink("#bot gate twilight");
my $bdgdaw = quest::saylink("#bot gate dawnshroud");
my $bdgnex = quest::saylink("#bot gate nexus");
my $bdgsto = quest::saylink("#bot gate stonebrunt");
my $bdgblo = quest::saylink("#bot gate bloodfields");
my $bdgeme = quest::saylink("#bot gate emerald");
my $bdgsky = quest::saylink("#bot gate skyfire");
my $bdgwos = quest::saylink("#bot gate wos");
my $bmage = quest::saylink("#bot magepet earth");
my $bmagw = quest::saylink("#bot magepet water");
my $bmaga = quest::saylink("#bot magepet air");
my $bmagf = quest::saylink("#bot magepet fire");
my $bmagm = quest::saylink("#bot magepet monster");
my $other = quest::saylink("other");
my $braid = quest::saylink("#bot raid help");
my $bsvr = quest::saylink("#bot saveraid");
my $bspnr = quest::saylink("#bot spawnraid");
my $bgprd = quest::saylink("#bot groupraid");
my $barch = quest::saylink("#bot archery");
my $bwgfay = quest::saylink("#bot gate fay");
my $bwgnk = quest::saylink("#bot gate nk");
my $bwgwk = quest::saylink("#bot gate wk");
my $bwghate = quest::saylink("#bot gate hateplane");
my $bwgair = quest::saylink("#bot gate airplane");
my $brstp = quest::saylink("#bot resist poison");
my $brstd = quest::saylink("#bot resist disease");
my $brstf = quest::saylink("#bot resist fire");
my $brstc = quest::saylink("#bot resist cold");
my $brstm = quest::saylink("#bot resist magic");
my $bcinvs = quest::saylink("#bot invis see");
my $binvsun = quest::saylink("#bot invis undead");


 if($text =~ /Hail/i)
	{
	quest::say("Do you need $help $name?");
	}
 if($text =~ /help/i)
	{
	quest::say("Do you need help with $general, $class or $other commands ");
	}
 if($text =~ /general/i)
	{
	quest::say("$bh, $bhc, $bla");
	quest::say("$bu, $bil");
	quest::say("$bga(target), $bgr(target)");
	quest::say("$bgs or $bst(target)");
	quest::say("$bgof(target)");
	quest::say("$bgog(target)");
	quest::say("$bgoa(target)");
	quest::say("Or can I $help you with something else?");	
	}
if($text =~ /class/i)
	{
	quest::say("$bmez(target)");
	quest::say("$bplk(target & stand right on door)");
	quest::say("$bcup, $bcud, $bcuc");
	quest::say("$bcub, $bbme, $btrk");
	quest::say("$btclm, $bevc, $brez");
	quest::say("$bcorp, $blre, $blevi");
	quest::say("$bsowr, $bsowg, $bsoww");
	quest::say("$binvs, $binvsun, $bcinvs");
	quest::say("$brune, $bshk, $bend");
	quest::say("$bchr, $bdire, $bpetr");
	quest::say("$bdgl, $bwgl");
	quest::say("$bmage, $bmagw");
	quest::say("$bmaga, $bmagf, $bmagm");
	quest::say("$brstm, $brstp, $brstd");
	quest::say("$brstf, $brstc");
	quest::say("Or can I $help you with something else?");	
	}
if($text =~ /other/i)
	{
	quest::say("$braid, $bsvr");
	quest::say("$bspnr, $bgprd, $barch");
	quest::say("Or can I $help you with something else?");	
	}
if($text =~ /List Druid Gate Locations/i)
	{	
	quest::say("$bdgkar, $bdgcom");
	quest::say("$bdgtox, $bdgbut");
	quest::say("$bdglav, $bdgro");
	quest::say("$bdgfee, $bdgste");
	quest::say("$bdgmis, $bdgwak");
	quest::say("$bdgice, $bdgdiv");
	quest::say("$bdgcob, $bdgcomb");
	quest::say("$bdgsur, $bdggri");
	quest::say("$bdgtwi, $bdgdaw");
	quest::say("$bdgnex, $bdgsto");
	quest::say("$bdgblo, $bdgeme");
	quest::say("$bdgsky, $bdgwos");
	quest::say("Or can I $help you with something else?");	
	}
if($text =~ /List Wizard Gate Locations/i)
	{
	quest::say("$bdgcom, $bdgtox");
	quest::say("$bdgro, $bdgwak");
	quest::say("$bdgice, $bdgdiv");
	quest::say("$bdgcob, $bdgcomb");
	quest::say("$bdggri, $bdgtwi");
	quest::say("$bdgdaw, $bdgnex");
	quest::say("$bdgsto, $bdgblo");
	quest::say("$bdgeme, $bdgsky");
	quest::say("$bdgwos, $bwgfay");
	quest::say("$bwgnk, $bwgwk");
	quest::say("$bwghate, $bwgair");
	quest::say("Or can I $help you with something else?");	
	}
}
Enjoy
Reply With Quote
  #4  
Old 07-21-2009, 10:30 AM
WildcardX
Developer
 
Join Date: Apr 2003
Posts: 589
Default

I guess what I think would be the most useful part of this script is if you added logic so the bot offers only the commands it is capable of performing. So an enchanter bot won't bother offering you help with doing a #bot cure but it would offer up #bot ai mez. That would cut down on the volume of the text the bots spit out and keep the info relevant.
__________________
Read my developer notes at my blog.

Quote:
If it's not on IRC, it ain't l33t!
Reply With Quote
  #5  
Old 07-21-2009, 10:37 AM
WildcardX
Developer
 
Join Date: Apr 2003
Posts: 589
Default

One of the weaknesses of the bot subsystem is the large volume of #bot commands that exist. You have to get to know them and making buttons is a must as it does help. Its a necessary evil atm, but I also don't see any reason why that existing interface couldn't be supplemented with something like your script, especially if this script can make that "interface" even more user frieldnly to use. Especially if you do it a way that doesnt destroy the game experience. What I mean by that is when I was in college I had to take a Theater productions class and one important concept I learned in that class was "suspension of disbelief". So if you can make this script so your having a "in game" conversation with your bot to give commands that are relevant to what the bot can actually do and its not overly verbose so using the #bot commands would just be easier, then I think the script has value. I hope I am making sense to you!
__________________
Read my developer notes at my blog.

Quote:
If it's not on IRC, it ain't l33t!
Reply With Quote
  #6  
Old 07-21-2009, 10:45 AM
WildcardX
Developer
 
Join Date: Apr 2003
Posts: 589
Default

Sorry.. my 3rd post in less than 15 minutes...

Anyway, another thought I just had as an application for something like your script is perhaps for an EQEmu implementation of what live now calls "henchmen" (which I still think was Sony trolling our boards and stealing the idea of bots from us since we had them before Sony!). I don't know much about live's henchmen implementation but I assume its a watered down version of bots. Perhaps something like your script could be applied to implementing henchmen by it wrapping calls to the bots subsystem?
__________________
Read my developer notes at my blog.

Quote:
If it's not on IRC, it ain't l33t!
Reply With Quote
  #7  
Old 07-22-2009, 02:04 AM
Krugus
Sarnak
 
Join Date: Dec 2005
Location: the Void
Posts: 40
Default Bot Commands via quest script

Quote:
Originally Posted by WildcardX View Post
I guess what I think would be the most useful part of this script is if you added logic so the bot offers only the commands it is capable of performing. So an enchanter bot won't bother offering you help with doing a #bot cure but it would offer up #bot ai mez. That would cut down on the volume of the text the bots spit out and keep the info relevant.
I wish I had some talent in programing but I'm still just learning how to crawl in the scripting system EQEmu has. I'm learning as I go but that is why its so much fun

Anyways, here is the next revision of my Bot Help Quest Script. Added the logic you suggested to the script so it would spit out the class commands based on the bots class. Raid commands are only listed (on my to do list):

Code:
#Bot Event Script
#Just Hail and click!
#Most of the bot commands are listed here if you see one missing 
#click the #bot help to find the missing command.
#
# LAST EDIT DATE: July 22, 2009
# VERSION: 0.5
# By: Krugus
#

sub EVENT_SAY
{
my $help = quest::saylink("help");
my $general = quest::saylink("general");
my $bh = quest::saylink("#bot help");
my $bhc = quest::saylink("#bot help create");
my $bla = quest::saylink("#bot list all");
my $bu = quest::saylink("#bot update");
my $bga = quest::saylink("#bot group add");
my $bgr = quest::saylink("#bot group remove");
my $bgof = quest::saylink("#bot group order follow");
my $bgog = quest::saylink("#bot group order guard");
my $bgoa = quest::saylink("#bot group order attack");
my $bil = quest::saylink("#bot inventory list");
my $bgs = quest::saylink("#bot group summon");
my $bst = quest::saylink("#bot summon");
my $class = quest::saylink("class");
my $bmez = quest::saylink("#bot ai mez");
my $bplk = quest::saylink("#bot picklock");
my $bcup = quest::saylink("#bot cure poison");
my $bcud = quest::saylink("#bot cure disease");
my $bcuc = quest::saylink("#bot cure curse");
my $bcub = quest::saylink("#bot cure blindness");
my $bbme = quest::saylink("#bot bindme");
my $btrk = quest::saylink("#bot track");
my $btclm = quest::saylink("#bot target calm");
my $bil = quest::saylink("#bot inventory list");
my $bgs = quest::saylink("#bot group summon");
my $bst = quest::saylink("#bot summon");
my $bevc = quest::saylink("#bot evac");
my $brez = quest::saylink("#bot resurrectme");
my $bcorp = quest::saylink("#bot corpse summon");
my $blre = quest::saylink("#bot lore");
my $bsowr = quest::saylink("#bot sow regular");
my $bsowg = quest::saylink("#bot sow group");
my $bsoww = quest::saylink("#bot sow wolf");
my $binvs = quest::saylink("#bot invis live");
my $blevi = quest::saylink("#bot levitate");
my $brune = quest::saylink("#bot runeme");
my $bshk = quest::saylink("#bot shrinkme");
my $bend = quest::saylink("#bot endureb");
my $bchr = quest::saylink("#bot charm");
my $bdire = quest::saylink("#bot dire charm");
my $bpetr = quest::saylink("#bot pet remove");
my $bdgl = quest::saylink("List Druid Gate Locations");
my $bwgl = quest::saylink("List Wizard Gate Locations");
my $bdgkar = quest::saylink("#bot gate karana");
my $bdgcom = quest::saylink("#bot gate commons");
my $bdgtox = quest::saylink("#bot gate tox");
my $bdgbut = quest::saylink("#bot gate butcher");
my $bdglav = quest::saylink("#bot gate lava");
my $bdgro = quest::saylink("#bot gate ro");
my $bdgfee = quest::saylink("#bot gate feerrott");
my $bdgste = quest::saylink("#bot gate steamfont");
my $bdgmis = quest::saylink("#bot gate misty");
my $bdgwak = quest::saylink("#bot gate wakening");
my $bdgice = quest::saylink("#bot gate iceclad");
my $bdgdiv = quest::saylink("#bot gate divide");
my $bdgcob = quest::saylink("#bot gate cobalt");
my $bdgcomb = quest::saylink("#bot gate combines");
my $bdgsur = quest::saylink("#bot gate surefall");
my $bdggri = quest::saylink("#bot gate grimling");
my $bdgtwi = quest::saylink("#bot gate twilight");
my $bdgdaw = quest::saylink("#bot gate dawnshroud");
my $bdgnex = quest::saylink("#bot gate nexus");
my $bdgsto = quest::saylink("#bot gate stonebrunt");
my $bdgblo = quest::saylink("#bot gate bloodfields");
my $bdgeme = quest::saylink("#bot gate emerald");
my $bdgsky = quest::saylink("#bot gate skyfire");
my $bdgwos = quest::saylink("#bot gate wos");
my $bmage = quest::saylink("#bot magepet earth");
my $bmagw = quest::saylink("#bot magepet water");
my $bmaga = quest::saylink("#bot magepet air");
my $bmagf = quest::saylink("#bot magepet fire");
my $bmagm = quest::saylink("#bot magepet monster");
my $other = quest::saylink("other");
my $braid = quest::saylink("#bot raid help");
my $bsvr = quest::saylink("#bot saveraid");
my $bspnr = quest::saylink("#bot spawnraid");
my $bgprd = quest::saylink("#bot groupraid");
my $barch = quest::saylink("#bot archery");
my $bwgfay = quest::saylink("#bot gate fay");
my $bwgnk = quest::saylink("#bot gate nk");
my $bwgwk = quest::saylink("#bot gate wk");
my $bwghate = quest::saylink("#bot gate hateplane");
my $bwgair = quest::saylink("#bot gate airplane");
my $brstp = quest::saylink("#bot resist poison");
my $brstd = quest::saylink("#bot resist disease");
my $brstf = quest::saylink("#bot resist fire");
my $brstc = quest::saylink("#bot resist cold");
my $brstm = quest::saylink("#bot resist magic");
my $bcinvs = quest::saylink("#bot invis see");
my $binvsun = quest::saylink("#bot invis undead");
my $bsow35 = quest::saylink("#bot sow shrew");
my $bsow50 = quest::saylink("#bot sow feral");
my $allclas = quest::saylink("all clas");


if($text =~ /Hail/i)
	{
	quest::say("Do you need $help $name?");
	}
if($text =~ /help/i)
	{
	quest::say("Do you need help with $general, $class or $other commands ");
	}
if($text =~ /general/i)
	{
	quest::say("$bh, $bhc, $bla");
	quest::say("$bu, $bil");
	quest::say("$bga(target), $bgr(target)");
	quest::say("$bgs or $bst(target)");
	quest::say("$bgof(target)");
	quest::say("$bgog(target)");
	quest::say("$bgoa(target)");
	quest::say("Or can I $help you with something else?");	
	}
if($text =~ /class/i)
	{
	my $botclass = $npc->GetClass();
	if (($botclass == 1 || $botclass == 3|| $botclass == 5 || $botclass == 7 || $botclass ==16)){
	quest::say("Look, I'm just here to get into a fight.");
	quest::say("If you wanted a caster, you should have hired one.");
	quest::say("Anything else I can $help you out with?");
	}
	elsif ($botclass == 2){#cleric
	quest::say("$bcup, $bcud, $bcuc");
	quest::say("$bcub, $bbme, $brez");
	quest::say("$btclm, $brstp, $brstd");
	quest::say("$brstf, $brstc");
	quest::say("Or can I $help you with something else?");	
	}
	elsif ($botclass == 4){#ranger
	quest::say("$btrk, $bend");
	quest::say("$bsowr, $bsowg, $bsoww");
	quest::say("Or can I $help you with something else?");
	}
	elsif ($botclass == 6){#druid
	quest::say("$bcup, $bcud, $bcuc"); 
	quest::say("$bcub, $bevc , $btrk"); 
	quest::say("$blevi,$binvs, $bend");
	quest::say("$bsowr, $bsowg, $bsoww");
	quest::say("Indoors: $bsow35 at 35th");
	quest::say("Indoors: $bsow50 at 50th");
	quest::say("$bchr, $bdire, $bpetr");
	quest::say("$brstm, $brstp, $brstd");
	quest::say("$brstf, $brstc");
	quest::say("$bdgl");
	quest::say("Or can I $help you with something else?");	
	}
	elsif ($botclass == 8){#bard
	quest::say("$btrk");
	quest::say("Or can I $help you with something else?");	
	}
	elsif ($botclass == 9){#rogue
	quest::say("$bplk(target & stand right on door)");
	quest::say("Or can I $help you with something else?");	
	}
	elsif ($botclass == 10){#shaman
	quest::say("$bcup, $bcud, $bcuc"); 
	quest::say("$bcub, $blevi, $bshk");
	quest::say("$bsowr, $bsowg, $bsoww");
	quest::say("$brstm, $brstp, $brstd"); 
	quest::say("$brstf, $brstc, $bend"); 
	quest::say("Or can I $help you with something else?");	
	}
	elsif ($botclass == 11){#necro
	quest::say("$bcorp, $blre, $binvsun");
	quest::say("$bchr, $bdire, $bpetr");
	quest::say("Or can I $help you with something else?");	
	}
	elsif ($botclass == 12){#wizard
	quest::say("$blre, $blevi"); 
	quest::say("$binvs, $binvsun, $bcinvs");
	quest::say("$bwgl");
	quest::say("Or can I $help you with something else?");	
	}
	elsif ($botclass == 13){#mage
	quest::say("$blre, $blevi");
	quest::say("$binvs, $bcinvs");
	quest::say("$bmage, $bmagw");
	quest::say("$bmaga, $bmagf, $bmagm");
	quest::say("Or can I $help you with something else?");	
	}
	elsif ($botclass == 14){#enchanter
	quest::say("$bmez(target)"); 
	quest::say("$btclm, $blre, $blevi");
	quest::say("$binvs, $bcinvs"); 
	quest::say("$brune, $bend");
	quest::say("$bchr, $bdire, $bpetr");
	quest::say("Or can I $help you with something else?");	
	}
	elsif ($botclass == 15){#Beastlord
	quest::say("$bsowr, $bsowg");
	quest::say("$bshk");
	quest::say("Or can I $help you with something else?");	
	}
}
if($text =~ /other/i)
	{
	quest::say("$braid, $bsvr");
	quest::say("$bspnr, $bgprd, $barch");
	quest::say("List $allclas commands");
	quest::say("Or can I $help you with something else?");	
	}
if($text =~ /List Druid Gate Locations/i)
	{	
	quest::say("$bdgkar, $bdgcom");
	quest::say("$bdgtox, $bdgbut");
	quest::say("$bdglav, $bdgro");
	quest::say("$bdgfee, $bdgste");
	quest::say("$bdgmis, $bdgwak");
	quest::say("$bdgice, $bdgdiv");
	quest::say("$bdgcob, $bdgcomb");
	quest::say("$bdgsur, $bdggri");
	quest::say("$bdgtwi, $bdgdaw");
	quest::say("$bdgnex, $bdgsto");
	quest::say("$bdgblo, $bdgeme");
	quest::say("$bdgsky, $bdgwos");
	quest::say("Or can I $help you with something else?");	
	}
if($text =~ /List Wizard Gate Locations/i)
	{
	quest::say("$bdgcom, $bdgtox");
	quest::say("$bdgro, $bdgwak");
	quest::say("$bdgice, $bdgdiv");
	quest::say("$bdgcob, $bdgcomb");
	quest::say("$bdggri, $bdgtwi");
	quest::say("$bdgdaw, $bdgnex");
	quest::say("$bdgsto, $bdgblo");
	quest::say("$bdgeme, $bdgsky");
	quest::say("$bdgwos, $bwgfay");
	quest::say("$bwgnk, $bwgwk");
	quest::say("$bwghate, $bwgair");
	quest::say("Or can I $help you with something else?");	
	}
if($text =~ /all clas/i)
	{
	quest::say("$bmez(target)");
	quest::say("$bplk(target & stand right on door)");
	quest::say("$bcup, $bcud, $bcuc"); 
	quest::say("$bcub, $bbme, $btrk");
	quest::say("$btclm, $bevc, $brez");
	quest::say("$bcorp, $blre, $blevi");
	quest::say("$bsowr, $bsowg, $bsoww");
	quest::say("$binvs, $binvsun, $bcinvs");
	quest::say("$brune, $bshk, $bend");
	quest::say("$bchr, $bdire, $bpetr");  
	quest::say("$bdgl, $bwgl");
	quest::say("$bmage, $bmagw");
	quest::say("$bmaga, $bmagf, $bmagm");
	quest::say("$brstm, $brstp, $brstd");
	quest::say("$brstf, $brstc");
	quest::say("Or can I $help you with something else?");	
	}
}
I left in the old All Class listing but placed it in a link in the Other section just in case I missed something and added a few more class bot commands I was missing (indoor sow for druids). Anyone see any #bot class commands I'm missing please let me know.

Think it would be feasible to add in a bot.pl function like we do for players so a server dev could just place this script in the templates folder so all bots would pull from a script like this?
Reply With Quote
  #8  
Old 07-22-2009, 03:10 AM
Krugus
Sarnak
 
Join Date: Dec 2005
Location: the Void
Posts: 40
Default ver 0.6 new and improved!

Updated the script yet again.

I got to thinking about bot spam. Got rid of quest::say and put in $client->Message and added color!

Code:
#Bot Event Script
#Just Hail and click!
#Most of the bot commands are listed here if you see one missing 
#click the #bot help to find the missing command.
#
# LAST EDIT DATE: July 22, 2009
# VERSION: 0.6
# By: Krugus
#

sub EVENT_SAY
{
my $help = quest::saylink("help");
my $general = quest::saylink("general");
my $bh = quest::saylink("#bot help");
my $bhc = quest::saylink("#bot help create");
my $bla = quest::saylink("#bot list all");
my $bu = quest::saylink("#bot update");
my $bga = quest::saylink("#bot group add");
my $bgr = quest::saylink("#bot group remove");
my $bgof = quest::saylink("#bot group order follow");
my $bgog = quest::saylink("#bot group order guard");
my $bgoa = quest::saylink("#bot group order attack");
my $bil = quest::saylink("#bot inventory list");
my $bgs = quest::saylink("#bot group summon");
my $bst = quest::saylink("#bot summon");
my $class = quest::saylink("class");
my $bmez = quest::saylink("#bot ai mez");
my $bplk = quest::saylink("#bot picklock");
my $bcup = quest::saylink("#bot cure poison");
my $bcud = quest::saylink("#bot cure disease");
my $bcuc = quest::saylink("#bot cure curse");
my $bcub = quest::saylink("#bot cure blindness");
my $bbme = quest::saylink("#bot bindme");
my $btrk = quest::saylink("#bot track");
my $btclm = quest::saylink("#bot target calm");
my $bil = quest::saylink("#bot inventory list");
my $bgs = quest::saylink("#bot group summon");
my $bst = quest::saylink("#bot summon");
my $bevc = quest::saylink("#bot evac");
my $brez = quest::saylink("#bot resurrectme");
my $bcorp = quest::saylink("#bot corpse summon");
my $blre = quest::saylink("#bot lore");
my $bsowr = quest::saylink("#bot sow regular");
my $bsowg = quest::saylink("#bot sow group");
my $bsoww = quest::saylink("#bot sow wolf");
my $binvs = quest::saylink("#bot invis live");
my $blevi = quest::saylink("#bot levitate");
my $brune = quest::saylink("#bot runeme");
my $bshk = quest::saylink("#bot shrinkme");
my $bend = quest::saylink("#bot endureb");
my $bchr = quest::saylink("#bot charm");
my $bdire = quest::saylink("#bot dire charm");
my $bpetr = quest::saylink("#bot pet remove");
my $bdgl = quest::saylink("List Druid Gate Locations");
my $bwgl = quest::saylink("List Wizard Gate Locations");
my $bdgkar = quest::saylink("#bot gate karana");
my $bdgcom = quest::saylink("#bot gate commons");
my $bdgtox = quest::saylink("#bot gate tox");
my $bdgbut = quest::saylink("#bot gate butcher");
my $bdglav = quest::saylink("#bot gate lava");
my $bdgro = quest::saylink("#bot gate ro");
my $bdgfee = quest::saylink("#bot gate feerrott");
my $bdgste = quest::saylink("#bot gate steamfont");
my $bdgmis = quest::saylink("#bot gate misty");
my $bdgwak = quest::saylink("#bot gate wakening");
my $bdgice = quest::saylink("#bot gate iceclad");
my $bdgdiv = quest::saylink("#bot gate divide");
my $bdgcob = quest::saylink("#bot gate cobalt");
my $bdgcomb = quest::saylink("#bot gate combines");
my $bdgsur = quest::saylink("#bot gate surefall");
my $bdggri = quest::saylink("#bot gate grimling");
my $bdgtwi = quest::saylink("#bot gate twilight");
my $bdgdaw = quest::saylink("#bot gate dawnshroud");
my $bdgnex = quest::saylink("#bot gate nexus");
my $bdgsto = quest::saylink("#bot gate stonebrunt");
my $bdgblo = quest::saylink("#bot gate bloodfields");
my $bdgeme = quest::saylink("#bot gate emerald");
my $bdgsky = quest::saylink("#bot gate skyfire");
my $bdgwos = quest::saylink("#bot gate wos");
my $bmage = quest::saylink("#bot magepet earth");
my $bmagw = quest::saylink("#bot magepet water");
my $bmaga = quest::saylink("#bot magepet air");
my $bmagf = quest::saylink("#bot magepet fire");
my $bmagm = quest::saylink("#bot magepet monster");
my $other = quest::saylink("other");
my $braid = quest::saylink("#bot raid help");
my $bsvr = quest::saylink("#bot saveraid");
my $bspnr = quest::saylink("#bot spawnraid");
my $bgprd = quest::saylink("#bot groupraid");
my $barch = quest::saylink("#bot archery");
my $bwgfay = quest::saylink("#bot gate fay");
my $bwgnk = quest::saylink("#bot gate nk");
my $bwgwk = quest::saylink("#bot gate wk");
my $bwghate = quest::saylink("#bot gate hateplane");
my $bwgair = quest::saylink("#bot gate airplane");
my $brstp = quest::saylink("#bot resist poison");
my $brstd = quest::saylink("#bot resist disease");
my $brstf = quest::saylink("#bot resist fire");
my $brstc = quest::saylink("#bot resist cold");
my $brstm = quest::saylink("#bot resist magic");
my $bcinvs = quest::saylink("#bot invis see");
my $binvsun = quest::saylink("#bot invis undead");
my $bsow35 = quest::saylink("#bot sow shrew");
my $bsow50 = quest::saylink("#bot sow feral");
my $allclas = quest::saylink("all clas");


if($text =~ /Hail/i)
	{
	my $npcn = $npc->GetName();
	$client->Message(14, "$npcn says Do you need $help $name?");
	}
if($text =~ /help/i)
	{
	my $npcn = $npc->GetName();
	$client->Message(14, "$npcn says Do you need help with $general, $class or $other commands ");
	}
if($text =~ /general/i)
	{
	my $npcn = $npc->GetName();
	$client->Message(14, "$npcn says $bh, $bhc, $bla");
	$client->Message(14, "$npcn says $bu, $bil");
	$client->Message(14, "$npcn says $bga(target), $bgr(target)");
	$client->Message(14, "$npcn says $bgs or $bst(target)");
	$client->Message(14, "$npcn says $bgof(target)");
	$client->Message(14, "$npcn says $bgog(target)");
	$client->Message(14, "$npcn says $bgoa(target)");
	$client->Message(15, "$npcn says Or can I $help you with something else?");	
	}
if($text =~ /class/i)
	{
	my $npcn = $npc->GetName();
	my $botclass = $npc->GetClass();
	if (($botclass == 1 || $botclass == 3|| $botclass == 5 || $botclass == 7 || $botclass ==16)){
	$client->Message(14, "$npcn says Look $name, I'm just here to get into a fight.");
	$client->Message(14, "$npcn says If you wanted a caster, you should have hired one.");
	$client->Message(15, "$npcn says Anything else I can $help you out with?");
	}
	elsif ($botclass == 2){#cleric
	$client->Message(14, "$npcn says $bcup, $bcud, $bcuc");
	$client->Message(14, "$npcn says $bcub, $bbme, $brez");
	$client->Message(14, "$npcn says $btclm, $brstp, $brstd");
	$client->Message(14, "$npcn says $brstf, $brstc");
	$client->Message(15, "$npcn says Or can I $help you with something else?");	
	}
	elsif ($botclass == 4){#ranger
	$client->Message(14, "$npcn says $btrk, $bend");
	$client->Message(14, "$npcn says $bsowr, $bsowg, $bsoww");
	$client->Message(15, "$npcn says Or can I $help you with something else?");
	}
	elsif ($botclass == 6){#druid
	$client->Message(14, "$npcn says $bcup, $bcud, $bcuc"); 
	$client->Message(14, "$npcn says $bcub, $bevc , $btrk"); 
	$client->Message(14, "$npcn says $blevi,$binvs, $bend");
	$client->Message(14, "$npcn says $bsowr, $bsowg, $bsoww");
	$client->Message(14, "$npcn says Indoors: $bsow35 at 35th");
	$client->Message(14, "$npcn says Indoors: $bsow50 at 50th");
	$client->Message(14, "$npcn says $bchr, $bdire, $bpetr");
	$client->Message(14, "$npcn says $brstm, $brstp, $brstd");
	$client->Message(14, "$npcn says $brstf, $brstc");
	$client->Message(14, "$npcn says $bdgl");
	$client->Message(15, "$npcn says Or can I $help you with something else?");	
	}
	elsif ($botclass == 8){#bard
	$client->Message(14, "$npcn says $btrk");
	$client->Message(15, "$npcn says Or can I $help you with something else?");	
	}
	elsif ($botclass == 9){#rogue
	$client->Message(14, "$npcn says $bplk(target & stand right on door)");
	$client->Message(15, "$npcn says Or can I $help you with something else?");	
	}
	elsif ($botclass == 10){#shaman
	$client->Message(14, "$npcn says $bcup, $bcud, $bcuc"); 
	$client->Message(14, "$npcn says $bcub, $blevi, $bshk");
	$client->Message(14, "$npcn says $bsowr, $bsowg, $bsoww");
	$client->Message(14, "$npcn says $brstm, $brstp, $brstd"); 
	$client->Message(14, "$npcn says $brstf, $brstc, $bend"); 
	$client->Message(15, "$npcn says Or can I $help you with something else?");	
	}
	elsif ($botclass == 11){#necro
	$client->Message(14, "$npcn says $bcorp, $blre, $binvsun");
	$client->Message(14, "$npcn says $bchr, $bdire, $bpetr");
	$client->Message(15, "$npcn says Or can I $help you with something else?");	
	}
	elsif ($botclass == 12){#wizard
	$client->Message(14, "$npcn says $blre, $blevi"); 
	$client->Message(14, "$npcn says $binvs, $binvsun, $bcinvs");
	$client->Message(14, "$npcn says $bwgl");
	$client->Message(15, "$npcn says Or can I $help you with something else?");	
	}
	elsif ($botclass == 13){#mage
	$client->Message(14, "$npcn says $blre, $blevi");
	$client->Message(14, "$npcn says $binvs, $bcinvs");
	$client->Message(14, "$npcn says $bmage, $bmagw");
	$client->Message(14, "$npcn says $bmaga, $bmagf, $bmagm");
	$client->Message(15, "$npcn says Or can I $help you with something else?");	
	}
	elsif ($botclass == 14){#enchanter
	$client->Message(14, "$npcn says $bmez(target)"); 
	$client->Message(14, "$npcn says $btclm, $blre, $blevi");
	$client->Message(14, "$npcn says $binvs, $bcinvs"); 
	$client->Message(14, "$npcn says $brune, $bend");
	$client->Message(14, "$npcn says $bchr, $bdire, $bpetr");
	$client->Message(15, "$npcn says Or can I $help you with something else?");	
	}
	elsif ($botclass == 15){#Beastlord
	$client->Message(14, "$npcn says $bsowr, $bsowg");
	$client->Message(14, "$npcn says $bshk");
	$client->Message(15, "$npcn says Or can I $help you with something else?");	
	}
}
if($text =~ /other/i)
	{
	my $npcn = $npc->GetName();
	$client->Message(14, "$npcn says $braid, $bsvr");
	$client->Message(14, "$npcn says $bspnr, $bgprd, $barch");
	$client->Message(14, "$npcn says List $allclas commands");
	$client->Message(15, "$npcn says Or can I $help you with something else?");	
	}
if($text =~ /List Druid Gate Locations/i)
	{
	my $npcn = $npc->GetName();
	$client->Message(14, "$npcn says $bdgkar, $bdgcom");
	$client->Message(14, "$npcn says $bdgtox, $bdgbut");
	$client->Message(14, "$npcn says $bdglav, $bdgro");
	$client->Message(14, "$npcn says $bdgfee, $bdgste");
	$client->Message(14, "$npcn says $bdgmis, $bdgwak");
	$client->Message(14, "$npcn says $bdgice, $bdgdiv");
	$client->Message(14, "$npcn says $bdgcob, $bdgcomb");
	$client->Message(14, "$npcn says $bdgsur, $bdggri");
	$client->Message(14, "$npcn says $bdgtwi, $bdgdaw");
	$client->Message(14, "$npcn says $bdgnex, $bdgsto");
	$client->Message(14, "$npcn says $bdgblo, $bdgeme");
	$client->Message(14, "$npcn says $bdgsky, $bdgwos");
	$client->Message(15, "$npcn says Or can I $help you with something else?");	
	}
if($text =~ /List Wizard Gate Locations/i)
	{
	my $npcn = $npc->GetName();
	$client->Message(14, "$npcn says $bdgcom, $bdgtox");
	$client->Message(14, "$npcn says $bdgro, $bdgwak");
	$client->Message(14, "$npcn says $bdgice, $bdgdiv");
	$client->Message(14, "$npcn says $bdgcob, $bdgcomb");
	$client->Message(14, "$npcn says $bdggri, $bdgtwi");
	$client->Message(14, "$npcn says $bdgdaw, $bdgnex");
	$client->Message(14, "$npcn says $bdgsto, $bdgblo");
	$client->Message(14, "$npcn says $bdgeme, $bdgsky");
	$client->Message(14, "$npcn says $bdgwos, $bwgfay");
	$client->Message(14, "$npcn says $bwgnk, $bwgwk");
	$client->Message(14, "$npcn says $bwghate, $bwgair");
	$client->Message(15, "$npcn says Or can I $help you with something else?");	
	}
if($text =~ /all clas/i)
	{
	my $npcn = $npc->GetName();
	$client->Message(14, "$npcn says $bmez(target)");
	$client->Message(14, "$npcn says $bplk(target & stand right on door)");
	$client->Message(14, "$npcn says $bcup, $bcud, $bcuc");
	$client->Message(14, "$npcn says $bcub, $bbme, $btrk");
	$client->Message(14, "$npcn says $btclm, $bevc, $brez");
	$client->Message(14, "$npcn says $bcorp, $blre, $blevi");
	$client->Message(14, "$npcn says $bsowr, $bsowg, $bsoww");
	$client->Message(14, "$npcn says $binvs, $binvsun, $bcinvs");
	$client->Message(14, "$npcn says $brune, $bshk, $bend");
	$client->Message(14, "$npcn says $bchr, $bdire, $bpetr");
	$client->Message(14, "$npcn says $bdgl, $bwgl");
	$client->Message(14, "$npcn says $bmage, $bmagw");
	$client->Message(14, "$npcn says $bmaga, $bmagf, $bmagm");
	$client->Message(14, "$npcn says $brstm, $brstp, $brstd");
	$client->Message(14, "$npcn says $brstf, $brstc");
	$client->Message(15, "$npcn says Or can I $help you with something else?");	
	}
}
Reply With Quote
  #9  
Old 07-22-2009, 12:51 PM
AndMetal
Developer
 
Join Date: Mar 2007
Location: Ohio
Posts: 648
Default

I honestly haven't used bots yet, but what if we incorporate the saylinks into the #bot command directly? That way, if you target a specific bot, if can be specific, and if not, it can be general.
__________________
GM-Impossible of 'A work in progress'
A non-legit PEQ DB server
How to create your own non-legit server

My Contributions to the Wiki
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 01:28 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3