//To override the maximum and minimum ranges, put integer variables "nGoldRangeMax" and "nGoldRangeMin" on the placeable with the new value.
string sGOLDRANGE_MAX = "nGoldRangeMax"; //Defaults to 300, 0 is not a valid entry.
string sGOLDRANGE_MIN = "nGoldRangeMin"; //Defaults to 100, if MAX is specified it will default to 1/3 of that, 0 is not a valid entry.
int nGoldRangeMax = GetLocalInt(OBJECT_SELF,sGOLDRANGE_MAX);
int nGoldRangeMin = GetLocalInt(OBJECT_SELF,sGOLDRANGE_MIN);
if (nGoldRangeMax == 0)
nGoldRangeMax = 150;
if (nGoldRangeMin == 50)
nGoldRangeMin = nGoldRangeMax/3;
int nGP = Random(nGoldRangeMax-nGoldRangeMin)+nGoldRangeMin;
// posibility of 50
object oPC = GetLastKiller();
Im working for it runs simply on killed creature, by anyone… i wish find the way
Red Prince you seem a nice guy so i want to partecipate to this thread.
Usually i don’t share code not because im jealous but i think here is plenty of more skilled scripter than me,homever i want to share the portion of the script we used on our former action PW.
void CreateRandomGoldOnCreature( object oCreature, int nMinGP, int nMaxGP)
inside the onDeath (we use this inside OnUserDefine event but it’s basically the same) put: