Pastebin launched a little side project called HostCabi.net, check it out ;-)Don't like ads? PRO users don't see any ads ;-)
Guest

rescue1

By: ace on Sep 16th, 2010  |  syntax: None  |  size: 0.93 KB  |  hits: 24  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1.  private void rescue(Command command)
  2.           {
  3.              
  4.         if(!command.hasSecondWord())
  5.         {
  6.             // if there is no second word, we don't know where to go...
  7.             System.out.println("Rescue who?");
  8.             return;
  9.         }
  10.  
  11.        else
  12.        {
  13.        
  14.         String characterID = command.getSecondWord();
  15.        
  16.         if(characters.get(characterID).getCurrentRoom() == null);
  17.             {
  18.                 System.out.println("They are not here!");
  19.             }
  20.            
  21.        
  22.        else
  23.        {
  24.            if(characters.get(characterID).getCurrentRoom() == player.getCurrentRoom())
  25.         {
  26.             characters.get(characterID).setCurrentRoom(rooms.get("outside"));
  27.             System.out.println (("you have saved ") + characterID + (" !"));
  28.         }
  29.        
  30.         else
  31.         {
  32.             System.out.println("They are not here!");
  33.         }
  34.     }
  35. }