#Plane of air Raven
from eventAPI import *
from APIUtils import *

rtPOAWind1 = 0
rtPrinceofSongs = 0

def fireEvent(e):
   global rtPOAWind1
   global rtPrinceofSongs
   rtPOAWind1 = getTag(e, "rtPOAWind1")
   rtPrinceofSongs = getTag(e, "rtPrinceofSongs")
   if ((rtPOAWind1 == 1) and (rtPrinceofSongs == 0)):
      princeofSongs(e)
      return 1
   else:
      return 1

def princeofSongs(e):
   global rtPrinceofSongs
   showMessage(e, ["There is a curious bird sitting in a nearby tree.", "", "It regards you with black eyes."])
   showPicture(e, "Laneraven")
   showMessage(e, ["The bird flys a bit lower in the tree and flaps it's wings noisily at you.  Then, to your surprise, the bird speaks."])
   showMessage(e, ["\"I saw what you did.  Yes, we all saw it.  We had been waiting for someone to come.  Waiting for a long time now.\"", "", "The bird lifts it's head and sings.  The song is clear and strong and you feel exuberent and free."])
   showMessage(e, ["There is nothing psysically different with this bird than with any other bird you have ever seen, yet it still speaks to you in a clear, high voice."])
   showMessage(e, ["\"You have our thanks.  For now we can again soar and play and view the world from above.\""])
   showMessage(e, ["\"You are curious, yes?  We are chosen to live here and Wind is our master and our friend.  It was he who taught us speech and while we are here he is never lonely.\"", "", "Again, the bird Sings and you are overcome with a feeling of harmony and friendship with the curious creature."])
   showMessage(e, ["\"I am the Prince of Songs\"", "", "\"You are welcome here.  You may fly amonst the trees and soar upon Wind's wishes with us.\"", "",  "The bird bobs its head as if it were bowing and sings a quick song that makes you feel very welcome indeed."])
   showMessage(e, ["\"There is a servant of Flame still here.  He must be banished from our home.  Though we lack the strength, perhaps you can oust him from his place of hiding and return him to the realms of fire?\""])
   showMessage(e, ["\"I will watch and follow you.  Mind that the elementals are not to be trifled with.  They lack the logical mind and would harm you.  Do not fear them however, for they do not act on malice but only from instinct.\""])
   showMessage(e, ["With that, the Prince of Songs takes flight.  You can see him flying above, watching you and occasionaly singing a fragment of song that serves to fill you with confidence."])
   rtPrinceofSongs = 1
   setTag(e, "rtPrinceofSongs", rtPrinceofSongs)
   return 1
