EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Quests::Q&A (https://www.eqemulator.org/forums/forumdisplay.php?f=599)
-   -   Only talk to Bertoxxulous Deity (https://www.eqemulator.org/forums/showthread.php?t=26216)

JeremyOC 09-18-2008 01:10 PM

Only talk to Bertoxxulous Deity
 
ok i've looked pretty extensivly through the forums and I can't find anything to help me with this one. I want to make a quest that will only talk to people of that deity. Since I did not see a $deity command I have tried to limit class and race of the deity. This is what I have:

sub EVENT_SAY
{
if ($text=~ /Hail/i)
{
if ($class eq 'Cleric','Wizard','Enchanter','Warrior','Shadowkni ght','Necromancer','Rogue','Magician')
{
if ($race eq 'Human','Gnome','Halfelf')
{
quest::say("Do not move young $class, you know not the dangers that lurk in this place. I am Bertoxxulous your god, and ruler of this Crypt of Decay. You are a new born child of mine, so you will do my bidding or face the consequences. Will you bow to me?");
}
}
}

if ($text=~ /Hail/i)
{
if ($class ne 'Cleric','Wizard','Enchanter','Warrior','Shadowkni ght','Necromancer','Rogue','Magician')
{
if ($race ne 'Human','Gnome','Halfelf')
{
quest::say(Begone non-believer!)
quest::castspell($userid,797)
}
}
}


Please could someone tell me what I am doing wrong? Thank you.

Neiv 09-18-2008 03:52 PM

For one thing . . .
Quote:

quest::say(Begone non-believer!)
Try quest::say("Begone non-believer!"); instead (note the quotes around the say text and the semicolon after it). Likewise a semicolon for the quest::castspell function. (Why are you casting by userid instead of by client?)

I have never seen single quotation marks used (such as you have in your class and race arguments). Nor have I seen a comma operate as an "OR" argument (isn't it || instead?). But maybe I'm thinking of separating functions.

joligario 09-18-2008 06:22 PM

It's going to be a $client->something command. Page 125 of the lexicon shows the deity chart.

Few other things:
Like he said, should use an else block instead of another if block.

You need to have &&'s or ||'s in your if statement depending on how you want it to work.

Pretty sure it needs to be CastSpell().

Shadowknight is one word.

Hope all this helps you get going in the right direction.

cavedude 09-18-2008 07:13 PM

$client->GetDeity() is the object you need. Here is an example of its usage:

Code:

sub EVENT_SAY {
$deity = $client->GetDeity();
if($text=~/Hail/i && $deity == 207){
 quest::summonitem(66172);
}
 }

Here is a list of the Deity values: http://www.eqemulator.net/wiki/wikka...akka=DeityList

joligario 09-18-2008 07:32 PM

So following allong your direction above...

Code:

sub EVENT_SAY {
  my $deity = $client->GetDeity();

  if ($text=~/hail/i) {
    if ($deity==207) { #Karana
      quest::say("Do not move young $class, you know not the dangers that lurk in this place. I am Bertoxxulous your god, and ruler of this Crypt of Decay. You are a new born child of mine, so you will do my bidding or face the consequences. Will you bow to me?");
    }
    else {
      quest::say("Begone non-believer!");
      quest::CastSpell($userid,797);
    }
  }
}

Obviously you'll need to put in the proper deity that you want.

JeremyOC 09-18-2008 07:56 PM

That worked, you're the man cavedude.


All times are GMT -4. The time now is 01:30 PM.

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