Auto-translated
Please tell me what is wrong with the script. When you enter a specific region, it resets, and a message appears. After clicking the 'OK' button, a battle against the dwarves begins, 6 objects disappear from the map, 1 message appears, I am given 15 scouts, a dialog box appears, I click on one of the answers, and none of them work, and the quest also does not appear in the active quests. I am working with the message box function with multiple answers for the first time.
----Battle with the Dwarves (Starting Location)-----
function MessageBox3()
Trigger(REGION_ENTER_AND_STOP_TRIGGER, 'reg8',nil)
MessageBox("/Maps/SingleMissions/richman2/message_3.txt","OK_1");
end;
Trigger(REGION_ENTER_AND_STOP_TRIGGER, 'reg8','MessageBox3')
function OK_1()
sleep (1);
StartCombat("Raelag", nil, 4, 100, 3, 167, 15, 167, 15, 167, 15, nil);
sleep(5);
RemoveObject('q1');
RemoveObject('q2');
RemoveObject('q3');
RemoveObject('q4');
RemoveObject('q5');
RemoveObject('q6');
AddHeroCreatures("Raelag", 71, 15);
MessageBox("/Maps/SingleMissions/richman2/message_4.txt");
TalkBoxForPlayers(PLAYER_1,nil, nil,'/Maps/SingleMissions/richman2/dialog_1.txt',nil, 0,1,'/Maps/SingleMissions/richman2/zag1.txt', nil,0,'/Maps/SingleMissions/richman2/otvet1.txt','/Maps/SingleMissions/richman2/otvet2.txt','/Maps/SingleMissions/richman2/otvet3.txt','/Maps/SingleMissions/richman2/otvet4.txt')
end;
function MyTalkBoxCallback(player, answer)
if (answer < 1) then
return
end
if (answer == 1) then
MessageBox("/Maps/SingleMissions/richman2/message_5.txt");
elseif (answer == 2) then
MessageBox("/Maps/SingleMissions/richman2/message_5.txt");
elseif (answer == 3) then
MessageBox("/Maps/SingleMissions/richman2/message_6.txt");
elseif (answer == 4) then
MessageBox("/Maps/SingleMissions/richman2/message_7.txt");
StartCombat("Raelag", nil, 2, 121, 5, 121, 5, nil);
end
end;
GetObjectiveState('kv_1',OBJECTIVE_ACTIVE);
----Battle with the Dwarves (Starting Location)-----
function MessageBox3()
Trigger(REGION_ENTER_AND_STOP_TRIGGER, 'reg8',nil)
MessageBox("/Maps/SingleMissions/richman2/message_3.txt","OK_1");
end;
Trigger(REGION_ENTER_AND_STOP_TRIGGER, 'reg8','MessageBox3')
function OK_1()
sleep (1);
StartCombat("Raelag", nil, 4, 100, 3, 167, 15, 167, 15, 167, 15, nil);
sleep(5);
RemoveObject('q1');
RemoveObject('q2');
RemoveObject('q3');
RemoveObject('q4');
RemoveObject('q5');
RemoveObject('q6');
AddHeroCreatures("Raelag", 71, 15);
MessageBox("/Maps/SingleMissions/richman2/message_4.txt");
TalkBoxForPlayers(PLAYER_1,nil, nil,'/Maps/SingleMissions/richman2/dialog_1.txt',nil, 0,1,'/Maps/SingleMissions/richman2/zag1.txt', nil,0,'/Maps/SingleMissions/richman2/otvet1.txt','/Maps/SingleMissions/richman2/otvet2.txt','/Maps/SingleMissions/richman2/otvet3.txt','/Maps/SingleMissions/richman2/otvet4.txt')
end;
function MyTalkBoxCallback(player, answer)
if (answer < 1) then
return
end
if (answer == 1) then
MessageBox("/Maps/SingleMissions/richman2/message_5.txt");
elseif (answer == 2) then
MessageBox("/Maps/SingleMissions/richman2/message_5.txt");
elseif (answer == 3) then
MessageBox("/Maps/SingleMissions/richman2/message_6.txt");
elseif (answer == 4) then
MessageBox("/Maps/SingleMissions/richman2/message_7.txt");
StartCombat("Raelag", nil, 2, 121, 5, 121, 5, nil);
end
end;
GetObjectiveState('kv_1',OBJECTIVE_ACTIVE);