The module sells all itens with 330% of price and we started to create a script to make all monsters drop + gold because the only way to get money was opening crates/barrels in citys/houses.
I made this code to add in OnDeath events:
////////////////////////////
//Check if MOB has a lot of GOLD
////////////////////////////
if(Random(101) <= 11)
{
float fLevel = GetChallengeRating(OBJECT_SELF);
int iRandom = Random(51);
float fRandom = IntToFloat(iRandom);
float fProduto = fLevel*fRandom;
int iValue = FloatToInt(fProduto);
int iValuex2 = iValue*2;
int iValuex3 = iValue*3;
//Give GOLD to MOB
GiveGoldToCreature(OBJECT_SELF, iValue);
//EXTRA GP
int iGoldExtra = Random(11);
GiveGoldToCreature(OBJECT_SELF, iGoldExtra);
//+Gold to High Mobs
int iMobCheck = FloatToInt(fLevel);
if(iMobCheck >= 19) GiveGoldToCreature(OBJECT_SELF, iValue);
if(iMobCheck >= 29) GiveGoldToCreature(OBJECT_SELF, iValuex2);
if(iMobCheck >= 39) GiveGoldToCreature(OBJECT_SELF, iValuex3);
//Double of GOLD 1%
if(Random(101) <= 11)
{
GiveGoldToCreature(OBJECT_SELF, iValue);
if(iMobCheck >= 19) GiveGoldToCreature(OBJECT_SELF, iValue);
if(iMobCheck >= 29) GiveGoldToCreature(OBJECT_SELF, iValuex2);
if(iMobCheck >= 39) GiveGoldToCreature(OBJECT_SELF, iValuex3);
}
}
////////////////////////////
////////////////////////////





Retour en haut






