Hammer Strip
-
- Loyal fan
- Posts: 235
- Joined: Mon Jul 12, 2004 9:36 am
anyone code it right yet? all i can do now is to reduce the endurance taken off by the hammer on the armor. and when finally endu 0 then it is unequipped.
- Tbone<br><a href="http://cyborg.namedecoder.com"><br><img src="http://cyborg.namedecoder.com/webimages ... ng"<br></a>
i think you must rewrite
Code: Select all
void CGame::CalculateEnduranceDecrement(short sTargetH, short sAttackerH, char cTargetType, int iArmorType)
<img src='http://img440.imageshack.us/img440/2627/15pt.jpg' border='0' alt='user posted image' /><br><br>HBPolska characters:<br><br>Hellios 150+ Aresden Hero Mage<br>TheBill 120 Aresden plrider<br>Kill_Me 100 Full-Hero plrider<br>Rockeater 110+ Aresden Plate Mage<br><br><a href='http://www.helbreath.org' target='_blank'>http://www.helbreath.org</a> come and play (250 ppl online)
-
- Loyal fan
- Posts: 235
- Joined: Mon Jul 12, 2004 9:36 am
does the hammer strip in 2.24b sources work? thx again.
thx.
or i write it like this?void CGame::CalculateEnduranceDecrement(short sTargetH, short sAttackerH, char cTargetType, int iArmorType)
{
short sItemIndex;
int iDownValue = 1, iHammerChance = 100;
if (m_pClientList[sTargetH] == NULL) return;
if ((cTargetType == DEF_OWNERTYPE_PLAYER) && (m_pClientList[sAttackerH] != NULL)) {
if ((cTargetType == DEF_OWNERTYPE_PLAYER) && (m_pClientList[sTargetH]->m_cSide != m_pClientList[sAttackerH]->m_cSide)) {
switch (m_pClientList[sAttackerH]->m_sUsingWeaponSkill) {
case 14:
if ((31 == ((m_pClientList[sAttackerH]->m_sAppr2 & 0x0FF0) >> 4)) || (32 == ((m_pClientList[sAttackerH]->m_sAppr2 & 0x0FF0) >> 4))) {
sItemIndex = m_pClientList[sAttackerH]->m_sItemEquipmentStatus[DEF_EQUIPPOS_TWOHAND];
if ((sItemIndex != -1) && (m_pClientList[sAttackerH]->m_pItemList[sItemIndex] != NULL)) {
if (m_pClientList[sAttackerH]->m_pItemList[sItemIndex]->m_sIDnum == 761) { // BattleHammer
iDownValue = 30;
break;
}
if (m_pClientList[sAttackerH]->m_pItemList[sItemIndex]->m_sIDnum == 762) { // GiantBattleHammer
iDownValue = 35;
break;
}
if (m_pClientList[sAttackerH]->m_pItemList[sItemIndex]->m_sIDnum == 843) { // BarbarianHammer
iDownValue = 30;
break;
}
}
}
else {
iDownValue = 20; break;
}
case 10: iDownValue = 3; break;
default: iDownValue = 1; break;
}
if (m_pClientList[sTargetH]->m_bIsSpecialAbilityEnabled == TRUE) {
switch (m_pClientList[sTargetH]->m_iSpecialAbilityType)
case 52: iDownValue = 0; iHammerChance = 0;
}
}
}
if ((m_pClientList[sTargetH]->m_cSide != 0) && (m_pClientList[sTargetH]->m_pItemList[iArmorType]->m_wCurLifeSpan > 0)) {
m_pClientList[sTargetH]->m_pItemList[iArmorType]->m_wCurLifeSpan -= iDownValue;
}
<span style='color:red'>if (m_pClientList[sTargetH]->m_pItemList[iArmorType]->m_wCurLifeSpan <= 0) {
m_pClientList[sTargetH]->m_pItemList[iArmorType]->m_wCurLifeSpan = 0;
SendNotifyMsg(NULL, sTargetH, DEF_NOTIFY_ITEMLIFESPANEND, m_pClientList[sTargetH]->m_pItemList[iArmorType]->m_cEquipPos, iArmorType, NULL, NULL);
ReleaseItemHandler(sTargetH, iArmorType, TRUE);
return;</span>
if (m_pClientList[sAttackerH]->m_pItemList[sItemIndex]->m_sIDnum == 843) { // BarbarianHammer
iDownValue = 30;
<span style='color:red'>if (m_pClientList[sTargetH]->m_pItemList[iArmorType]->m_wCurLifeSpan <= 0) {
m_pClientList[sTargetH]->m_pItemList[iArmorType]->m_wCurLifeSpan = 0;
SendNotifyMsg(NULL, sTargetH, DEF_NOTIFY_ITEMLIFESPANEND, m_pClientList[sTargetH]->m_pItemList[iArmorType]->m_cEquipPos, iArmorType, NULL, NULL);
ReleaseItemHandler(sTargetH, iArmorType, TRUE);
return;</span>
break;
thx.
- Tbone<br><a href="http://cyborg.namedecoder.com"><br><img src="http://cyborg.namedecoder.com/webimages ... ng"<br></a>
ull find that once the armor endurance reaches below 0 it will jump to 65500 ~~
<img src='http://www.prism.gatech.edu/~gtg818f/basesig.gif' border='0' alt='user posted image' /><br><img src='http://img228.imageshack.us/img228/439/steam1tf.gif' border='0' alt='user posted image' />
-
- Loyal fan
- Posts: 235
- Joined: Mon Jul 12, 2004 9:36 am
erm t, mopre clues pls. so i assume the second code is the correct one?
thx guys for helping me learn to code.
without tehif (m_pClientList[sAttackerH]->m_pItemList[sItemIndex]->m_sIDnum == 843) { // BarbarianHammer
iDownValue = 30;
if (m_pClientList[sTargetH]->m_pItemList[iArmorType]->m_wCurLifeSpan <= 0) {
SendNotifyMsg(NULL, sTargetH, DEF_NOTIFY_ITEMLIFESPANEND, m_pClientList[sTargetH]->m_pItemList[iArmorType]->m_cEquipPos, iArmorType, NULL, NULL);
ReleaseItemHandler(sTargetH, iArmorType, TRUE);
return;
break;
since u said that if endu 0 it jumps to 65500, then remove it will do? or not?m_pClientList[sTargetH]->m_pItemList[iArmorType]->m_wCurLifeSpan = 0;
thx guys for helping me learn to code.
- Tbone<br><a href="http://cyborg.namedecoder.com"><br><img src="http://cyborg.namedecoder.com/webimages ... ng"<br></a>
-
- Loyal fan
- Posts: 423
- Joined: Thu Apr 07, 2005 7:53 pm
wtf im usuing popics code on my sources and for some reason its not working, and I think its because it will only unequip there item once its at 0 endu but thats kinda gay and the original strip dun do that so wtf goin on? No one nail it right yet?
<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>
I guess ....This will help
Works good for me...
Code: Select all
void CGame::CalculateEnduranceDecrement(short sTargetH, short sAttackerH, char cTargetType, int iArmorType)
{
short sItemIndex;
int iDownValue = 1, iHammerChance = 100;
if (m_pClientList[sTargetH] == NULL) return;
if ((cTargetType == DEF_OWNERTYPE_PLAYER) && (m_pClientList[sAttackerH] != NULL )) {
if ((cTargetType == DEF_OWNERTYPE_PLAYER) && (m_pClientList[sTargetH]->m_cSide != m_pClientList[sAttackerH]->m_cSide)) {
switch (m_pClientList[sAttackerH]->m_sUsingWeaponSkill) {
case 14:
if ((31 == ((m_pClientList[sAttackerH]->m_sAppr2 & 0x0FF0) >> 4)) || (32 == ((m_pClientList[sAttackerH]->m_sAppr2 & 0x0FF0) >> 4))) {
sItemIndex = m_pClientList[sAttackerH]->m_sItemEquipmentStatus[DEF_EQUIPPOS_TWOHAND];
if ((sItemIndex != -1) && (m_pClientList[sAttackerH]->m_pItemList[sItemIndex] != NULL)) {
if (m_pClientList[sAttackerH]->m_pItemList[sItemIndex]->m_sIDnum == 1761) { // BattleHammer
iDownValue = 30;
break;
}
if (m_pClientList[sAttackerH]->m_pItemList[sItemIndex]->m_sIDnum == 762) { // GiantBattleHammer
iDownValue = 35;
break;
}
if (m_pClientList[sAttackerH]->m_pItemList[sItemIndex]->m_sIDnum == 843) { // BarbarianHammer
iDownValue = 30;
break;
}
}
}
else {
iDownValue = 20; break;
}
case 10: iDownValue = 3; break;
default: iDownValue = 1; break;
}
if (m_pClientList[sTargetH]->m_bIsSpecialAbilityEnabled == TRUE) {
switch (m_pClientList[sTargetH]->m_iSpecialAbilityType)
case 52: iDownValue = 0; iHammerChance = 0;
}
}
}
if ((m_pClientList[sTargetH]->m_cSide != 0) && (m_pClientList[sTargetH]->m_pItemList[iArmorType]->m_wCurLifeSpan > 0)) {
m_pClientList[sTargetH]->m_pItemList[iArmorType]->m_wCurLifeSpan -= iDownValue;
}
if ((m_pClientList[sTargetH]->m_pItemList[iArmorType]->m_wCurLifeSpan <= 0) || (m_pClientList[sTargetH]->m_pItemList[iArmorType]->m_wCurLifeSpan > 64000)) {
m_pClientList[sTargetH]->m_pItemList[iArmorType]->m_wCurLifeSpan = 0;
SendNotifyMsg(NULL, sTargetH, DEF_NOTIFY_ITEMLIFESPANEND, m_pClientList[sTargetH]->m_pItemList[iArmorType]->m_cEquipPos, iArmorType, NULL, NULL);
ReleaseItemHandler(sTargetH, iArmorType, TRUE);
return;
}
try
{
if (m_pClientList[sAttackerH] != NULL) {
if (cTargetType == DEF_OWNERTYPE_PLAYER) {
sItemIndex = m_pClientList[sAttackerH]->m_sItemEquipmentStatus[DEF_EQUIPPOS_TWOHAND];
if ((sItemIndex != -1) && (m_pClientList[sAttackerH]->m_pItemList[sItemIndex] != NULL)) {
if ((m_pClientList[sAttackerH]->m_pItemList[sItemIndex]->m_sIDnum == 617) || (m_pClientList[sAttackerH]->m_pItemList[sItemIndex]->m_sIDnum == 618) || (m_pClientList[sAttackerH]->m_pItemList[sItemIndex]->m_sIDnum == 619) || (m_pClientList[sAttackerH]->m_pItemList[sItemIndex]->m_sIDnum == 873) || (m_pClientList[sAttackerH]->m_pItemList[sItemIndex]->m_sIDnum == 874) || (m_pClientList[sAttackerH]->m_pItemList[sItemIndex]->m_sIDnum == 75) || (m_pClientList[sAttackerH]->m_pItemList[sItemIndex]->m_sIDnum == 76)) {
m_pClientList[sAttackerH]->m_sUsingWeaponSkill = 6;
return;
}
}
}
}
if (m_pClientList[sAttackerH] != NULL) {
if (cTargetType == DEF_OWNERTYPE_PLAYER) {
if ((m_pClientList[sAttackerH]->m_sUsingWeaponSkill == 14) && (iHammerChance == 100)) {
if (m_pClientList[sTargetH]->m_pItemList[iArmorType]->m_wMaxLifeSpan < 2000) {
iHammerChance = iDice(6, (m_pClientList[sTargetH]->m_pItemList[iArmorType]->m_wMaxLifeSpan - m_pClientList[sTargetH]->m_pItemList[iArmorType]->m_wCurLifeSpan));
}
else {
iHammerChance = iDice(4, (m_pClientList[sTargetH]->m_pItemList[iArmorType]->m_wMaxLifeSpan - m_pClientList[sTargetH]->m_pItemList[iArmorType]->m_wCurLifeSpan));
}
if ((31 == ((m_pClientList[sAttackerH]->m_sAppr2 & 0x0FF0) >> 4)) || (32 == ((m_pClientList[sAttackerH]->m_sAppr2 & 0x0FF0) >> 4))) {
sItemIndex = m_pClientList[sAttackerH]->m_sItemEquipmentStatus[DEF_EQUIPPOS_TWOHAND];
if ((sItemIndex != -1) && (m_pClientList[sAttackerH]->m_pItemList[sItemIndex] != NULL)) {
if (m_pClientList[sAttackerH]->m_pItemList[sItemIndex]->m_sIDnum == 1761) { // BattleHammer
iHammerChance = iHammerChance/2;
}
if (m_pClientList[sAttackerH]->m_pItemList[sItemIndex]->m_sIDnum == 762) { // GiantBattleHammer
iHammerChance = ((iHammerChance*10)/9);
}
if (m_pClientList[sAttackerH]->m_pItemList[sItemIndex]->m_sIDnum == 843) { // GiantBattleHammer
iHammerChance = ((iHammerChance*10)/9);
}
}
}
if ((m_pClientList[sTargetH]->m_pItemList[iArmorType]->m_sIDnum == 622) || (m_pClientList[sTargetH]->m_pItemList[iArmorType]->m_sIDnum == 621)) {
iHammerChance = 0;
}
if (m_pClientList[sTargetH]->m_pItemList[iArmorType]->m_wCurLifeSpan < iHammerChance) {
wsprintf(G_cTxt, "(iHammerChance (%d), target armor endurance (%d)!", iHammerChance, m_pClientList[sTargetH]->m_pItemList[iArmorType]->m_wCurLifeSpan);
PutLogList(G_cTxt);
ReleaseItemHandler(sTargetH, iArmorType, TRUE);
SendNotifyMsg(NULL, sTargetH, DEF_NOTIFY_ITEMRELEASED, m_pClientList[sTargetH]->m_pItemList[iArmorType]->m_cEquipPos, iArmorType, NULL, NULL);
return;
}
}
}
}
}
catch(...)
{
}
}
-
- Loyal fan
- Posts: 423
- Joined: Thu Apr 07, 2005 7:53 pm
Myne looks almost identical too that one and mynes not working for me :/ I'll try that one out.
<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>
-
- Loyal fan
- Posts: 423
- Joined: Thu Apr 07, 2005 7:53 pm
yeah I changed the ID's too fit my item cfgs but still no success.
EDIT: I will try your code soon.
EDIT: I will try your code soon.
<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>
-
- Loyal fan
- Posts: 423
- Joined: Thu Apr 07, 2005 7:53 pm
Yeah it worked, dont really need it anymore though lol HB is dead and im starting a Lineage 2 server in a month or so. My host has 2 Uber server boxes packing Dual Xeon 4.0 chips and 3GB ram each and his Internet Speed is OC192 (9.6GigaBytes per second)CDWriter wrote: Worked Yes ? .....well i know it does so![]()
<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>
so thats how arcanian disappearedSlipknight wrote:Yeah it worked, dont really need it anymore though lol HB is dead and im starting a Lineage 2 server in a month or so. My host has 2 Uber server boxes packing Dual Xeon 4.0 chips and 3GB ram each and his Internet Speed is OC192 (9.6GigaBytes per second)CDWriter wrote: Worked Yes ? .....well i know it does so![]()

"<i>One night I was talking to God, but I realized I was talking to <u>myself</u></i>"<br><br><img src='http://img61.imageshack.us/img61/2678/untitled13bf.gif' border='0' alt='user posted image' /><br><br><b><u>Links</u></b><br>
-
- Loyal fan
- Posts: 391
- Joined: Sat Mar 26, 2005 12:41 am
ok well any way whats up with the
well seams to work with that part
but ...
just a question is the BattleHammer the only Item ID that is diffrent???
oh i found something u kinda made mistake on lol
you put IDnum == 843 ) { //GiantBattleHammer
when it s a //BarHammer but it dont matter
.. just so new people dont get confused
i guess they did that to in the original 2.24 source
part am i supos to add that too?????catch(...)
{
}
}
well seams to work with that part

just a question is the BattleHammer the only Item ID that is diffrent???
oh i found something u kinda made mistake on lol

you put IDnum == 843 ) { //GiantBattleHammer
when it s a //BarHammer but it dont matter


<img src='http://freewebs.com/trickro/70s.png' border='0' alt='user posted image' /><img src='http://freewebs.com/trickro/70s2.jpg' border='0' alt='user posted image' />