Thursday, March 22, 2018

Lottery Script - Skyrim Mod

; The Lottery Spell by M7 2017

Book Property Horse1 Auto
Book Property Squire Auto
Key Property A1 Auto ; for chest near dungeon Bleak Falls Barrow
Book Property Note Auto ; for key
MiscObject Property Gems Auto
MiscObject Property Gold Auto
Weapon Property Sword Auto
Armor Property Mail Auto
MiscObject Property Lockpix Auto
Potion Property SHM Auto
Potion Property Food Auto

Message Property Lottery Auto

Int Random

Event OnEffectFinish(Actor akTarget, Actor akCaster)

Int iButton = Lottery.Show()
 Random = Utility.RandomInt(1, 9)

  if iButton == 0 ; rewards

  if Random == 1
  Game.GetPlayer().additem(Horse1, 1)
 
  elseif Random == 2
  Game.GetPlayer().additem(Squire, 1)

  elseif Random == 3
  Game.GetPlayer().additem(A1, 1)
  Game.GetPlayer().additem(Note, 1)

   elseif Random == 4
  Game.GetPlayer().additem(Gems, 7)
 
  elseif Random == 5
  Game.GetPlayer().additem(Mail, 1)
  Game.GetPlayer().additem(Sword, 1)

  elseif Random == 6
  Game.GetPlayer().additem(Lockpix, 15)

  elseif Random == 7
  Game.GetPlayer().additem(SHM, 5)

  elseif Random == 8
  Game.GetPlayer().additem(Food, 5)

   elseif Random == 9
  Game.GetPlayer().additem(Gold, 1000)


   elseif iButton == 1 ; nothing
    endif
endif
endEvent


No comments:

Post a Comment