FANDOM


A death script for monsters created by Redone.
Function Main()

Player = Actor()
Target = ContextActor()
DropZone$   = ActorZone(Target)

XPos% = ActorX(Target) + Rand(-2, 2)
YPos% = ActorY(Target)
ZPos% = ActorZ(Target) + Rand(-2, 2)

   Death = Rand(1, 3)
   If (Death = 1)
      AnimateActor(Target, "Death 1", 0.2, 0)
   ElseIf (Death = 2)
      AnimateActor(Target, "Death 2", 0.2, 0)
   Else
      AnimateActor(Target, "Death 3", 0.2, 0)
   EndIf
   DoEvents(500)


   AnimateActor(Player, "Look", .3, 0)
   DoEvents(100)

         
      GoldDrop = Rand(1,100)
      Output(Player, "You Have Found " + GoldDrop + " Copper")
      ChangeMoney(Player, GoldDrop)
               
   ItemType = Rand(1, 2)
   Select ItemType
      Case 1
            Loot$ = "Boar Tusk"
            LootAmnt = Rand(1, 2)
      Case 2
            Loot$ = "Heal Stone"
            LootAmnt = Rand(1, 2)
      End Select
   SpawnItem(Loot, LootAmnt, DropZone, Xpos, Ypos, Zpos)

   Return
End Function