Go Back   EQEmulator Home > EQEmulator Forums > Quests > Quests::Q&A

Quests::Q&A This is the quest support section

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #6  
Old 12-26-2008, 11:16 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Here is an example of a quest that I currently use and know that it works:

Code:
#Explosive Storm

my $entity_id;

sub EVENT_SPAWN {

  quest::settimer("change_storm1",5);

}

sub EVENT_TIMER {

  if ($timer eq "change_storm1") {
    quest::stoptimer("change_storm1");
    quest::npctexture(2);
    quest::emote("gains more energy and becomes less stable.");
    quest::settimer("change_storm2",5); }

  if ($timer eq "change_storm2") {
    quest::stoptimer("change_storm2");
    quest::npctexture(1);
    quest::emote("gains even more energy and looks extremely dangerous.");
    quest::settimer("change_storm3",5); }
    
  if ($timer eq "change_storm3") {
    quest::stoptimer("change_storm3");
$npc->CastSpell(7758, $userid);
    quest::emote("explodes and disperses.");
    quest::depop(); }

}
I am not sure you can change multiple size/gender/race all at the same time without issues, but I imagine something like this might work:

Code:
my $randomrace = quest::ChooseRandom(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12);
my $randomgender = quest::ChooseRandom(0, 1);

sub EVENT_SPAWN {
   quest::settimer("RandRace", 1)
}

sub EVENT_TIMER {

my $raceset = $randomrace;

   if ($timer eq "RandRace") {
    quest::stoptimer("RandRace");
    quest::npcrace($raceset);
    quest::settimer("RandGender", 1)
  }

   if ($timer eq "RandGender") {
    quest::stoptimer("RandGender");
    quest::npcgender($randomgender);
    quest::settimer("SetRaceSize", 1)
  }

   if ($timer eq "SetRaceSize") {
    quest::stoptimer("SetRaceSize");
    if($raceset == 4){
      quest::npcsize(5);
    }
    if($raceset == 3){
      quest::npcsize(7);
    }
    if($raceset == 7){
      quest::npcsize(5);
    }
    if($raceset == 6){
      quest::npcsize(5);
    }
    if($raceset == 11){
      quest::npcsize(4);
    }
    if($raceset == 8){
      quest::npcsize(4);
    }
    if($raceset == 12){
      quest::npcsize(4);
    }
    if($raceset == 10){
      quest::npcsize(8);
    }
    if($raceset == 9){
      quest::npcsize(8);
    }
    if($raceset == 2){
      quest::npcsize(8);
    }

  }

}
I don't know if that will work or not, but maybe something like that.

Here is another example I use with random Race changing:

Code:
sub EVENT_ITEM {

  if($platinum == 100) {
    quest::say("H-h-h-happy Trick or T-t-treating!");
    quest::playerrace(quest::ChooseRandom(14,46,60,82,85)); }

  if($platinum == 500) {
    quest::say("Yar! H-h-h-happy Trick or T-t-treating!");
my $hgender = $client->GetBaseGender();
    quest::playerrace(quest::ChooseRandom(338,339,340,341,342));
    quest::playergender($hgender); }

}
You can also look at the Illusionist quest I have posted in the Custom section, but those are all for changing player race and genders.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
 


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 09:52 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 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3