So at the moment I'm working on a buff script that has the immediate goal of prebuffing for item drops to get as many of the +item dependant boss loots from hobopolis as possible without bankrupting yourself in the process.
I say immediate because as I wrote out the records I realized how terrible it would be to want to modify for something else and have to create an entirely new record tree. Right now the tree is pretty extensive (and could probably use a couple variable renames) and unfortunately the only way to add an item is individually. If the purpose of the script was solely for pet buffing where the item list is much more manageable hand-coding each wouldn't be as terrible. As it stands I've created my own set of records that holds relevant stats for items and resulting effects. Although I did just realize I need to code relevant buff names as to not let the script try and buff with the same effect twice from separate items.
Currently a "quick" item to code looks like this
and a hell item looks like this
I was wondering if something exists already to manage/create locally stored item lists so I can search a local file for items opposed to hard-coding in each item with a particular relevant bonus whenever I feel like adding some functionality.
Included my item "record" (I come from c++ so it's a struct as far as I'm concerend) and the base script for input/constructive criticism, not looking for someone to do it for me, but nudges in the right direction are always welcome
I say immediate because as I wrote out the records I realized how terrible it would be to want to modify for something else and have to create an entirely new record tree. Right now the tree is pretty extensive (and could probably use a couple variable renames) and unfortunately the only way to add an item is individually. If the purpose of the script was solely for pet buffing where the item list is much more manageable hand-coding each wouldn't be as terrible. As it stands I've created my own set of records that holds relevant stats for items and resulting effects. Although I did just realize I need to code relevant buff names as to not let the script try and buff with the same effect twice from separate items.
Currently a "quick" item to code looks like this
Code:
petWeight[1].itemName = "irradiated pet snacks";
petWeight[1].itemMiscEffects.famWeight = 10;
petWeight[1].itemEffectDur = 10;
petWeight[1].itemPrice = mall_price(to_item(petWeight[1].itemName));
and a hell item looks like this
Code:
itemDrop[11].itemName = "crystal skeleton vodka";
itemDrop[11].itemDropBonus.itemDrop = 25.0;
itemDrop[11].itemMiscEffects.monsterLvl = 15;
itemDrop[11].itemEleDmg.spookyDmg = 20;
itemDrop[11].itemMiscEffects.advGain = 16.0;
itemDrop[11].itemStatBonus.musGain = 24.5;
itemDrop[11].itemStatBonus.moxGain = 24.5;
itemDrop[11].itemStatBonus.mysGain = 24.5;
itemDrop[11].itemReqs.reqSober = 3;
itemDrop[11].itemReqs.reqLvl = 3;
itemDrop[11].itemEffectDur = 20;
itemDrop[11].itemPrice = mall_price(to_item(itemDrop[11].itemName));
I was wondering if something exists already to manage/create locally stored item lists so I can search a local file for items opposed to hard-coding in each item with a particular relevant bonus whenever I feel like adding some functionality.
Included my item "record" (I come from c++ so it's a struct as far as I'm concerend) and the base script for input/constructive criticism, not looking for someone to do it for me, but nudges in the right direction are always welcome

Attachments
Last edited: