Need help with Oblivion script

Blakestr

[H]ard|Gawd
Joined
Aug 11, 2004
Messages
1,955
First off, I've never scripted before...I realize there might not be a lot of Oblivion scripters on these forums, however, I've learned what i do know from a Morrowind Scripting Guide so if you scripted in Morrowind you should still be able to help...the Construction Set seems very similiar and the scripting language is very similiar with a few differences, such as :

Morrowind to make something happen when a player equipped an item you'd put an IF statement

If (Onequip == 1 )

Now you just do Begin OnEquip...

Anyway, I am working on a script for a Lockpick Mold, that melts down player gold and turns it into lockpicks. Essentially it is a weapon that, when equipped, Will ask the player how many lockpicks they would like to make, 5, 20, 50, or 100. Then the program will check the player's gold to make sure they have the corresponding amount, then deliver the appropriate amount of lockpicks to the players inventory, with a message saying xx amount of lockpicks were made out of xx septims.

Right now I have a lockpick mold that displays a Messagebox with the 4 selections, but I can't get the GetButtonPressed Function to display any following messages or commands...once i figure that out I can go onto checking for appropriate gold amount, subtracting it, and adding the lockpicks in the inventory (which would be the Additem command but would I have to entire it the entire amount of times or just 'Additem lockpick id 100 (is the following number the amount, I usually see just 1 as an example)

here is the script I have....feel free to point out any redundancies or ask questions, it is my first script, alot of trial and error but I am starting to get the gist of it...just plug and chug....

Right now all it is designed to do is return a message when you click on one of the selections on the popup (on equipping it)
scriptname AAAAALOCKPICKMOLD

short controlvar
short button
short amount
short gold12


Begin OnAdd Player
Set gold12 to GetGold
MessageBox "You have this %.0f gold", gold12



End

Begin Onequip
set controlvar to 1
MessageBox "How many lockpicks would you like to mold, out of your precious, precious gold?", "5", "20", "50", "100"
set button to GetButtonPressed

if ( button == -1)
return

elseif ( button == 1)
MessageBox "You have made five locks out of 25 Septims."


elseif ( button == 2 )
MessageBox "You have made 20 locks out of 100 Septims."



elseif ( button == 3 )
MessageBox "You have made 50 locks out of 250 Septims."



elseif ( button == 4 )
MessageBox "You have made 100 locks out of 500 Septims."

endif

End
 
I don't know the answer to your question, but you probably should ask on some of the elderscrolls mod sites too. I don't think there are a lot of Elderscrolls mod experts here.
 
Yeah I posted on Bethesda soft forums...very good place but no replies yet...I did email the author of an excellent scripting guide for Morrowind and asked if he could update it or at least he's tutorial to Oblivion....
 
Back
Top