EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Quests::Q&A (https://www.eqemulator.org/forums/forumdisplay.php?f=599)
-   -   Quest help (https://www.eqemulator.org/forums/showthread.php?t=21342)

hayward6 08-22-2006 04:39 AM

Quest help
 
Here's my work so far on the Hired hand quest I am designing for my server. Like I mentioned before I would like to give players the ability to hire npc help rather than fight alone if they chose. This is far from done, but this will help you get an idea of what im doing I need a few things to work this out...

1. I need the ability to make the summoned nps the same level as the player.
2. I need to make sure giving a certain amout of money can trigger the event.
3. I need to set a limit so only one helper can be assigned at a time to each player.

Here's what I have. This will be placed on an npc in freeport that everyone has so that the database wont need editing if someone else wishes to use it.

Code:

####################################
# Freeport Hired Hand Quest
#####################################
sub EVENT_SAY
{
 if($text=~/Hail/i)
  {
    quest::emote("Looks around the room carefully");
    quest::pause(2);
    quest::say("Hail. $name!  I had to be sure you were alone, this type of (buisness) is not always accepted among the people here.");
  }
  if($text=~/buisness/i)
  {
    quest::say("What! you don't know of my trade? Have you not heard of the Freeport Hired Hands? Oh come now, don't tell me you haven't come to hire an (Adventurer) from me.");
  }
  if($text=~/adventurer/i)
  {
    quest::say("Yes, an adventurer! I have some of the finest (cleric's), (Warrior's) and (Wizard's) Norrath has ever seen. If hired they will fight at your side for the day.");
  }
  if($text=~/cleric's/i)
  {
    quest::say("Yes the cleric's I have are very experienced and will help to keep you alive in combat. Trade me 2 Gold for the services of a Cleric for one day.");
  }
  if($text=~/warrior's/i)
  {
    quest::say("Yes the Warrior's I have are very experienced in battle and will protect you well. Trade me 4 Gold for the services of a Warrior for one day.");
  }
  if($text=~/Wizard's/i)
  {
    quest::say("Yes, the Wizard's I have are very experienced in battle and will assist you well. Trade me 6 Gold for the services of a Warrior for one day.");
}

#Summoning the Hired Hand Cleric 2 gold, Warrior 4 gold, Wizard 6 gold.

sub EVENT_ITEM
{
        #Cleric
        if($gold==2){
                quest::say("Thank you, this Cleric is among my finest and, will serve you well.");
                quest::givepet(npcid);
}
sub EVENT_ITEM
{
        #Warrior
        if($gold==4){
                quest::say("Thank you, this Warrior is among my finest and, will serve you well.");
                quest::givepet(npcid);
}
sub EVENT_ITEM
{
        #Wizard
        if($gold==6){
                quest::say("Thank you, this Wizard is among my finest and, will serve you well.");
                quest::givepet(npcid);
}

#end of quest


hayward6 08-22-2006 04:43 AM

And yes I know (npcid) isn't going to work... I stuck them in there as fillers :)

I think I figured out the money thing.

John Adams 08-23-2006 07:47 AM

Just guessing here, but I do not see a quest::spawn() where you can set the NPC attribs like the #spawn2 command in-game. It's likely you'd have to use the existing Pet data to spawn a helper around the players level? That could result in a large script, but I think you can test the player $level or something and spawn the pet that is closest.

Or, re-write one of the quest::spawn commands to accept level, stats, size attribs. :)

Let me know when you have that done. ~snicker~ j/k - I'll take a look, too, soon as this project @ work is done kicking my ass.

hayward6 08-23-2006 11:55 PM

Here's another question...

At what point is the pearl file accessed for quest data? Is it read for the entire game when the server is brought up, or is it read when the zone boots up?

I ask this because I want to be able to make small changes to the script so I can adjust this quest as needed, and right now I find that all editing to a pearl file while in the zone makes no difference at all. Even when I repop the zone it stays the way it was. Do I have to bring the server down between each and every edit if I want to check it?

Also I have put the quest I posted on a random npc in the Plane of Knowledge and he wont respond to a hail or money given. I have some changes to make I think.

John Adams 08-24-2006 02:26 AM

Modify your .pl file, and in-game, type #reloadpl (or an assortment of other reload commands that seem to do the same thing). That's how I am tuning PL files. Soon as I get one that actually does what I want, I plan on posting a set of updates. My problem is, I need additional quest script functionality, and I fear that may require writing the matching CPP code, and I am just not up to speed enough on that yet.

Angelox 08-24-2006 03:01 AM

Quote:

Originally Posted by John Adams
Modify your .pl file, and in-game, type #reloadpl (or an assortment of other reload commands that seem to do the same thing). That's how I am tuning PL files. Soon as I get one that actually does what I want, I plan on posting a set of updates. My problem is, I need additional quest script functionality, and I fear that may require writing the matching CPP code, and I am just not up to speed enough on that yet.

I'm glad you posted this - I've been re-loading the zone for fine tune. Leave it to me, and I'll always choose the longest route.
I can test them in my linux shell, and it will tell me if it's going to work at all (before I load them in the server).
Im the "backwords" guy here; I have my EQEMU server in XP (which is stripped of just about everything but the server and it's needs, for better perfomance), and my client is with Linux and Cedega. I started up a windows machine just so I could run the win binaries updates posted instead of compile under Linux.

hayward6 08-24-2006 11:48 AM

Well I worked out all the talking... but for the life of me I cant get the person to react at all to any type of money even using the script taken directly from the guide. Has something changed?

hayward6 08-24-2006 12:11 PM

It's quite possible that this quest will be the death of me... here's what I have so far, it works all the way up untill time to turn in money. the npc im placing this on simply will not respond to money turnins... yes I know the pet summon wont work anyways, but he should at least be saying his responce phrase to the money right? any help would be appreciated.

Code:

#Hired Hand's Quest

sub EVENT_SAY {
if($text=~/Hail/i){
    quest::emote("Looks around carefully");
    quest::pause(2);
    quest::say("Hail. $name!  I had to be sure you were alone, this type of (buisness) is not always accepted among the people here.");
}
if($text=~/buisness/i)
  {
    quest::say("What! you don't know of my trade? Have you not heard of the Freeport Hired Hands? Oh come now, don't tell me you haven't come to hire an (Adventurer) from me.");
  }
  if($text=~/adventurer/i)
  {
    quest::say("Yes, an adventurer! I have some of the finest (cleric's), (Warrior's) and (Wizard's) Norrath has ever seen. If hired they will fight at your side for the day.");
  }
  if($text=~/cleric's/i)
  {
    quest::say("Yes the cleric's I have are very experienced and will help to keep you alive in combat. Trade me 2 Gold for the services of a Cleric for one day.");
  }
  if($text=~/warrior's/i)
  {
    quest::say("Yes the Warrior's I have are very experienced in battle and will protect you well. Trade me 4 Gold for the services of a Warrior for one day.");
  }
  if($text=~/Wizard's/i)
  {
    quest::say("Yes, the Wizard's I have are very experienced in battle and will assist you well. Trade me 6 Gold for the services of a Warrior for one day.");
  }
}




sub EVENT_ITEM
{
if($copper == 2){
    quest::say("Thank you, this Cleric is among my finest and, will serve you well.");
    quest::givepet(npcid);}
}
sub EVENT_ITEM
{
if($copper == 4){
    quest::say("Thank you, this Warrior is among my finest and, will serve you well.");
    quest::givepet(npcid);}
}
sub EVENT_ITEM
{
if($copper == 6){
    quest::say("Thank you, this Wizard is among my finest and, will serve you well.");
    quest::givepet(npcid);
  }
}
#END (Quest writing Sucks!)


Aramid 08-24-2006 12:15 PM

If it's like your sample above, you have Multiple Sub EVENT_ITEM's. You should only have one

Code:

sub EVENT_ITEM
{
        #Cleric
        if($gold==2){
                quest::say("Thank you, this Cleric is among my finest and, will serve you well.");
                quest::givepet(npcid);
}
        #Warrior
        elsif($gold==4){
                quest::say("Thank you, this Warrior is among my finest and, will serve you well.");
                quest::givepet(npcid);
}

        #Wizard
        elsif($gold==6){
                quest::say("Thank you, this Wizard is among my finest and, will serve you well.");
                quest::givepet(npcid);
}
}
#end of quest


hayward6 08-25-2006 12:03 AM

Ok, it's working as written below. All I need to do now is make the actual pet summon work, make sure the pets are able to cross zone lines and set a check to make sure the player doesn't already have a pet... and add some text for an invalid turnin :) lots to do, good thing the weekend is coming.

Code:

#Hired Hand's Quest

sub EVENT_SAY {
if($text=~/Hail/i){
    quest::emote("Looks around carefully");
    quest::pause(2);
    quest::say("Hail. $name!  I had to be sure you were alone, this type of (buisness) is not always accepted among the people here.");
}
if($text=~/buisness/i)
  {
    quest::say("What! you don't know of my trade? Have you not heard of the Norrath Hired Hands? Oh come now, don't tell me you haven't come to hire an (Adventurer) from me.");
  }
  if($text=~/adventurer/i)
  {
    quest::say("Yes, an adventurer! I have some of the finest (cleric's), (Warrior's) and (Wizard's) Norrath has ever seen. If hired they will fight at your side for the day.");
  }
  if($text=~/cleric's/i)
  {
    quest::say("Yes the cleric's I have are very experienced and will help to keep you alive in combat. Trade me 2 Gold for the services of a Cleric for one day.");
  }
  if($text=~/warrior's/i)
  {
    quest::say("Yes the Warrior's I have are very experienced in battle and will protect you well. Trade me 4 Gold for the services of a Warrior for one day.");
  }
  if($text=~/Wizard's/i)
  {
    quest::say("Yes, the Wizard's I have are very experienced in battle and will assist you well. Trade me 6 Gold for the services of a Warrior for one day.");
  }
}

sub EVENT_ITEM {
        #Cleric
        if($gold==2){
                quest::say("Thank you, this Cleric is among my finest and, will serve you well.");
                quest::givepet(npcid);}
        #Warrior
        elsif($gold==4){
                quest::say("Thank you, this Warrior is among my finest and, will serve you well.");
                quest::givepet(npcid);}

        #Wizard
        elsif($gold==6){
                quest::say("Thank you, this Wizard is among my finest and, will serve you well.");
                quest::givepet(npcid);}
}
#end of quest


Cripp 08-25-2006 05:05 AM

for your item turn in..
Code:

sub EVENT_ITEM {
        #Cleric
        if($gold==2 && $class eq "Cleric"){
                quest::say("Thank you, this Cleric is among my finest and, will serve you well.");
                quest::givepet(npcid);}
        #Warrior
        elsif($gold==4 && $class eq "Warrior"){
                quest::say("Thank you, this Warrior is among my finest and, will serve you well.");
                quest::givepet(npcid);}

        #Wizard
        elsif($gold==6 && $class eq "Wizard"){
                quest::say("Thank you, this Wizard is among my finest and, will serve you well.");
                quest::givepet(npcid);}
}

would go with this so other classes cant get the wiz/war/cler pet

hayward6 08-25-2006 05:13 AM

I don't think I understand this... I don't want it restricted to certain classes at all. I want anyone to be able to go hire a pet and use it to fight with them. Like a Cleric may want to hire a fighter, a Bard may want to hire a wizard... like that. Did I misunderstand what your offering here?

Also remember that this is a huge work in progress. I have no idea right now how I will get the cleric pet to buff and heal a player. It works in eq live with the vet reward pet... so it is possible, but how we can do it here is all together different :)

Cripp 08-25-2006 05:38 AM

oooh i understand, misunderstood your quest
my bad


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

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.