Jump to content

i made a script, now what?


TheBlob2

Recommended Posts

I made a script but I don't know how to get it to work in the game, I know how to code papyrus but I'm not entirely sure how to get the scripts to trigger during gameplay. I spent a couple hours working on it, and I don't wanna do all that work for nothing.

 

So the general purpose of the script is to lower the player's skills to when the player is looking at his stats menu and have the skills go back to normal after they exit the menu. Decreasing the skills to compensate for the luck bonus, i know that the luck bonus isn't as high as this in vanilla, but i have a mod that increases it. (it always felt odd to me how luck counts towards my overall knowledge towards a subject, it should atleast be hidden from me how much difference luck makes to give it a sense of mystery) when i release this mod i will obviously change the values for the vanilla luck bonus.

 

the script:

int status

Begin MenuMode 1003 ;(stats menu)
If Player.GetAV luck == 1
player.modav barter 10
player.modav energyweapons 10
player.modav explosives 10
player.modav guns 10
player.modav lockpick 10
player.modav medicine 10
player.modav meleeweapons 10
player.modav repair 10
player.modav science 10
player.modav sneak 10
player.modav speech 10
player.modav survival 10
player.modav unarmed 10

ElseIf Player.GetAV luck == 2
player.modav barter 5
player.modav energyweapons 5
player.modav explosives 5
player.modav guns 5
player.modav lockpick 5
player.modav medicine 5
player.modav meleeweapons 5
player.modav repair 5
player.modav science 5
player.modav sneak 5
player.modav speech 5
player.modav survival 5
player.modav unarmed 5

ElseIf Player.GetAV luck == 3
player.modav barter 0
player.modav energyweapons 0
player.modav explosives 0
player.modav guns 0
player.modav lockpick 0
player.modav medicine 0
player.modav meleeweapons 0
player.modav repair 0
player.modav science 0
player.modav sneak 0
player.modav speech 0
player.modav survival 0
player.modav unarmed 0

ElseIf Player.GetAV luck == 4
player.modav barter -5
player.modav energyweapons -5
player.modav explosives -5
player.modav guns -5
player.modav lockpick -5
player.modav medicine -5
player.modav meleeweapons -5
player.modav repair -5
player.modav science -5
player.modav sneak -5
player.modav speech -5
player.modav survival -5
player.modav unarmed -5

ElseIf Player.GetAV luck == 5
player.modav barter -10
player.modav energyweapons -10
player.modav explosives -10
player.modav guns -10
player.modav lockpick -10
player.modav medicine -10
player.modav meleeweapons -10
player.modav repair -10
player.modav science -10
player.modav sneak -10
player.modav speech -10
player.modav survival -10
player.modav unarmed -10

ElseIf Player.GetAV luck == 6
player.modav barter -15
player.modav energyweapons -15
player.modav explosives -15
player.modav guns -15
player.modav lockpick -15
player.modav medicine -15
player.modav meleeweapons -15
player.modav repair -15
player.modav science -15
player.modav sneak -15
player.modav speech -15
player.modav survival -15
player.modav unarmed -15

ElseIf Player.GetAV luck == 7
player.modav barter -20
player.modav energyweapons -20
player.modav explosives -20
player.modav guns -20
player.modav lockpick -20
player.modav medicine -20
player.modav meleeweapons -20
player.modav repair -20
player.modav science -20
player.modav sneak -20
player.modav speech -20
player.modav survival -20
player.modav unarmed -20

ElseIf Player.GetAV luck == 8
player.modav barter -25
player.modav energyweapons -25
player.modav explosives -25
player.modav guns -25
player.modav lockpick -25
player.modav medicine -25
player.modav meleeweapons -25
player.modav repair -25
player.modav science -25
player.modav sneak -25
player.modav speech -25
player.modav survival -25
player.modav unarmed -25

ElseIf Player.GetAV luck == 9
player.modav barter -30
player.modav energyweapons -30
player.modav explosives -30
player.modav guns -30
player.modav lockpick -30
player.modav medicine -30
player.modav meleeweapons -30
player.modav repair -30
player.modav science -30
player.modav sneak -30
player.modav speech -30
player.modav survival -30
player.modav unarmed -30

ElseIf Player.GetAV luck == 10
player.modav barter -35
player.modav energyweapons -35
player.modav explosives -35
player.modav guns -35
player.modav lockpick -35
player.modav medicine -35
player.modav meleeweapons -35
player.modav repair -35
player.modav science -35
player.modav sneak -35
player.modav speech -35
player.modav survival -35
player.modav unarmed -35
EndIf
set status to 1
end

Begin menumode 1002 ;(inventory)
if status == 1
If Player.GetAV luck == 1
player.modav barter -10
player.modav energyweapons -10
player.modav explosives -10
player.modav guns -10
player.modav lockpick -10
player.modav medicine -10
player.modav meleeweapons -10
player.modav repair -10
player.modav science -10
player.modav sneak -10
player.modav speech -10
player.modav survival -10
player.modav unarmed -10

ElseIf Player.GetAV luck == 2
player.modav barter -5
player.modav energyweapons -5
player.modav explosives -5
player.modav guns -5
player.modav lockpick -5
player.modav medicine -5
player.modav meleeweapons -5
player.modav repair -5
player.modav science -5
player.modav sneak -5
player.modav speech -5
player.modav survival -5
player.modav unarmed -5

ElseIf Player.GetAV luck == 3
player.modav barter 0
player.modav energyweapons 0
player.modav explosives 0
player.modav guns 0
player.modav lockpick 0
player.modav medicine 0
player.modav meleeweapons 0
player.modav repair 0
player.modav science 0
player.modav sneak 0
player.modav speech 0
player.modav survival 0
player.modav unarmed 0

ElseIf Player.GetAV luck == 4
player.modav barter 5
player.modav energyweapons 5
player.modav explosives 5
player.modav guns 5
player.modav lockpick 5
player.modav medicine 5
player.modav meleeweapons 5
player.modav repair 5
player.modav science 5
player.modav sneak 5
player.modav speech 5
player.modav survival 5
player.modav unarmed 5

ElseIf Player.GetAV luck == 5
player.modav barter 10
player.modav energyweapons 10
player.modav explosives 10
player.modav guns 10
player.modav lockpick 10
player.modav medicine 10
player.modav meleeweapons 10
player.modav repair 10
player.modav science 10
player.modav sneak 10
player.modav speech 10
player.modav survival 10
player.modav unarmed 10

ElseIf Player.GetAV luck == 6
player.modav barter 15
player.modav energyweapons 15
player.modav explosives 15
player.modav guns 15
player.modav lockpick 15
player.modav medicine 15
player.modav meleeweapons 15
player.modav repair 15
player.modav science 15
player.modav sneak 15
player.modav speech 15
player.modav survival 15
player.modav unarmed 15

ElseIf Player.GetAV luck == 7
player.modav barter 20
player.modav energyweapons 20
player.modav explosives 20
player.modav guns 20
player.modav lockpick 20
player.modav medicine 20
player.modav meleeweapons 20
player.modav repair 20
player.modav science 20
player.modav sneak 20
player.modav speech 20
player.modav survival 20
player.modav unarmed 20

ElseIf Player.GetAV luck == 8
player.modav barter 25
player.modav energyweapons 25
player.modav explosives 25
player.modav guns 25
player.modav lockpick 25
player.modav medicine 25
player.modav meleeweapons 25
player.modav repair 25
player.modav science 25
player.modav sneak 25
player.modav speech 25
player.modav survival 25
player.modav unarmed 25

ElseIf Player.GetAV luck == 9
player.modav barter 30
player.modav energyweapons 30
player.modav explosives 30
player.modav guns 30
player.modav lockpick 30
player.modav medicine 30
player.modav meleeweapons 30
player.modav repair 30
player.modav science 30
player.modav sneak 30
player.modav speech 30
player.modav survival 30
player.modav unarmed 30

ElseIf Player.GetAV luck == 10
player.modav barter 35
player.modav energyweapons 35
player.modav explosives 35
player.modav guns 35
player.modav lockpick 35
player.modav medicine 35
player.modav meleeweapons 35
player.modav repair 35
player.modav science 35
player.modav sneak 35
player.modav speech 35
player.modav survival 35
player.modav unarmed 35
EndIf
set status to 0
endif

end

Begin menumode 1023 ;(journal)
if status == 1
If Player.GetAV luck == 1
player.modav barter -10
player.modav energyweapons -10
player.modav explosives -10
player.modav guns -10
player.modav lockpick -10
player.modav medicine -10
player.modav meleeweapons -10
player.modav repair -10
player.modav science -10
player.modav sneak -10
player.modav speech -10
player.modav survival -10
player.modav unarmed -10

ElseIf Player.GetAV luck == 2
player.modav barter -5
player.modav energyweapons -5
player.modav explosives -5
player.modav guns -5
player.modav lockpick -5
player.modav medicine -5
player.modav meleeweapons -5
player.modav repair -5
player.modav science -5
player.modav sneak -5
player.modav speech -5
player.modav survival -5
player.modav unarmed -5

ElseIf Player.GetAV luck == 3
player.modav barter 0
player.modav energyweapons 0
player.modav explosives 0
player.modav guns 0
player.modav lockpick 0
player.modav medicine 0
player.modav meleeweapons 0
player.modav repair 0
player.modav science 0
player.modav sneak 0
player.modav speech 0
player.modav survival 0
player.modav unarmed 0

ElseIf Player.GetAV luck == 4
player.modav barter 5
player.modav energyweapons 5
player.modav explosives 5
player.modav guns 5
player.modav lockpick 5
player.modav medicine 5
player.modav meleeweapons 5
player.modav repair 5
player.modav science 5
player.modav sneak 5
player.modav speech 5
player.modav survival 5
player.modav unarmed 5

ElseIf Player.GetAV luck == 5
player.modav barter 10
player.modav energyweapons 10
player.modav explosives 10
player.modav guns 10
player.modav lockpick 10
player.modav medicine 10
player.modav meleeweapons 10
player.modav repair 10
player.modav science 10
player.modav sneak 10
player.modav speech 10
player.modav survival 10
player.modav unarmed 10

ElseIf Player.GetAV luck == 6
player.modav barter 15
player.modav energyweapons 15
player.modav explosives 15
player.modav guns 15
player.modav lockpick 15
player.modav medicine 15
player.modav meleeweapons 15
player.modav repair 15
player.modav science 15
player.modav sneak 15
player.modav speech 15
player.modav survival 15
player.modav unarmed 15

ElseIf Player.GetAV luck == 7
player.modav barter 20
player.modav energyweapons 20
player.modav explosives 20
player.modav guns 20
player.modav lockpick 20
player.modav medicine 20
player.modav meleeweapons 20
player.modav repair 20
player.modav science 20
player.modav sneak 20
player.modav speech 20
player.modav survival 20
player.modav unarmed 20

ElseIf Player.GetAV luck == 8
player.modav barter 25
player.modav energyweapons 25
player.modav explosives 25
player.modav guns 25
player.modav lockpick 25
player.modav medicine 25
player.modav meleeweapons 25
player.modav repair 25
player.modav science 25
player.modav sneak 25
player.modav speech 25
player.modav survival 25
player.modav unarmed 25

ElseIf Player.GetAV luck == 9
player.modav barter 30
player.modav energyweapons 30
player.modav explosives 30
player.modav guns 30
player.modav lockpick 30
player.modav medicine 30
player.modav meleeweapons 30
player.modav repair 30
player.modav science 30
player.modav sneak 30
player.modav speech 30
player.modav survival 30
player.modav unarmed 30

ElseIf Player.GetAV luck == 10
player.modav barter 35
player.modav energyweapons 35
player.modav explosives 35
player.modav guns 35
player.modav lockpick 35
player.modav medicine 35
player.modav meleeweapons 35
player.modav repair 35
player.modav science 35
player.modav sneak 35
player.modav speech 35
player.modav survival 35
player.modav unarmed 35
EndIf
set status to 0
endif

end

Begin GameMode
if status == 1
If Player.GetAV luck == 1
player.modav barter -10
player.modav energyweapons -10
player.modav explosives -10
player.modav guns -10
player.modav lockpick -10
player.modav medicine -10
player.modav meleeweapons -10
player.modav repair -10
player.modav science -10
player.modav sneak -10
player.modav speech -10
player.modav survival -10
player.modav unarmed -10

ElseIf Player.GetAV luck == 2
player.modav barter -5
player.modav energyweapons -5
player.modav explosives -5
player.modav guns -5
player.modav lockpick -5
player.modav medicine -5
player.modav meleeweapons -5
player.modav repair -5
player.modav science -5
player.modav sneak -5
player.modav speech -5
player.modav survival -5
player.modav unarmed -5

ElseIf Player.GetAV luck == 3
player.modav barter 0
player.modav energyweapons 0
player.modav explosives 0
player.modav guns 0
player.modav lockpick 0
player.modav medicine 0
player.modav meleeweapons 0
player.modav repair 0
player.modav science 0
player.modav sneak 0
player.modav speech 0
player.modav survival 0
player.modav unarmed 0

ElseIf Player.GetAV luck == 4
player.modav barter 5
player.modav energyweapons 5
player.modav explosives 5
player.modav guns 5
player.modav lockpick 5
player.modav medicine 5
player.modav meleeweapons 5
player.modav repair 5
player.modav science 5
player.modav sneak 5
player.modav speech 5
player.modav survival 5
player.modav unarmed 5

ElseIf Player.GetAV luck == 5
player.modav barter 10
player.modav energyweapons 10
player.modav explosives 10
player.modav guns 10
player.modav lockpick 10
player.modav medicine 10
player.modav meleeweapons 10
player.modav repair 10
player.modav science 10
player.modav sneak 10
player.modav speech 10
player.modav survival 10
player.modav unarmed 10

ElseIf Player.GetAV luck == 6
player.modav barter 15
player.modav energyweapons 15
player.modav explosives 15
player.modav guns 15
player.modav lockpick 15
player.modav medicine 15
player.modav meleeweapons 15
player.modav repair 15
player.modav science 15
player.modav sneak 15
player.modav speech 15
player.modav survival 15
player.modav unarmed 15

ElseIf Player.GetAV luck == 7
player.modav barter 20
player.modav energyweapons 20
player.modav explosives 20
player.modav guns 20
player.modav lockpick 20
player.modav medicine 20
player.modav meleeweapons 20
player.modav repair 20
player.modav science 20
player.modav sneak 20
player.modav speech 20
player.modav survival 20
player.modav unarmed 20

ElseIf Player.GetAV luck == 8
player.modav barter 25
player.modav energyweapons 25
player.modav explosives 25
player.modav guns 25
player.modav lockpick 25
player.modav medicine 25
player.modav meleeweapons 25
player.modav repair 25
player.modav science 25
player.modav sneak 25
player.modav speech 25
player.modav survival 25
player.modav unarmed 25

ElseIf Player.GetAV luck == 9
player.modav barter 30
player.modav energyweapons 30
player.modav explosives 30
player.modav guns 30
player.modav lockpick 30
player.modav medicine 30
player.modav meleeweapons 30
player.modav repair 30
player.modav science 30
player.modav sneak 30
player.modav speech 30
player.modav survival 30
player.modav unarmed 30

ElseIf Player.GetAV luck == 10
player.modav barter 35
player.modav energyweapons 35
player.modav explosives 35
player.modav guns 35
player.modav lockpick 35
player.modav medicine 35
player.modav meleeweapons 35
player.modav repair 35
player.modav science 35
player.modav sneak 35
player.modav speech 35
player.modav survival 35
player.modav unarmed 35
EndIf
set status to 0
endif

end



Link to comment
Share on other sites

you need to make a new quest, this script as quest script...put this script into the quest...done

 

1) save the script as quest script -

qlljed51v1abusm6g.jpg

important: your script need:

scn MyLuckScript ;change the name!

.....your code..... 

2) make a quest (example:)

lz4ucyr57mu3wm96g.jpg

red = important! - "Script Processing Delay" - you need to try the right value!

Edited by MrRadioactiv
Link to comment
Share on other sites

OK so you want to save your script as a quest script. Now make a new quest. I didn't see your script name (no scn), but lets say it's luckySCRIPT you'll probably want to name the quest luckyQUEST (you don't have to just helps to show an association). In the quest select start game enabled, set the priority to 55, and set your script processing delay to very low number so that the script fires off right after your in the menumode, like 0.1 (you may have to make it even lower, something like 0.001 is used if you need the script to check each frame).

 

Save your quest. Now open it again and select your script from the "script" drop down menu box.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...