bencebence Posted July 8, 2011 Share Posted July 8, 2011 Hey everyone I was working on the last script I need, and... I think everybody noticed that I can make a huge amount of script. This was too much :confused: 807 lines of pure script. Do anyone know an easy method how to make it shorter, but still clear, and easily understandable?Because I know with lots of variables it's easy, but it'll get a little harder to understand.Thanks in advance,bencebence Link to comment Share on other sites More sharing options...
MarkInMKUK Posted July 8, 2011 Share Posted July 8, 2011 Plan your software rather than just starting at the top and ploughing through. That's why programmers do flow charts and state diagrams - so they can simplify the code before they write it. First, take the whole code, and break it into chunks. Draw a flowchart with each Asian in a box. Look for things you do more than once, on different paths. That's a sign you may be able to simplify the code. Next, look at each section on its own. draw a flow chart. Look at it. If you have lots of reasons to avoid doing something, and only one reason you DO do it, then write the code to pick the one reason and do it, rather than all the reasons MOT to . Finally, go get a book or two on "how to program" and actually learn - not a specific language, but how to plan programming. It WILL pay off in the end. Link to comment Share on other sites More sharing options...
bencebence Posted July 8, 2011 Author Share Posted July 8, 2011 Hm, alright, thanks. I will try to do it. I hope I'll not end up with a broken script :P Link to comment Share on other sites More sharing options...
bencebence Posted July 8, 2011 Author Share Posted July 8, 2011 Hm, I know what I've done multiple times, but I don't know if is there a way to make a variable from a block as long as this; if (menulevel == 60) set button to getbuttonpressed if (button > -1) if (button == 0 && daedritecount >= 1) player.removeitem DaedricBar 1 player.additem WeapDaedricDagger 1 elseif (button == 1 && daedritecount >= 1) player.removeitem DaedricBar 1 player.additem DaedricArrowTips 1 elseif (button == 2 && daedritecount >= 2) player.removeitem DaedricBar 2 player.additem WeapDaedricShortSword 1 elseif (button == 3 && daedritecount >= 3) player.removeitem DaedricBar 3 player.additem WeapDaedricLongsword 1 elseif (button == 4 && daedritecount >= 3) player.removeitem DaedricBar 3 player.additem WeapDaedricClaymore 1 elseif (button == 5 && daedritecount >= 3) player.removeitem DaedricBar 3 player.additem WeapDaedricWarAxe 1 elseif (button == 6 && daedritecount >= 4) player.removeitem DaedricBar 4 player.additem WeapDaedricWarhammer 1 elseif (button == 7) message "Smithing cancelled." else message "Not enough materials." endif endif endifI have 10 of this for weapons and 10 like this for armors. Link to comment Share on other sites More sharing options...
fg109 Posted July 8, 2011 Share Posted July 8, 2011 Other than using arrays, I can't think of any way to make that shorter. And even with arrays, it will still be almost as long. Link to comment Share on other sites More sharing options...
bencebence Posted July 8, 2011 Author Share Posted July 8, 2011 Then I will break it into a weapon and an armor part. And make two anvils, one for weapons and one for armors. Link to comment Share on other sites More sharing options...
fore Posted July 8, 2011 Share Posted July 8, 2011 Doiing these kind of functions 10 or 20 times calls out loud for OBSE's user-defined functions. They are really GREAT. :thumbsup: Link to comment Share on other sites More sharing options...
fg109 Posted July 8, 2011 Share Posted July 8, 2011 I love having user defined functions. I wrote two for multi page menu displays and I use them in any mod that requires some complex menus. Link to comment Share on other sites More sharing options...
bencebence Posted July 8, 2011 Author Share Posted July 8, 2011 And how to use those functions? Link to comment Share on other sites More sharing options...
bencebence Posted July 8, 2011 Author Share Posted July 8, 2011 Hmm, I couldn't shorten it down, it's still almost the same length, and now it gives more errors.I'll post the original smith script. Can anyone shorten it for me, if it's not a too big request? (I just ask it, I don't want to take anyone's time) ScriptName 0ebmArmourAnvil Short hammer Short menulevel Short button Short ironcount Short bronzecount short coppercount Short steelcount Short dwarvencount Short elvencount Short glasscount Short ebonycount Short daedriccount Short armorerskill Begin OnActivate set armorerskill to player.getactorvalue armorer set hammer to player.getequipped Blacksmithhammer if hammer == 1 messagebox "Would you like to smith armor or weapon?", "Armor", "Weapon", "Cancel" set menulevel to 21 else Message "Not wearing suitable gear." endif end Begin gamemode set ironcount to player.getitemcount IronBar set steelcount to player.getitemcount SteelBar set dwarvencount to player.getitemcount DwarfiteBar set elvencount to player.getitemcount AyliiteBar set glasscount to player.getitemcount CrystaliteBar set ebonycount to player.getitemcount EbonyBar set daedriccount to player.getitemcount DaedriteBar set bronzecount to player.getitemcount BronzeBar set coppercount to player.getitemcount CopperBar if (menulevel == 21) set button to getbuttonpressed if (button > -1) if (button == 0) messagebox "Choose material.", "Copper, "Bronze", "Iron", "Steel", "Dwarfite", "Alyiite", "Crystalite", "Mithril", "Ebony", "Daedric", "Cancel" set menulevel to 31 elseif (button == 1) messagebox "Choose material.", "Copper, "Bronze", "Iron", "Steel", "Dwarfite", "Alyiite", "Crystalite", "Mithril", "Ebony", "Daedric", "Cancel" set menulevel to 32 elseif (button == 2) message "Crafting cancelled." else message "Your Armorer skill is too low." endif endif endif if (menulevel == 31) set button to getbuttonpressed if (button > -1) if (button == 0 && armorerskill >= 1) messagebox "Choose armor piece.", "Boots", "Cuirass", "Gauntlets", "Greaves", "Helmet", "Shield", "Full Set of Armor","Cancel" set menulevel to 41 elseif (button == 1 && armorerskill >= 5) messagebox "Choose armor piece.", "Boots", "Cuirass", "Gauntlets", "Greaves", "Helmet", "Shield", "Full Set of Armor", "Cancel" set menulevel to 42 elseif (button == 2 && armorerskill >= 10) messagebox "Choose armor piece.", "Boots", "Cuirass", "Gauntlets", "Greaves", "Helmet", "Shield", "Full Set of Armor", "Cancel" set menulevel to 43 elseif (button == 3 && armorerskill >= 15) messagebox "Choose armor piece.", "Boots", "Cuirass", "Gauntlets", "Greaves", "Helmet", "Shield", "Full Set of Armor", "Cancel" set menulevel to 44 elseif (button == 4 && armorerskill >= 25) messagebox "Choose armor piece.", "Boots", "Cuirass", "Gauntlets", "Greaves", "Helmet", "Shield", "Full Set of Armor", "Cancel" set menulevel to 45 elseif (button == 5 && armorerskill >= 30) messagebox "Choose armor piece.", "Boots", "Cuirass", "Gauntlets", "Greaves", "Helmet", "Shield", "Full Set of Armor", "Cancel" set menulevel to 46 elseif (button == 6 && armorerskill >= 35) messagebox "Choose armor piece.", "Boots", "Cuirass", "Gauntlets", "Greaves", "Helmet", "Shield", "Full Set of Armor", "Cancel" set menulevel to 47 elseif (button == 7 && armorerskill >= 45) messagebox "Choose armor piece.", "Boots", "Cuirass", "Gauntlets", "Greaves", "Helmet", "Shield", "Full Set of Armor", "Cancel" set menulevel to 48 elseif (button == 8 && armorerskill >= 55) messagebox "Choose armor piece.", "Boots", "Cuirass", "Gauntlets", "Greaves", "Helmet", "Shield", "Full Set of Armor", "Cancel" set menulevel to 49 elseif (button == 9 && armorerskill >= 70) messagebox "Choose armor piece.", "Boots", "Cuirass", "Gauntlets", "Greaves", "Helmet", "Shield", "Full Set of Armor", "Cancel" set menulevel to 50 elseif (button == 10) message "Smithing cancelled." else message "You don't have high enough armorer skill to smith this item!" endif endif endif if (menulevel == 32) set button to getbuttonpressed if (button > -1) if (button == 0 && armorerskill >= 1) messagebox "Choose Weapon type.", "Boots", "Cuirass", "Gauntlets", "Greaves", "Helmet", "Shield", "Full Suit", "Cancel" set menulevel to 51 elseif (button == 1 && armorerskill >= 5) messagebox "Choose Weapon type.", "Boots", "Cuirass", "Gauntlets", "Greaves", "Helmet", "Shield", "Full Suit", "Cancel" set menulevel to 52 elseif (button == 2 && armorerskill >= 10) messagebox "Choose Weapon type.", "Boots", "Cuirass", "Gauntlets", "Greaves", "Helmet", "Shield", "Full Suit", "Cancel" set menulevel to 53 elseif (button == 3 && armorerskill >= 15) messagebox "Choose Weapon type.", "Boots", "Cuirass", "Gauntlets", "Greaves", "Helmet", "Shield", "Full Suit", "Cancel" set menulevel to 54 elseif (button == 4 && armorerskill >= 25) messagebox "Choose Weapon type.", "Boots", "Cuirass", "Gauntlets", "Greaves", "Helmet", "Shield", "Full Suit", "Cancel" set menulevel to 55 elseif (button == 5 && armorerskill >= 30) messagebox "Choose Weapon type.", "Boots", "Cuirass", "Gauntlets", "Greaves", "Helmet", "Shield", "Full Suit", "Cancel" set menulevel to 56 elseif (button == 6 && armorerskill >= 35) messagebox "Choose Weapon type.", "Boots", "Cuirass", "Gauntlets", "Greaves", "Helmet", "Shield", "Full Suit", "Cancel" set menulevel to 57 elseif (button == 7 && armorerskill >= 45) messagebox "Choose Weapon type.", "Boots", "Cuirass", "Gauntlets", "Greaves", "Helmet", "Shield", "Full Suit", "Cancel" set menulevel to 58 elseif (button == 8 && armorerskill >= 55) messagebox "Choose Weapon type.", "Boots", "Cuirass", "Gauntlets", "Greaves", "Helmet", "Shield", "Full Suit", "Cancel" set menulevel to 59 elseif (button == 9 && armorerskill >= 70) messagebox "Choose Weapon type.", "Boots", "Cuirass", "Gauntlets", "Greaves", "Helmet", "Shield", "Full Suit", "Cancel" set menulevel to 60 elseif (button == 10) message "Smithing cancelled." else message "You don't have high enough armorer skill to smith this item!" endif endif endif if (menulevel == 41) set button to getbuttonpressed if (button > -1) if (button == 0 && coppercount >= 3) player.removeitem CopperBar 3 player.additem CopperBoots 1 elseif (button == 1 && coppercount >= 5) player.removeitem CopperBar 5 player.additem CopperCuirass 1 elseif (button == 2 && coppercount >= 2) player.removeitem CopperBar 2 player.additem CopperGauntlets 1 elseif (button == 3 && coppercount >= 4) player.removeitem CopperBar 4 player.additem CopperGreaves 1 elseif (button == 4 && coppercount >= 2) player.removeitem CopperBar 2 player.additem CopperHelmet 1 elseif (button == 5 && coppercount >= 3) player.removeitem CopperBar 3 player.additem CopperShield 1 elseif (button == 6 && coppercount >= 19) player.removeitem CopperBar 19 player.additem CopperBoots 1 player.additem CopperCuirass 1 player.additem CopperGauntlets 1 player.additem CopperGreaves 1 player.additem CopperHelmet 1 player.additem CopperShield 1 elseif (button == 7) message "Smithing cancelled." else message "Not enough materials." endif endif endif if (menulevel == 42) set button to getbuttonpressed if (button > -1) if (button == 0 && bronzecount >= 3) player.removeitem BronzeBar 3 player.additem BronzeBoots 1 elseif (button == 1 && bronzecount >= 5) player.removeitem BronzeBar 5 player.additem BronzeCuirass 1 elseif (button == 2 && bronzecount >= 2) player.removeitem BronzeBar 2 player.additem BronzeGauntlets 1 elseif (button == 3 && bronzecount >= 4) player.removeitem BronzeBar 4 player.additem BronzeGreaves 1 elseif (button == 4 && bronzecount >= 2) player.removeitem BronzeBar 2 player.additem BronzeHelmet 1 elseif (button == 5 && bronzecount >= 3) player.removeitem BronzeBar 3 player.additem BronzeShield 1 elseif (button == 6 && bronzecount >= 19) player.removeitem BronzeBar 19 player.additem BronzeBoots 1 player.additem BronzeCuirass 1 player.additem BronzeGauntlets 1 player.additem BronzeGreaves 1 player.additem BronzeHelmet 1 player.additem BronzeShield 1 elseif (button == 7) message "Smithing cancelled." else message "Not enough materials." endif endif endif if (menulevel == 43) set button to getbuttonpressed if (button > -1) if (button == 0 && ironcount >= 3) player.removeitem IronBar 3 player.additem IronBoots 1 elseif (button == 1 && ironcount >= 5) player.removeitem IronBar 5 player.additem IronCuirass 1 elseif (button == 2 && ironcount >= 2) player.removeitem IronBar 2 player.additem IronGauntlets 1 elseif (button == 3 && ironcount >= 4) player.removeitem IronBar 4 player.additem IronGreaves 1 elseif (button == 4 && ironcount >= 2) player.removeitem IronBar 2 player.additem IronHelmet 1 elseif (button == 5 && ironcount >= 3) player.removeitem IronBar 3 player.additem IronShield 1 elseif (button == 6 && ironcount >= 19) player.removeitem IronBar 19 player.additem IronBoots 1 player.additem IronCuirass 1 player.additem IronGauntlets 1 player.additem IronGreaves 1 player.additem IronHelmet 1 player.additem IronShield 1 elseif (button == 7) message "Smithing cancelled." else message "Not enough materials." endif endif endif if (menulevel == 44) set button to getbuttonpressed if (button > -1) if (button == 0 && steelcount >= 3) player.removeitem SteelBar 3 player.additem SteelBoots 1 elseif (button == 1 && steelcount >= 5) player.removeitem SteelBar 5 player.additem SteelCuirass 1 elseif (button == 2 && steelcount >= 2) player.removeitem SteelBar 2 player.additem SteelGauntlets 1 elseif (button == 3 && steelcount >= 4) player.removeitem SteelBar 4 player.additem SteelGreaves 1 elseif (button == 4 && steelcount >= 2) player.removeitem SteelBar 2 player.additem SteelHelmet 1 elseif (button == 5 && steelcount >= 3) player.removeitem SteelBar 3 player.additem SteelShield 1 elseif (button == 6 && steelcount >= 19) player.removeitem SteelBar 19 player.additem SteelBoots 1 player.additem SteelCuirass 1 player.additem SteelGauntlets 1 player.additem SteelGreaves 1 player.additem SteelHelmet 1 player.additem SteelShield 1 elseif (button == 7) message "Smithing cancelled." else message "Not enough materials." endif endif endif if (menulevel == 45) set button to getbuttonpressed if (button > -1) if (button == 0 && dwarfitecount >= 3) player.removeitem DwarfiteBar 3 player.additem DwarvenBoots 1 elseif (button == 1 && dwarfitecount >= 5) player.removeitem DwarfiteBar 5 player.additem DwarvenCuirass 1 elseif (button == 2 && dwarfitecount >= 2) player.removeitem DwarfiteBar 2 player.additem DwarvenGauntlets 1 elseif (button == 3 && dwarfitecount >= 4) player.removeitem DwarfiteBar 4 player.additem DwarvenGreaves 1 elseif (button == 4 && dwarfitecount >= 2) player.removeitem DwarfiteBar 2 player.additem DwarvenHelmet 1 elseif (button == 5 && dwarfitecount >= 3) player.removeitem DwarfiteBar 3 player.additem DwarvenShield 1 elseif (button == 6 && dwarfitecount >= 19) player.removeitem DwarfiteBar 19 player.additem DwarvenBoots 1 player.additem DwarvenCuirass 1 player.additem DwarvenGauntlets 1 player.additem DwarvenGreaves 1 player.additem DwarvenHelmet 1 player.additem DwarvenShield 1 elseif (button == 7) message "Smithing cancelled." else message "Not enough materials." endif endif endif if (menulevel == 46) set button to getbuttonpressed if (button > -1) if (button == 0 && ayliitecount >= 3) player.removeitem AyliiteBar 3 player.additem ElvenBoots 1 elseif (button == 1 && ayliitecount >= 5) player.removeitem AyliiteBar 5 player.additem ElvenCuirass 1 elseif (button == 2 && ayliitecount >= 2) player.removeitem AyliiteBar 2 player.additem ElvenGauntlets 1 elseif (button == 3 && ayliitecount >= 4) player.removeitem AyliiteBar 4 player.additem ElvenGreaves 1 elseif (button == 4 && ayliitecount >= 2) player.removeitem AyliiteBar 2 player.additem ElvenHelmet 1 elseif (button == 5 && ayliitecount >= 3) player.removeitem AyliiteBar 3 player.additem ElvenShield 1 elseif (button == 6 && ayliitecount >= 19) player.removeitem AyliiteBar 19 player.additem ElvenBoots 1 player.additem ElvenCuirass 1 player.additem ElvenGauntlets 1 player.additem ElvenGreaves 1 player.additem ElvenHelmet 1 player.additem ElvenShield 1 elseif (button == 7) message "Smithing cancelled." else message "Not enough materials." endif endif endif if (menulevel == 47) set button to getbuttonpressed if (button > -1) if (button == 0 && crystalitecount >= 3) player.removeitem CrystaliteBar 3 player.additem GlassBoots 1 elseif (button == 1 && crystalitecount >= 5) player.removeitem CrystaliteBar 5 player.additem GlassCuirass 1 elseif (button == 2 && crystalitecount >= 2) player.removeitem CrystaliteBar 2 player.additem GlassGauntlets 1 elseif (button == 3 && crystalitecount >= 4) player.removeitem CrystaliteBar 4 player.additem GlassGreaves 1 elseif (button == 4 && crystalitecount >= 2) player.removeitem CrystaliteBar 2 player.additem GlassHelmet 1 elseif (button == 5 && crystalitecount >= 3) player.removeitem CrystaliteBar 3 player.additem GlassShield 1 elseif (button == 6 && crystalitecount >= 19) player.removeitem DwarfiteBar 19 player.additem GlassBoots 1 player.additem GlassCuirass 1 player.additem GlassGauntlets 1 player.additem GlassGreaves 1 player.additem GlassHelmet 1 player.additem GlassShield 1 elseif (button == 7) message "Smithing cancelled." else message "Not enough materials." endif endif endif if (menulevel == 48) set button to getbuttonpressed if (button > -1) if (button == 0 && mithrilcount >= 3) player.removeitem MithrilBar 3 player.additem MithrilBoots 1 elseif (button == 1 && mithrilcount >= 5) player.removeitem MithrilBar 5 player.additem MithrilCuirass 1 elseif (button == 2 && mithrilcount >= 2) player.removeitem MithrilBar 2 player.additem MithrilGauntlets 1 elseif (button == 3 && mithrilcount >= 4) player.removeitem MithrilBar 4 player.additem MithrilGreaves 1 elseif (button == 4 && mithrilcount >= 2) player.removeitem MithrilBar 2 player.additem MithrilHelmet 1 elseif (button == 5 && mithrilcount >= 3) player.removeitem MithrilBar 3 player.additem MithrilShield 1 elseif (button == 6 && mithrilcount >= 19) player.removeitem MithrilBar 19 player.additem MithrilBoots 1 player.additem MithrilCuirass 1 player.additem MithrilGauntlets 1 player.additem MithrilGreaves 1 player.additem MithrilHelmet 1 player.additem MithrilShield 1 elseif (button == 7) message "Smithing cancelled." else message "Not enough materials." endif endif endif if (menulevel == 49) set button to getbuttonpressed if (button > -1) if (button == 0 && ebonycount >= 3) player.removeitem EbonyBar 3 player.additem EbonyBoots 1 elseif (button == 1 && ebonycount >= 5) player.removeitem EbonyBar 5 player.additem EbonyCuirass 1 elseif (button == 2 && ebonycount >= 2) player.removeitem EbonyBar 2 player.additem EbonyGauntlets 1 elseif (button == 3 && ebonycount >= 4) player.removeitem EbonyBar 4 player.additem EbonyGreaves 1 elseif (button == 4 && ebonycount >= 2) player.removeitem EbonyBar 2 player.additem EbonyHelmet 1 elseif (button == 5 && ebonycount >= 3) player.removeitem EbonyBar 3 player.additem EbonyShield 1 elseif (button == 6 && ebonycount >= 19) player.removeitem EbonyBar 19 player.additem EbonyBoots 1 player.additem EbonyCuirass 1 player.additem EbonyGauntlets 1 player.additem EbonyGreaves 1 player.additem EbonyHelmet 1 player.additem EbonyShield 1 elseif (button == 7) message "Smithing cancelled." else message "Not enough materials." endif endif endif if (menulevel == 50) set button to getbuttonpressed if (button > -1) if (button == 0 && daedritecount >= 3) player.removeitem DaedriteBar 3 player.additem DaedricBoots 1 elseif (button == 1 && daedritecount >= 5) player.removeitem DaedriteBar 5 player.additem DaedricCuirass 1 elseif (button == 2 && daedritecount >= 2) player.removeitem DaedriteBar 2 player.additem DaedricGauntlets 1 elseif (button == 3 && daedritecount >= 4) player.removeitem DaedriteBar 4 player.additem DaedricGreaves 1 elseif (button == 4 && daedritecount >= 2) player.removeitem DaedriteBar 2 player.additem DaedricHelmet 1 elseif (button == 5 && daedritecount >= 3) player.removeitem DaedriteBar 3 player.additem DaedricShield 1 elseif (button == 6 && daedritecount >= 19) player.removeitem DaedriteBar 19 player.additem DaedricBoots 1 player.additem DaedricCuirass 1 player.additem DaedricGauntlets 1 player.additem DaedricGreaves 1 player.additem DaedricHelmet 1 player.additem DaedricShield 1 elseif (button == 7) message "Smithing cancelled." else message "Not enough materials." endif endif endif if (menulevel == 51) set button to getbuttonpressed if (button > -1) if (button == 0 && coppercount >= 1) player.removeitem CopperBar 1 player.additem CopperDagger 1 elseif (button == 1 && coppercount >= 1) player.removeitem CopperBar 1 player.additem CopperArrowTips 8 elseif (button == 2 && coppercount >= 2) player.removeitem CopperBar 2 player.additem CopperShortsword 1 elseif (button == 3 && coppercount >= 3) player.removeitem CopperBar 3 player.additem CopperLongsword 1 elseif (button == 4 && coppercount >= 3) player.removeitem CopperBar 3 player.additem CopperClaymore 1 elseif (button == 5 && coppercount >= 3) player.removeitem CopperBar 3 player.additem CopperWarAxe 1 elseif (button == 6 && coppercount >= 4) player.removeitem CopperBar 4 player.additem CopperWarHammer 1 elseif (button == 7) message "Smithing cancelled." else message "Not enough materials." endif endif endif if (menulevel == 52) set button to getbuttonpressed if (button > -1) if (button == 0 && bronzecount >= 1) player.removeitem BronzeBar 1 player.additem BronzeDagger 1 elseif (button == 1 && bronzecount >= 1) player.removeitem BronzeBar 1 player.additem BronzeArrowTips 8 elseif (button == 2 && bronzecount >= 2) player.removeitem BronzeBar 2 player.additem BronzeShortsword 1 elseif (button == 3 && bronzecount >= 3) player.removeitem BronzeBar 3 player.additem BronzeLongsword 1 elseif (button == 4 && bronzecount >= 3) player.removeitem BronzeBar 3 player.additem BronzeClaymore 1 elseif (button == 5 && bronzecount >= 3) player.removeitem BronzeBar 3 player.additem BronzeWarAxe 1 elseif (button == 6 && bronzecount >= 4) player.removeitem BronzeBar 4 player.additem BronzeWarHammer 1 elseif (button == 7) message "Smithing cancelled." else message "Not enough materials." endif endif endif if (menulevel == 53) set button to getbuttonpressed if (button > -1) if (button == 0 && ironcount >= 1) player.removeitem IronBar 1 player.additem IronDagger 1 elseif (button == 1 && ironcount >= 1) player.removeitem IronBar 1 player.additem IronArrowTips 8 elseif (button == 2 && ironcount >= 2) player.removeitem IronBar 2 player.additem IronShortsword 1 elseif (button == 3 && ironcount >= 3) player.removeitem IronBar 3 player.additem IronLongsword 1 elseif (button == 4 && ironcount >= 3) player.removeitem IronBar 3 player.additem IronClaymore 1 elseif (button == 5 && ironcount >= 3) player.removeitem IronBar 3 player.additem IronWarAxe 1 elseif (button == 6 && ironcount >= 4) player.removeitem IronBar 4 player.additem IronWarHammer 1 elseif (button == 7) message "Smithing cancelled." else message "Not enough materials." endif endif endif if (menulevel == 54) set button to getbuttonpressed if (button > -1) if (button == 0 && steelcount >= 1) player.removeitem SteelBar 1 player.additem SteelDagger 1 elseif (button == 1 && steelcount >= 1) player.removeitem SteelBar 1 player.additem SteelArrowTips 8 elseif (button == 2 && steelcount >= 2) player.removeitem SteelBar 2 player.additem SteelShortsword 1 elseif (button == 3 && steelcount >= 3) player.removeitem SteelBar 3 player.additem SteelLongsword 1 elseif (button == 4 && steelcount >= 3) player.removeitem SteelBar 3 player.additem SteelClaymore 1 elseif (button == 5 && steelcount >= 3) player.removeitem SteelBar 3 player.additem SteelWarAxe 1 elseif (button == 6 && steelcount >= 4) player.removeitem SteelBar 4 player.additem SteelWarHammer 1 elseif (button == 7) message "Smithing cancelled." else message "Not enough materials." endif endif endif if (menulevel == 55) set button to getbuttonpressed if (button > -1) if (button == 0 && dwarfitecount >= 1) player.removeitem DwarfiteBar 1 player.additem DwarvenDagger 1 elseif (button == 1 && dwarfitecount >= 1) player.removeitem DwarfiteBar 1 player.additem DwarvenArrowTips 8 elseif (button == 2 && dwarfitecount >= 2) player.removeitem DwarfiteBar 2 player.additem DwarvenShortsword 1 elseif (button == 3 && dwarfitecount >= 3) player.removeitem DwarfiteBar 3 player.additem DwarvenLongsword 1 elseif (button == 4 && dwarfitecount >= 3) player.removeitem DwarfiteBar 3 player.additem DwarvenClaymore 1 elseif (button == 5 && dwarfitecount >= 3) player.removeitem DwarfiteBar 3 player.additem DwarvenWarAxe 1 elseif (button == 6 && dwarfitecount >= 4) player.removeitem DwarfiteBar 4 player.additem DwarvenWarHammer 1 elseif (button == 7) message "Smithing cancelled." else message "Not enough materials." endif endif endif if (menulevel == 56) set button to getbuttonpressed if (button > -1) if (button == 0 && ayliitecount >= 1) player.removeitem AyliiteBar 1 player.additem ElvenDagger 1 elseif (button == 1 && ayliitecount >= 1) player.removeitem AyliiteBar 1 player.additem ElvenArrowTips 1 elseif (button == 2 && ayliitecount >= 2) player.removeitem AyliiteBar 2 player.additem ElvenShortSword 1 elseif (button == 3 && ayliitecount >= 3) player.removeitem AyliiteBar 3 player.additem ElvenLongsword 1 elseif (button == 4 && ayliitecount >= 3) player.removeitem AyliiteBar 3 player.additem ElvenClaymore 1 elseif (button == 5 && ayliitecount >= 3) player.removeitem AyliiteBar 3 player.additem ElvenWarAxe 1 elseif (button == 6 && ayliitecount >= 4) player.removeitem AyliiteBar 4 player.additem ElvenWarhammer 1 elseif (button == 7) message "Smithing cancelled." else message "Not enough materials." endif endif endif if (menulevel == 57) set button to getbuttonpressed if (button > -1) if (button == 0 && crystalitecount >= 1) player.removeitem CrystaliteBar 1 player.additem GlassDagger 1 elseif (button == 1 && crystalitecount >= 1) player.removeitem CrystaliteBar 1 player.additem GlassArrowTips 1 elseif (button == 2 && crystalitecount >= 2) player.removeitem CrystaliteBar 2 player.additem GlassShortSword 1 elseif (button == 3 && crystalitecount >= 3) player.removeitem CrystaliteBar 3 player.additem GlassLongsword 1 elseif (button == 4 && crystalitecount >= 3) player.removeitem CrystaliteBar 3 player.additem GlassClaymore 1 elseif (button == 5 && crystalitecount >= 3) player.removeitem CrystaliteBar 3 player.additem GlassWarAxe 1 elseif (button == 6 && crystalitecount >= 4) player.removeitem CrystaliteBar 4 player.additem GlassWarhammer 1 elseif (button == 7) message "Smithing cancelled." else message "Not enough materials." endif endif endif if (menulevel == 58) set button to getbuttonpressed if (button > -1) if (button == 0 && mithrilcount >= 1) player.removeitem MithrilBar 1 player.additem MithrilDagger 1 elseif (button == 1 && mithrilcount >= 1) player.removeitem MithrilBar 1 player.additem MithrilArrowTips 1 elseif (button == 2 && mithrilcount >= 2) player.removeitem MithrilBar 2 player.additem MithrilShortSword 1 elseif (button == 3 && mithrilcount >= 3) player.removeitem MithrilBar 3 player.additem MithrilLongsword 1 elseif (button == 4 && mithrilcount >= 3) player.removeitem MithrilBar 3 player.additem MithrilClaymore 1 elseif (button == 5 && mithrilcount >= 3) player.removeitem MithrilBar 3 player.additem MithrilWarAxe 1 elseif (button == 6 && mithrilcount >= 4) player.removeitem MithrilBar 4 player.additem MithrilWarhammer 1 elseif (button == 7) message "Smithing cancelled." else message "Not enough materials." endif endif endif if (menulevel == 59) set button to getbuttonpressed if (button > -1) if (button == 0 && ebonycount >= 1) player.removeitem EbonyBar 1 player.additem EbonyDagger 1 elseif (button == 1 && ebonycount >= 1) player.removeitem EbonyBar 1 player.additem EbonyArrowTips 1 elseif (button == 2 && ebonycount >= 2) player.removeitem EbonyBar 2 player.additem EbonyShortSword 1 elseif (button == 3 && ebonycount >= 3) player.removeitem EbonyBar 3 player.additem EbonyLongsword 1 elseif (button == 4 && ebonycount >= 3) player.removeitem EbonyBar 3 player.additem EbonyClaymore 1 elseif (button == 5 && ebonycount >= 3) player.removeitem EbonyBar 3 player.additem EbonyWarAxe 1 elseif (button == 6 && ebonycount >= 4) player.removeitem EbonyBar 4 player.additem EbonyWarhammer 1 elseif (button == 7) message "Smithing cancelled." else message "Not enough materials." endif endif endif if (menulevel == 60) set button to getbuttonpressed if (button > -1) if (button == 0 && daedritecount >= 1) player.removeitem DaedriteBar 1 player.additem DaedricDagger 1 elseif (button == 1 && daedritecount >= 1) player.removeitem DaedriteBar 1 player.additem DaedricArrowTips 1 elseif (button == 2 && daedritecount >= 2) player.removeitem DaedriteBar 2 player.additem DaedricShortSword 1 elseif (button == 3 && daedritecount >= 3) player.removeitem DaedriteBar 3 player.additem DaedricLongsword 1 elseif (button == 4 && daedritecount >= 3) player.removeitem DaedriteBar 3 player.additem DaedricClaymore 1 elseif (button == 5 && daedritecount >= 3) player.removeitem DaedriteBar 3 player.additem DaedricWarAxe 1 elseif (button == 6 && daedritecount >= 4) player.removeitem DaedriteBar 4 player.additem DaedricWarhammer 1 elseif (button == 7) message "Smithing cancelled." else message "Not enough materials." endif endif endif endIf someone'd make it for me it would be " " Link to comment Share on other sites More sharing options...
Recommended Posts