FalynIndoril Posted April 28, 2017 Share Posted April 28, 2017 (edited) If one could currently help with a scripting issue that I am facing, it would be appreciated, as I am but a novice modder. I am trying to get items to disappear from my PC's Inventory after a certain amount of days (meat,hearts,bread,mead) to give them the oppression of 'spoiling'. Here is the example of a draft script I have begin rottingmatterscript01Short NumDays; Removes the meat / heart / skin from the player after 1 dayif ( NumDays > 1 )MessageBox, "This biodegradable matter has spoiled, and can no longer be used or consumed. You discard it from your Inventory." player->RemoveItem, "ingred_rat_meat_01", player->RemoveItem, "ingred_crab_meat_01", player->RemoveItem, "ingred_hound_meat_01", player->RemoveItem, "ingred_scrib_jerky_01", player->RemoveItem, "ingred_scuttle_meat_01", player->RemoveItem, "ingred_human_meat_01", player->RemoveItem, "ingred_daedras_heart_01", player->RemoveItem, "ingred_cursed_daedras_heart_01", player->RemoveItem, "ingred_ghoul_heart_01", player->RemoveItem, "ingred_daedra_skin_01", player->RemoveItem, "ingred_guar_hide_01", player->RemoveItem, "ingred_kagouti_hide_01", player->RemoveItem, "ingred_scamp_skin_01", player->RemoveItem, "ingred_durzog_meat_01", player->RemoveItem, "ingred_eyeball", endifEnd Thank you, may the ALMSIVI guide you! Edited April 30, 2017 by FalynIndoril Link to comment Share on other sites More sharing options...
btmangan10 Posted July 1, 2017 Share Posted July 1, 2017 (edited) Hey brother. This may be the script you should look at. Script 1 (A global command script which must be listed in the "start scripts" list under gameplay tab) this script contains 2 global variables which you must declare and set to 0 begin BTM_SpoilIngredientMaster if ( delSmallKwama > 0 )player->removeitem "food_kwama_egg_01" 1set delSmallKwama to ( delSmallKwama - 1 )endif end Script 2this script is attached to the small kwama egg object. This one is still somewhat buggy. It's most of the way there, but becomes disabled on certain eggs while working perfectly fine on others? To be honest I don't have the patience to debug this any further, but it is almost there I think. begin BTM_SpoilableIngredients;Deletes food which has "existed" in player control for multiple days ;varsshort daysPassedshort myDayshort enabletriggershort OnPCAddshort OnPCDrop if ( OnPCAdd == 1 )set enabletrigger to 1set OnPCAdd to 0endif if ( OnPCDrop == 1 )set enabletrigger to 0set OnPCDrop to 0endif if ( enabletrigger == 0 )returnendif ;store first dayif ( daysPassed == 0 )set myDay to Dayset daysPassed to 1endif ;if we've already set a day, count the daysif ( myDay != Day )set daysPassed to daysPassed + 1set myDay to Dayendif if ( daysPassed > 2 )if ( daysPassed < 100 )set delSmallKwama to ( delSmallKwama + 1 )set daysPassed to 101endifendif End Edited July 2, 2017 by btmangan10 Link to comment Share on other sites More sharing options...
Recommended Posts