Форум HeroesWorld-а - Показать сообщение отдельно - Скрипты
Тема: Скрипты
Показать сообщение отдельно
#2931
Старый 15.09.2019, 20:32
  #2931
^
Grigoriy
 
Аватар для Grigoriy
📖
Регистрация: 02.11.2016
Сообщения: 134
Регистрация: 02.11.2016
Сообщения: 134
По умолчанию
Re: Скрипты

GerterЕсть ли возможность через код включать/выключать подсветку объектов(которая при зажатии альта)? Скрипта точно нет, но может консольная команда есть?

Если бы такой чит был, мы бы уже о нём давно знали бы, да и, честно говоря, это необходимое зло в такой игре как Герои, в 3дшной её итерации.

А вот у меня, кстати, такой момент - пытаюсь реализовать квест с выполнением оного двумя путями: один через выплату золотом и ожидание н-ого кол-ва дней, а другой через нахождение нужного существа и его уничтожение. И вот с моментом ожидания какая-то беда, никак не хочет отрабатывать скрипт, как я только его там не крутил, причём никаких ошибок в консоли нет.
Скрипт:

	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 );
Grigoriy вне форума
Ответить с цитированием