rondivu Posted September 21, 2008 Share Posted September 21, 2008 Hello all, I wanted to create a class (I call Quickdraw), that gains an armor rating (specifically a permanent Shield ability added to his current abilities) every time his Speed and Agility are high enough using a script. :blink: Here's what I have so far:___________________________________________________________________________ scn SSArmorScript short AGILEshort FASTshort PWNshort armorvalue Begin GameMode set AGILE to player.getav agility / 2 set FAST to player.getav speed / 2 set PWN to AGILE + FAST set armorvalue to PWN / 2 if GetIsClass Quickdraw == 0 Return elseif (armorvalue > 0 && armorvalue <= 15) player.addspell ShieldAbilityInitial elseif (armorvalue > 15 && armorvalue <= 25) player.addspell ShieldAbility01 elseif (armorvalue > 25 && armorvalue <= 35) player.addspell ShieldAbility02 elseif (armorvalue > 35 && armorvalue <= 45) player.addspell ShieldAbility03 elseif (armorvalue > 45 && armorvalue <= 50) player.addspell ShieldAbility04 elseif (armorvalue > 50 && armorvalue <= 65) player.addspell ShieldAbility05 elseif (armorvalue > 65 && armorvalue <= 75) player.addspell ShieldAbility06 elseif (armorvalue > 75 && armorvalue <= 85) player.addspell ShieldAbility07 elseif (armorvalue > 85 && armorvalue <= 95) player.addspell ShieldAbility08 elseif (armorvalue > 95) player.addspell ShieldAbilityPlus endif end _____________________________________________________________________* :unsure: Note that I will have the ShieldAbilityInitial ability a magnitude 8 shield/ + 2 points Magic and Weapon Resistance, and damage to both light and heavy armor (50 each) so that the character won't find it very useful to wear armor. **The ShieldAbilityXX spells are spells with 8 shield, and different perks per number (01-08) for a total of 8 perks ***The ShieldAbilityPlus is just a higher reward for people reaching a really high number of both Speed and Armor Ok, so I realize that it doesn't delete the previous spells, but I thought that stacking it would make it better, but if not, can anyone make a better suggestion on how to make this script work better? I am new to scripting so forgive me if I've made this script horribly bugged. I also know that there is a Monk Armor mod out there I originally attempted to modify, but I wanted to make mine different in its functionality. Suggestions, Criticisms, Inflammations welcome. Don't go easy on me. Seriously. -Rondivu Link to comment Share on other sites More sharing options...
rondivu Posted September 21, 2008 Author Share Posted September 21, 2008 Here's the refined version of my level scaling natural armor, dependent Agility, Speed, and Luck...________________________________________________________ scn SSArmorScript short AGILEshort FASTshort LUCKYshort PWNDshort armorvalue Begin GameMode set AGILE to player.getav agility / 3 set FAST to player.getav speed / 3 set LUCKY to player.getav luck / 3 set PWND to AGILE + FAST + LUCKY set armorvalue to PWND / 2 if (player.GetIsClass Quickdraw) == 0 && (player.IsInCombat) == 0 Return endif if (armorvalue >= 0 && armorvalue <= 15) player.addspell ShieldAbilityInitial elseif (armorvalue > 15) player.removespell ShieldAbilityInitial endif if (armorvalue > 15 && armorvalue <= 25) player.addspell ShieldAbility01 elseif (armorvalue > 25 && armorvalue < 15) player.removespell ShieldAbility01 endif if (armorvalue > 25 && armorvalue <= 35) player.addspell ShieldAbility02 elseif (armorvalue > 35 && armorvalue < 25) player.removespell ShieldAbility02 endif if (armorvalue > 35 && armorvalue <= 45) player.addspell ShieldAbility03 elseif (armorvalue > 45 && armorvalue < 35) player.removespell ShieldAbility03 endif if (armorvalue > 45 && armorvalue <= 50) player.addspell ShieldAbility04 elseif (armorvalue > 50 && armorvalue < 45) player.removespell ShieldAbility04 endif if (armorvalue > 50 && armorvalue <= 65) player.addspell ShieldAbility05 elseif (armorvalue > 65 && armorvalue < 50) player.removespell ShieldAbility05 endif if (armorvalue > 65 && armorvalue <= 75) player.addspell ShieldAbility06 elseif (armorvalue > 75 && armorvalue < 65) player.removespell ShieldAbility06 endif if (armorvalue > 75 && armorvalue <= 85) player.addspell ShieldAbility07 elseif (armorvalue > 85 && armorvalue < 75) player.removespell ShieldAbility07 endif if (armorvalue > 85 && armorvalue <= 95) player.addspell ShieldAbility08 elseif (armorvalue > 95 && armorvalue < 85) player.removespell ShieldAbility08 endif if (armorvalue > 95) player.addspell ShieldAbilityPlus else player.removespell ShieldAbilityPlus endif end _____________________________________________Two Questions that have been bugging me... 1) Does the "Return" on if (GetIsClass Quickdraw) == 0 && (player.IsInCombat) == 0 Return endif ...completely ignore the rest of the script running? I kind of want it to detect if you have that class, and also if you're in combat so I was wondering if I did this correctly. 2) Does anyone know if, hypothetically, I placed a "Return" right after every player.addspell ShieldAbilityXX, would it let the script run shorter and therefore be more efficient? Or would it just be better as is? Please help any Scripting modders out there who know how to do scripting please help. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.