IF
 See(Player1)
 NumTimesTalkedTo(0)
THEN
 RESPONSE #100
 Dialogue(Player1)
END



IF
 AreaCheck("AR0020")
 Detect("WBRUPERT")
 Global("WBRUPERTRuns","GLOBAL",1)
THEN
 RESPONSE #100
 SetGlobal("WBRUPERTRuns","GLOBAL",2)
 StartDialogueNoSet("WBRUPERT")
END



IF
 Global("WBMockWillie","GLOBAL",6)
THEN
 RESPONSE #100
 SetGlobal("WBMockWillie","GLOBAL",7)
 StartDialogueNoSet(Player1)
END



IF
 Global("WBMockWillie","GLOBAL",9)
 AreaCheck("AR0020")
THEN
 RESPONSE #100
 SetGlobal("WBMockWillie","GLOBAL",10)
 StartDialogueNoSet(Player1)
END



IF
 Global("WBRunAway","GLOBAL",1)
 Global("WBRunAwayComment","GLOBAL",0)
THEN
 RESPONSE #100
 SetGlobal("WBRunAwayComment","GLOBAL",1)
 StartDialogueNoSet(Player1)
END


IF
 InParty(Myself)
 AreaCheck("AR0400")
 Global("WBMumSpawns","GLOBAL",0)
THEN
 RESPONSE #100
 SetGlobal("WBMumSpawns","GLOBAL",1)
END

IF
 InParty(Myself)
 AreaCheck("AR0406")
 Global("WBMumSpawns","GLOBAL",1)
THEN
 RESPONSE #100
 SetGlobal("WBMumSpawns","GLOBAL",2)
END

IF
 InParty(Myself)
 AreaCheck("AR0400")
 Global("WBMumSpawns","GLOBAL",2)
THEN
 RESPONSE #100
 SetGlobal("WBMumSpawns","GLOBAL",3)
 CreateCreatureObjectOffScreen("WBMUM",Myself,0,0,0)
END



IF
 Global("WBMumSpawns","GLOBAL",4)
THEN
 RESPONSE #100
 SetGlobal("WBMumSpawns","GLOBAL",5)
 StartDialogueNoSet(Player1)
END




IF   
!HasItem("WILLBEER",Myself)
THEN
   RESPONSE #100
   GiveItemCreate("WILLBEER","WillyB",0,0,0)
END

IF
   !HasItem("WILLBEER",Myself)
   OR(6)
      HasItem("WILLBEER",Player1)
      HasItem("WILLBEER",Player2)
      HasItem("WILLBEER",Player3)
      HasItem("WILLBEER",Player4)
      HasItem("WILLBEER",Player5)
      HasItem("WILLBEER",Player6)
THEN
   RESPONSE #100
     ActionOverride(Player1,GiveItem("WILLBEER","WillyB"))
     ActionOverride(Player2,GiveItem("WILLBEER","WillyB"))
     ActionOverride(Player3,GiveItem("WILLBEER","WillyB"))
     ActionOverride(Player4,GiveItem("WILLBEER","WillyB"))
     ActionOverride(Player5,GiveItem("WILLBEER","WillyB"))
     ActionOverride(Player6,GiveItem("WILLBEER","WillyB"))
END



IF
      !HasItem("WILLBEER",Myself)
      !HasItem("WILLBEER",Player1)
      !HasItem("WILLBEER",Player2)
      !HasItem("WILLBEER",Player3)
      !HasItem("WILLBEER",Player4)
      !HasItem("WILLBEER",Player5)
      !HasItem("WILLBEER",Player6)
THEN
   RESPONSE #100
     ActionOverride(Player1,PickUpItem("WILLBEER"))
     ActionOverride(Player2,PickUpItem("WILLBEER"))
     ActionOverride(Player3,PickUpItem("WILLBEER"))
     ActionOverride(Player4,PickUpItem("WILLBEER"))
     ActionOverride(Player5,PickUpItem("WILLBEER"))
     ActionOverride(Player6,PickUpItem("WILLBEER"))
END



IF
   NumItemsGT("WILLBEER","WillyB",1)
THEN
   RESPONSE #100
      DestroyItem("WILLBEER")
END




IF
  GlobalGT("WBMockWillie","GLOBAL",5)   
  !HasItem("WBCHAIN",Myself)
THEN
   RESPONSE #100
   GiveItemCreate("WBCHAIN","WillyB",0,0,0)
END

IF
   GlobalGT("WBMockWillie","GLOBAL",5)   
   !HasItem("WBCHAIN",Myself)
   OR(6)
      HasItem("WBCHAIN",Player1)
      HasItem("WBCHAIN",Player2)
      HasItem("WBCHAIN",Player3)
      HasItem("WBCHAIN",Player4)
      HasItem("WBCHAIN",Player5)
      HasItem("WBCHAIN",Player6)
THEN
   RESPONSE #100
     ActionOverride(Player1,GiveItem("WBCHAIN","WillyB"))
     ActionOverride(Player2,GiveItem("WBCHAIN","WillyB"))
     ActionOverride(Player3,GiveItem("WBCHAIN","WillyB"))
     ActionOverride(Player4,GiveItem("WBCHAIN","WillyB"))
     ActionOverride(Player5,GiveItem("WBCHAIN","WillyB"))
     ActionOverride(Player6,GiveItem("WBCHAIN","WillyB"))
END



IF
      GlobalGT("WBMockWillie","GLOBAL",5)   
      !HasItem("WBCHAIN",Myself)
      !HasItem("WBCHAIN",Player1)
      !HasItem("WBCHAIN",Player2)
      !HasItem("WBCHAIN",Player3)
      !HasItem("WBCHAIN",Player4)
      !HasItem("WBCHAIN",Player5)
      !HasItem("WBCHAIN",Player6)
THEN
   RESPONSE #100
     ActionOverride(Player1,PickUpItem("WBCHAIN"))
     ActionOverride(Player2,PickUpItem("WBCHAIN"))
     ActionOverride(Player3,PickUpItem("WBCHAIN"))
     ActionOverride(Player4,PickUpItem("WBCHAIN"))
     ActionOverride(Player5,PickUpItem("WBCHAIN"))
     ActionOverride(Player6,PickUpItem("WBCHAIN"))
END



IF
   GlobalGT("WBMockWillie","GLOBAL",5)
   NumItemsGT("WBCHAIN","WillyB",1)
THEN
   RESPONSE #100
      DestroyItem("WBCHAIN")
END
