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.

Reply
 
Thread Tools Display Modes
  #1  
Old 05-03-2009, 02:46 AM
Dreamblox
Fire Beetle
 
Join Date: Apr 2009
Location: Somewhere in the world
Posts: 3
Default Veteran AA?

Any info on the Vet AA's such as the Chaotic Jester? I thought they made the game so much fun then when you have them hehe.
Reply With Quote
  #2  
Old 05-03-2009, 08:28 AM
Derision
Developer
 
Join Date: Feb 2004
Location: UK
Posts: 1,540
Default

I was just thinking about this myself recently.

I spent some time today working on the Chaotic Jester. Mostly it was just SQL for the AA, pet and NPCType tables, and a perl quest for his random actions. There is a tiny bit of code support required to set his name and make him follow the person who spawned him (since he is classed as a swarm pet).

I'll post it all when I'm done.
Reply With Quote
  #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
  #4  
Old 05-03-2009, 11:54 AM
warhawk
Sarnak
 
Join Date: Mar 2008
Posts: 47
Default

Thats awesome, thanks Derision.

I found a list of the others for those that arn't familiar with these AA's
Veteran Rewards are as follows:

Year 1

Lesson of the Devoted: The player is surrounded by a beautiful blue/white glow as they gain double experience for half an hour every 24 hours.

Year 2

Infusion of the Faithful: Usable once every 24 hours, the player enjoys maximum resistances and statistics and a faster run speed for 15 minutes while he glows brightly with power.

Year 3
Chaotic Jester: Summons a Bristlebane puppet that persists for 15 minutes. Usable once every 24 hours, Bristlebane will randomly cast various spells that provide benefits or minor penalties.

Year 4

Expedient Recovery: Usable once per week, all the player’s corpses are summoned to their feet and given 100% experience resurrection.

Year 5

Steadfast Servant: Summons a creature that casts healing spells upon the player and others nearby. Lasts for half an hour and is usable once every 24 hours.

Year 6

Staunch Recovery: Usable once every 3 days, the player is fully healed with health, mana, and endurance fully restored.

Year 7

Intensity of the Resolute: Increases the power of the player’s abilities and heals substantially for 5 minutes once every 24 hours while the player is surrounded by a glow of energy.

Warhawk
Reply With Quote
  #5  
Old 05-04-2009, 06:44 PM
Dreamblox
Fire Beetle
 
Join Date: Apr 2009
Location: Somewhere in the world
Posts: 3
Default

Huge thanks Derision for the code hopefully others will find this topic if they ever wondered about the Vet. AA's.
Reply With Quote
  #6  
Old 05-05-2009, 07:15 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Just an FYI that the client search script is very CPU intensive and can start causing issues quick if over-utilized. I put this script on SH today and we are seeing a large jump in CPU utilization. We haven't confirmed if it is due to this new AA for sure or not, but I figured it was worth mentioning here just in case. If we find out for sure, I will let you guys know.

It would be great to have the client search added as a feature to the source and hopefully cut down a ton of overhead when using it. If we had a client list, we could be doing 20 FORs instead of 2000 :P

EDIT: FYI, it turns out that the High CPU Utilization and crashes were due to another issue in the source that has been fixed. Really, this script shouldn't be way too rough on a server as long as you didn't have like 30 of them up at the same time (essentially running the FOR 1 time per second average). And that is pretty unlikely to happen, at least not often. It would still be nice to have the client search code in the source though
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!

Last edited by trevius; 05-06-2009 at 06:42 AM..
Reply With Quote
  #7  
Old 06-13-2009, 02:28 PM
Derision
Developer
 
Join Date: Feb 2004
Location: UK
Posts: 1,540
Default

For those not using the PEQ database, here is the SQL to add:

Lesson of the devoted (requires Rev657).
Infusion of the faithful (Rev657 recommended).
Expedient recovery (requires Rev659).

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 (1371, 'Lesson of the Devoted', 0, 1, 1371, 1371, 1371, 1371, 8, 6880, 0, 0, 23, 72000, 65534, 1, 1, 0);
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 (1372, 'Infusion of the Faithful', 0, 1, 1372, 1372, 1372, 1372, 8, 6881, 0, 0, 24, 72000, 65534, 1, 1, 0);
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 (1374, 'Expedient Recovery', 0, 1, 1374, 1374, 1374, 1374, 8, 6883, 0, 0, 26, 590400, 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`, `redux_aa2`, `redux_rate2`) VALUES (1371, 0, 72000, 6880, 0, 0, 0, 0, 0, 0, 0, 0);
INSERT INTO `aa_actions` (`aaid`, `rank`, `reuse_time`, `spell_id`, `target`, `nonspell_action`, `nonspell_mana`, `nonspell_duration`, `redux_aa`, `redux_rate`, `redux_aa2`, `redux_rate2`) VALUES (1372, 0, 72000, 6881, 0, 0, 0, 0, 0, 0, 0, 0); 
INSERT INTO `aa_actions` (`aaid`, `rank`, `reuse_time`, `spell_id`, `target`, `nonspell_action`, `nonspell_mana`, `nonspell_duration`, `redux_aa`, `redux_rate`, `redux_aa2`, `redux_rate2`) VALUES (1374, 0, 590400, 6883, 0, 0, 0, 0, 0, 0, 0, 0);
Reply With Quote
Reply


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