[Req] Weapon Ranges
I tried to look for it, but since I'm kinda new w/ hb src files I guess, I wasn't able to find it.
The problem is: you have different ranges for hammers & swords, and then there's StormBringer which has a even greater range. Any1 know how I could modify this or add custom ranges to the items?
The problem is: you have different ranges for hammers & swords, and then there's StormBringer which has a even greater range. Any1 know how I could modify this or add custom ranges to the items?
<span style='color:green'>Gief <span style='color:purple'>epix</span> codes plz.</span>
The server must know the weapon range to allow the damage from further tiles, and the client must know the range to let you be able to attack.LythQ wrote: I tried to look for it, but since I'm kinda new w/ hb src files I guess, I wasn't able to find it.
The problem is: you have different ranges for hammers & swords, and then there's StormBringer which has a even greater range. Any1 know how I could modify this or add custom ranges to the items?
I'm going to stop short of a snippet, but if you're using '3.51'+ sources then searching for the sb (in both files) should give you a clear picture of what is required to customize weapon ranges.
Reppin' 127.0.0.1!!!<br><br><img src='http://img502.imageshack.us/img502/1348/sig4daxbn2.jpg' border='0' alt='user posted image' /><br><br>I contend that we are both atheists. I just believe in one fewer god than you do. <br>When you understand why you dismiss all the other possible gods, you will <br>understand why I dismiss yours.<br>~ <b>Stephen Roberts</b>
Thx for the reply, I'm using SlammeR's src's (3.82) btw.
Also, this is something that has to be done in code right? If so what is the property that the hg gets from the itemlist to know it's a hammer, sword, stormbringer?
Sry for the noobish question, but as I said I'm new to the hb src's and therefore it's variables & cfg's.
I've been searching on the server files and found this function:
void CGame::StormBringer
which has:
iV2 = m_pClientList[iClientH]->m_cAttackDiceRange_L;
Which I guess it's the range, I tried to mess around the stuff that could change it, but I'm guessing from ur post I must change the client as well so it allows me to crit/hit from further?
Also I couldn't find what was calling that StormBringer function on the hg project, is it being called from the client ?
Also, this is something that has to be done in code right? If so what is the property that the hg gets from the itemlist to know it's a hammer, sword, stormbringer?
Sry for the noobish question, but as I said I'm new to the hb src's and therefore it's variables & cfg's.
I've been searching on the server files and found this function:
void CGame::StormBringer
which has:
iV2 = m_pClientList[iClientH]->m_cAttackDiceRange_L;
Which I guess it's the range, I tried to mess around the stuff that could change it, but I'm guessing from ur post I must change the client as well so it allows me to crit/hit from further?
Also I couldn't find what was calling that StormBringer function on the hg project, is it being called from the client ?
<span style='color:green'>Gief <span style='color:purple'>epix</span> codes plz.</span>
There is a value on each item which will decide which skill is required to crit with it. The skill also decides the range. In the case of sb, seperate checks are made to see if it's equipped, then the files will adjust your range accordingly.LythQ wrote: Thx for the reply, I'm using SlammeR's src's (3.82) btw.
Also, this is something that has to be done in code right? If so what is the property that the hg gets from the itemlist to know it's a hammer, sword, stormbringer?
Correct. What you've done here is allowed the server to register attacks from an increased range, but the client can still only send attacks from the range it knows.LythQ wrote: I've been searching on the server files and found this function:
void CGame::StormBringer
which has:
iV2 = m_pClientList[iClientH]->m_cAttackDiceRange_L;
Which I guess it's the range, I tried to mess around the stuff that could change it, but I'm guessing from ur post I must change the client as well so it allows me to crit/hit from further?
Keep on the SB codes. You will see eventually. Just remember to look at the client too.
Reppin' 127.0.0.1!!!<br><br><img src='http://img502.imageshack.us/img502/1348/sig4daxbn2.jpg' border='0' alt='user posted image' /><br><br>I contend that we are both atheists. I just believe in one fewer god than you do. <br>When you understand why you dismiss all the other possible gods, you will <br>understand why I dismiss yours.<br>~ <b>Stephen Roberts</b>
Thanks for pointing me in the right direction, I'll look into the client asap (like 2morrow, time 4 bed atm <.<) and post the results as soon as I'm done w/ it or fail to do so.
Once again, thanks, I'm new to this and am not used to code in different projects at the same time, nor the client/server applications so feedback is greatly appreciated (although I always search for stuff be4 posting).
Just so that it counts, I'm not planning on making a noob max lv 500 and max stat 700 two week server, and don't even know if I'm going to get the server public, just doing it for the fun of coding the game that got me the addiction of coding, going 2 develop it during summer vacations.
Once again, thanks, I'm new to this and am not used to code in different projects at the same time, nor the client/server applications so feedback is greatly appreciated (although I always search for stuff be4 posting).
Just so that it counts, I'm not planning on making a noob max lv 500 and max stat 700 two week server, and don't even know if I'm going to get the server public, just doing it for the fun of coding the game that got me the addiction of coding, going 2 develop it during summer vacations.
<span style='color:green'>Gief <span style='color:purple'>epix</span> codes plz.</span>
Back from school, was able to do it very smoothly (the changes I made on the hg were the ones i needed for it to allow that distance). On the client side I changed:
<a href='http://img107.imageshack.us/img107/6266 ... 2elzy7.jpg' target='_blank'></a>
Found a sort of a security exploit that could be used here, the HG doesn't check the distance you can crit, tried changing the crit distance on long swords only on the client and the dmg worked.}else if ( (absX <= 10) && (absY <= 10) && (m_iSuperAttackLeft > 10) && (m_bSuperAttackMode == TRUE)
&& (_iGetAttackType() == 30)) // Crit with StormBlade (by Snoopy)
{ wType = _iGetAttackType();
m_cCommand = DEF_OBJECTATTACK;
m_sCommX = m_sMCX;
m_sCommY = m_sMCY;
}else if ( (absX <= 10) && (absY <= 10)
&& (_iGetAttackType() == 5)) // Normal hit with StormBlade (by Snoopy)
{ wType = _iGetAttackType();
m_cCommand = DEF_OBJECTATTACK;
m_sCommX = m_sMCX;
m_sCommY = m_sMCY;
<a href='http://img107.imageshack.us/img107/6266 ... 2elzy7.jpg' target='_blank'></a>
<span style='color:green'>Gief <span style='color:purple'>epix</span> codes plz.</span>
Then I suggest that you fix this exploit, and thank you for letting it be known to others. I've found a client, which I think was made by Zero back in the day, which allowed you to do /crit [Characters Name] xxx,xxx (coordinates) and you could crit that person (If on the same map)..LythQ wrote: Back from school, was able to do it very smoothly (the changes I made on the hg were the ones i needed for it to allow that distance). On the client side I changed:
Found a sort of a security exploit that could be used here, the HG doesn't check the distance you can crit, tried changing the crit distance on long swords only on the client and the dmg worked.}else if ( (absX <= 10) && (absY <= 10) && (m_iSuperAttackLeft > 10) && (m_bSuperAttackMode == TRUE)
&& (_iGetAttackType() == 30)) // Crit with StormBlade (by Snoopy)
{ wType = _iGetAttackType();
m_cCommand = DEF_OBJECTATTACK;
m_sCommX = m_sMCX;
m_sCommY = m_sMCY;
}else if ( (absX <= 10) && (absY <= 10)
&& (_iGetAttackType() == 5)) // Normal hit with StormBlade (by Snoopy)
{ wType = _iGetAttackType();
m_cCommand = DEF_OBJECTATTACK;
m_sCommX = m_sMCX;
m_sCommY = m_sMCY;
<a href='http://img107.imageshack.us/img107/6266 ... 2elzy7.jpg' target='_blank'></a>
<!--QuoteBegin--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> </td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->charlie says:<br>i may own outpost but im not a nerd<!--QuoteEnd--></td></tr></table><div class='signature'><!--QuoteEEnd--><br><!--QuoteBegin--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> </td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->(locobans @ Mar 12 2007, 10:48 PM) <br>"Remember while peeing, If you shake it more than twice you playing with it..." <br><!--QuoteEnd--></td></tr></table><div class='signature'><!--QuoteEEnd-->
I never made that. The only thing I did like that was a /cast command which let you cast any spell anywhere on the map.
<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 </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.
Who did then? o_obone-you wrote: I never made that. The only thing I did like that was a /cast command which let you cast any spell anywhere on the map.
<!--QuoteBegin--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> </td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->charlie says:<br>i may own outpost but im not a nerd<!--QuoteEnd--></td></tr></table><div class='signature'><!--QuoteEEnd--><br><!--QuoteBegin--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> </td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->(locobans @ Mar 12 2007, 10:48 PM) <br>"Remember while peeing, If you shake it more than twice you playing with it..." <br><!--QuoteEnd--></td></tr></table><div class='signature'><!--QuoteEEnd-->
Your imagination, as usual.Sentinel wrote:Who did then? o_obone-you wrote: I never made that. The only thing I did like that was a /cast command which let you cast any spell anywhere on the map.
Reppin' 127.0.0.1!!!<br><br><img src='http://img502.imageshack.us/img502/1348/sig4daxbn2.jpg' border='0' alt='user posted image' /><br><br>I contend that we are both atheists. I just believe in one fewer god than you do. <br>When you understand why you dismiss all the other possible gods, you will <br>understand why I dismiss yours.<br>~ <b>Stephen Roberts</b>
Not even...Dax wrote:Your imagination, as usual.Sentinel wrote:Who did then? o_obone-you wrote: I never made that. The only thing I did like that was a /cast command which let you cast any spell anywhere on the map.
<!--QuoteBegin--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> </td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->charlie says:<br>i may own outpost but im not a nerd<!--QuoteEnd--></td></tr></table><div class='signature'><!--QuoteEEnd--><br><!--QuoteBegin--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> </td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->(locobans @ Mar 12 2007, 10:48 PM) <br>"Remember while peeing, If you shake it more than twice you playing with it..." <br><!--QuoteEnd--></td></tr></table><div class='signature'><!--QuoteEEnd-->
Ok, where should I place this code? (file and function)LythQ wrote: Back from school, was able to do it very smoothly (the changes I made on the hg were the ones i needed for it to allow that distance). On the client side I changed:
Found a sort of a security exploit that could be used here, the HG doesn't check the distance you can crit, tried changing the crit distance on long swords only on the client and the dmg worked.}else if ( (absX <= 10) && (absY <= 10) && (m_iSuperAttackLeft > 10) && (m_bSuperAttackMode == TRUE)
&& (_iGetAttackType() == 30)) // Crit with StormBlade (by Snoopy)
{ wType = _iGetAttackType();
m_cCommand = DEF_OBJECTATTACK;
m_sCommX = m_sMCX;
m_sCommY = m_sMCY;
}else if ( (absX <= 10) && (absY <= 10)
&& (_iGetAttackType() == 5)) // Normal hit with StormBlade (by Snoopy)
{ wType = _iGetAttackType();
m_cCommand = DEF_OBJECTATTACK;
m_sCommX = m_sMCX;
m_sCommY = m_sMCY;
<a href='http://img107.imageshack.us/img107/6266 ... 2elzy7.jpg' target='_blank'></a>
Do you even know what that part does? This topic isn't a tutorial.Thefire wrote:Ok, where should I place this code? (file and function)LythQ wrote: Back from school, was able to do it very smoothly (the changes I made on the hg were the ones i needed for it to allow that distance). On the client side I changed:
Found a sort of a security exploit that could be used here, the HG doesn't check the distance you can crit, tried changing the crit distance on long swords only on the client and the dmg worked.}else if ( (absX <= 10) && (absY <= 10) && (m_iSuperAttackLeft > 10) && (m_bSuperAttackMode == TRUE)
&& (_iGetAttackType() == 30)) // Crit with StormBlade (by Snoopy)
{ wType = _iGetAttackType();
m_cCommand = DEF_OBJECTATTACK;
m_sCommX = m_sMCX;
m_sCommY = m_sMCY;
}else if ( (absX <= 10) && (absY <= 10)
&& (_iGetAttackType() == 5)) // Normal hit with StormBlade (by Snoopy)
{ wType = _iGetAttackType();
m_cCommand = DEF_OBJECTATTACK;
m_sCommX = m_sMCX;
m_sCommY = m_sMCY;
<a href='http://img107.imageshack.us/img107/6266 ... 2elzy7.jpg' target='_blank'></a>
Reppin' 127.0.0.1!!!<br><br><img src='http://img502.imageshack.us/img502/1348/sig4daxbn2.jpg' border='0' alt='user posted image' /><br><br>I contend that we are both atheists. I just believe in one fewer god than you do. <br>When you understand why you dismiss all the other possible gods, you will <br>understand why I dismiss yours.<br>~ <b>Stephen Roberts</b>
That code alone doesn't fix anything, was just a test to allow me to hit from further with StormBringer. If you're referring to the code where you can change the critical range it can be found on the Client's game.cpp after this block:
You then go to the desired type of weapon that you want to change. The one I changed on mine was the StormBringer's, but you can change any type of weapon, let's say for example, Long Swords, you go to:
And where you have:
Change the values to the critical distance you want. The exploit consists in you changing the distance here and doing nothing on the HG, still it allows you to crit from further.
Code: Select all
}else if ( (absX <= 2) && (absY <= 2) // strike on Big mobs & gate from a range
&& ((sObjectType == 66)||(sObjectType == 73)||(sObjectType == 81)||(sObjectType == 91)))
{ wType = _iGetAttackType();
m_cCommand = DEF_OBJECTATTACK;
m_sCommX = m_sMCX;
m_sCommY = m_sMCY;
}else //
{ switch (_iGetWeaponSkillType()) {
Code: Select all
case 8: // LS
if ( (absX <= 3) && (absY <= 3) && (m_iSuperAttackLeft > 0) && (m_bSuperAttackMode == TRUE)
&& (_iGetAttackType() != 30)) // crit without StormBlade by Snoopy
{ wType = _iGetAttackType();
m_cCommand = DEF_OBJECTATTACK;
m_sCommX = m_sMCX;
m_sCommY = m_sMCY;
Code: Select all
(absX <= 3) && (absY <= 3)
<span style='color:green'>Gief <span style='color:purple'>epix</span> codes plz.</span>