Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Database/World Building

Development::Database/World Building World Building forum, dedicated to the EQEmu MySQL Database. Post partial/complete databases for spawns, items, etc.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #3  
Old 05-03-2009, 10:59 AM
Derision
Developer
 
Join Date: Feb 2004
Location: UK
Posts: 1,540
Default

You need Rev457 for this to work correctly:

SQL
Code:
INSERT INTO `altadv_vars` (`skill_id`, `name`, `cost`, `max_level`, `hotkey_sid`, `hotkey_sid2`, `title_sid`, `desc_sid`, `type`, `spellid`, `prereq_skill`, `prereq_minpoints`, `spell_type`, `spell_refresh`, `classes`, `berserker`, `class_type`, `cost_inc`) VALUES 
(1373, 'Chaotic Jester', 0, 1, 1373, 1373, 1373, 1373, 4, 6882, 0, 0, 25, 72000, 65534, 1, 1, 0);

INSERT INTO `aa_actions` (`aaid`, `rank`, `reuse_time`, `spell_id`, `target`, `nonspell_action`, `nonspell_mana`, `nonspell_duration`, `redux_aa`, `redux_rate`) VALUES 
(1373, 0, 72000, 6882, 0, 0, 0, 0, 0, 0);

INSERT INTO `npc_types` (`id`, `name`, `lastname`, `level`, `race`, `class`, `bodytype`, `hp`, `gender`, `texture`, `helmtexture`, `size`, `hp_regen_rate`, `mana_regen_rate`, `loottable_id`, `merchant_id`, `npc_spells_id`, `npc_faction_id`, `mindmg`, `maxdmg`, `npcspecialattks`, `aggroradius`, `face`, `luclin_hairstyle`, `luclin_haircolor`, `luclin_eyecolor`, `luclin_eyecolor2`, `luclin_beardcolor`, `luclin_beard`, `d_meele_texture1`, `d_meele_texture2`, `runspeed`, `MR`, `CR`, `DR`, `FR`, `PR`, `see_invis`, `see_invis_undead`, `qglobal`, `AC`, `npc_aggro`, `spawn_limit`, `attack_speed`, `findable`, `STR`, `STA`, `DEX`, `AGI`, `_INT`, `WIS`, `CHA`, `see_hide`, `see_improved_hide`, `trackable`, `isbot`, `exclude`, `ATK`, `Accuracy`) VALUES 
(671, 'a_jester_of_bristlebane', NULL, 1, 153, 9, 1, 100, 2, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 'H', 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 75, 75, 75, 75, 80, 75, 75, 0, 0, 1, 0, 1, 0, 0);

INSERT INTO `pets` (`type`, `npcID`, `temp`) VALUES 
('PetVeteranRewardJester', 671, 1);
Note that I used the next free NPCType and Pet IDs from my copy of the PEQ DB, which I haven't updated in a while, so you may have to amend those.

With that SQL the AA appears under the PoP Adv. tab in Titanium and Special in SoF. It is a zero cost AA that anyone should be able to train, 22 hours re-use timer.

quests/templates/a_jester_of_bristlebane.pl
Code:
# quests/templates/a_jester_of_bristlebane.pl
#
# Quest file for Chaotic Jester Veteran AA
#
# The GetRandomClient code posted by Kayen on EQEmu forums.
#
sub GetRandomClient {

        my $ListCheck = 0;
        my $LastClient = 0;

        for ($ListCheck = 0; $ListCheck < 2000; $ListCheck++) {

                $ClientSearch = $entity_list->GetClientByID($ListCheck);

                if ($ClientSearch) {
                        my $DistanceCheck = $ClientSearch->CalculateDistance($x, $y, $z);
                        if ($DistanceCheck <= 100) {
                                my $ChooseClient = quest::ChooseRandom(1,2);
                                if ($ChooseClient == 2) {
                                        return $ClientSearch->GetID();
                                }
                                else {
                                        $LastClient = $ClientSearch;
                                }
                        }
                }

        }
        return $npc->GetFollowID();
}

sub EVENT_SPAWN {
        quest::settimer(RandomAction, 30);
        quest::settimer(Depop, 900);
}

sub EVENT_TIMER {

        if($timer eq "Depop") {
                quest::depop();
        }

        my $action = quest::ChooseRandom(1,2,3,4,5,6,7,8,9,10,11,12,13,14);

        if($action == 1) {
                $ClientID = GetRandomClient();
                if($ClientID > 0) {
                        $c = $entity_list->GetClientByID($ClientID);
                        if($c) {
                                quest::say("How about a little wine to quench your thirst?");
                                $c->SummonItem(quest::ChooseRandom(64046, 64047), 10);
                        }
                }
        }
        elsif($action == 2) {
                quest::say("I used to work nights as an entertainer for Fennin Ro. . .then he fired me.");
        }
        elsif($action == 3) {
                quest::say("My puns seem to get worse the older I get.  I guess I'm groaning up.");
        }
        elsif($action == 4) {
                $ClientID = GetRandomClient();
                if($ClientID > 0) {
                        quest::say("You need to be more down to earth.");
                        $npc->CastSpell(345, $ClientID);
                }
        }
        elsif($action == 5) {
                quest::say("You have the life expectancy of a blind elf in Kelethin.");
        }
        elsif($action == 6) {
                quest::say("What do you call an angry Berserker?  Anything they want you to!");
        }
        elsif($action == 7) {
                quest::say("What did one ranger say to the other ranger at the local pub?  Bind here often?");
        }
        elsif($action == 8) {
                $ClientID = GetRandomClient();
                if($ClientID > 0) {
                        quest::say("How's the weather up there?");
                        $npc->CastSpell(2522, $ClientID);
                }
        }
        elsif($action == 9) {
                $c = GetRandomClient();
                if($c > 0) {
                        quest::say("You look exhausted.");
                        $npc->CastSpell(6897, $c, 10, 0);
                }
        }
        elsif($action == 10) {
                $ClientID = GetRandomClient();
                if($ClientID > 0) {
                        $c = $entity_list->GetClientByID($ClientID);
                        if($c) {
                                quest::say("Try a bite of my tasty bread.  I make it myself.");
                                $c->SummonItem(quest::ChooseRandom(64044, 64045), 10);
                        }
                }
        }
        elsif($action == 11) {
                quest::say("This place really needs to lighten up.");
                $npc->CastSpell(30, 0, 10, 0);
        }
        elsif($action == 12) {
                quest::say("I've always heard that change must come from within but this is ridiculous.");
                $ClientID = GetRandomClient();
                if($ClientID > 0) {
                        $c = $entity_list->GetClientByID($ClientID);
                        if($c) {
                                $c->BuffFadeByEffect(58);
                                $IllusionSpell = quest::ChooseRandom(586, 590, 591, 587, 1731, 3063, 595, 583, 594, 589, 582, 243, 593);
                                $c->CastSpell($IllusionSpell, $ClientID, 10, 0);
                        }
                }
        }
        elsif($action == 13) {
                quest::say("I think monks use that 'weight thing' as an excuse to make me carry their bags.");
        }
        elsif($action == 14) {
                quest::say("Next time you visit the Plane of Mischief, say hello to the merry mushroom men for me.  Fun guys, all of them.");
        }
        else {
        }

}
Reply With Quote
 

Thread Tools
Display Modes

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