okokokok Posted April 4, 2011 Share Posted April 4, 2011 As i the title sais im trying to make a script for a weapon that adds a strength and/or enduarance requirement to wield. this is what i wrote, it doesn't work at all what so ever :down: help please :wallbash: scn GreatHalbredOnEquip short doOnce begin OnActivate Activate If (player.getav Strength*2 + player.getav Endurance < 200) player.Drop 1GreatHalbred 1 Message "You try to pick up the weapon but it slips from your hands after only a second. You are not strong enough" elseif (player.getav Strength*2 + player.getav Endurance > 200) && (doOnce != 0) set doOnce to 1 Message "You pick up the weapon with great ease and feel its power rushing through you as it becomes your own" endif end Link to comment Share on other sites More sharing options...
d4em Posted April 4, 2011 Share Posted April 4, 2011 Try: Begin onequip If player.getav strenght < 60 && player.getav endurance < 60 Player.unequip sword Message " the sword is too heavy for me " EndifEnd This may contain some spelling errors, and the values and id of sword should be changed, but i hope youll find it usefull Link to comment Share on other sites More sharing options...
fg109 Posted April 4, 2011 Share Posted April 4, 2011 (edited) @okokok 1. I'm not sure if you can use math formulas inside an if statement 2. Your elseif statement isn't right (I mean the doOnce condition). 3. This is an OnActivate block, which means you are picking up the item. That means it's not in your inventory, so you can't drop it. (I see you put the Activate command there but the sword probably doesn't get into your inventory in time for you to use the drop command.) Edited April 4, 2011 by fg109 Link to comment Share on other sites More sharing options...
d4em Posted April 4, 2011 Share Posted April 4, 2011 Im sorry, i misunderstood - i thought it was about equiping the item. You shouldnt add doonce at all , since it does what it says. If the player picks it up Once, the script wont ever run a second time. And the formulas .... Im sorry but i figured you were the one asking for help and i was the one knowing scripting. If you know what doesnt work without trying, then why are you asking for help? Begin onactivateIf Player.getav strength < 60 && player.getav endurance < 60message " the weapon is too heavy to lift "ElseifActivateEndifEnd Now please try It before telling me i am wrong. Link to comment Share on other sites More sharing options...
d4em Posted April 4, 2011 Share Posted April 4, 2011 Damn sorry. I totally misread. Please accept my apologies. I think it time to go to bed ;l Link to comment Share on other sites More sharing options...
fg109 Posted April 4, 2011 Share Posted April 4, 2011 (edited) No problem. Edited April 4, 2011 by fg109 Link to comment Share on other sites More sharing options...
okokokok Posted April 4, 2011 Author Share Posted April 4, 2011 thanks a lot guys for invalubale assistans, this is going to be an awesome mod! I think i' can release it for real soon.... just a few kinks here and there regarding the weapons enchantment script My first mod is coming up soon Yayifications! ;D oh and FakePersonality, i only made slight modifications to the script you just wrote here, plase tell me if you wish to be credited..... Link to comment Share on other sites More sharing options...
d4em Posted April 4, 2011 Share Posted April 4, 2011 No need for credit, would appreciate kudo :) ( cant see if you gave me obe , im on iphone ) Link to comment Share on other sites More sharing options...
Recommended Posts