|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Quests::Completed This is where Completed quests are. |
|
|
|
07-17-2007, 08:54 PM
|
AX Classic Developer
|
|
Join Date: May 2006
Location: filler
Posts: 2,049
|
|
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!");
}
|
|
|
|
|
|
|
07-18-2007, 12:35 AM
|
Forum Guide
|
|
Join Date: Sep 2003
Location: California
Posts: 1,474
|
|
"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]
Last edited by GeorgeS; 07-18-2007 at 08:39 AM..
|
|
|
|
02-01-2008, 04:03 AM
|
Fire Beetle
|
|
Join Date: Jan 2008
Posts: 8
|
|
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
|
|
|
|
02-01-2008, 04:28 AM
|
|
Demi-God
|
|
Join Date: May 2007
Location: b
Posts: 1,447
|
|
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);
}
}
|
|
|
|
02-01-2008, 06:42 AM
|
AX Classic Developer
|
|
Join Date: May 2006
Location: filler
Posts: 2,049
|
|
Those are Perl Quests - they usually come with the package you downloaded, and you might already have them.
Quote:
Originally Posted by shawnluc
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
|
|
03-13-2008, 08:47 AM
|
Sarnak
|
|
Join Date: Feb 2008
Posts: 72
|
|
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?
|
03-13-2008, 10:46 AM
|
Discordant
|
|
Join Date: May 2006
Posts: 356
|
|
Quote:
Originally Posted by Ut0pia
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....
|
03-14-2008, 01:43 PM
|
Forum Guide
|
|
Join Date: Sep 2003
Location: California
Posts: 1,474
|
|
If you want, there are many examples on my quest editor. Also, there's a built in help/guide to assist.
GeorgeS
|
03-16-2008, 10:36 AM
|
Sarnak
|
|
Join Date: Feb 2008
Posts: 72
|
|
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
|
03-26-2008, 02:55 AM
|
Hill Giant
|
|
Join Date: Nov 2005
Posts: 145
|
|
Hey utopia this is spinningfists hows it going!? Should coem play on PvP with us!
|
03-26-2008, 04:56 PM
|
Forum Guide
|
|
Join Date: Sep 2003
Location: California
Posts: 1,474
|
|
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
|
|
|
|
03-27-2008, 06:18 AM
|
Sarnak
|
|
Join Date: Feb 2008
Posts: 72
|
|
Quote:
Originally Posted by GeorgeS
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.
|
|
|
|
03-27-2008, 02:03 PM
|
Forum Guide
|
|
Join Date: Sep 2003
Location: California
Posts: 1,474
|
|
I have debated over the FTP issue, and can definitely develop it so that's an option. I look into adding ftp access...
GeorgeS
|
03-27-2008, 02:11 PM
|
Sarnak
|
|
Join Date: Feb 2008
Posts: 72
|
|
Quote:
Originally Posted by GeorgeS
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
|
05-26-2008, 01:58 PM
|
Fire Beetle
|
|
Join Date: Jan 2008
Posts: 8
|
|
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!
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -4. The time now is 03:03 AM.
|
|
|
|
|
|
|
|
|
|
|
|
|