Someone Help Me

All Helbreath Server Source Discussion here.
Post Reply
Slipknight
Loyal fan
Posts: 423
Joined: Thu Apr 07, 2005 7:53 pm

Post by Slipknight »

Ok im trying too add stated weapon drops too monsters

ATM I've only had one problem and cannot find the fix.

What im trying too do is make Unicorns drop Stated Kloness weapons.

Heres Unicorn weapon drop

Code: Select all

	case 8: // Demon, Unicorn, Hellclaw, Tigerworm, Gagoyle
         switch (iDice(1,7)) {
  case 1: iItemID = 50;  break; // GreatSword
  case 2: iItemID = 54;  break; // Flameberge
  case 3: iItemID = 560; break; // BattleAxe
  case 4: iItemID = 31;  break; // Esterk
  case 5: iItemID = 34;  break; // Rapier
  case 6: iItemID = 55;  break; // Flameberge+1
  case 7: iItemID = 615; break; // GiantSword
    	}
    	break;
As you see here if I added kloness weapons too this code demons,hellclaws,tigerworms and gargoyle would also drop them which I dont want. And as you see here if I added kloness weapons there drop rate would be as low as those other weapons which I dont want and I've tryed adding case 1 drops with there own rate and then case 2 drops but it gives me all this fucked up errors when I do.

So basically how do I make unicorns and only unicorns drop stated kloness weapons at a higher right w/o getting gay errors.

All help appreciated
<img src='http://www.bleachportal.net/interactive ... irjjkt.jpg' border='0' alt='user posted image' /><br><img src='http://www.hazegfx.com/UserBanners/Slipknot%20Fan.jpg' border='0' alt='user posted image' /><br><img src='http://www.hazegfx.com/UserBanners/UT2004%20Player.jpg' border='0' alt='user posted image' /><br><img src='http://www.hazegfx.com/UserBanners/AC%20DC%20Fan.png' border='0' alt='user posted image' /><br>
bone-you
Spamtastic
Posts: 1310
Joined: Wed Mar 16, 2005 3:12 am

Post by bone-you »

You can go about it the way I was going to before. You make a case for every NPC (which means you change the switch(var) to reflect that) then you can set every mob to drop different things, instead of category-like. Or you can make an IF statement before the switch checking if it's a unicorn, then skipping it completely and setting it to kloness.
<img src='http://www.helbreathx.net/sig/sig.jpeg' border='0' alt='user posted image' /><br><a href='http://mafia.cheats4us.org/index.php?x=231030' target='_blank'>#1 on Mafia :D</a><br><!--QuoteBegin-Slipknight+--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (Slipknight)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->100mb Internet, burstable too 10GB oc192<br>his speed can go up too 10gbs<br>...<br>Yes my car can have a top speed of 1000mph<!--QuoteEnd--></td></tr></table><div class='signature'><!--QuoteEEnd--><br>^^ I wonder where the retard went to.
Slipknight
Loyal fan
Posts: 423
Joined: Thu Apr 07, 2005 7:53 pm

Post by Slipknight »

k i'll try and make all those cases but thats alot too add and I will most likely fuck up and get like 50 errors.
<img src='http://www.bleachportal.net/interactive ... irjjkt.jpg' border='0' alt='user posted image' /><br><img src='http://www.hazegfx.com/UserBanners/Slipknot%20Fan.jpg' border='0' alt='user posted image' /><br><img src='http://www.hazegfx.com/UserBanners/UT2004%20Player.jpg' border='0' alt='user posted image' /><br><img src='http://www.hazegfx.com/UserBanners/AC%20DC%20Fan.png' border='0' alt='user posted image' /><br>
bone-you
Spamtastic
Posts: 1310
Joined: Wed Mar 16, 2005 3:12 am

Post by bone-you »

Well, the cases are for if you plan on making more than just the unicorn different. If you only plan on changing uni, then do an IF and a GOTO to pass it up or something.
<img src='http://www.helbreathx.net/sig/sig.jpeg' border='0' alt='user posted image' /><br><a href='http://mafia.cheats4us.org/index.php?x=231030' target='_blank'>#1 on Mafia :D</a><br><!--QuoteBegin-Slipknight+--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (Slipknight)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->100mb Internet, burstable too 10GB oc192<br>his speed can go up too 10gbs<br>...<br>Yes my car can have a top speed of 1000mph<!--QuoteEnd--></td></tr></table><div class='signature'><!--QuoteEEnd--><br>^^ I wonder where the retard went to.
Slipknight
Loyal fan
Posts: 423
Joined: Thu Apr 07, 2005 7:53 pm

Post by Slipknight »

I plan on editing alot of monster drops so i'll just do the long way should be easier in the end when I wanna add things in fast.
<img src='http://www.bleachportal.net/interactive ... irjjkt.jpg' border='0' alt='user posted image' /><br><img src='http://www.hazegfx.com/UserBanners/Slipknot%20Fan.jpg' border='0' alt='user posted image' /><br><img src='http://www.hazegfx.com/UserBanners/UT2004%20Player.jpg' border='0' alt='user posted image' /><br><img src='http://www.hazegfx.com/UserBanners/AC%20DC%20Fan.png' border='0' alt='user posted image' /><br>
Slipknight
Loyal fan
Posts: 423
Joined: Thu Apr 07, 2005 7:53 pm

Post by Slipknight »

Hey also it seems no matter how long I put the drop rate into iDice it never really changed and sometimes I think it makes the drop rate lower so when im putting 1,2 that means it drops 50% of the time right?
<img src='http://www.bleachportal.net/interactive ... irjjkt.jpg' border='0' alt='user posted image' /><br><img src='http://www.hazegfx.com/UserBanners/Slipknot%20Fan.jpg' border='0' alt='user posted image' /><br><img src='http://www.hazegfx.com/UserBanners/UT2004%20Player.jpg' border='0' alt='user posted image' /><br><img src='http://www.hazegfx.com/UserBanners/AC%20DC%20Fan.png' border='0' alt='user posted image' /><br>
blackfury
noob
Posts: 29
Joined: Wed Oct 27, 2004 9:13 pm

Post by blackfury »

it will be 50%, because
e.g.
switch(iDice(1,3)){
case 1: iItemID = 30; break;
case 2: iItemID = 31; break;
case 3: iItemID = 32; break;
}

this will trhow a dice if you get number 3 it will drop case 3, if you get 1 case etc, so if you plan to add more drops you should increase that number..
Slipknight
Loyal fan
Posts: 423
Joined: Thu Apr 07, 2005 7:53 pm

Post by Slipknight »

oh so iDice does'nt effect drop rate at all. Hmm I kinda dont like that.
<img src='http://www.bleachportal.net/interactive ... irjjkt.jpg' border='0' alt='user posted image' /><br><img src='http://www.hazegfx.com/UserBanners/Slipknot%20Fan.jpg' border='0' alt='user posted image' /><br><img src='http://www.hazegfx.com/UserBanners/UT2004%20Player.jpg' border='0' alt='user posted image' /><br><img src='http://www.hazegfx.com/UserBanners/AC%20DC%20Fan.png' border='0' alt='user posted image' /><br>
bone-you
Spamtastic
Posts: 1310
Joined: Wed Mar 16, 2005 3:12 am

Post by bone-you »

Slipknight wrote: oh so iDice does'nt effect drop rate at all. Hmm I kinda dont like that.
Let's sit down before we hurt ourselves thinking of how the HGServer works. iDice is not a drop rate controller, or anything for that matter. All it is, is a fancy way to do rand(). It's actually quite strange how it works, but it's easy to use.
iDice(1,5) can only return a number 1-5 correct?
iDice(1,10000) can only return a number 1-10000.
But, iDice(2,10000) returns a number 2-20000.

Code: Select all

int iDice(int iThrow, int iRange)
{
	register int i, iRet;

	if (iRange <= 0) return 0;
	iRet = 0;
	for (i = 1; i <= iThrow; i++) {
  iRet += (rand() % iRange) + 1;
	}
	return iRet;
}
It does a for loop depending on iThrow. If iThrow is one (iDice(1,*)) then it only does it once. The higher the iThrow, the more times it goes through meaning it adds them up on top of each other iThrow amount of times meaning the result can be iThrow times bigger. % mean divide and return the remainder. rand() makes a random int between 0 and 32767 (RAND_MAX). If iRange is say, 10, then it takes a random number (let's say 2473), divides it by 10 (247.3), and returns the remainder (3). Adds 1, (4). And adds that to iRet. So there's your result of iDice(1,10). 4.

If you didn't care about that at all, then how you change drop rate is by either: if using hbx sources, changing it in the configs, or for any sources, changing it in the drop function. If you use 2.20 or 2.03, search for iDice(1,6500) and you'll find it unless it was changed. iDice is just a number generator.. not really a controller of parts of the game. :P
<img src='http://www.helbreathx.net/sig/sig.jpeg' border='0' alt='user posted image' /><br><a href='http://mafia.cheats4us.org/index.php?x=231030' target='_blank'>#1 on Mafia :D</a><br><!--QuoteBegin-Slipknight+--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (Slipknight)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->100mb Internet, burstable too 10GB oc192<br>his speed can go up too 10gbs<br>...<br>Yes my car can have a top speed of 1000mph<!--QuoteEnd--></td></tr></table><div class='signature'><!--QuoteEEnd--><br>^^ I wonder where the retard went to.
Slipknight
Loyal fan
Posts: 423
Joined: Thu Apr 07, 2005 7:53 pm

Post by Slipknight »

im usuing hbx 2.24c files and editing the cfg file is'nt what I want I wanna be able too give each drop or set of drops a specific drop rate.
<img src='http://www.bleachportal.net/interactive ... irjjkt.jpg' border='0' alt='user posted image' /><br><img src='http://www.hazegfx.com/UserBanners/Slipknot%20Fan.jpg' border='0' alt='user posted image' /><br><img src='http://www.hazegfx.com/UserBanners/UT2004%20Player.jpg' border='0' alt='user posted image' /><br><img src='http://www.hazegfx.com/UserBanners/AC%20DC%20Fan.png' border='0' alt='user posted image' /><br>
Post Reply