BEGIN CMGKALI2




IF ~See(Player1)
  Gender(Player1,FEMALE)
  Global("LilithResurrected","GLOBAL",1)~
THEN BEGIN greetingStartF
   SAY ~Ah, you. Why did you resurrect me?~
   ++ ~I wanted to know more about Kali.~ + briefingNV1
   ++ ~I have a weakness for women.~ + briefingNV2   
   ++ ~I wanted to kill you again!~ + briefing3f
END


IF ~See(Player1)
!Gender(Player1,FEMALE)
  Global("LilithResurrected","GLOBAL",1)~
THEN BEGIN greetingStart
   SAY ~Ah, you. Why did you resurrect me?~
   ++ ~I wanted to know more about Kali.~ + briefingNV1
   ++ ~I have a weakness for women.~ + briefingNV2  
   ++ ~I wanted to kill you again!~ + briefing3f
END


IF ~~ briefingNV1
  SAY ~I see. So what do you want to do with me? Remember, Kali watches over all vampires.~
  ++ ~Join my party, and we will find out what we can do for Kali.~ + briefing2  
  ++ ~You are free. I release you.~ + briefing3
  ++ ~Die, bloodsucker!~ + briefing3f
END



IF ~~ briefingNV2
  SAY ~I see. You want a pleasure, do you?~
  ++ ~Join my party, and we will find out.~ + briefing2w  
  ++ ~You are free. I release you.~ + briefing3
  ++ ~Die, bloodsucker!~ + briefing3f
END


IF ~~ briefing2
  SAY ~For Kali bloodlust!~
  IF ~~ THEN DO ~
  MakeGlobal()
  SetGlobal("LilithResurrected","GLOBAL",2)
  DestroyItem("cmgforg1")
  GiveItemCreate("VVCASKET",Myself,1,1,0) // Empty Casket		
  JoinParty()
  ~ EXIT
END


IF ~~ briefing2w
  SAY ~The pleasures of the flesh await us!~
  IF ~~ THEN DO ~
  MakeGlobal()
  SetGlobal("LilithResurrected","GLOBAL",2)
  DestroyItem("cmgforg1")
  GiveItemCreate("VVCASKET",Myself,1,1,0) // Empty Casket		
  JoinParty()
  ~ EXIT
END

IF ~~ briefing3f
  SAY ~Kali, grant me power!~
  IF ~~ THEN DO ~SetGlobal("LilithResurrected","GLOBAL",2)
  SetGlobal("LilithLeft","GLOBAL",1)
Enemy()
~ EXIT
END

IF ~~ briefing3
  SAY ~Goodbye, <CHARNAME>. We could have done so much together. I will continue serving Kali, no matter what.~
  IF ~~ THEN DO ~RunAwayFromNoInterrupt(Player1,50)
  SetGlobal("LilithResurrected","GLOBAL",2)
DestroySelf()
~ EXIT
END

//when thrown out
IF ~!Gender(Player1,FEMALE)
!InParty(Myself)~ THEN BEGIN GreetingVManSB1
SAY ~Do you need me?~ 
 IF ~Global("VampireStronghold","GLOBAL",1)~ THEN REPLY ~Go to my vampire castle. We will meet there.~ GOTO vampStronghold 
  IF ~Global("BodhiStronghold","GLOBAL",2)~ THEN REPLY ~Go to graveyard stronghold. We will meet there.~ GOTO strongholdBodhi 
 IF ~!BeenInParty("cmlilith")~ THEN REPLY  ~Come with me, Lilith, Kali awaits our action.~ GOTO briefing2
 IF ~BeenInParty("cmlilith")~ THEN REPLY ~Come with me, Lilith, Kali awaits our action.~ GOTO notparty1
 ++ ~Stay here, Lilith, I will return.~ + notparty2
  ++ ~You are free to go. I release you.~ + briefing3 
 ++ ~I decided to kill you.~ + briefing3f
END

IF ~~ notparty2
SAY ~Don't wander for long. Kali hates non-action.~
IF ~~ THEN DO ~~ EXIT
END

IF ~Gender(Player1,FEMALE)
!InParty(Myself)~ THEN BEGIN GreetingVFemSB1
SAY ~Do you need me?~
 IF ~Global("VampireStronghold","GLOBAL",1)~ THEN REPLY ~Go to my vampire castle. We will meet there.~ GOTO vampStronghold 
  IF ~Global("BodhiStronghold","GLOBAL",2)~ THEN REPLY ~Go to graveyard stronghold. We will meet there.~ GOTO strongholdBodhi  
 IF ~!BeenInParty("cmlilith")~ THEN REPLY  ~Come with me, Lilith, Kali awaits our action.~ GOTO briefing2
 IF ~BeenInParty("cmlilith")~ THEN REPLY ~Come with me, Lilith, Kali awaits our action.~ GOTO notparty1
 ++ ~Stay here, Lilith, I will return.~ + notparty2
  ++ ~You are free to go. I release you.~ + briefing3  
 ++ ~I decided to kill you.~ + briefing3f
END




IF ~~ notparty1
  SAY ~I was hoping you say it.~
  IF ~~ THEN DO ~
		JoinParty()~ EXIT
END

IF ~~ notpartGoST
   SAY ~Will see here. If you don't get killed.~
   IF ~~ THEN DO ~MakeGlobal()
   LeaveParty()
   RunAwayFromNoInterrupt(Player1,40)
   MoveBetweenAreas("AR0808",[536.788],S)~ EXIT
 END  

// talk in party

IF ~!Gender(Player1,FEMALE)
InParty(Myself)
Race(Player1,VAMPIRE)~ THEN BEGIN GreetingManV1
SAY ~<CHARNAME>, do you need something from me?~ 
 IF ~Global("VampireStronghold","GLOBAL",1)~ THEN REPLY ~Go to my vampire castle. We will meet there.~ GOTO vampStronghold 
  IF ~Global("BodhiStronghold","GLOBAL",2)~ THEN REPLY ~Go to graveyard stronghold. We will meet there.~ GOTO strongholdBodhi 
 ++ ~Are you hungry? You can suck my blood, Lilith.~ + suckblood
 ++ ~Tell me your story, Lilith.~ + talkLilithM
 ++ ~Tell me about goddess Kali, Lilith.~ + talkLilithKaliM
 ++ ~No, nothing right now, Lilith.~ + byesilent
  ++ ~I decided to kill you.~ + briefing3f
END

IF ~Gender(Player1,FEMALE)
InParty(Myself)
Race(Player1,VAMPIRE)~ THEN BEGIN GreetingFemV1
SAY ~<CHARNAME>, do you need something from me?~ 
 IF ~Global("VampireStronghold","GLOBAL",1)~ THEN REPLY ~Go to my vampire castle. We will meet there.~ GOTO vampStronghold 
  IF ~Global("BodhiStronghold","GLOBAL",2)~ THEN REPLY ~Go to graveyard stronghold. We will meet there.~ GOTO strongholdBodhi 
 ++ ~Are you hungry? You can suck my blood, Lilith.~ + suckblood
 ++ ~Tell me your story, Lilith.~ + talkLilithF
 ++ ~Tell me about goddess Kali, Lilith.~ + talkLilithKaliF 
 ++ ~No, nothing right now, Lilith.~ + byesilent
  ++ ~I decided to kill you.~ + briefing3f
END

IF ~!Gender(Player1,FEMALE)
InParty(Myself)
!Race(Player1,VAMPIRE)~ THEN BEGIN GreetingMan1
SAY ~<CHARNAME>, do you need something from me?~ 
 IF ~Global("VampireStronghold","GLOBAL",1)~ THEN REPLY ~Go to my vampire castle. We will meet there.~ GOTO vampStronghold 
  IF ~Global("BodhiStronghold","GLOBAL",2)~ THEN REPLY ~Go to graveyard stronghold. We will meet there.~ GOTO strongholdBodhi 
 ++ ~Are you hungry? You can suck my blood, Lilith.~ + suckblood
 ++ ~Make me a vampire, Lilith.~ + vampconvm
 ++ ~Tell me your story, Lilith.~ + talkLilithM
 ++ ~Tell me about goddess Kali, Lilith.~ + talkLilithKaliM 
 ++ ~No, nothing right now, Lilith. Sorry.~ + byesilent
   ++ ~I decided to kill you.~ + briefing3f
END

IF ~Gender(Player1,FEMALE)
InParty(Myself)
!Race(Player1,VAMPIRE)~ THEN BEGIN GreetingFem1
SAY ~<CHARNAME>, do you need something from me?~
 IF ~Global("VampireStronghold","GLOBAL",1)~ THEN REPLY ~Go to my vampire castle. We will meet there.~ GOTO vampStronghold 
  IF ~Global("BodhiStronghold","GLOBAL",2)~ THEN REPLY ~Go to graveyard stronghold. We will meet there.~ GOTO strongholdBodhi  
 ++ ~Are you hungry? You can suck my blood, Lilith.~ + suckblood
 ++ ~Make me a vampire, Lilith.~ + vampconvf 
 ++ ~Tell me your story, Lilith.~ +   talkLilithF
  ++ ~Tell me about goddess Kali, Lilith.~ + talkLilithKaliF
 ++ ~No, nothing right now, Lilith. Sorry for disturbance.~ + byesilent
   ++ ~I decided to kill you.~ + briefing3f
END

IF ~~ byesilent
SAY ~Don't waste my time like this, please!~
  IF ~~ THEN DO ~~ EXIT
END


IF ~~ talkLilithM
  SAY ~That is not much story in my life. I was born in village, when I grew up, I have stealt village gold and went to see the world. I was made into a vampire by one of Kali most faithful clerics and became worshipping her Majesty.~
  IF ~~ THEN GOTO talkLilithM2
END

IF ~~ talkLilithM2
  SAY ~Not long ago I heard about ancient tombs in Windspear Hills and went to see it with Marial and Raven.~
  IF ~~ THEN GOTO talkLilithM3
END

IF ~~ talkLilithM3
  SAY ~Then you came in.~
  IF ~~ THEN EXIT
END


IF ~~ talkLilithF
  SAY ~That is not much story in my life. I was born in village, when I grew up, I have stealt village gold and went to see the world. I was made into a vampire by one of Kali most faithful clerics and became worshipping her Majesty.~
  IF ~~ THEN GOTO talkLilithF2
END

IF ~~ talkLilithF2
  SAY ~Not long ago I heard about ancient tombs in Windspear Hills and went to see it with Marial and Raven.~
  IF ~~ THEN GOTO talkLilithF3
END

IF ~~ talkLilithF3
  SAY ~Then you came in.~
  IF ~~ THEN EXIT
END


IF ~~ suckblood
  SAY ~It's a good idea for dinner!~
  IF ~!Global("Player1RaceBlood","GLOBAL",4)~ THEN GOTO suckbloodNo  
  IF ~Global("Player1RaceBlood","GLOBAL",4)~ THEN GOTO suckblood2
END

IF ~~ suckbloodNo
  SAY ~Kali forbids to drink this urina you call 'blood'.~
  IF ~~ THEN DO ~~ EXIT
END


IF ~~ suckblood2
  SAY ~I'm loving it!~
  IF ~~ THEN DO ~ApplyDamagePercent(Player1,85,MAGIC)
  SetGlobalTimer("BloodlustTimer","LOCALS",ONE_DAY)
		ApplySpell(Myself,RESTORE_FULL_HEALTH)~ EXIT 
END

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


IF ~~ vampconvf
  SAY ~(Lilith gently embraces you and gets closer.)~
  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 Lilith.)~
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 Lilith. Lilith has wicked flame in her soul, her lusts for blood and pleasure are almost of equal level.)~

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

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

IF ~~ talkLilithKaliF
  SAY ~Kali is a goddess of all vampires. When first gods appeared, she was among them. She gained a domain in Negative Plane and created first vampires. First vampires didn't have so many weaknesses that I have. They were called 'planar vampires'. And she by herself turned into vampire goddess of the great level.~
  IF ~~ THEN GOTO talkLilithKaliF2
END

IF ~~ talkLilithKaliM
  SAY ~Kali is a goddess of all vampires. When first gods appeared, she was among them. She gained a domain in Negative Plane and created first vampires. First vampires didn't have so many weaknesses that I have. They were called 'planar vampires'. And she by herself turned into vampire goddess of the great level.~
  IF ~~ THEN GOTO talkLilithKaliF2
END

IF ~~ talkLilithKaliF2
  SAY ~Once she desided to take over Faerun for vampire kind. Negative plane army of vampires had entered realms and ther was a great war. Kali and few dark gods fought Amanautor and other forgotten gods of these times. Finally our goddess had lost, She was robbed of godhood and barely escaped to Negative Plane, where she still hides.~
  IF ~~ THEN GOTO talkLilithKaliF3
END


IF ~~ talkLilithKaliF3
  SAY ~Shar took over Negative Plane and allows our goddess to live. But this is a humilation for such a proud and violent goddess. We hope one day to organize her return to Realms. She would grant us improved vampiric blood, and we will serve her for eternity.~
  IF ~~ THEN GOTO talkLilithKaliF2
END


 IF ~~ vampStronghold
  SAY ~See you there.~
  IF ~~ THEN DO ~LeaveParty()
RunAwayFromNoInterrupt(Player1,20)
MoveBetweenAreas("DSC016",[1680.636],W)~ EXIT
END


IF ~~ strongholdBodhi
  SAY ~See you there.~
  IF ~~ THEN DO ~
    LeaveParty()
  RunAwayFromNoInterrupt(LastTalkedToBy(Myself),30)
   MoveBetweenAreas("AR0808",[1215.485],N)
   RandomWalk()~ EXIT
END