[Updated] Falling Inn

Started by Kazamatta, April 14, 2012, 03:21:17 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Kazamatta

This is The script for the Inn in the town of Laikim. Its the first place you head to after starting the game.

function Pause(caption){
  BeginOptions();
  AddOption(0,caption,"","");
  ProcessOptions();
}

function op1(){
  Echo("\nTarile: Well, come on in, have a drink.");
  Echo("\nThe man behind the bar steps toward you.");
  Pause("Continue...");
  Echo("\nTarile: I am Tarile and I own and operate this inn and tavern. Have a seat and get comfortable I will bring you some beer.");
}

function op2(){
  Echo("\nOld Man(in a demanding tone): No. Get Out Of Here!");
  Pause("Continue...");
  Echo("\nThe whole crowd breaks into loud roar of laughter." +
       "They realize they have nothing to fear from you and all " +
       "return to drinking their beer and talking");
  Pause("Continue...");
  Echo("\nThe man behind the bar steps toward you.");
  Echo("\Tarile: Don't pay them any mind." +
       "I used to be an adventurer myself when I was younger and I have learned " +
       "that respect is something that is always earned and never given.");
  Pause("Continue...");
  Echo("\nTarile: I am Tarile I own and operate this inn and tavern. Have a seat and get comfortable I will bring you some beer.");
}

function op3(){
  Echo("\nEverybody bursts into loud yells of joy and happiness as if this is more than they expected.");
  PartyGold -= 8;
  Echo("\nThe party lost 8 gold coins");
  Pause("Continue...");
  Echo("\nThe man behind the bar steps toward you.");
  Echo("\nTarile: I am Tarile I own and operate this inn and tavern. Have a seat and get comfortable i will bring you some beer.");
}

function OnFirstEnter(){
  Echo("\nAs soon as you walk in, all the talkin stops and the crowd turns to look at you standing in the doorway.");
  ClearOptions();
  AddOption(0,"Hi.We are looking for a place to stay for the night","op1();","");
  AddOption(0,"We have come a long way and are thirsty. May we enter?","op2();","");
  AddOption(0,"HEY! Next round on us","op3();","");
  ProcessOptions();
  ClearOptions();
  AddOption(0,"Wait...","","");
  ProcessOptions();
  Echo("\nHe returns after a few minutes bringing your beer.");
  return 0;
}