SelectionBox(msg, list)
Displays a message box with a selection list (like the one of the Town Portal spell) and with "OK" and "CANCEL" buttons.
Example of use:
h = GetCurrentHero();
rewardDeclined = 0;
MessageBox("After a brilliant performance, the Guardian comes to you and offers you a well deserved reward.");
msg = "Choose your reward!";
list = {"Traveler's Boots of Mobility", "Army of 50 Master Swordmen", "20 units of Crystal", "25000 Gold"};
choice = SelectionBox(msg, list);
if choice == 0 then -- the player has chosen to click on the "CANCEL" button.
MessageBox("Too bad you refuse the reward, I'm disappointed. But maybe I do not know everything and it will bring you luck later?");
rewardDeclined = 1;
elseif choice == 1 then
GrantArtifact(h, ARTIFACT_TRAVELERS_BOOTS_OF_MOBILITY);
elseif choice == 2 then
GrantArmy(h, CREATURE_MASTER_SWORDSMAN, 50);
elseif choice == 3 then
GiveResource(GetHeroOwner(h), RESOURCE_CRYSTAL, 20);
elseif choice == 4 then
GiveResource(GetHeroOwner(h), RESOURCE_GOLD, 25000);
end;