Enter Skyrim

Enter Skyrim
Skyrim Mages College

Sunday, October 9, 2016

A Casino Slot Machine Script

A Casino Slot Machine Script

by: M7


(This works using a Random Number Generator)


MiscObject Property Gold Auto

int random

Event OnActivate(ObjectReference akActionRef)

    If akActionRef == Game.GetPlayer()

random = Utility.RandomInt(1, 7) ; randomly generates a number from 1 to 7

     if random == 1
   Game.GetPlayer().additem(Gold, 100)
 
    elseif random == 2
   Debug.MessageBox("Sorry, you didn't win this time.")

  elseif random == 3
   Game.GetPlayer().additem(Gold, 10)

  elseif random == 4
   Debug.MessageBox("Sorry, you didn't win this time.")

  elseif random == 5
   Debug.MessageBox("Sorry, you didn't win this time.")

  elseif random == 6
   Game.GetPlayer().additem(Gold, 10)

    elseif random == 7
   Game.GetPlayer().additem(Gold, 1000)
   Debug.MessageBox("You won the Jackpot!")
 
  endif
endif

endEvent

;;

M7


No comments:

Post a Comment