i'm trying my first script and a mod based on it. Basically, what I want to achieve is to being able to grind all kitchen wear that's made of stone/ceramic etc. into stonemeal. What I did for that was:
- retexturing the stonemeal icon to look more dark and brown to use it as stonemeal icon
- made a new ingredient, named 'stonemeal' with the unique ID: RiflerStoneMeal
- made a new script (adepted from Zinnis bone grinder mod) and attached it to any kitchen wear I want to use it on (excluding thoose that already had scripts attached or where quest items or assigned to a quest)
- gave the player npc the needed items to test in game
So now, when I got into game the script works fine. I gave myself 30 cups + the two that are on the table. It works with the two stonewear items from the table, but as soon as I click on the column of 30 bowls, it gives me the message 'You succesfully grinded it into stonemeal' and then the rest of the 29 bowls simply disappear. Any ideas why that is? I tried the script using a Mortar and Pestel, a Repair Hammer and even made a unique item, but always the same result. I made the script with Notepad++ and then pasted and copied it into the CS...here it is:
scn SalatClayPowderScriptshort buttonshort toolsshort alchskillshort askedshort randshort startmealshort amtfloat timerref Statebegin OnEquip set State to 1endbegin menumodeif state == 1 MessageBox "Grind this into Stonemeal?" "Yes" "No" set asked to 1 set state to 2endifif state == 2 set button to GetButtonPressed if button > -1 set state to 3 endifendifif state == 3 if button == 0 if player.GetItemCount RiflerStoneGrinder > 0 set tools to 1 set state to 4 else MessageBox "You need a Stonegrinder to grind it into Stonemeal." set state to 0 endifendifendifif state == 4 set alchskill to player.getAV Alchemy set rand to GetRandomPercent set amt to 0 set startmeal to player.GetItemCount RiflerStoneMeal if alchskill < 25 if rand > 49 MessageBox "You succesfully grind it into Stonemeal." set amt to 1 else MessageBox "Due to your ineptitude with your Stonegrinder, you fail to grind it into Stonemeal." endif elseif alchskill > 75 if rand > 49 MessageBox "Due to your expertise in working with your Stonegrinder for alchemical purposes, your grind it into enough Stonemeal for two uses." set amt to 2 else MessageBox "You succesfully grind it into Stonemeal." set amt to 1 endif else MessageBox "You succesfully grind it into Stonemeal." set amt to 1 endif set state to 5 set tools to 0 if amt > 0 player.additem RiflerStoneMeal amt endif set timer to 0.2endifif state == 5 if (timer > 0) set timer to timer - GetSecondsPassed else RemoveMe endifendifend