BEGIN BSULVAR

IF ~See(Player1)
Gender(Player1,FEMALE)
Global("BodhiStrongholdPledged","LOCALS",0)
Global("BodhiStronghold","GLOBAL",2)~ THEN BEGIN pledgeMaster1F
   SAY ~I will serve you, my mistress!~
IF ~~ THEN DO ~SetGlobal("BodhiStrongholdPledged","LOCALS",1)~ EXIT
END

IF ~See(Player1)
!Gender(Player1,FEMALE)
Global("BodhiStrongholdPledged","LOCALS",0)
Global("BodhiStronghold","GLOBAL",2)~ THEN BEGIN pledgeMaster1M
   SAY ~I will serve you, my master!~
IF ~~ THEN DO ~SetGlobal("BodhiStrongholdPledged","LOCALS",1)~ EXIT
END


IF ~See(Player1)
  Gender(Player1,FEMALE)
  Global("UlvarylResurrected","GLOBAL",1)~
THEN BEGIN greetingStartF
   SAY ~It's you! I didn't think of you anything other than food. Why did you resurrect me?~
   ++ ~I will let you live again, if you will serve me!~ + briefingNV1
   ++ ~I have a weakness for women.~ + briefingNV1   
   ++ ~Die, hag!~ + briefing3m
END


IF ~See(Player1)
!Gender(Player1,FEMALE)
  Global("UlvarylResurrected","GLOBAL",1)~
THEN BEGIN greetingStart
   SAY ~It's you! I didn't think of you anything other than food. Why did you resurrect me?~
   ++ ~I will let you live again, if you will serve me!~ + briefingNV1
   ++ ~I have a weakness for women.~ + briefingNV1
   ++ ~Die, hag!~ + briefing3f
END


IF ~~ briefingNV1
  SAY ~I can serve only Bodhi. I can obey you and do what you say, but it will be limited.~
  ++ ~You can join my party. Maybe you will change your sights.~ + briefing2
  ++ ~You are free to go. I release you.~ + briefing3
  ++ ~Die, hag!~ + briefing3f
END



IF ~~ briefing2
  SAY ~I have no choice. Right.~
  IF ~~ THEN DO ~
  MakeGlobal()
  SetGlobal("UlvarylResurrected","GLOBAL",2)
  DestroyItem("VVHULVAR")
  GiveItemCreate("VVCASKET",Myself,1,1,0) // Empty Casket		
  JoinParty()
  ~ EXIT
END

IF ~~ briefing3m
  SAY ~Hag?! I'll will cut off your dignity for this!~
  IF ~~ THEN DO ~SetGlobal("UlvarylResurrected","GLOBAL",2)
SetGlobal("UlvarylLeft","GLOBAL",1)  
Enemy()
//Berserk()
~ EXIT
END


IF ~~ briefing3f
  SAY ~Hag?! Look at you! Let's see how you will look like in my age!~
  IF ~~ THEN DO ~SetGlobal("UlvarylResurrected","GLOBAL",2)
  SetGlobal("UlvarylLeft","GLOBAL",1) 
Enemy()
//Berserk()
~ EXIT
END

IF ~~ briefing3
  SAY ~Goodbye, <CHARNAME>. I will be digging in memories of past.~
  IF ~~ THEN DO ~RunAwayFromNoInterrupt(Player1,50)
  SetGlobal("UlvarylResurrected","GLOBAL",2)
DestroySelf()
~ EXIT
END

//when thrown out
IF ~Gender(Player1,MALE)
!Global("BodhiStronghold","GLOBAL",2)
!InParty(Myself)~ THEN BEGIN GreetingVManB1
SAY ~Do you need to issue me commands, my master?~ 
 ++ ~Return, Ulvaryl, I need your skills.~ + notparty1
 ++ ~Stay here, Ulvaryl, I will return.~ + notparty2
  ++ ~You are free to go. I release you.~ + briefing3 
 ++ ~I decided to end your life.~ + briefing3f
END

IF ~~ notparty2
SAY ~Okay, master!~
IF ~~ THEN DO ~~ EXIT
END

IF ~Gender(Player1,FEMALE)
!Global("BodhiStronghold","GLOBAL",2)
!InParty(Myself)~ THEN BEGIN GreetingVFemB1
SAY ~Do you need to issue me commands, my mistress?~ 
 ++ ~Return, Ulvaryl, I need your skills.~ + notparty1
 ++ ~Stay here, Ulvaryl, I will return.~ + notparty2
  ++ ~You are free to go. I release you.~ + briefing3  
 ++ ~I decided to end your life.~ + briefing3f
END

IF ~Gender(Player1,FEMALE)
Global("BodhiStronghold","GLOBAL",2)
!InParty(Myself)~ THEN BEGIN GreetingVFemB1
SAY ~Do you need to issue me commands, my mistress?~ 
 ++ ~Return, Ulvaryl, I need your skills.~ + notparty1
 ++ ~Go to our Stronghold in Grave Yard District. I will find you there, if it will be needed.~ + notpartGoST
 ++ ~Stay here, Ulvaryl, I will return.~ + notparty2
  ++ ~You are free to go. I release you.~ + briefing3  
 ++ ~I decided to end your life.~ + briefing3f
END


IF ~Gender(Player1,MALE)
Global("BodhiStronghold","GLOBAL",2)
!InParty(Myself)~ THEN BEGIN GreetingVMAleB1
SAY ~Do you need to issue me commands, my master?~ 
 ++ ~Return, Ulvaryl, I need your skills.~ + notparty1
 ++ ~Go to our Stronghold in Grave Yard District. I will find you there, if it will be needed.~ + notpartGoST
 ++ ~Stay here, Ulvaryl, I will return.~ + notparty2
  ++ ~You are free to go. I release you.~ + briefing3  
 ++ ~I decided to end your life.~ + briefing3f
END

IF ~~ notparty1m
  SAY ~Heh...~
  IF ~~ THEN DO ~
	//	DestroyItem("VVUlvaryl")
	//	DestroyItem("MONHP1")
		JoinParty()~ EXIT
END

IF ~~ notparty1
  SAY ~Hoh...~
  IF ~~ THEN DO ~
		JoinParty()~ EXIT
END

IF ~~ notpartGoST
   SAY ~See you later.~
   IF ~~ THEN DO ~LeaveParty()
   RunAwayFromNoInterrupt(Player1,40)
   MoveBetweenAreas("AR0808",[1496.1044],S)~ EXIT
 END  

// talk in party

IF ~Gender(Player1,MALE)
InParty(Myself)
Race(Player1,VAMPIRE)~ THEN BEGIN GreetingManV1
SAY ~My master, do you need something from me?~ 
 ++ ~Are you hungry? You can suck my blood, Ulvaryl.~ + suckblood
 ++ ~Tell me your story, Ulvaryl.~ + talkUlvarylM
 ++ ~No, nothing right now, Ulvaryl.~ + byesilent
  ++ ~I decided to end your life.~ + briefing3f
END

IF ~Gender(Player1,FEMALE)
InParty(Myself)
Race(Player1,VAMPIRE)~ THEN BEGIN GreetingFemV1
SAY ~My mistress, do you need something from me?~ 
 ++ ~Are you hungry? You can suck my blood, Ulvaryl.~ + suckblood
 ++ ~Tell me your story, Ulvaryl.~ + talkUlvarylF
 ++ ~No, nothing right now, Ulvaryl.~ + byesilent
  ++ ~I decided to end your life.~ + briefing3f
END

IF ~Gender(Player1,MALE)
InParty(Myself)
!Race(Player1,VAMPIRE)~ THEN BEGIN GreetingMan1
SAY ~<CHARNAME>, do you need something from me?~ 
 ++ ~Are you hungry? You can suck my blood, Ulvaryl.~ + suckblood
 ++ ~Make me a vampire, Ulvaryl.~ + vampconvm
 ++ ~Tell me your story, Ulvaryl.~ + talkUlvarylM
 ++ ~No, nothing right now, Ulvaryl. Sorry.~ + byesilent
   ++ ~I decided to end your life.~ + briefing3f
END

IF ~Gender(Player1,FEMALE)
InParty(Myself)
!Race(Player1,VAMPIRE)~ THEN BEGIN GreetingFem1
SAY ~<CHARNAME>, do you need something from me?~ 
 ++ ~Are you hungry? You can suck my blood, Ulvaryl.~ + suckblood
 ++ ~Make me a vampire, Ulvaryl. I want to be a same blood with you.~ + vampconvf 
 ++ ~Tell me your story, Ulvaryl.~ +   talkUlvarylM
 ++ ~No, nothing right now, Ulvaryl. Sorry for disturbance.~ + byesilent
   ++ ~I decided to end your life.~ + briefing3f
END

IF ~~ byesilent
SAY ~As you wish!~
  IF ~~ THEN DO ~~ EXIT
END


IF ~~ talkUlvarylM
  SAY ~I was a handmaiden of Jon Irenicus, back in Suldanesselar. When Bodhi and Jon were exiled, I went with them to serve them as I pledged.~
  IF ~~ THEN GOTO talkUlvarylM2
END

IF ~~ talkUlvarylM2
  SAY ~I always helped Jon. When you came out of his laboratory and escaped, Jon was furious. He sent me to crypt of Bodhi and went after you. Because of you he got to Spellhold.~
  IF ~~ THEN GOTO talkUlvarylM3
END

IF ~~ talkUlvarylM3
  SAY ~I was taking care of his damaged apartment almost alone! It's a worst time in my life!~
  IF ~~ THEN EXIT
END


IF ~~ talkUlvarylF
  SAY ~I was a handmaiden of Jon Irenicus, back in Suldanesselar. When Bodhi and Jon were exiled, I went with them to serve them as I pledged.~
  IF ~~ THEN GOTO talkUlvarylF2
END

IF ~~ talkUlvarylF2
   SAY ~I always helped Jon. When you came out of his laboratory and escaped, Jon was furious. He sent me to crypt of Bodhi and went after you. Because of you he got to Spellhold.~
   IF ~~ THEN GOTO talkUlvarylF3
END

IF ~~ talkUlvarylF3
  SAY ~I was taking care of his damaged apartment almost alone! It's a worst time in my life!~
  IF ~~ THEN EXIT
END




IF ~~ suckblood
  SAY ~With great pleasure.~
  IF ~!Global("Player1RaceBlood","GLOBAL",4)~ THEN GOTO suckbloodNo  
  IF ~Global("Player1RaceBlood","GLOBAL",4)~ THEN GOTO suckblood2
END

IF ~~ suckbloodNo
  SAY ~Foo! Your blood is surely a poison!~
  IF ~~ THEN DO ~~ EXIT
END

IF ~~ suckblood2
  SAY ~Not bad, jundging by your appearance.~
  IF ~~ THEN DO ~ApplyDamagePercent(Player1,90,MAGIC)
  SetGlobalTimer("BloodlustTimer","LOCALS",ONE_DAY)
		ApplySpell(Myself,RESTORE_FULL_HEALTH)~ EXIT 
END

IF ~~ vampconvm
  SAY ~(Ulvaryl embraces you by neck and gets closer.)~
  IF ~!Global("Player1RaceBlood","GLOBAL",4)~ THEN GOTO suckbloodNo  
  IF ~Global("Player1RaceBlood","GLOBAL",4)~ THEN GOTO vampconv2
END


IF ~~ vampconvf
  SAY ~(Ulvaryl's teeth go out and gently bite you in your neck.)~
  IF ~!Global("Player1RaceBlood","GLOBAL",4)~ THEN GOTO suckbloodNo  
  IF ~Global("Player1RaceBlood","GLOBAL",4)~ THEN GOTO vampconv2
END

IF ~~ vampconv2
  SAY ~(Suddently you feel her teeths have pierced your skin and gone to carotid vein. Blood flow is distracted and becomes pulsating. You feel that your blood flows into Ulvaryl.)~
IF ~~ GOTO vampconv3
END

IF ~~ vampconv3
  SAY ~(Soon you feel great weakness, your throuths are clouded. And you loose consciousness.)~
IF ~~ GOTO vampconv4
END

IF ~~ vampconv4
  SAY ~(...You open your eyes. World around you have changed. You have changed. You feel coldness of your body and immediately you feel all-consuming hunger growing in you.)~
IF ~~ GOTO vampconv5
END

IF ~~ vampconv5
  SAY ~(You are now undead, as you wished. Now you feel presence of Ulvaryl and her foggy memories. You feel, that Ulvaryl is worried almost about little detail she sees as wrong.)~

  IF ~~ THEN DO ~
  ActionOverride(Player1,SetGlobal("ActorVampirisedLevel","LOCALS",2))
		ChangeStat(Player1,WIS,1,ADD)
		ChangeStat(Player1,INT,-1,ADD)
	

		SetGlobal("UlvarylVampirized","GLOBAL",1)	
	~ EXIT
END


