477 |
477 |
478 function AnimationSetup() |
478 function AnimationSetup() |
479 -- DIALOG 01 - Start, getting info about the device |
479 -- DIALOG 01 - Start, getting info about the device |
480 AddSkipFunction(dialog01, Skipanim, {dialog01}) |
480 AddSkipFunction(dialog01, Skipanim, {dialog01}) |
481 table.insert(dialog01, {func = AnimWait, args = {hero.gear, 3000}}) |
481 table.insert(dialog01, {func = AnimWait, args = {hero.gear, 3000}}) |
482 table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("In the Planet of Sand, you have to double check your moves..."), 5000}}) |
482 table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("On the Planet of Sand, you have to double check your moves ..."), 5000}}) |
483 table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("Finally you are here..."), SAY_SAY, 2000}}) |
483 table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("Finally you are here!"), SAY_SAY, 2000}}) |
484 table.insert(dialog01, {func = AnimWait, args = {hero.gear, 2000}}) |
484 table.insert(dialog01, {func = AnimWait, args = {hero.gear, 2000}}) |
485 table.insert(dialog01, {func = AnimSay, args = {hero.gear, loc("Thank you for meeting me on such a short notice!"), SAY_SAY, 3000}}) |
485 table.insert(dialog01, {func = AnimSay, args = {hero.gear, loc("Thank you for meeting me on such a short notice!"), SAY_SAY, 3000}}) |
486 table.insert(dialog01, {func = AnimWait, args = {ally.gear, 4000}}) |
486 table.insert(dialog01, {func = AnimWait, args = {ally.gear, 4000}}) |
487 table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("No problem, I would do anything for H!"), SAY_SAY, 4000}}) |
487 table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("No problem, I would do anything for H!"), SAY_SAY, 4000}}) |
488 table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("Now listen carefully! Below us there are tunnels that have been created naturally over the years"), SAY_SAY, 4000}}) |
488 table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("Now listen carefully! Below us there are tunnels that have been created naturally over the years"), SAY_SAY, 4000}}) |
489 table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("I have heard that the local tribes say that many years ago some PAotH scientists were dumping their waste here"), SAY_SAY, 5000}}) |
489 table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("I have heard that the local tribes say that many years ago some PAotH scientists were dumping their waste here."), SAY_SAY, 5000}}) |
490 table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("H confirmed that there isn't such a PAotH activity logged"), SAY_SAY, 4000}}) |
490 table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("H confirmed that there isn't such a PAotH activity logged."), SAY_SAY, 4000}}) |
491 table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("So, I believe that it's a good place to start"), SAY_SAY, 3000}}) |
491 table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("So, I believe that it's a good place to start."), SAY_SAY, 3000}}) |
492 table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("Beware though! Many smugglers come often to explore these tunnels and scavenge whatever valuable items they can find"), SAY_SAY, 5000}}) |
492 table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("Beware, though! Many smugglers come often to explore these tunnels and scavenge whatever valuable items they can find."), SAY_SAY, 5000}}) |
493 table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("They won't hesitate to attack you in order to rob you!"), SAY_SAY, 4000}}) |
493 table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("They won't hesitate to attack you in order to rob you!"), SAY_SAY, 4000}}) |
494 table.insert(dialog01, {func = AnimWait, args = {hero.gear, 6000}}) |
494 table.insert(dialog01, {func = AnimWait, args = {hero.gear, 6000}}) |
495 table.insert(dialog01, {func = AnimSay, args = {hero.gear, loc("OK, I'll be extra careful!"), SAY_SAY, 4000}}) |
495 table.insert(dialog01, {func = AnimSay, args = {hero.gear, loc("Okay, I'll be extra careful!"), SAY_SAY, 4000}}) |
496 table.insert(dialog01, {func = AnimWait, args = {ally.gear, 2000}}) |
496 table.insert(dialog01, {func = AnimWait, args = {ally.gear, 2000}}) |
497 table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("There is the tunnel entrance"), SAY_SAY, 3000}}) |
497 table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("The tunnel entrance is over there."), SAY_SAY, 3000}}) |
498 table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("Good luck!"), SAY_SAY, 3000}}) |
498 table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("Good luck!"), SAY_SAY, 3000}}) |
499 table.insert(dialog01, {func = AnimWait, args = {hero.gear, 500}}) |
499 table.insert(dialog01, {func = AnimWait, args = {hero.gear, 500}}) |
500 table.insert(dialog01, {func = startMission, args = {hero.gear}}) |
500 table.insert(dialog01, {func = startMission, args = {hero.gear}}) |
501 end |
501 end |
502 |
502 |
549 end |
549 end |
550 |
550 |
551 function checkForWin() |
551 function checkForWin() |
552 if cratesFound == 0 then |
552 if cratesFound == 0 then |
553 -- have to look more |
553 -- have to look more |
554 AnimSay(hero.gear, loc("Haven't found it yet..."), SAY_THINK, 5000) |
554 AnimSay(hero.gear, loc("Haven't found it yet ..."), SAY_THINK, 5000) |
555 cratesFound = cratesFound + 1 |
555 cratesFound = cratesFound + 1 |
556 elseif cratesFound == 1 then |
556 elseif cratesFound == 1 then |
557 -- end game |
557 -- end game |
558 saveCompletedStatus(5) |
558 saveCompletedStatus(5) |
559 AnimSay(hero.gear, loc("Hoorah!!!"), SAY_SHOUT, 5000) |
559 AnimSay(hero.gear, loc("Hooray!"), SAY_SHOUT, 5000) |
560 SendStat(siGameResult, loc("Congratulations, you won!")) |
560 SendStat(siGameResult, loc("Congratulations, you won!")) |
561 SendStat(siCustomAchievement, loc("To win the game you had to collect the 2 crates with no specific order")) |
561 SendStat(siCustomAchievement, loc("To win the game you had to collect the 2 crates with no specific order.")) |
562 SendStat(siPlayerKills,'1',teamC.name) |
562 SendStat(siPlayerKills,'1',teamC.name) |
563 SendStat(siPlayerKills,'0',teamB.name) |
563 SendStat(siPlayerKills,'0',teamB.name) |
564 EndGame() |
564 EndGame() |
565 end |
565 end |
566 end |
566 end |
567 |
567 |
568 function lose() |
568 function lose() |
569 SendStat(siGameResult, loc("Hog Solo lost, try again!")) |
569 SendStat(siGameResult, loc("Hog Solo lost, try again!")) |
570 SendStat(siCustomAchievement, loc("To win the game you have to find the right crate")) |
570 SendStat(siCustomAchievement, loc("To win the game you have to find the right crate.")) |
571 SendStat(siCustomAchievement, loc("You can avoid some battles")) |
571 SendStat(siCustomAchievement, loc("You can avoid some battles.")) |
572 SendStat(siCustomAchievement, loc("Use your ammo wisely")) |
572 SendStat(siCustomAchievement, loc("Use your ammo wisely.")) |
573 SendStat(siCustomAchievement, loc("Don't destroy the device crate!")) |
573 SendStat(siCustomAchievement, loc("Don't destroy the device crate!")) |
574 SendStat(siPlayerKills,'1',teamB.name) |
574 SendStat(siPlayerKills,'1',teamB.name) |
575 SendStat(siPlayerKills,'0',teamC.name) |
575 SendStat(siPlayerKills,'0',teamC.name) |
576 EndGame() |
576 EndGame() |
577 end |
577 end |