EQEmulator Forums

EQEmulator Forums (http://www.eqemulator.org/forums/index.php)
-   Support::Windows Servers (http://www.eqemulator.org/forums/forumdisplay.php?f=587)
-   -   Creating a new AA (http://www.eqemulator.org/forums/showthread.php?t=43477)

bingram 11-24-2021 08:04 PM

Creating a new AA
 
I was hoping to create a new AA using the SQL code below. I haven't been able to get it to work. Is it possible? Thanks!

Code:

/* CREATE NEW AA */
set @db_str_maxid = (select max(id) from db_str);
insert into db_str (id, type, value) values(@maxid + 1, 1, 'Strength Mutation');
insert into db_str (id, type, value) values(@maxid + 1, 4, 'You were born with more strength than normal.');
set @aa_ranks_maxid = (select max(id) from aa_ranks);
insert into aa_ranks (id, upper_hotkey_sid, lower_hotkey_sid, title_sid, desc_sid, cost, level_req, spell, spell_type, recast_time, expansion, prev_id, next_id)
values(@aa_ranks_maxid + 1, -1, -1, @db_str_maxid + 1, @db_str_maxid + 1, 0, 1, -1, 0, 0, 0, -1, -1);
set @aa_ability_maxid = (select max(id) from aa_ability);
insert into aa_ability (id, name, category, classes, races, drakkin_heritage, deities, status, type, charges, grant_only, first_rank_id, enabled, reset_on_death)
values(@aa_ability_maxid + 1, 'Strength Mutation', 5, 65535, 65535, 127, 131071, 0, 4, 0, 1, @aa_ranks_maxid + 1, 1, 0);
insert into aa_rank_effects (rank_id, slot, effect_id, base1, base2) values(@aa_ranks_maxid + 1, 1, 4, 50, 0); /* STR */
insert into aa_rank_effects (rank_id, slot, effect_id, base1, base2) values(@aa_ranks_maxid + 1, 2, 7, 50, 0); /* STA */

/* ASSIGN AA TO CHARACTER */
insert into character_alternate_abilities (id, aa_id, aa_value, charges) values(1, 30196, 1, 0)


bingram 11-25-2021 11:27 AM

I figured out that the aa_id in character_alternate_abillities should be from aa_ranks, not aa_ability.


All times are GMT -4. The time now is 11:21 PM.

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