bomo99 Posted March 29, 2018 Share Posted March 29, 2018 (edited) i am in the process of making an item that is an unbreakable repair hammer and a portable spellmaker and enchanter all in one but i have no idea how to make a custom repair hammer that kind of acts like a skeleton key but for repairing ik that master armorer is practically the same thing just wondering if it can be done ps. i want to know if i can do this just on CSpss. if you want the code for the item as we speak so you know how the item will function let me know Edited March 29, 2018 by bomo99 Link to comment Share on other sites More sharing options...
lubronbrons Posted March 29, 2018 Share Posted March 29, 2018 there two simple way to achieve that 1. use game setting fDamageToWeaponPercentage (default 0.06)set to 0 then all weapons never get broken, when used 2. use event handler on hit, whenever hit occur just repair the weapon with syntax SetEquippedCurrentHealth Link to comment Share on other sites More sharing options...
bomo99 Posted March 29, 2018 Author Share Posted March 29, 2018 (edited) First thing that i need to do is find out is how to get the item to activate the repair menu, then make it unbreakable like the skeleton key i dont want to make every item in the game unbreakable because then their would be no reason to make unbreakable repair hammer Edited March 29, 2018 by bomo99 Link to comment Share on other sites More sharing options...
lubronbrons Posted March 29, 2018 Share Posted March 29, 2018 then you should good to go with my second suggestion event handler --> https://cs.elderscrolls.com/index.php?title=SetEventHandler Link to comment Share on other sites More sharing options...
bomo99 Posted March 29, 2018 Author Share Posted March 29, 2018 Begin GameMode Set Button to GetButtonPressed If Button == 0 Showenchantment Elseif Button == 1 Showspellmaking "Elseif Button == 2";Where the Repair option will beEndifEndwill the event handler work if the item is inventory or "will it work if the "Player" clicks on the button (I prefer it be this option)". for this SetEquippedCurrentHealth will it work for the health at 125 from expert or just send it back to 100 kind of like dawn/duskfang Link to comment Share on other sites More sharing options...
lubronbrons Posted March 29, 2018 Share Posted March 29, 2018 (edited) if you want it validated based on Armorer skillthat's your choice :smile: it will work regardlessevent handler that should be perfect for this is OnHityou should get the item with this command --> Player.GetEquipmentSlot 16 EDIT : oh woops my mistake, revision --> Player.GetEquippedObject 16 Edited March 30, 2018 by lubronbrons Link to comment Share on other sites More sharing options...
bomo99 Posted March 30, 2018 Author Share Posted March 30, 2018 Elseif Button == 2 SetEventHandler "OnHit" player.getEquipmentSlot 16just wondering if i am wrapping my head around it correctly plus cs said "script command not found for SetEventHandler" Link to comment Share on other sites More sharing options...
lubronbrons Posted March 30, 2018 Share Posted March 30, 2018 don't use CS when building mods, use CSE insteadyou need to install this mod successfully in your setup --> https://www.nexusmods.com/oblivion/mods/36370/googling it if you has trouble installing it, sorry my troubleshooting skill is not that good. my strong point in modding is scripting, also my English is not that good please be tolerate with me~ Link to comment Share on other sites More sharing options...
bomo99 Posted March 30, 2018 Author Share Posted March 30, 2018 got it to work but now just wondering 2 things1. is this right Elseif Button == 2 SetEventHandler "OnHit" player.getEquipmentSlot 162. will the mod require OBSE to load Link to comment Share on other sites More sharing options...
lubronbrons Posted March 30, 2018 Share Posted March 30, 2018 (edited) oh no... you've got it wrongit should be like this --> declarer this only once by using command like GetGameLoaded or GetGameRestarted. this script type is Quest. attach it to quest and make sure 'start game' flag is checked on scn myQuestScript begin GameMode if GetGameRestarted SetEventHandler "OnHit" myFunc "second"::PlayerRef endif end --> create this script, type Object scn myFunc ref victim ref attacker ref rf1 short sh1 begin function{victim attacker} Let rf1 := Player.GetEquippedObject 16 if rf1 if CompareName "-INF-" rf1 Let sh1 := GetObjectHealth rf1 Player.SetEquippedCurrentHealth sh1 16 endif endif end --> you might use this for your menu script scn myMenu short choice ref rf1 begin GameMode Let choice := GetButtonPressed if choice == 0 Showenchantment elseif choice == 1 Showspellmaking elseif choice == 2 ;Where the Repair option will be Let rf1 := Player.GetEquippedObject 16 if rf1 if CompareName "-INF-" rf1 ModName "-INF-|" rf1 else AppendToName "-INF-" rf1 endif endif endif end Edited March 30, 2018 by lubronbrons Link to comment Share on other sites More sharing options...
Recommended Posts