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

Development::Bots Forum for bots.

Closed Thread
 
Thread Tools Display Modes
  #1  
Old 04-17-2007, 04:21 AM
Magoth78
Discordant
 
Join Date: Jun 2003
Posts: 345
Default

Hello Georges, thanks for the answer.

Making bots to spawn wouldn't be the hardest job. As you said, you can use a perl script to make them spawn and follow you.

Now, as a part of a full project, I think it would be better to code a full interface for the bots using the #commands, perl scripts or maybe UI. Yes, because you will need to equip/unequip them, make group/raids depending of situations and assign tasks.

What I think would be the hard part (if not impossible, I don't know at this time) is to make them auto-join the group (so you can see their HP/Man bars) and acting as close as players do. That means they would have a group/Raid AI : melee1 will be the MT, melee2 will tank if any add, healers1 will heal melee1, healers2 will heal melee2, casters will assist melee1, etc...

I agree with you, that sounds like a dream

Later,
Mag
__________________
User's projects:
-- Original EMPIRE I/II and Factions! servers
-- Web GM Portal
-- EQoffline/bots
  #2  
Old 04-22-2007, 08:38 AM
Magoth78
Discordant
 
Join Date: Jun 2003
Posts: 345
Default

Maybe a dream will become real.

I've started to work on the project, there are the principal features:

1/ You can group with your bots.

Once you've spawned your bots, you can group with 5 of them. Their name and HPs are appearing in your normal group bar. If they are damaged or healed, you will see their HPs moving.

*** actually 5 is the limitation because I want to make everything working well in group then I'll start to work on raids.


2/ Attack limitations (melee + spells)

You can't attack your bots. Bots can't attack themselves. Bots can't attack their Master (you by default or any other player who grouped their bots).


3/ Moove

Once you've grouped your bots, they will follow you just like all the others mobs do when they're aggroing you. That's a great thing because they will never be stuck and if they re rooted/snared or anything else and you are far from them, they will always find their way to you.


4/ Master death, Bots death

If you die (or zone/disco/LD) you loose your actual bots and your group is disbanded. But don't worry, you can just spawn them and invite them in your group again.
If a bot dies, he disappears then leaves the group. Also, you can spawn it again and group it.


Now, I'm going to focus on the stats of the bots and their inventory. As I said on a previous post, I would like to give to a choosen bot an item that I've looted. This way, this bot will become stronger.
For that, I've 2 majors ways:
a) A perl quest per bot : once I gave an item to a bot, it gains the benefits of this items. Its stats are updgraded (if the item is better that he had) or downgraded (if I want to unequip this bot).
b) A web feature : A lot of things can be done with php.

When done, I will start to work on their AI. I really want to have the rogue Bots to go behind the mob, Mezzers bots doing some CC, etc... but I think there re a lot of job to do in order to make it working perfectly..


Later,
Mag
__________________
User's projects:
-- Original EMPIRE I/II and Factions! servers
-- Web GM Portal
-- EQoffline/bots
  #3  
Old 04-22-2007, 09:43 AM
Angelox
AX Classic Developer
 
Join Date: May 2006
Location: filler
Posts: 2,049
Default

Here's a helper Bot I started, but have since run out to finish; It actually follows you around and heals, buffs you at your request. I had it working in Gulf of Gunthark, Infact you can test it on the Rathe server;
First, you talk to Cadale Brohat at the vendors in Gunthak;
Code:
#zone: gunthak NPC: Cadale_Brohat (224209)
#Angelox

sub EVENT_SAY { 
if ($text=~/Hail/i){
  quest::emote("smiles widely at you. 'Welcome. You are brave to venture to Broken Skull Rock. Don't mind the others. Everyone is a bit touchy around here. If you are interested in dyes, feel free to peruse what I have to offer. Playing with them has given me hours of entertainment! Just be careful on this rock, and watch your back. Oh, before I forget, I'm looking for someone to help me with some [tasks] that I need to get done. All my time with the dyes has kept me from some of the more important things I need to take care of.'");
  quest::emote("Gets closer and whispers,'Or perhaps you might be interested in hiring some [help]?");
 }
elsif($text=~/help/i){
  quest::emote("chuckles, 'I have some mercenary friends interested in making some plat, they've asked me to handle their [pay]");
}
elsif(($text=~/pay/i)&&($class eq 'Warrior')){
  quest::emote("Whispers, 'Not so loud! I'm moonlighting here -  50 plat will get you help tell you leave this world'");
}
elsif(($text=~/pay/i)&&($class eq 'Paladin')){
  quest::emote("Whispers, 'Not so loud! I'm moonlighting here -  50 plat will get you help tell you leave this world'");
}
elsif(($text=~/pay/i)&&($class eq 'Shadowknight')){
  quest::emote("Whispers, 'Not so loud! I'm moonlighting here -  50 plat will get you help tell you leave this world'");
}
elsif(($text=~/pay/i)&&($class eq 'Ranger')){
  quest::emote("Whispers, 'Not so loud! I'm moonlighting here -  50 plat will get you help tell you leave this world'");
}
elsif(($text=~/pay/i)&&($class eq 'Monk')){
  quest::emote("Whispers, 'Not so loud! I'm moonlighting here -  50 plat will get you help tell you leave this world'");
}
elsif(($text=~/pay/i)&&($class eq 'Bard')){
  quest::emote("Whispers, 'Not so loud! I'm moonlighting here -  50 plat will get you help tell you leave this world'");
}
elsif(($text=~/pay/i)&&($class eq 'Rogue')){
  quest::emote("Whispers, 'Not so loud! I'm moonlighting here -  50 plat will get you help tell you leave this world'");
}
elsif(($text=~/pay/i)&&($class eq 'Berserker')){
  quest::emote("Whispers, 'Not so loud! I'm moonlighting here -  50 plat will get you help tell you leave this world'");
}
elsif($text=~/pay/i){
  quest::says("Sorry, this offer is only for melee-types");
 }
}

sub EVENT_ITEM{
  if ($platinum<=49){
    quest::say("Thank you for your donation $name, it wasn't enough though ...");
}
  elsif (($platinum>=50)&&($sandee==0)){
    quest::emote("summons a mercenary to your side");
    quest::spawn2(224236,1,0,-242.0,1521.1,4.1,108.4);
    quest::say("Here she is, be careful not to wander too far away from her, else she comes back to me");
    quest::delglobal("sandy");
    quest::setglobal("sandy",2,3,"F");
    $sandy=undef;
    $sandee=1;
    quest::delglobal("$name");
    quest::setglobal("$name",3,3,"F");
}
   elsif ($sandy==2){
    quest::say("Sorry, all mercenarys are in use.");
}
   elsif (${$name}==3){
    quest::say("You can only have one at a time.");
}
  elsif (($platinum>=50)&&($sandy==3)){
    quest::emote("summons a mercenary to your side");
    quest::spawn2(224236,1,0,-242.0,1521.1,4.1,108.4);
    quest::say("Here she is, be careful not to wander too far away from her, else she comes back to me");
    quest::delglobal("sandy");
    quest::setglobal("sandy",2,3,"F");
    $sandy=undef;
    quest::delglobal("$name");
    quest::setglobal("$name",3,3,"F");
}else{
    quest::say("Oops! I missed a possibilty!");
 }
}
Then , if you payed the right amount and are the proper class, Brohat will pop you some help - Merc Sandy ( A cool looking female dark elf);
Code:
# Angelox's EQ Bots
#Gunthak healer

sub EVENT_SAY { 
 if($class eq 'Cleric'){quest::say("Sorry, I can't help a cleric");
 }
 elsif($class eq 'Shaman'){
 quest::say("Sorry, I can't help a Shaman");
 }
 elsif($class eq 'Necromancer'){
 quest::say("Sorry, I can't help a Necro");
 }
 elsif($class eq 'Wizard'){
 quest::say("Sorry, I can't help a Wizard");
 }
 elsif($class eq 'Magician'){
 quest::say("Sorry, I can't help a Magician");
 }
 elsif($class eq 'Enchanter'){
 quest::say("Sorry, I can't help a Enchanter");
 }
 elsif($class eq 'Beastlord'){
 quest::say("Sorry, I can't help a Beastlord");
 }
 elsif($text=~/follow/i){
quest::clear_proximity();
quest::say("Following");
quest::follow($userid);
 }
 elsif($text=~/quit/i){
 quest::say("Ok, good-bye!");
 quest::delglobal("sandy");
 quest::setglobal("sandy","3","3","F");
 $sandy=undef;
 quest::delglobal("$name");
 quest::setglobal("$name","2","3","F");
 quest::clear_proximity();
 quest::depop();
}
elsif($text=~/hail/i){
quest::say("I'm ready $name, do you need to know the [commands]?");
}
elsif($text=~/commands/i){
quest::say("If you target and say [follow], then I will follow you,");
quest::say("If you target and say [stop], then I will stop, but don't go to far away, else you'll loose me,");
quest::say("If you target and say [quit], I will go away,");
quest::say("I can [heal] you with celestial healing, and I have [temperance] for buffs,");
quest::say("You have to trarget me for my attention.");
quest::say("Don't forget to tell me to [quit] when you're done.");
}
elsif($text=~/heal/i){
 quest::say("Casting celestial healing ...");
 quest::settimer("cheal1",5);
}
elsif($text=~/temp/i){
quest::say("Casting temperance ...");
quest::settimer("temp1",15);
}
elsif($text=~/stop/i){
 quest::clear_proximity();
 quest::depop();
 my $a = 224236;
 my $x = $npc->GetX();
 my $y = $npc->GetY();
 my $z = $npc->GetZ(); 
quest::spawn2($a,1,0,$x,$y,$z,$h);
quest::say("Ok, don't stray too far!");
 }
}

sub EVENT_SPAWN{
	$x = $npc->GetX();
	$y = $npc->GetY();
	quest::set_proximity($x - 120, $x + 120, $y - 120, $y + 120);
}

sub EVENT_EXIT{
	quest::depop();
	quest::delglobal("sandy");
	quest::setglobal("sandy","3","3","F");
	$sandy=undef;
	quest::delglobal("$name");
	quest::setglobal("$name","2","3","F");
}

sub EVENT_TIMER
{
    if ($timer eq "cheal1"){
        quest::stoptimer("cheal1");
        $npc->CastSpell(1444,$userid);
    }
    elsif ($timer eq "temp1"){
        quest::stoptimer("temp1");
        $npc->CastSpell(3692,$userid);
 }
}

sub EVENT_DEATH{
	quest::delglobal("sandy");
	quest::setglobal("sandy","3","3","F");
	$sandy=undef;
	quest::delglobal("$name");
	quest::setglobal("$name","2","3","F");
 }
Like I said, this little puppy works - I just need to finish it or maybe you can - right now I'm having a hell of a time recuperating some lost data from my server death, also am working, and my little bit of spare time goes to database work (Cavedude: Hatesfury is on its way!) .
I also had plans for this npc to cross into other zones with its owner via quest_globals
  #4  
Old 04-22-2007, 04:03 PM
Magoth78
Discordant
 
Join Date: Jun 2003
Posts: 345
Default

Hello angelox,

thanks for the idea.

Perl is surely the easiest way to command your bot. But the limitation of it is that you have to target one bot in order to make it doing an action. I'd prefer to have a bot that know what he can do depending of its class and in most situations..

Let's say you're grouped with 5 bots:
1 war, 1 rogue, 1 enchanter, 1 cleric, 1 shaman and you, 1 ranger

You're pulling.
- Once you or one of your bot has the aggro the war will taunt the mob (wich will become the main target of the group).
- The rogue(bot) will go behind it and start the dps.
- The enchanter(bot) will wait to see if any other mob aggro you or one of your bot. If so, he will mez it and keep it mezzed till the first mob dies. While the add is mezzed, he will cast some DD on the main target.
- The cleric(bot) will check the HPs of the group.
- The shaman(bot) will debuff the mob (debuff+dots), will check the buffs of the groups in fight.
- and you... you do what you want to

In the actual state, Perl doesn't permit me to automatize all theses tasks. But I could use it to start a particular AI on a given bot. For example, if I have 2 healers in group, I could set the main and the second healer or 1 bot will be healing and the second one will make dps...

Good day,
Mag
__________________
User's projects:
-- Original EMPIRE I/II and Factions! servers
-- Web GM Portal
-- EQoffline/bots
  #5  
Old 04-22-2007, 08:56 PM
Angelox
AX Classic Developer
 
Join Date: May 2006
Location: filler
Posts: 2,049
Default

There are at least two client programs that I know of that will do that. One is Xylobot - I used it before and worked very well.
  #6  
Old 04-22-2007, 10:30 PM
Magoth78
Discordant
 
Join Date: Jun 2003
Posts: 345
Default

Yes Xylo and MQ probably do the thing but client wise...

I will try to code that so it's server wise and only for the bots (mobs). As I've mentionned earlier the bots are mobs, not clients.

And that will make the work harder
__________________
User's projects:
-- Original EMPIRE I/II and Factions! servers
-- Web GM Portal
-- EQoffline/bots

Last edited by Magoth78; 04-23-2007 at 06:35 AM..
  #7  
Old 04-22-2007, 11:16 PM
mattmeck
Guest
 
Posts: n/a
Default

This would be useful for a lot of different things, a quest for a perma body guard, a quest where you have to help an NPC with a kill... etc etc.

I could see uses for this even on the legit servers.
Closed Thread


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 03:01 PM.


 

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