Code : Tout sélectionner
Scriptname SAGChooseAClassScript extends Quest
Import Game
Import Utility
;;;;;;;;;;;;;;;;;;;;;;;; PROPERTIES ;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;; ARRAYS PROPERTIES ;;;;;;;;;;;;;;;;;;;;;;;;
; This will handle the randomization of videos
String[] Property WarriorVideos Auto
String[] Property VampireHunterVideos Auto
String[] Property MageVideos Auto
String[] Property WarMageVideos Auto
String[] Property ArcherVideos Auto
String[] Property ThiefVideos Auto
String[] Property MerchantVideos Auto
String[] Property BardVideos Auto
String[] Property MonkVideos Auto
String[] Property AssassinVideos Auto
;;;;;;;;;;;;;;;;;;;;;;;; OTHER PROPERTIES ;;;;;;;;;;;;;;;;;;;;;;;;
Int Property Video = 0 Auto
Message Property SAGShowClassMenuMessage Auto
Message Property SAGNextPageChooseClass Auto
Message Property SAGChooseUnderPrayerClassMessage Auto
Message Property SAGVampireHunterNeedMassacreMESSAGE Auto
Actor Property Player Auto
ObjectReference Property SAGBookCLassesDefinitionREFERENCE2 Auto
ObjectReference Property RalofRef Auto
GlobalVariable Property SAGChargenOverNoClassMenu Auto
Int Property Back = 0 Auto
Int Property ShowBook = 1 Auto
Int Property VampireHunter = 2 Auto
Int Property Warrior = 0 Auto
Int Property Mage = 1 Auto
Int Property WarMage= 2 Auto
Int Property Archer = 3 Auto
Int Property Thief = 4 Auto
Int Property Merchant = 5 Auto
Int Property Bard = 6 Auto
Int Property Monk = 7 Auto
Int Property Assassin = 8 Auto
Int Property NextPage = 9 Auto
Int Property Daedra = 9 Auto
Int Property Talos = 8 Auto
Int Property Arkay = 7 Auto
Int Property Julianos = 6 Auto
Int Property Kynareth = 5 Auto
Int Property Stendarr = 4 Auto
Int Property Mara = 3 Auto
Int Property Zenithar = 2 Auto
Int Property Dibella = 1 Auto
Int Property Akatosh = 0 Auto
Perk Property SAGVampireHunterClassPerk Auto
Perk Property SAGArcherClassPerk Auto
Perk Property SAGWarriorClassPerk Auto
Perk Property SAGThiefClassPerk Auto
Perk Property SAGWarmageClassPerk Auto
Perk Property SAGMageClassPerk Auto
Perk Property SAGmerchantClassPerk Auto
Perk Property SAGbardClassPerk Auto
Perk Property SAGprayerClassPerk Auto
Perk Property SAGassassinClassPerk Auto
Spell Property SAGPrayerTransformSPELL Auto
Spell Property SAGVampireHunterSpell Auto
Spell Property SAGVampireHunterAbilitySPELL Auto
Spell Property SAGVampireHunterMustMassacre Auto
Armor Property ReligiousTalosMankind Auto
Armor Property ReligiousArkayLifeDeath Auto
Armor Property ReligiousJulianosMagic Auto
Armor Property ReligiousKynarethAir Auto
Armor Property ReligiousStendarrMercy Auto
Armor Property ReligiousMaraLove Auto
Armor Property ReligiousZenitharCommerce Auto
Armor Property ReligiousDibellaBeauty Auto
Armor Property ReligiousAkatoshTime Auto
ImageSpaceModifier Property VampireSunlightISMD02 Auto
;;;;;;;;;;;;;;;;;;;;;;;; END PROPERTIES ;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;; SHOW CLASS MENU FUNCTION ;;;;;;;;;;;;;;;;;;;;;;;;
Function ShowClassMenu()
Video = RandomInt(0,3)
Player = GetPlayer()
RemovePlayerClass()
Wait(1)
Int Button
Button = SAGShowClassMenuMessage.Show()
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ****** PAGE 1 ****** ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
if Button == Warrior
player.addperk(SAGWarriorClassPerk)
;PlayBink("Warrior.bik")
PlayBink(WarriorVideos[Video])
Player.ModAv("OneHanded", 20)
Player.ModAv("TwoHanded", 21)
Player.ModAv("Magicka", -70)
Player.ModAv("Stamina", 10)
elseif Button == Mage
player.addperk(SAGMageClassPerk)
;PlayBink("Mage.bik")
PlayBink(MageVideos[Video])
Player.ModAv("Magicka", 70)
Player.ModAv("Stamina", -30)
Player.ModAv("OneHanded", -20)
Player.ModAv("TwoHanded", -25)
Player.ModAv("Health", 25)
Player.ModAv("Restoration", 20)
elseif Button == WarMage
player.addperk(SAGwarMageClassPerk)
;PlayBink("WarMage.bik")
PlayBink(WarMageVideos[Video])
Player.ModAv("Destruction", 40)
Player.ModAv("Magicka", 40)
Player.ModAv("OneHanded", 10)
Player.ModAv("TwoHanded", -15)
Player.ModAv("DamageResist", 5)
elseif Button == Archer
player.addperk(SAGArcherClassPerk)
;PlayBink("Archer.bik")
PlayBink(ArcherVideos[Video])
Player.ModAv("Marksman", 15)
Player.ModAv("OneHanded", 10)
Player.ModAv("BowSpeedBonus",10)
Player.ModAv("Stamina", 20)
Player.ModAv("Magicka", -20)
Player.ModAv("JumpingBonus", 6)
elseif Button == Thief
player.addperk(SAGThiefClassPerk)
;PlayBink("Thief.bik")
PlayBink(ThiefVideos[Video])
Player.ModAv("Sneak", 25)
Player.ModAv("PickPocket", 10)
Player.ModAv("Stamina", 5)
Player.ModAv("UnarmedDamage", 15)
Player.ModAv("Health", -25)
elseif Button == Merchant
player.addperk(SAGmerchantClassPerk)
;PlayBink("Merchant.bik")
PlayBink(MerchantVideos[Video])
Player.ModAv("Speechcraft", 20)
Player.ModAv("BypassVendorStolenCheck", 1)
Player.ModAv("Intimidation", 5)
Player.ModAv("PickPocket", -20)
Player.ModAv("Stamina", -5)
elseif Button == Bard
player.addperk(SAGBardClassPerk)
;PlayBink("Bard.bik")
PlayBink(BardVideos[Video])
Player.ModAv("Speechcraft", 15)
Player.ModAv("Confidence", 15)
Player.ModAv("Intimidation", -5)
Player.ModAv("Stamina", 10)
Player.ModAv("ShoutRecoveryMult", -0.3)
elseif Button == Monk
player.addperk(SAGPrayerClassPerk)
;PlayBink("Monk.bik")
PlayBink(MonkVideos[Video])
Player.ModAv("Magicka", 30)
Player.ModAv("Intimidation", 30)
Player.ModAv("Stamina", -20)
Player.ModAv("Confidence", 5)
Player.ModAv("UnarmedDamage", 20)
Player.ModAv("Health", 10)
Player.ModAv("Alchemy", 20)
ShowPrayerSubMenu()
elseif Button == Assassin
player.addperk(SAgAssassinClassPerk)
;PlayBink("Assassin.bik")
PlayBink(AssassinVideos[Video])
Player.ModAv("LightArmor", 10)
Player.ModAv("OneHanded", 20)
Player.ModAv("TwoHanded", 10)
Player.ModAv("Sneak", 10)
Player.ModAv("Intimidation", 20)
Player.ModAv("Confidence", -10)
Player.ModAv("Health", -25)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ****** PAGE 2 ****** ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
elseif Button == NextPage
Int ButtonSecond = SAGNextPageChooseClass.Show()
if ButtonSecond == Back
ShowClassMenu()
elseif ButtonSecond == ShowBook
SAGBookCLassesDefinitionREFERENCE2.Activate(Player)
Wait(0.3)
ShowClassMenu()
elseif ButtonSecond == VampireHunter
Player.AddPerk(SAGVampireHunterClassPerk)
Player.ModAv("PoisonResist", 10)
Player.ModAv("Intimidation", 30)
Player.ModAv("NightEye", 1)
Player.ModAv("Alchemy", 30)
Player.ModAv("Magicka", -70)
Player.ModAv("Conjuration", 30)
Player.ModAv("Stamina", 20)
;PlayBink("VampireHunter.bik")
PlayBink(VampireHunterVideos[Video])
Player.AddSpell(SAGVampireHunterSpell )
endif
endif
EndFunction
;;;;;;;;;;;;;;;;;;;;;;;; REMOVE PLAYER'S CLASS FUNCTION ;;;;;;;;;;;;;;;;;;;;;;;;
Function RemovePlayerClass()
player.removeperk(sagarcherclassperk)
player.removeperk(SAGWarriorClassPerk)
player.removeperk(SAGThiefClassPerk)
player.removeperk(SAGWarmageClassPerk)
player.removeperk(SAGMageClassPerk)
player.removeperk(SAGmerchantClassPerk)
player.removeperk(SAGbardClassPerk)
player.removeperk(SAGprayerClassPerk)
player.removeperk(SAGassassinClassPerk)
EndFunction
;;;;;;;;;;;;;;;;;;;;;;;; END OF "REMOVE PLAYER'S CLASS FUNCTION" ;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;; SHOW PRAYER'S SUB-MENU FUNCTION ;;;;;;;;;;;;;;;;;;;;;;;;
Function ShowPrayerSubMenu()
Int ButtonPrayer = SAGChooseUnderPrayerClassMessage.Show()
if ButtonPrayer == Daedra
Player.AddSpell(SAGPrayerTransformSPELL)
elseif ButtonPrayer == Talos
Player.Additem(ReligiousTalosMankind, 1, 1)
Player.EquipItem(ReligiousTalosMankind, 0, 1)
elseif ButtonPrayer == Arkay
Player.AddItem(ReligiousArkayLifeDeath, 1, 1)
Player.EquipItem(ReligiousArkayLifeDeath, 0, 1)
elseif ButtonPrayer == Julianos
Player.AddItem(ReligiousJulianosMagic, 1, 1)
Player.EquipItem(ReligiousJulianosMagic, 0, 1)
elseif ButtonPrayer == Kynareth
Player.AddItem(ReligiousKynarethAir,1,1)
Player.EquipItem(ReligiousKynarethAir,0,1)
elseif ButtonPrayer == Stendarr
Player.Additem(ReligiousStendarrMercy,1,1)
Player.Equipitem(ReligiousStendarrMercy,0,1)
elseif ButtonPrayer == Mara
Player.Additem(ReligiousMaraLove,1,1)
Player.EquipItem(ReligiousMaraLove,0,1)
elseif ButtonPrayer == Zenithar
Player.Additem(ReligiousZenitharCommerce,1,1)
Player.EquipItem(ReligiousZenitharCommerce,0,1)
elseif ButtonPrayer == Dibella
player.additem(ReligiousDibellaBeauty,1,1)
player.equipitem(ReligiousDibellaBeauty,0,1)
elseif ButtonPrayer == Akatosh
player.additem(ReligiousAkatoshTime,1,1)
player.equipitem(ReligiousAkatoshTime,0,1)
endif
EndFunction
;;;;;;;;;;;;;;;;;;;;;;;; END OF PRAYER'S SUB-MENU FUNCTION ;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;; REGISTER FOR UPDATE FUNCTION ;;;;;;;;;;;;;;;;;;;;;;;;
Function Funct()
registerforupdate(2)
EndFunction
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;; CLASS-RELATED "QUESTS" ;;;;;;;;;;;;;;;;;;;;;;;;
Event OnUpdate()
;;;;;;;;;;;;;;;;;;;;;;;; VAMPIRE HUNTER ;;;;;;;;;;;;;;;;;;;;;;;;
if Player.HasSpell(SAGVampireHunterSpell )
if Player.HasSpell(SAGVampireHunterAbilitySPELL) == 0 && Player.HasSpell(SAGVampireHunterMustMassacre) == 0
VampireSunlightISMD02.Apply()
Player.AddSpell(SAGVampireHunterMustMassacre)
SAGVampireHunterNeedMassacreMESSAGE.Show()
Wait(2)
VampireSunlightISMD02.Remove()
elseif Player.HasSpell(SAGVampireHunterAbilitySPELL) == 1 && Player.HasSpell(SAGVampireHunterMustMassacre) == 1
Player.DispelSpell(SAGVampireHunterMustMassacre)
Wait(0.5)
Player.RemoveSpell(SAGVampireHunterMustMassacre)
endif
endif
EndEvent