PDA

View Full Version : Server Rebuild and Update/Restore


Figback65
01-29-2013, 10:19 AM
Hey guys,


I have a question about restoring your servers. I had previously had a build from june 2012, lost my source on backup and now currently use a newer source from a few days ago. I noticed in some of the notes that some tables have changed and some tables had been added. After building the new source and restoring MY tables from a previous build, I have had some wierd issues. Some I have fixed due to files not being copied but I have others that I am wondering if its because of table mismatch? Is there a more proper way to restore a database? Some of the issues so far are as follows.

NPCs do not properly buff each other with correct faction settings, they do buff pets.

My noob guards are classes like BST, SK, SHM, not "guard" class, when the OGRES spawn as BST or SHM, they attack each other and will heal and buff each other while attacking another. This does not happen with any other racial guards that are set by classes. Only Ogres. They also buff pets priority one as well.

I have double checked the factions of the NPCs, everything that I can tell, is correct but, I am no pro. This did not happen before the rebuild.

Thank you!
Fig

Veeshans Classic Raid+++

c0ncrete
01-29-2013, 10:31 AM
if you knew the build you were using at the time, i would think that you could source in your backup then apply all of the updates to the database from utils/sql/svn. you probably don't want to try to restore an old backup to an up-to-date database. unless you were doing it via script, which is much more complicated.

Figback65
01-29-2013, 10:37 AM
Hmmm ok so restoring a backup to an up-to-date is bad. :/ I am not good with scripts in that sense either. So what are my options? Maybe just pick and choose what to restore on the new build instead of a full restore?

Figback65
01-29-2013, 10:45 AM
Can anybody think of a reason why NPCs would only buff pets and not other NPCs? for a hotfix?

c0ncrete
01-29-2013, 11:25 AM
as i mentioned, you might try to restore your old database, then run the updates found in utils/sql/svn. that should update your old tables to the current schema without messing with your existing data.

Figback65
01-30-2013, 10:12 AM
Thanks for the info c0ncrete. I tried searching for some tips but couldnt find any. Is there a general rule of thumb of how far back in required/optional updates I(someone) should start from when restoring a database? What about dealing with most of them being unsuccessfull as well? I tried applying some, none succeeded, nothing changed.


EDIT: Acutally I think i just came across it in a Disorder post, Is it from the revision number installed?

c0ncrete
01-30-2013, 10:46 AM
it should be from the revision number installed.

i've got a batch file sitting in source\utils\sql\svn that looks like this, just to make sure i cover all of my bases:

set /p USER=username:
set /p PASS=password:

mysql -u%USER% -p%PASS% --database=peq --force < 1711_account_restricted_aa.out > 1711_account_restricted_aa.out 2>&1
mysql -u%USER% -p%PASS% --database=peq --force < 1711_account_restricted_aa.sql > 1711_account_restricted_aa.out 2>&1
mysql -u%USER% -p%PASS% --database=peq --force < 1717_optional_rule_bash_stun_chance.sql > 1717_optional_rule_bash_stun_chance.out 2>&1
mysql -u%USER% -p%PASS% --database=peq --force < 1718_optional_rules_mod3s.sql > 1718_optional_rules_mod3s.out 2>&1
mysql -u%USER% -p%PASS% --database=peq --force < 1719_optional_triggerOnCastAAs.sql > 1719_optional_triggerOnCastAAs.out 2>&1
mysql -u%USER% -p%PASS% --database=peq --force < 1720_optional_sql_AAs.sql > 1720_optional_sql_AAs.out 2>&1
mysql -u%USER% -p%PASS% --database=peq --force < 1720_required_sql_AA_effects_update.sql > 1720_required_sql_AA_effects_update.out 2>&1
mysql -u%USER% -p%PASS% --database=peq --force < 1721_optional_sql_drakkin_breath_update.sql > 1721_optional_sql_drakkin_breath_update.out 2>&1
mysql -u%USER% -p%PASS% --database=peq --force < 1721_required_sql_altadv_vars_update.sql > 1721_required_sql_altadv_vars_update.out 2>&1
mysql -u%USER% -p%PASS% --database=peq --force < 1723_optional_sql_new_stats_window_rule.sql > 1723_optional_sql_new_stats_window_rule.out 2>&1
mysql -u%USER% -p%PASS% --database=peq --force < 1723_required_sql_corruption.sql > 1723_required_sql_corruption.out 2>&1
mysql -u%USER% -p%PASS% --database=peq --force < 1736_optional_sql_feral_swipe.sql > 1736_optional_sql_feral_swipe.out 2>&1
mysql -u%USER% -p%PASS% --database=peq --force < 1737_required_sql_rule_and_aa_update.sql > 1737_required_sql_rule_and_aa_update.out 2>&1
mysql -u%USER% -p%PASS% --database=peq --force < 1746_optional_sql_bot_manaregen.sql > 1746_optional_sql_bot_manaregen.out 2>&1
mysql -u%USER% -p%PASS% --database=peq --force < 1747_optional_HoT_zone_and_zonepoints.sql > 1747_optional_HoT_zone_and_zonepoints.out 2>&1
mysql -u%USER% -p%PASS% --database=peq --force < 1750_optional_sql_reflect_rule.sql > 1750_optional_sql_reflect_rule.out 2>&1
mysql -u%USER% -p%PASS% --database=peq --force < 1753_optional_haste_cap_rule.sql > 1753_optional_haste_cap_rule.out 2>&1
mysql -u%USER% -p%PASS% --database=peq --force < 1753_required_sql_healing_adept_aa.sql > 1753_required_sql_healing_adept_aa.out 2>&1
mysql -u%USER% -p%PASS% --database=peq --force < 1754_required_sql_healing_adept_aa_fix.sql > 1754_required_sql_healing_adept_aa_fix.out 2>&1
mysql -u%USER% -p%PASS% --database=peq --force < 1755_required_sql_fear_resist_aas.sql > 1755_required_sql_fear_resist_aas.out 2>&1
mysql -u%USER% -p%PASS% --database=peq --force < 1784_optional_corpsedrag_rules.sql > 1784_optional_corpsedrag_rules.out 2>&1
mysql -u%USER% -p%PASS% --database=peq --force < 1786_required_update_to_aas.sql > 1786_required_update_to_aas.out 2>&1
mysql -u%USER% -p%PASS% --database=peq --force < 1790_required_aa_required_level_cost.sql > 1790_required_aa_required_level_cost.out 2>&1
mysql -u%USER% -p%PASS% --database=peq --force < 1793_resist_adjust.sql > 1793_resist_adjust.out 2>&1
mysql -u%USER% -p%PASS% --database=peq --force < 1799_optional_rest_regen_endurance_rule.sql > 1799_optional_rest_regen_endurance_rule.out 2>&1
mysql -u%USER% -p%PASS% --database=peq --force < 1802_required_doppelganger.sql > 1802_required_doppelganger.out 2>&1
mysql -u%USER% -p%PASS% --database=peq --force < 1803_required_tasks_xpreward_signed.sql > 1803_required_tasks_xpreward_signed.out 2>&1
mysql -u%USER% -p%PASS% --database=peq --force < 1804_required_ae_melee_updates.sql > 1804_required_ae_melee_updates.out 2>&1
mysql -u%USER% -p%PASS% --database=peq --force < 1809_optional_rules.sql > 1809_optional_rules.out 2>&1
mysql -u%USER% -p%PASS% --database=peq --force < 1813_required_doppelganger_npcid_change.sql > 1813_required_doppelganger_npcid_change.out 2>&1
mysql -u%USER% -p%PASS% --database=peq --force < 1817_optional_npc_archery_bonus_rule.sql > 1817_optional_npc_archery_bonus_rule.out 2>&1
mysql -u%USER% -p%PASS% --database=peq --force < 1823_optional_delay_death.sql > 1823_optional_delay_death.out 2>&1
mysql -u%USER% -p%PASS% --database=peq --force < 1847_required_doors_dest_zone_size_32.sql > 1847_required_doors_dest_zone_size_32.out 2>&1
mysql -u%USER% -p%PASS% --database=peq --force < 1859_optional_item_casts_use_focus_rule.sql > 1859_optional_item_casts_use_focus_rule.out 2>&1
mysql -u%USER% -p%PASS% --database=peq --force < 1884_optional_bot_spells_update.sql > 1884_optional_bot_spells_update.out 2>&1
mysql -u%USER% -p%PASS% --database=peq --force < 1885_optional_rules_fv_pvp_expansions.sql > 1885_optional_rules_fv_pvp_expansions.out 2>&1
mysql -u%USER% -p%PASS% --database=peq --force < 1889_optional_skill_cap_rule.sql > 1889_optional_skill_cap_rule.out 2>&1
mysql -u%USER% -p%PASS% --database=peq --force < 1908_required_npc_types_definitions.sql > 1908_required_npc_types_definitions.out 2>&1
mysql -u%USER% -p%PASS% --database=peq --force < 1926_optional_stat_cap.sql > 1926_optional_stat_cap.out 2>&1
mysql -u%USER% -p%PASS% --database=peq --force < 1944_spawn2.sql > 1944_spawn2.out 2>&1
mysql -u%USER% -p%PASS% --database=peq --force < 1946_doors.sql > 1946_doors.out 2>&1
mysql -u%USER% -p%PASS% --database=peq --force < 1960_optional_console_timeout_rule.sql > 1960_optional_console_timeout_rule.out 2>&1
mysql -u%USER% -p%PASS% --database=peq --force < 1962_optional_guild_creation_window_rules.sql > 1962_optional_guild_creation_window_rules.out 2>&1
mysql -u%USER% -p%PASS% --database=peq --force < 1963_optional_rule_live_like_focuses.sql > 1963_optional_rule_live_like_focuses.out 2>&1
mysql -u%USER% -p%PASS% --database=peq --force < 1968_optional_enrage_rules.sql > 1968_optional_enrage_rules.out 2>&1
mysql -u%USER% -p%PASS% --database=peq --force < 1972_optional_extradmg_item_cap.sql > 1972_optional_extradmg_item_cap.out 2>&1
mysql -u%USER% -p%PASS% --database=peq --force < 1974_required_bot_spells_update.sql > 1974_required_bot_spells_update.out 2>&1
mysql -u%USER% -p%PASS% --database=peq --force < 1977_underwater.sql > 1977_underwater.out 2>&1
mysql -u%USER% -p%PASS% --database=peq --force < 1998_optional_intoxication_and_looting_rules.sql > 1998_optional_intoxication_and_looting_rules.out 2>&1
mysql -u%USER% -p%PASS% --database=peq --force < 2004_charges_alt_currency.sql > 2004_charges_alt_currency.out 2>&1
mysql -u%USER% -p%PASS% --database=peq --force < 2015_optional_specialization_training_rule.sql > 2015_optional_specialization_training_rule.out 2>&1
mysql -u%USER% -p%PASS% --database=peq --force < 2016_optional_rule_bot_aa_expansion.sql > 2016_optional_rule_bot_aa_expansion.out 2>&1
mysql -u%USER% -p%PASS% --database=peq --force < 2023_optional_mysqlcli.sql > 2023_optional_mysqlcli.out 2>&1
mysql -u%USER% -p%PASS% --database=peq --force < 2024_optional_update_crystals.sql > 2024_optional_update_crystals.out 2>&1
mysql -u%USER% -p%PASS% --database=peq --force < 2024_required_update.sql > 2024_required_update.out 2>&1
mysql -u%USER% -p%PASS% --database=peq --force < 2057_required_discovered_items.sql > 2057_required_discovered_items.out 2>&1
mysql -u%USER% -p%PASS% --database=peq --force < 2058_optional_rule_discovered_items.sql > 2058_optional_rule_discovered_items.out 2>&1
mysql -u%USER% -p%PASS% --database=peq --force < 2062_required_version_changes.sql > 2062_required_version_changes.out 2>&1
mysql -u%USER% -p%PASS% --database=peq --force < 2069_required_pets.sql > 2069_required_pets.out 2>&1
mysql -u%USER% -p%PASS% --database=peq --force < 2087_required_bots_hp_and_mana_and_spell_updates.s ql > 2087_required_bots_hp_and_mana_and_spell_updates.o ut 2>&1
mysql -u%USER% -p%PASS% --database=peq --force < 2098_required_zonepoint_version_changes.sql > 2098_required_zonepoint_version_changes.out 2>&1
mysql -u%USER% -p%PASS% --database=peq --force < 2099_required_discovered_items_account_status.sql > 2099_required_discovered_items_account_status.out 2>&1
mysql -u%USER% -p%PASS% --database=peq --force < 2104_required_group_roles.sql > 2104_required_group_roles.out 2>&1
mysql -u%USER% -p%PASS% --database=peq --force < 2107_required_bot_stances.sql > 2107_required_bot_stances.out 2>&1
mysql -u%USER% -p%PASS% --database=peq --force < 2129_required_lfguild.sql > 2129_required_lfguild.out 2>&1
mysql -u%USER% -p%PASS% --database=peq --force < 2133_required_faction_loot_despawn.sql > 2133_required_faction_loot_despawn.out 2>&1
mysql -u%USER% -p%PASS% --database=peq --force < 2136_extended_targets.sql > 2136_extended_targets.out 2>&1
mysql -u%USER% -p%PASS% --database=peq --force < 2142_emotes.sql > 2142_emotes.out 2>&1
mysql -u%USER% -p%PASS% --database=peq --force < 2154_optional_rule_spell_procs_resists_falloff.sql > 2154_optional_rule_spell_procs_resists_falloff.out 2>&1
mysql -u%USER% -p%PASS% --database=peq --force < 2156_optional_charm_break_rule.sql > 2156_optional_charm_break_rule.out 2>&1
mysql -u%USER% -p%PASS% --database=peq --force < 2159_optional_defensiveproc_rules.sql > 2159_optional_defensiveproc_rules.out 2>&1
mysql -u%USER% -p%PASS% --database=peq --force < 2164_require_bots_bottimers.sql > 2164_require_bots_bottimers.out 2>&1
mysql -u%USER% -p%PASS% --database=peq --force < 2171_optional_SpecialAttackACBonus_rule.sql > 2171_optional_SpecialAttackACBonus_rule.out 2>&1
mysql -u%USER% -p%PASS% --database=peq --force < 2176_optional_aa_expansion_SOF_fix.sql > 2176_optional_aa_expansion_SOF_fix.out 2>&1
mysql -u%USER% -p%PASS% --database=peq --force < 2176_optional_FrenzyBonus_rule.sql > 2176_optional_FrenzyBonus_rule.out 2>&1
mysql -u%USER% -p%PASS% --database=peq --force < 2176_required_aa_updates.sql > 2176_required_aa_updates.out 2>&1
mysql -u%USER% -p%PASS% --database=peq --force < 2178_required_aa_updates.sql > 2178_required_aa_updates.out 2>&1
mysql -u%USER% -p%PASS% --database=peq --force < 2183_optional_bot_xp_rule.sql > 2183_optional_bot_xp_rule.out 2>&1
mysql -u%USER% -p%PASS% --database=peq --force < 2185_optional_NPCFlurryChacne_rule.sql > 2185_optional_NPCFlurryChacne_rule.out 2>&1
mysql -u%USER% -p%PASS% --database=peq --force < 2185_optional_NPCFlurryChance_rule.sql > 2185_optional_NPCFlurryChance_rule.out 2>&1
mysql -u%USER% -p%PASS% --database=peq --force < 2185_required_aa_updates.sql > 2185_required_aa_updates.out 2>&1
mysql -u%USER% -p%PASS% --database=peq --force < 2188_optional_miscspelleffect_rules.sql > 2188_optional_miscspelleffect_rules.out 2>&1
mysql -u%USER% -p%PASS% --database=peq --force < 2188_required_aa_updates.sql > 2188_required_aa_updates.out 2>&1
mysql -u%USER% -p%PASS% --database=peq --force < 2189_optional_taunt_rules.sql > 2189_optional_taunt_rules.out 2>&1
mysql -u%USER% -p%PASS% --database=peq --force < 2195_required_sharedplatupdates.sql > 2195_required_sharedplatupdates.out 2>&1
mysql -u%USER% -p%PASS% --database=peq --force < 2208_optional_aa_stacking_rule.sql > 2208_optional_aa_stacking_rule.out 2>&1
mysql -u%USER% -p%PASS% --database=peq --force < 2208_optional_EnableSoulAbrasionAA.sql > 2208_optional_EnableSoulAbrasionAA.out 2>&1
mysql -u%USER% -p%PASS% --database=peq --force < 2208_required_aa_updates.sql > 2208_required_aa_updates.out 2>&1
mysql -u%USER% -p%PASS% --database=peq --force < 2209_optional_additive_bonus_rule.sql > 2209_optional_additive_bonus_rule.out 2>&1
mysql -u%USER% -p%PASS% --database=peq --force < 2213_loot_changes.sql > 2213_loot_changes.out 2>&1
mysql -u%USER% -p%PASS% --database=peq --force < 2214_faction_list_mod.sql > 2214_faction_list_mod.out 2>&1
mysql -u%USER% -p%PASS% --database=peq --force < 2215_required_aa_updates.sql > 2215_required_aa_updates.out 2>&1
mysql -u%USER% -p%PASS% --database=peq --force < 2243_optional_char_max_level_rule.sql > 2243_optional_char_max_level_rule.out 2>&1
mysql -u%USER% -p%PASS% --database=peq --force < 2260_probability.sql > 2260_probability.out 2>&1
mysql -u%USER% -p%PASS% --database=peq --force < 2262_required_pet_discipline_update.sql > 2262_required_pet_discipline_update.out 2>&1
mysql -u%USER% -p%PASS% --database=peq --force < 2264_required_aa_updates.sql > 2264_required_aa_updates.out 2>&1
mysql -u%USER% -p%PASS% --database=peq --force < 2268_required_updates.sql > 2268_required_updates.out 2>&1
mysql -u%USER% -p%PASS% --database=peq --force < 2274_optional_rule_iplimitdisconnectall.sql > 2274_optional_rule_iplimitdisconnectall.out 2>&1
mysql -u%USER% -p%PASS% --database=peq --force < 2278_optional_rule_targetableswarmpet.sql > 2278_optional_rule_targetableswarmpet.out 2>&1
mysql -u%USER% -p%PASS% --database=peq --force < 2280_optional_rule_targetableswarmpet-rename.sql > 2280_optional_rule_targetableswarmpet-rename.out 2>&1
mysql -u%USER% -p%PASS% --database=peq --force < 2283_required_npc_changes.sql > 2283_required_npc_changes.out 2>&1
mysql -u%USER% -p%PASS% --database=peq --force < 2299_required_inspectmessage_fields.sql > 2299_required_inspectmessage_fields.out 2>&1
mysql -u%USER% -p%PASS% --database=peq --force < 2300_optional_loot_changes.sql > 2300_optional_loot_changes.out 2>&1
mysql -u%USER% -p%PASS% --database=peq --force < 2340_required_maxbuffslotspet.sql > 2340_required_maxbuffslotspet.out 2>&1
mysql -u%USER% -p%PASS% --database=peq --force < 2361_required_qs_rule_values.sql > 2361_required_qs_rule_values.out 2>&1
mysql -u%USER% -p%PASS% --database=peq --force < 2370_required_aa_updates.sql > 2370_required_aa_updates.out 2>&1
mysql -u%USER% -p%PASS% --database=peq --force < 2376_required_aa_updates.sql > 2376_required_aa_updates.out 2>&1
mysql -u%USER% -p%PASS% --database=peq --force < 2380_optional_merc_data.sql > 2380_optional_merc_data.out 2>&1
mysql -u%USER% -p%PASS% --database=peq --force < 2380_optional_merc_merchant_npctypes_update.sql > 2380_optional_merc_merchant_npctypes_update.out 2>&1
mysql -u%USER% -p%PASS% --database=peq --force < 2380_optional_merc_rules.sql > 2380_optional_merc_rules.out 2>&1
mysql -u%USER% -p%PASS% --database=peq --force < 2383_required_group_ismerc.sql > 2383_required_group_ismerc.out 2>&1
mysql -u%USER% -p%PASS% --database=peq --force < 2428_optional_levelbasedexpmods.sql > 2428_optional_levelbasedexpmods.out 2>&1
mysql -u%USER% -p%PASS% --database=peq --force < 2448_optional_stun_proc_aggro_rule.sql > 2448_optional_stun_proc_aggro_rule.out 2>&1

Figback65
01-30-2013, 03:22 PM
I am totally stealing that .bat file :)

Through massive rebuilds today and yest, the ogre guards attacking each other is in my tables.

As for the NPC buff order. I found from a default 2294 +svn, I sat in TOFS, changed the ghosts spell list to a default pet list and watched them slowly buff up. They buff themselves > their own pets > other owners pets > other owners.

I am doing selective restores to pinpoint my ogre problem lol.

Thanks again c0ncrete!

Figback65
01-31-2013, 07:30 PM
Hmmm I dont know where i should post this besides continuing from my post. I figured out the issue with the ogres attacking finally. Im not sure if this needs to be fixed or what todo, but, Any NPCs with special attack U for unslowable, turns agressive after it gets targetted by a friendly npc for a buff, and attacks the buffer. I tested it on other NPCs as well.

trevius
02-01-2013, 04:14 AM
I am guessing the NPCs are buffing with Haste when the aggro happens. It is most likely due to this block of code:

spells.cpp
// slow and haste spells
if(SpecAttacks[UNSLOWABLE] && IsEffectInSpell(spell_id, SE_AttackSpeed))
{
mlog(SPELLS__RESISTS, "We are immune to Slow spells.");
caster->Message_StringID(MT_Shout, IMMUNE_ATKSPEED);
sint32 aggro = CheckAggroAmount(spell_id);
if(aggro > 0) {
AddToHateList(caster, aggro);
} else {
AddToHateList(caster, 1);
}
return true;
}

There probably needs to be a check added to see if the spell is a buff or debuff or if the SE_AttackSpeed amount being changed is positive or negative.

Uleat
02-01-2013, 01:43 PM
(I really hate piggy-backing a piggy-back...)

I was in Old Seb last night and had my GM flag on with a group of bots.

I had Trak targeted, and as soon as my enchanter's pet came within agro range, Trak attacked it..or one of my other bots.

I guess it could have been a haste spell being cast.