Give hero spells and skill at map start
This script will, at the start of the map, find the first hero of the first player, and give him the Fireball spell, 10 points in knowledge, 100 spellpoints, and Expert Wisdom.
Trigger(MAP_START, "", "give_stuff");
function give_stuff()
player = GetPlayer(0);
hero = GetHero(player, 0);
GrantSpell(hero, SPELL_FIREBALL);
SetPrimarySkill(hero, PRIMARY_SKILL_KNOWLEDGE, 10);
SetSpellPoints(hero, 100);
SetSecondarySkill(hero, SECONDARY_SKILL_WISDOM, 3);
end
Give all player's heroes new troops at the start of the week
On Day 1 of every week after the first, this script will give all heroes belonging to the first player 50 skeletons, accompanied by a flavorful message.
Trigger(NEW_DAY, "", "grant_weekly_recruits");
function grant_weekly_recruits()
if GetDay() == 1 and not (GetWeek() == 1 and GetMonth() == 1) then
player = GetPlayer(0);
for i=0, GetNumHeroes(player)-1 do
hero = GetHero(player, i);
GrantArmy(hero, CREATURE_SKELETON, 50);
end;
MessageBox("More troops have risen to join our cause.");
end;
end;
Comments (0)
You don't have permission to comment on this page.