I’m using Slayers of Darkmoon loot generation system “Commche 2006”, and I would love to be able to OnOpenStore of the merchant, ADD specified number of random items to the shop.
The loot system’s main script gives me some useful commands that I think I can use:
// Generates a random weapon
// =======================================
// oMob = the creature that just died
// oSack = the object into which you will spawn the weapon
// iRange = the quality of the weapon: 1=lowest 5=highest
// SockChance = a % chance for the generated weapon to be socketed
// DamBroke = a switch to disable chance of damaged/broken weapon: 0=on 1=off
void DropWeapon(object oMob, object oSack, int iRange, int SockChance, int DamBroke);
Can I #include this main script into my store’s OnStoreOpen script (or just when the store is spawned?) and then use the above example in it to spawn a random weapon to the store? And how can I fire that off let’s say 20 times? I’ve got X number of commands like the above that I might want to have run several times for the merchant.
I’ve played around with just the following which feels wrong.
#include "sd_lootsystem"
#include "x2_inc_itemprop"
#include "nw_i0_generic"
void DropWeapon(object oMob, object oStore, int iRange, int SockChance, int DamBroke);
As always thank you for the suggestions!