Author Topic: Bleed script help.  (Read 415 times)

Legacy_Knight_Shield

  • Hero Member
  • *****
  • Posts: 812
  • Karma: +0/-0
Bleed script help.
« on: March 27, 2011, 11:19:36 pm »


                Here is a script that works great.It is by Scott Thorne.
 

Monsters steal some of your gold while lying unconcious .

Problem: They take to much.I tried to adjust but not sure I did it properly,here is the take gold part .I think they should only take 5% IMHO .It says it shouldnt take more than 1000 but my players say it takes like half or more.


void LootVictim(object oFoe, object oDying){    int iGold = GetGold(oDying);    if(iGold > 9)    {        int iRnd = Random(iGold-1)+1;        if(iRnd < 10)        {            iRnd == 10;        }        if(iRnd > 1000)        {            iRnd == 1000; //1000 gold max to steal        }        DelayCommand(2.0,AssignCommand(oFoe,ActionPlayAnimation(ANIMATION_LOOPING_GET_LOW,1.0,6.0)));        DelayCommand(6.0,AssignCommand(oFoe,TakeGoldFromCreature(iRnd,oDying)));        DelayCommand(15.0,AssignCommand(oFoe,ActionRandomWalk()));    }        else        {            int iGold = GetGold(oDying)-1;            int iRnd = Random(iGold)+1;            DelayCommand(2.0,AssignCommand(oFoe,ActionPlayAnimation(ANIMATION_LOOPING_GET_LOW,1.0,6.0)));            DelayCommand(6.0,AssignCommand(oFoe,TakeGoldFromCreature(iRnd,oDying)));            DelayCommand(15.0,AssignCommand(oFoe,ActionRandomWalk()));        }    }
               
               

               
            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
Bleed script help.
« Reply #1 on: March 27, 2011, 11:47:48 pm »


               iRnd == 1000;

change to

iRnd = 1000;
               
               

               
            

Legacy_Baragg

  • Sr. Member
  • ****
  • Posts: 496
  • Karma: +0/-0
Bleed script help.
« Reply #2 on: March 28, 2011, 03:34:20 am »


               Shouldn't they also change:

iRnd == 10

to

iRnd = 10   ?
               
               

               
            

Legacy_Lightfoot8

  • Hero Member
  • *****
  • Posts: 4797
  • Karma: +0/-0
Bleed script help.
« Reply #3 on: March 28, 2011, 05:28:53 am »


               

Baragg wrote...

Shouldn't they also change:

iRnd == 10

to

iRnd = 10 ?


Yes.
               
               

               
            

Legacy_Knight_Shield

  • Hero Member
  • *****
  • Posts: 812
  • Karma: +0/-0
Bleed script help.
« Reply #4 on: March 29, 2011, 02:05:23 am »


               Thanks guys I thought of that but wasnt sure.Even with the =1000 monster only takes 10% but I will definitely try =10. If you guys are someone else would like to see the whole script just let me know.