Go Back   EQEmulator Home > EQEmulator Forums > Quests > Quests::Completed

Quests::Completed This is where Completed quests are.

Reply
 
Thread Tools Display Modes
  #1  
Old 07-17-2007, 08:54 PM
Angelox
AX Classic Developer
 
Join Date: May 2006
Location: filler
Posts: 2,049
Default Buff Bot Example

This is an example of how far you can go with just a little imagination - I have two bots in PoK, one for mana and one for HP buffs. they med when no one's talking to them, stand when hailed, and talk/wave to each other.
Also, I had placed random signal scripts all around PoK so you get the impression they are oocing what they sell. I think this is an older script as I had also randomized their "time to ooc" so they would drive you nuts with their offers.

Code:
#zone:PoKnowledge
#Angelox

sub EVENT_SAY { 
if(($text=~/hail/i)&&($ulevel<= 45)){
$npc->SetAppearance(0);
quest::say("Hello $name, I can buff you with clarity for a fee of 5pp, and my friend over there has cleric buffs.");
quest::emote("waves at Qadar");
quest::doanim("29");
}
elsif(($text=~/hail/i)&&($ulevel=>46)){
$npc->SetAppearance(0);
quest::say("Hello $name, I can buff you with KEI for a fee of 15pp, and my friend over there has cleric buffs");
quest::emote("waves at Qadar");
quest::doanim("29");
 }
}

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

sub EVENT_ENTER
{
	$npc->SetAppearance(1);
	my $random_result = int(rand(100));
	if ($random_result<=15){
	quest::shout("Casting KEI and Clarity for donations on the rock behind the main bank!");
	}else{
	#Do Nothing
 }
}

sub EVENT_ITEM{
  if (($platinum>=15)&&($ulevel=> 46)){
    $npc->SetAppearance(0);
    quest::selfcast(2570);
    quest::say("Casting KEI, Good hunting!");
  }elsif(($platinum>=5)&&($ulevel<= 45)){
    $npc->SetAppearance(0);
    $npc->CastSpell(174,$userid);
    quest::say("Casting Clarity, Good hunting!");
  }else{
    quest::say("Thank you for your donation $name, it wasn't enough though ...");
 }
}

sub EVENT_SIGNAL {
quest::shout("Casting KEI and Clarity for donations on the rock behind the main bank!");
}
Reply With Quote
  #2  
Old 07-18-2007, 12:35 AM
GeorgeS
Forum Guide
 
Join Date: Sep 2003
Location: California
Posts: 1,474
Default

"Casting KEI and Clarity for donations on the rock behind the main bank..."
- that brings back memories!

Nice example


GeorgeS

Code:
sub EVENT_SAY {
if ($text =~/Hail/i)
{ quest::say("Greetings $name. If you want me to cast a spell on you, please say so and I will give you my [pricelist]. If you want me to [heal] you, please say so and I will do it for free."); }
if($text=~/pricelist/i)
{quest::say("I can cast the following spells : Spirit of Wolf = 1 pp // Dead Man Floating = 3 pp // Clarity II = 5 pp // Spiritual Light = 8 pp // Spiritual Radiance = 15 pp // Temperance = 1 peridot // Virtue = 4 peridots // KEI = 50 pp");}
if ($text=~/heal/i) { quest::selfcast(13); }
}
sub EVENT_ITEM
{
if($platinum == 1)
{
quest::selfcast(278);
}
if($platinum == 3)
{
quest::selfcast(457);
}
if($platinum == 5)
{
quest::selfcast(1693);
}
if($platinum == 8)
{
quest::selfcast(2176);
}
if($platinum == 15)
{
quest::selfcast(2177);
}
if($item1== 10028)
{
quest::selfcast(3692);
}
if($itemcount{10028} == 4)
{
quest::selfcast(3467);
}
if($platinum == 50)
{
quest::selfcast(2570);
}
}
QUOTE]
__________________
Your source for EQ database tools
Toolshop is open for business


http://www.georgestools.chrsschb.com//

Last edited by GeorgeS; 07-18-2007 at 08:39 AM..
Reply With Quote
  #3  
Old 02-01-2008, 04:03 AM
shawnluc
Fire Beetle
 
Join Date: Jan 2008
Posts: 8
Default

I apologize as this may sound like a stupid question.

Where, and how would I go about implementing this code into my server?

Thanks!

Soraken
Reply With Quote
  #4  
Old 02-01-2008, 04:28 AM
Secrets's Avatar
Secrets
Demi-God
 
Join Date: May 2007
Location: b
Posts: 1,447
Default

I prefer using a global system for buff 'credit'.

Code:
sub EVENT_SPAWN
{
quest::settimer(1,1);
}

sub EVENT_SAY 
{
	my $cost = 500;
	
	my $credit = $qglobals{buffcredit} ? $qglobals{buffcredit} : 0;

	if ($text =~ /hail/i)
	{
		quest::say("If you want some [buffs] say the keyword.. They will cost $cost plat.");
		$npc->SetAppearance(0);
		quest::settimer(1,10);
	}
	elsif ($text =~ /buffs/i)
	{
		if ($credit < $cost)
		{
			quest::say("No can do sir. You need ".($cost - $credit)." more plat!");
		}
		else
		{
			quest::selfcast(2112);
			quest::selfcast(2517);
			quest::selfcast(8199);
			quest::selfcast(1939);
			quest::selfcast(2517);
			if ($cost > 0)
			{
				$credit -= $cost;
				quest::setglobal('buffcredit', "$credit", 5, 'F');
				quest::say("Thanks $name!  You lost $cost and now have $credit.");
			}
		}
	}
}
 
sub EVENT_ITEM
{
	my $credit = $qglobals{buffcredit} ? $qglobals{buffcredit} : 0;
	
	if ($platinum > 0)
	{
		$credit += $platinum;
		quest::setglobal('buffcredit', "$credit", 5, 'F');
		quest::say("Thanks $name! You now have $credit in credit!");
	}
	else 
		{
		plugin::return_items(\%itemcount);
    		}
}

sub EVENT_TIMER
{
	if($timer eq "1")
		{
		$npc->SetAppearance(1);
		quest::stoptimer(1);
		quest::settimer(1,5);
		}
}
Reply With Quote
  #5  
Old 02-01-2008, 06:42 AM
Angelox
AX Classic Developer
 
Join Date: May 2006
Location: filler
Posts: 2,049
Default

Those are Perl Quests - they usually come with the package you downloaded, and you might already have them.

Quote:
Originally Posted by shawnluc View Post
I apologize as this may sound like a stupid question.
Where, and how would I go about implementing this code into my server?
Thanks!
Soraken
Reply With Quote
  #6  
Old 03-13-2008, 08:47 AM
Ut0pia
Sarnak
 
Join Date: Feb 2008
Posts: 72
Default

Hi, I'm trying to learn the how these bots are scripted in Perl but am having trouble understanding all the lines of code. Does anyone mind breaking each line down and explaining what they do so I can gain a further understanding of the Perl Scripts?
Reply With Quote
  #7  
Old 03-13-2008, 10:46 AM
Aramid
Discordant
 
Join Date: May 2006
Posts: 356
Default

Quote:
Originally Posted by Ut0pia View Post
Hi, I'm trying to learn the how these bots are scripted in Perl but am having trouble understanding all the lines of code. Does anyone mind breaking each line down and explaining what they do so I can gain a further understanding of the Perl Scripts?
Here would be your best source of what does what in the quest code:

http://www.eqemulator.net/wiki/wikka...=QuestTutorial
__________________
Random Segments of Code....
Reply With Quote
  #8  
Old 03-14-2008, 01:43 PM
GeorgeS
Forum Guide
 
Join Date: Sep 2003
Location: California
Posts: 1,474
Default

If you want, there are many examples on my quest editor. Also, there's a built in help/guide to assist.

GeorgeS
__________________
Your source for EQ database tools
Toolshop is open for business


http://www.georgestools.chrsschb.com//
Reply With Quote
  #9  
Old 03-16-2008, 10:36 AM
Ut0pia
Sarnak
 
Join Date: Feb 2008
Posts: 72
Default

Well, I was able to learn just about everything that the scripts here do. But when I created my own scripts, they didn't work. I posted the scripts in the Q/A section.

However, I do love examples. Where can I Find your quest examples GeorgeS
Reply With Quote
  #10  
Old 03-26-2008, 02:55 AM
HurtinuDaily
Hill Giant
 
Join Date: Nov 2005
Posts: 145
Default

Hey utopia this is spinningfists hows it going!? Should coem play on PvP with us!
Reply With Quote
  #11  
Old 03-26-2008, 04:56 PM
GeorgeS
Forum Guide
 
Join Date: Sep 2003
Location: California
Posts: 1,474
Default

DL the quest editor, and there are dozens of scripts to go by. Fill in the db.ini correctly, and you'll have access to the same scripts I did when learning the stuff. I believe all my quests are pre-tested and should work as is.


GeorgeS
__________________
Your source for EQ database tools
Toolshop is open for business


http://www.georgestools.chrsschb.com//
Reply With Quote
  #12  
Old 03-27-2008, 06:18 AM
Ut0pia
Sarnak
 
Join Date: Feb 2008
Posts: 72
Default

Quote:
Originally Posted by GeorgeS View Post
DL the quest editor, and there are dozens of scripts to go by. Fill in the db.ini correctly, and you'll have access to the same scripts I did when learning the stuff. I believe all my quests are pre-tested and should work as is.


GeorgeS
Thank you very much GeorgeS. Thankfully, I have been using your script editor for a few weeks now to check my Syntax. I completely understand the Buff Bot Script here now and have created my own as well as understand a lot of the examples in your script editor.

In fact, now that I've started to put together a design team, I'm requiring them to do use GeorgeS quest script editor at least once. I like it because it connects to the database. My own concern is that there is no way to do the same thing for the scripts. The scripts have to be gathered from locally from a network or same machine. I was wondering if there was any plans to allow it to connect to ftp sites to grab the files. Or perhaps there is another method.
Reply With Quote
  #13  
Old 03-27-2008, 02:03 PM
GeorgeS
Forum Guide
 
Join Date: Sep 2003
Location: California
Posts: 1,474
Default

I have debated over the FTP issue, and can definitely develop it so that's an option. I look into adding ftp access...


GeorgeS
__________________
Your source for EQ database tools
Toolshop is open for business


http://www.georgestools.chrsschb.com//
Reply With Quote
  #14  
Old 03-27-2008, 02:11 PM
Ut0pia
Sarnak
 
Join Date: Feb 2008
Posts: 72
Default

Quote:
Originally Posted by GeorgeS View Post
I have debated over the FTP issue, and can definitely develop it so that's an option. I look into adding ftp access...


GeorgeS
The problem is that the files if accessed via ftp, have to be opened on the client machine. So the file would have to be downloaded before it is opened. That's at least my understanding of how ftp works. Of course I could be wrong
Reply With Quote
  #15  
Old 05-26-2008, 01:58 PM
shawnluc
Fire Beetle
 
Join Date: Jan 2008
Posts: 8
Default

Anyone know if there is a call like the 'quest::selfcast' that will cast on the target?

I have setup one of my buffbots to do group buffs, but it only seems to buff one target at a time.

Thanks in advance!
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 03:03 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