BEGIN BSCOHN

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("CohnResurrected","GLOBAL",1)~
THEN BEGIN greetingStartF
   SAY ~It's you! Mistress Bodhy have known that you are dangerous. Why did you resurrect me?~
   ++ ~I want you to serve me. Or to die.~ + briefingNV1
   ++ ~I have a weakness for servants.~ + briefingNV1   
   ++ ~I wanted to kill you once more.~ + briefing3f
END


IF ~See(Player1)
!Gender(Player1,FEMALE)
  Global("CohnResurrected","GLOBAL",1)~
THEN BEGIN greetingStart
   SAY ~It's you! Mistress Bodhy have known that you are dangerous. Why did you resurrect me?~
   ++ ~I want you to serve me. Or to die.~ + briefingNV1
   ++ ~I have a weakness for servants.~ + briefingNV1
   ++ ~Die, servant of evil~ + briefing3f
END


IF ~~ briefingNV1
  SAY ~This crypt will go to ruins without me. I am the majordomo of this crypt.~
  ++ ~Then return to your duties and make this crypt great again!~ + notpartGoST
  ++ ~Then join my party. We will care about crypt.~ + briefing2
  ++ ~You are free to go. I release you.~ + notpartGoST
  ++ ~Die, servant of evil!~ + briefing3f
END



IF ~~ briefing2
  SAY ~It's a pain to leave this crypt, but I'll join.~
  IF ~~ THEN DO ~
  MakeGlobal()
  SetGlobal("CohnResurrected","GLOBAL",2)
  DestroyItem("VVHCOHN")
  GiveItemCreate("VVCASKET",Myself,1,1,0) // Empty Casket		
  JoinParty()
  ~ EXIT
END

IF ~~ briefing3f
  SAY ~Come and get me, intruder!~
  IF ~~ THEN DO ~SetGlobal("CohnResurrected","GLOBAL",2)
Enemy()
~ EXIT
END

IF ~~ briefing3
  SAY ~Goodbye, <CHARNAME>. I will try to find other master to serve to.~
  IF ~~ THEN DO ~RunAwayFromNoInterrupt(Player1,50)
  SetGlobal("CohnResurrected","GLOBAL",2)
DestroySelf()
~ EXIT
END

//when thrown out
IF ~!Gender(Player1,FEMALE)
!Global("BodhiStronghold","GLOBAL",2)
!InParty(Myself)~ THEN BEGIN GreetingVManB1
SAY ~Do you need me, my master?~ 
 ++ ~Come with me, Cohn, I need your skills.~ + notparty1
 ++ ~Stay here, Cohn, I will return.~ + notparty2m
  ++ ~Show me your wares.~ + shopView
  ++ ~I want to rest.~ + restView
  ++ ~You are free to go. I release you from your duties.~ + notpartGoST 
 ++ ~I decided to end your life.~ + briefing3f
END

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

IF ~~ notparty2f
SAY ~Okay, mistress!~
IF ~~ THEN DO ~~ EXIT
END

IF ~Gender(Player1,FEMALE)
!Global("BodhiStronghold","GLOBAL",2)
!InParty(Myself)~ THEN BEGIN GreetingVFemB1
SAY ~Do you need me, my mistress?~ 
 ++ ~Return, Cohn, I need you, my servant.~ + notparty1
 ++ ~Stay here, Cohn, I will return.~ + notparty2f
  ++ ~Show me your wares.~ + shopView 
  ++ ~I want to rest.~ + restView  
  ++ ~You are free to go. I release you from your duties.~ + notpartGoST 
  ++ ~I decided to end your life.~ + briefing3f
END

IF ~Gender(Player1,FEMALE)
Global("BodhiStronghold","GLOBAL",2)
AreaCheck("AR0808")
!InParty(Myself)~ THEN BEGIN GreetingVFemSTR
SAY ~Do you need me, my mistress?~ 
 ++ ~Return, Cohn, I need you, my servant.~ + notparty1
 ++ ~Go to our Stronghold in Grave Yard District. I will find you there, if it will be needed.~ + notpartGoST
 ++ ~Stay here, Cohn, I will return.~ + notparty2f
  ++ ~Show me your wares.~ + shopView 
  ++ ~I want to rest.~ + restView   
    ++ ~I want to fortify our position in Ahkatla.~ + butlerArmyF
  ++ ~You are free to go. I release you from your duties.~ + notpartGoST 
 ++ ~I decided to end your life.~ + briefing3f
END

IF ~!Gender(Player1,FEMALE)
Global("BodhiStronghold","GLOBAL",2)
AreaCheck("AR0808")
!InParty(Myself)~ THEN BEGIN GreetingVMaleSTR
SAY ~Do you need me, my master?~ 
 ++ ~Return, Cohn, I need you, my servant.~ + notparty1
 ++ ~Go to our Stronghold in Grave Yard District. I will find you there, if it will be needed.~ + notpartGoST
 ++ ~Stay here, Cohn, I will return.~ + notparty2m
   ++ ~Show me your wares.~ + shopView 
  ++ ~I want to rest.~ + restView  
  ++ ~I want to fortify our position in Ahkatla.~ + butlerArmyM
  ++ ~You are free to go. I release you from your duties.~ + notpartGoST 
 ++ ~I decided to end your life.~ + briefing3f
END


IF ~Gender(Player1,FEMALE)
Global("BodhiStronghold","GLOBAL",2)
!AreaCheck("AR0808")
!InParty(Myself)~ THEN BEGIN GreetingVFemB1
SAY ~Do you need me, my mistress?~ 
 ++ ~Return, Cohn, I need you, my servant.~ + notparty1
 ++ ~Go to our Stronghold in Grave Yard District. I will find you there, if it will be needed.~ + notpartGoST
 ++ ~Stay here, Cohn, I will return.~ + notparty2f
//  ++ ~Show me your wares.~ + shopView 
//  ++ ~I want to rest.~ + restView   
  ++ ~You are free to go. I release you from your duties.~ + notpartGoST 
 ++ ~I decided to end your life.~ + briefing3f
END

IF ~!Gender(Player1,FEMALE)
Global("BodhiStronghold","GLOBAL",2)
!AreaCheck("AR0808")
!InParty(Myself)~ THEN BEGIN GreetingVMaleB1
SAY ~Do you need me, my master?~ 
 ++ ~Return, Cohn, I need you, my servant.~ + notparty1
 ++ ~Go to our Stronghold in Grave Yard District. I will find you there, if it will be needed.~ + notpartGoST
 ++ ~Stay here, Cohn, I will return.~ + notparty2m
//   ++ ~Show me your wares.~ + shopView 
//  ++ ~I want to rest.~ + restView  
  ++ ~You are free to go. I release you from your duties.~ + notpartGoST 
 ++ ~I decided to end your life.~ + briefing3f
END

IF ~~ notparty1m
  SAY ~I was starting to feel useleness.~
  IF ~~ THEN DO ~
	//	DestroyItem("VVCohn")
	//	DestroyItem("MONHP1")
		JoinParty()~ EXIT
END

IF ~~ notparty1
  SAY ~I was starting to feel useleness.~
  IF ~~ THEN DO ~
		JoinParty()~ EXIT
END

IF ~~ notpartGoST
   SAY ~I will return to crypt and serve as majordomo.~
   IF ~~ THEN DO ~LeaveParty()
   RunAwayFromNoInterrupt(Player1,40)
   MoveBetweenAreas("AR0808",[1120.521],N)~ EXIT
 END  

// talk in party

IF ~Gender(Player1,MALE)
InParty(Myself)
Race(Player1,VAMPIRE)~ THEN BEGIN GreetingManV1
SAY ~My master, do you need something?~ 
 ++ ~Are you hungry? You can drink my blood, Cohn.~ + suckblood
 ++ ~Tell me your story, Cohn.~ + talkCohnM
 ++ ~No, nothing, sorry, Cohn.~ + 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?~ 
 ++ ~Are you hungry? You can drink my blood, Cohn.~ + suckblood
 ++ ~Tell me your story, Cohn.~ + talkCohnF
 ++ ~No, nothing, sorry, Cohn.~ + 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?~ 
 ++ ~Are you hungry? You can drink my blood, Cohn.~ + suckblood
 ++ ~Make me a vampire, Cohn.~ + vampconvm
 ++ ~Tell me your story, Cohn.~ + talkCohnM
 ++ ~No, nothing, sorry, Cohn.~ + 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?~ 
 ++ ~Are you hungry? You can drink my blood, Cohn.~ + suckblood
 ++ ~Make me a vampire, Cohn.~ + vampconvf 
 ++ ~Tell me your story, Cohn.~ +   talkCohnM
 ++ ~No, nothing, sorry, Cohn.~ + byesilent
   ++ ~I decided to end your life.~ + briefing3f
END

IF ~~ byesilent
SAY ~Nevermind.~
  IF ~~ THEN DO ~~ EXIT
END


IF ~~ talkCohnM
  SAY ~I am a majordomo of Bodhi house in Suldanesselar. When Bodhi were exiled from Suldanesselar, I followed her and endured all the troubles she had.~
  IF ~~ THEN GOTO talkCohnM2
END

IF ~~ talkCohnM2
  SAY ~This crypt functions as stronghold because of me and my management. These wenches have no idea about the economy and care of home.~
  IF ~~ THEN GOTO talkCohnM3
END

IF ~~ talkCohnM3
  SAY ~I hope you will appreciate my work, master.~
  IF ~~ THEN EXIT
END


IF ~~ talkCohnF
  SAY ~I am a majordomo of Bodhi house in Suldanesselar. When Bodhi were exiled from Suldanesselar, I followed her and endured all the troubles she had.~
  IF ~~ THEN GOTO talkCohnF2
END

IF ~~ talkCohnF2
   SAY ~This crypt functions as stronghold because of me and my management. These wenches have no idea about the economy and care of home.~
 IF ~~ THEN GOTO talkCohnF3
END

IF ~~ talkCohnF3
  SAY ~I hope you will appreciate my work, mistress.~
  IF ~~ THEN EXIT
END



IF ~~ suckblood
  SAY ~If you ask, then fine.~
  IF ~!Global("Player1RaceBlood","GLOBAL",4)~ THEN GOTO suckbloodNo  
  IF ~Global("Player1RaceBlood","GLOBAL",4)~ THEN GOTO suckblood2
END

IF ~~ suckbloodNo
  SAY ~No, thanks!~
  IF ~~ THEN DO ~~ EXIT
END

IF ~~ suckblood2
  SAY ~I like your blood.~
  IF ~~ THEN DO ~ApplyDamagePercent(Player1,85,MAGIC)
  SetGlobalTimer("BloodlustTimer","LOCALS",ONE_DAY)
		ApplySpell(Myself,RESTORE_FULL_HEALTH)~ EXIT 
END

IF ~~ vampconvm
  SAY ~(Cohn gets closer.)~
  IF ~!Global("Player1RaceBlood","GLOBAL",4)~ THEN GOTO suckbloodNo  
  IF ~Global("Player1RaceBlood","GLOBAL",4)~ THEN GOTO vampconv2
END


IF ~~ vampconvf
  SAY ~(Cohn's teeth go out and brutally 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 his teeths have pierced your skin and gone to carotid vein. Blood flow is distracted and becomes pulsating. You feel that your blood flows into Cohn.)~
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 Cohn and calculations on debit or credit and when to clean tombs.)~

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

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

IF ~~ restView
SAY ~Here are things I sell to vampires.~
IF ~~ THEN DO ~StartStore("COHNTA",LastTalkedToBy(Myself))~ EXIT
END

IF ~~ shopView
SAY ~Here are things I sell to vampires.~
IF ~~ THEN DO ~StartStore("COHNTA",LastTalkedToBy(Myself))~ EXIT
END


IF ~~ butlerArmyF
 SAY ~Our allies among liches supply us with undead troops... for a gold. You can strengthen our defence and buy guardians, if you want. Here is a rooster of troops available, mistress.~
    IF ~PartyGoldGT(10000)~ THEN REPLY ~I want to buy skeleton monster.~ GOTO buySkeleton
    IF ~PartyGoldGT(1000)~ THEN REPLY ~I want to buy zombie.~ GOTO buyZombie
    IF ~PartyGoldGT(1000)~ THEN REPLY ~I want to buy ghoul.~ GOTO buyGhoul
 IF ~PartyGoldGT(10000)~ THEN REPLY ~I want to buy vampiric myst.~ GOTO buyMyst
 IF ~PartyGoldGT(15000)~ THEN REPLY ~I want to buy vampire militia female.~  GOTO buyFVampire
 IF ~PartyGoldGT(15000)~ THEN REPLY ~I want to buy vampire militia male.~  GOTO buyMVampire
 IF ~PartyGoldGT(8000)~ THEN REPLY ~I want to buy flesh golem.~  GOTO buyMFleshGolem 
 IF ~~ THEN REPLY ~I don't want to buy nothing right now.~ GOTO GreetingVFemSTR
END

IF ~~ butlerArmyM
 SAY ~Our allies among liches supply us with undead troops... for a gold. You can strengthen our defence and buy guardians, if you want. Here is a rooster of troops available, master.~
    IF ~PartyGoldGT(10000)~ THEN REPLY ~I want to buy skeleton monster.~ GOTO buySkeleton
    IF ~PartyGoldGT(1000)~ THEN REPLY ~I want to buy zombie.~ GOTO buyZombie
    IF ~PartyGoldGT(3000)~ THEN REPLY ~I want to buy ghoul.~ GOTO buyGhoul
 IF ~PartyGoldGT(10000)~ THEN REPLY ~I want to buy vampiric myst.~ GOTO buyMyst
 IF ~PartyGoldGT(15000)~ THEN REPLY ~I want to buy vampire militia female.~  GOTO buyFVampire
 IF ~PartyGoldGT(15000)~ THEN REPLY ~I want to buy vampire militia male.~  GOTO buyMVampire
 IF ~PartyGoldGT(8000)~ THEN REPLY ~I want to buy flesh golem.~  GOTO buyMFleshGolem 
 IF ~~ THEN REPLY ~I don't want to buy nothing right now.~ GOTO GreetingVMaleSTR
END

IF ~~ buySkeleton
  SAY ~I summon skeleton monster!~
  IF ~~ THEN DO ~TakePartyGold(10000)
		CreateVisualEffect("spfleshs",[1382.917])
		Wait(1)
	CreateCreature("VV2SKELM",[1382.917],S)
  ~ EXIT
END

IF ~~ buyZombie
  SAY ~I summon zombie!~
  IF ~~ THEN DO ~TakePartyGold(1000)
		CreateVisualEffect("spfleshs",[1381.915])
		Wait(1)
	CreateCreature("VV2ZOMBI",[1381.915],S)
  ~ EXIT
END

IF ~~ buyMyst
  SAY ~I summon vampiric myst!~
  IF ~~ THEN DO ~TakePartyGold(10000)
		CreateVisualEffect("spfleshs",[1384.916])
		Wait(1)
	CreateCreature("VV2MYST",[1384.916],S)
  ~ EXIT
END

IF ~~ buyGhoul
  SAY ~I summon ghoul!~
  IF ~~ THEN DO ~TakePartyGold(3000)
		CreateVisualEffect("spfleshs",[1381.915])
		Wait(1)
	CreateCreature("VV2GHOUL",[1381.915],S)
  ~ EXIT
END


IF ~~ buyFVampire
  SAY ~I summon vampire militia female!~
  IF ~~ THEN DO ~TakePartyGold(15000)
		CreateVisualEffect("spfleshs",[1380.915])
		Wait(1)
	CreateCreature("VV2VAMPF",[1380.915],S)
  ~ EXIT
END



IF ~~ buyMVampire
  SAY ~I summon vampire militia male!~
  IF ~~ THEN DO ~TakePartyGold(15000)
		CreateVisualEffect("spfleshs",[1379.914])
		Wait(1)
	CreateCreature("VV2VAMPM",[1379.914],S)
  ~ EXIT
END



IF ~~ buyMFleshGolem
  SAY ~I summon flesh golem!~
  IF ~~ THEN DO ~TakePartyGold(8000)
		CreateVisualEffect("spfleshs",[1383.913])
		Wait(1)
	CreateCreature("VV2GOLEM",[1383.913],S)
  ~ EXIT
END