lynxcali Posted February 14, 2011 Share Posted February 14, 2011 Okay so a friend of mine sent me a script that if you add it to a chest, then place an item in it, and cast a fortify magicka spell on it, it will duplicate that item.Well I made a new box, added the script to it, went ingame, placed an item in it, casted the fortify magicka spell in it, and it doesnt duplicate the itemHere is the code:scn zzPQMultiplierBoxScript ref boxeditemshort stateshort doonceshort dayofLastMulti Begin OnMagicEffectHit FOSP if ( state == 0 ) set state to 1 endifEnd Begin Gamemode if doonce == 0 set dayofLastMulti to 10 set doonce to 1 endif if state == 0 return else ;if GetDayofWeek == dayofLastMulti ; Message "The box already done it's work today." ;else PMS effectReflectDamage 1000 ;set boxeditem to GetInventoryObject 0 ;if IsIngredient boxeditem if boxeditem == MS04HornGift MG19ChestRef.removeitem MS04HornGift 10 set boxeditem to MinotaurHorn elseif boxeditem == MG01Bonemeal MG19ChestRef.removeitem MG01Bonemeal 10 set boxeditem to bonemeal elseif boxeditem == MG13VampireDust MG19ChestRef.removeitem MG13VampireDust 10 set boxeditem to vampiredust endif ;if boxeditem != MS39Nirnroot additem boxeditem 9 Message "The box works it's magic in silence." ;Set dayofLastMulti to GetDayofWeek ;endif ;else ; Message "The box emits an ominous noise and shakes lightly..." ; RemoveAllItems ; Set dayofLastMulti to GetDayofWeek ;endif ;endif endif SMS effectReflectDamage set state to 0End If one of you could fix it I would be very grateful! Link to comment Share on other sites More sharing options...
Ferryt Posted February 14, 2011 Share Posted February 14, 2011 This is the script for an item in the Summonable Private Quarters mod by LazyMonk. If you intend to use this, or some modification of it in a project which you're going to post on this site, make sure you try to get permission from him, first. My guess is that something which has been commented out is interfering with proper execution of the script. That stuff was designed to limit the frequency with which you can use the chest and is pretty tightly woven into the rest of the code. Put it back in and then try it, again, preferably with an item you don't mind losing, like a worthless piece of clutter. Another issue is that this mod requires OBSE. My brain is too fried at the moment to sort through all the commands to see if any of them are OBSE-specific, but if you don't already have at least version 16 installed, then grab the latest version, 19 (20 is still in beta), and install it before you try to run this script. Link to comment Share on other sites More sharing options...
LFact Posted February 14, 2011 Share Posted February 14, 2011 This is the script for an item in the Summonable Private Quarters mod by LazyMonk. If you intend to use this, or some modification of it in a project which you're going to post on this site, make sure you try to get permission from him, first. My guess is that something which has been commented out is interfering with proper execution of the script. That stuff was designed to limit the frequency with which you can use the chest and is pretty tightly woven into the rest of the code. Put it back in and then try it, again, preferably with an item you don't mind losing, like a worthless piece of clutter. Another issue is that this mod requires OBSE. My brain is too fried at the moment to sort through all the commands to see if any of them are OBSE-specific, but if you don't already have at least version 16 installed, then grab the latest version, 19 (20 is still in beta), and install it before you try to run this script. The commented out lines are for checking if the item is alchemy ingredient, and for getting how many times you try to duplicate item at a day. I modified it for personal use, and had no problem with it. I PM'ed the script to OP by the request, but I should've tell not to post the modified script....... Link to comment Share on other sites More sharing options...
Recommended Posts