Auto-translated
Is there a way to enable/disable object highlighting (the one that appears when you hold down Alt) using code? I know there's no script for it, but maybe there's a console command?
If such a cheat existed, we would have known about it long ago, and frankly, it's a necessary evil in a game like Heroes, especially in its 3D iteration.
I'm having a different issue, though. I'm trying to implement a quest with two possible solutions: one involves paying gold and waiting a certain number of days, and the other involves finding and destroying a specific creature. The waiting period isn't working correctly; the script just won't execute, no matter how I try to modify it, and there are no errors in the console.
Script:
centHero = ""
SetObjectEnabled("cent0", nil);
SetDisabledObjectMode("cent0", DISABLED_INTERACT);
sleep(1);
function Centaurquest(heroname)
if GetCurrentPlayer()==1 and centavr == 0 then
StartAdvMapDialog( 2 );
sleep(5);
centavr = 1;
trader = 1;
MessageBox("Maps/SingleMissions/orcs2/centtext10.txt");
elseif GetCurrentPlayer()==1 and centavr == 1 and trader == 1 then
MessageBox("Maps/SingleMissions/orcs2/centtext1.txt");
elseif GetObjectOwner( heroname ) == PLAYER_1 and centavr == 1 and trader == 3 then
centHero = heroname
QuestionBox("Maps/SingleMissions/orcs2/centtext4.txt", "Centaurquestcomplite");
elseif GetCurrentPlayer()==1 and centavr == 2 then
MessageBox("Maps/SingleMissions/orcs2/centtext2.txt");
end;
end;
function Centaurquestcomplite()
if HasArtefact( centHero, 17 ) == true then
StartAdvMapDialog( 3 );
sleep(1);
PlayObjectAnimation( "cent0", "happy", ONESHOT );
sleep(1);
RemoveArtefact( centHero, 17 );
SetTownBuildingLimitLevel("port", TOWN_BUILDING_DWELLING_2, 2);
centavr = 2;
elseif HasArtefact( centHero, 17 ) == false then
MessageBox("Maps/SingleMissions/orcs2/centtext3.txt");
end;
end;
function Centaurquesttrader()
if GetCurrentPlayer()==1 and centavr == 1 and trader == 1 then
QuestionBox("Maps/SingleMissions/orcs2/centtext5.txt", "Traderyes", "Traderno");
end;
end;
function Traderyes()
if GetPlayerResource(PLAYER_1, GOLD) >= 10000 then
dealtime = GetDate(ABSOLUTE_DAY);
SetPlayerResource(PLAYER_1, GOLD, GetPlayerResource(PLAYER_1, GOLD) - 10000 );
sleep(1);
trader = 2;
RemoveObject("thief");
sleep(1);
elseif GetPlayerResource(PLAYER_1, GOLD) < 10000 then
MessageBox("Maps/SingleMissions/orcs2/ubivectext6.txt");
end;
end;
Trigger(NEW_DAY_TRIGGER, 'TradeDay');
function TradeDay()
if ((GetDate(ABSOLUTE_DAY) - dealtime) == 4) then
MessageBox("Maps/SingleMissions/orcs2/centtext8.txt");
GiveArtifact("главныйгерой", 17);
trader = 3;
end;
end;
function Traderno()
MessageBox("Maps/SingleMissions/orcs2/centtext7.txt");
end;
function Thiefdead()
while 1 do
sleep(10);
if IsObjectExists ("thief") == nil and trader == 0 then
MessageBox("Maps/SingleMissions/orcs2/centtext9.txt");
trader = 3;
break;
elseif IsObjectExists ("thief") == nil and trader == 1 then
MessageBox("Maps/SingleMissions/orcs2/centtext9.txt");
trader = 3;
break;
elseif IsObjectExists ("thief") == nil and trader == 2 then
MessageBox("Maps/SingleMissions/orcs2/centtext6.txt");
break;
end;
end;
end;
startThread( Thiefdead );