Skip to content

Instantly share code, notes, and snippets.

Created February 17, 2017 05:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/bf08475bf8ac2d98abb9d6f6a362f846 to your computer and use it in GitHub Desktop.
Save anonymous/bf08475bf8ac2d98abb9d6f6a362f846 to your computer and use it in GitHub Desktop.
Changes to make the hero do not learn free spells and all sprite spells are displayed correctly in the Mage Guild.
Trigger(MAP_START, "", "give_spells");
Trigger(TOWN_LOADED, "Sorrow's End", "check_library");
startMap = 0;
mapVariables = {"startMap"};
function give_spells()
if startMap == 0 then
startMap = 1;
p = GetPlayer(0);
h = GetHero(p, 0);
GrantSpell(h, SPELL_METEOR_SHOWER);
SetPrimarySkill(h, PRIMARY_SKILL_KNOWLEDGE, 10);
SetSpellpoints(h, 100);
SetSecondarySkill(h, SECONDARY_SKILL_LEADERSHIP, 1);
SetSecondarySkill(h, SECONDARY_SKILL_WISDOM, 3);
p2 = GetPlayer(1);
h2 = GetHero(p2, 0);
GrantArmy(h2, CREATURE_BONE_DRAGON, 10);
end
end;
function check_library()
t = GetCurrentTown();
if HasVisitingHero(t) then
h = GetVisitingHero(t);
if HasArtifact(h, ARTIFACT_MAGES_RING_OF_POWER) then
TakeArtifact(h, ARTIFACT_MAGES_RING_OF_POWER);
MessageBox("The Mage's Ring fits easily in the keyhole of the sealed library door. Inside lie shelves packed with tomes.");
SetGuildSpell(t, 4, 0, SPELL_DIMENSION_DOOR);
SetGuildSpell(t, 4, 1, SPELL_SUMMON_WATER_ELEMENTAL);
SetGuildSpell(t, 4, 2, SPELL_SUMMON_EARTH_ELEMENTAL);
SetGuildSpell(t, 4, 3, SPELL_RESURRECT_TRUE);
BuildInCurrentTown(BUILDING_MAGE_GUILD);
BuildInCurrentTown(BUILDING_MAGE_GUILD);
BuildInCurrentTown(BUILDING_MAGE_GUILD);
BuildInCurrentTown(BUILDING_MAGE_GUILD);
BuildInCurrentTown(BUILDING_MAGE_GUILD);
SetNumGuildSpells(t, 0, 4);
SetNumGuildSpells(t, 1, 4);
SetNumGuildSpells(t, 2, 4);
SetNumGuildSpells(t, 3, 4);
SetNumGuildSpells(t, 4, 4);
end;
end;
end;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment