488 |
488 |
489 function AnimationSetup() |
489 function AnimationSetup() |
490 -- DIALOG 01 - Start, welcome to moon |
490 -- DIALOG 01 - Start, welcome to moon |
491 AddSkipFunction(dialog01, Skipanim, {dialog01}) |
491 AddSkipFunction(dialog01, Skipanim, {dialog01}) |
492 table.insert(dialog01, {func = AnimWait, args = {hero.gear, 3000}}) |
492 table.insert(dialog01, {func = AnimWait, args = {hero.gear, 3000}}) |
493 table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("On the Ice Planet, where ice rules..."), 5000}}) |
493 table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("On the Ice Planet, where ice rules ..."), 5000}}) |
494 table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("Finally you are here..."), SAY_SAY, 2000}}) |
494 table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("Finally you are here!"), SAY_SAY, 2000}}) |
495 table.insert(dialog01, {func = AnimWait, args = {hero.gear, 2000}}) |
495 table.insert(dialog01, {func = AnimWait, args = {hero.gear, 2000}}) |
496 table.insert(dialog01, {func = AnimSay, args = {hero.gear, loc("Hi! Nice to meet you"), SAY_SAY, 3000}}) |
496 table.insert(dialog01, {func = AnimSay, args = {hero.gear, loc("Hi! Nice to meet you."), SAY_SAY, 3000}}) |
497 table.insert(dialog01, {func = AnimWait, args = {ally.gear, 2000}}) |
497 table.insert(dialog01, {func = AnimWait, args = {ally.gear, 2000}}) |
498 table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("Listen carefully! The bandit leader, Thanta, has recently found a very strange device"), SAY_SAY, 4000}}) |
498 table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("Listen carefully! The bandit leader, Thanta, has recently found a very strange device."), SAY_SAY, 4000}}) |
499 table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("He doesn't know it but this device is a part of the anti-gravity device"), SAY_SAY, 2500}}) |
499 table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("He doesn't know it but this device is a part of the anti-gravity device."), SAY_SAY, 2500}}) |
500 table.insert(dialog01, {func = AnimWait, args = {hero.gear, 8000}}) |
500 table.insert(dialog01, {func = AnimWait, args = {hero.gear, 8000}}) |
501 table.insert(dialog01, {func = AnimSay, args = {hero.gear, loc("Nice, then I should get the part as soon as possible!"), SAY_SAY, 4000}}) |
501 table.insert(dialog01, {func = AnimSay, args = {hero.gear, loc("Nice, then I should get the part as soon as possible!"), SAY_SAY, 4000}}) |
502 table.insert(dialog01, {func = AnimWait, args = {ally.gear, 4000}}) |
502 table.insert(dialog01, {func = AnimWait, args = {ally.gear, 4000}}) |
503 table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("Be careful, your gadgets won't work in the bandit area. You should get an ice gun"), SAY_SAY, 7000}}) |
503 table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("Be careful, your gadgets won't work in the bandit area. You should get an ice gun."), SAY_SAY, 7000}}) |
504 table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("There is one below us!"), SAY_SAY, 4000}}) |
504 table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("There is one below us!"), SAY_SAY, 4000}}) |
505 table.insert(dialog01, {func = AnimWait, args = {hero.gear, 500}}) |
505 table.insert(dialog01, {func = AnimWait, args = {hero.gear, 500}}) |
506 table.insert(dialog01, {func = AnimSwitchHog, args = {hero.gear}}) |
506 table.insert(dialog01, {func = AnimSwitchHog, args = {hero.gear}}) |
507 -- DIALOG 02 - Hero got to Thant2 |
507 -- DIALOG 02 - Hero got to Thant2 |
508 AddSkipFunction(dialog02, Skipanim, {dialog02}) |
508 AddSkipFunction(dialog02, Skipanim, {dialog02}) |
509 table.insert(dialog02, {func = AnimWait, args = {hero.gear, 3000}}) |
509 table.insert(dialog02, {func = AnimWait, args = {hero.gear, 3000}}) |
510 table.insert(dialog02, {func = AnimCaption, args = {hero.gear, loc("Congratulations, now you can take Thanta's device part..."), 5000}}) |
510 table.insert(dialog02, {func = AnimCaption, args = {hero.gear, loc("Congratulations, now you can take Thanta's device part!"), 5000}}) |
511 table.insert(dialog02, {func = AnimSay, args = {bandit1.gear, loc("Oh! Please spare me. You can take all my treasures!"), SAY_SAY, 3000}}) |
511 table.insert(dialog02, {func = AnimSay, args = {bandit1.gear, loc("Oh! Please spare me. You can take all my treasures!"), SAY_SAY, 3000}}) |
512 table.insert(dialog02, {func = AnimWait, args = {hero.gear, 5000}}) |
512 table.insert(dialog02, {func = AnimWait, args = {hero.gear, 5000}}) |
513 table.insert(dialog02, {func = AnimSay, args = {hero.gear, loc("I just want the strange device you found!"), SAY_SAY, 3000}}) |
513 table.insert(dialog02, {func = AnimSay, args = {hero.gear, loc("I just want the strange device you found!"), SAY_SAY, 3000}}) |
514 table.insert(dialog02, {func = AnimWait, args = {bandit1.gear, 4000}}) |
514 table.insert(dialog02, {func = AnimWait, args = {bandit1.gear, 4000}}) |
515 table.insert(dialog02, {func = AnimSay, args = {bandit1.gear, loc("Here! Take it..."), SAY_SAY, 3000}}) |
515 table.insert(dialog02, {func = AnimSay, args = {bandit1.gear, loc("Here! Take it!"), SAY_SAY, 3000}}) |
516 table.insert(dialog02, {func = actionsOnWin, args = {}}) |
516 table.insert(dialog02, {func = actionsOnWin, args = {}}) |
517 end |
517 end |
518 |
518 |
519 -------------- Other Functions ------------------- |
519 -------------- Other Functions ------------------- |
520 |
520 |
521 function actionsOnWin() |
521 function actionsOnWin() |
522 saveCompletedStatus(4) |
522 saveCompletedStatus(4) |
523 SendStat(siGameResult, loc("Congratulations, you acquired the device part!")) |
523 SendStat(siGameResult, loc("Congratulations, you acquired the device part!")) |
524 SendStat(siCustomAchievement, loc("At the end of the game your health was ")..GetHealth(hero.gear)) |
524 SendStat(siCustomAchievement, string.format(loc("At the end of the game your health was %d."), GetHealth(hero.gear))) |
525 -- maybe add number of tries for each part? |
525 -- maybe add number of tries for each part? |
526 SendStat(siPlayerKills,'1',teamC.name) |
526 SendStat(siPlayerKills,'1',teamC.name) |
527 SendStat(siPlayerKills,'0',teamB.name) |
527 SendStat(siPlayerKills,'0',teamB.name) |
528 EndGame() |
528 EndGame() |
529 end |
529 end |