Help With C++ Coding.

All Helbreath Server Source Discussion here.
Ghaleon
Regular
Posts: 66
Joined: Sun Jul 17, 2005 7:10 am

Post by Ghaleon »

Well I'm convinced that no one is really going to help me code a helbreath server so I decided to try and learn c++.

I got a dev-cpp compiler and really the only thing I want to learn is how to code monsters in HB to drop different items, even custom ones.

I followed the full guide at www.cprogramming.com but now what? I don't know where to go from there. I don't know what you need to do to change monster drops.

Can anyone with c++ knowledge please give me a general idea on exactly what it is I have to do?

Thanks.
Slipknight
Loyal fan
Posts: 423
Joined: Thu Apr 07, 2005 7:53 pm

Post by Slipknight »

Ghaleon wrote: Well I'm convinced that no one is really going to help me code a helbreath server so I decided to try and learn c++.

I got a dev-cpp compiler and really the only thing I want to learn is how to code monsters in HB to drop different items, even custom ones.

I followed the full guide at www.cprogramming.com but now what? I don't know where to go from there. I don't know what you need to do to change monster drops.

Can anyone with c++ knowledge please give me a general idea on exactly what it is I have to do?

Thanks.
Too change monsters drop in C++ is incredibly easy.

I doubt you even need too know C++ too be able too do this as it really is copy+ paste and change a few numbers too add something.

Also dont use dev++ compiler get MSVC++ which is Microsoft Visual C++ you can get one off a torrent site easily.

www.torrentreactor.us or .com whichever.

Just search for any monsters name until you start seeing item names which wont be long and you should be able too figure out how easy it is too do it.
<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>
Ghaleon
Regular
Posts: 66
Joined: Sun Jul 17, 2005 7:10 am

Post by Ghaleon »

Search for monster names where??

Where do I search? and with what? a hex editor? the compiler?

Once I can find that out ^^ I'm pretty sure I can find out what to do.
locobans
Outpost Junkie
Posts: 2264
Joined: Tue Jul 13, 2004 3:51 am
Location: Behind You
Contact:

Post by locobans »

:Moved: B)
QUOTE (ADDKiD @ Dec 1 2006, 4:01 PM) <br>You guys make me laugh alot, half the shit I say, is bullshit...<br><br><img src='http://img485.imageshack.us/img485/492/banssig1ng.gif' border='0' alt='user posted image' /><br><br><b>I see no changes at all, wake up in the morning and ask myself...<br>Is life worth living? Should I blast myself?</b><br><br><b><a href='http://2paclegacy.com' target='_blank'>2PacLegacy.com</a></b>
Crackboy
noob
Posts: 17
Joined: Mon Aug 02, 2004 10:24 pm

Post by Crackboy »

Well I dunno for you guys, but I can't find the source of my problem...
Rudolph sometimes drop Aresden Hero Blade... altough its NOT set to be dropped by the rudolph... It's like all the items are able to be dropped by every monster :\

Anyone fixed that ?

Btw im using 2.24c from Helbreathss.tk [ - HBx Team HGserver 2.24c [462 Kb] C++ Sources]
Ghaleon
Regular
Posts: 66
Joined: Sun Jul 17, 2005 7:10 am

Post by Ghaleon »

Crackboy did you edit it to drop like that or did it come with the files?
binarydata
DBfiller
Posts: 3816
Joined: Fri Oct 31, 2003 5:30 am
Location: San Diego CA, USA
Contact:

Post by binarydata »

the the coding part for drops is easy
its just finding it thats a bitch
<img src='http://img88.exs.cx/img88/2290/7666.jpg' border='0' alt='user posted image' />
Jaap
Loyal fan
Posts: 390
Joined: Thu Apr 22, 2004 8:21 am

Post by Jaap »

You'll want to look for the CGame::NpcDeadItemGenerator method in Game.cpp

It determines the drop of the NPC (this method is called in NpcKilledHandler if I'm correct).
Ghaleon
Regular
Posts: 66
Joined: Sun Jul 17, 2005 7:10 am

Post by Ghaleon »

Okay, I downloaded the 2.20 client source files from the other forum on here and I found game.cpp.

Once I edit the drop what do I do?

how to the source files connect to the actual files at all?

sorry for being a newb in advance.
Ghaleon
Regular
Posts: 66
Joined: Sun Jul 17, 2005 7:10 am

Post by Ghaleon »

I opened game.cpp, searched for CGame::NpcDeadItemGenerator and it found nothing.

binarydata
DBfiller
Posts: 3816
Joined: Fri Oct 31, 2003 5:30 am
Location: San Diego CA, USA
Contact:

Post by binarydata »

Ghaleon wrote: Okay, I downloaded the 2.20 client source files from the other forum on here and I found game.cpp.

Once I edit the drop what do I do?

how to the source files connect to the actual files at all?

sorry for being a newb in advance.
you edit drops in the fucking server......
not the client
<img src='http://img88.exs.cx/img88/2290/7666.jpg' border='0' alt='user posted image' />
Ghaleon
Regular
Posts: 66
Joined: Sun Jul 17, 2005 7:10 am

Post by Ghaleon »

sorry my bad, yeah I found it now in the 2.24b server source files.

marleythe9
Loyal fan
Posts: 391
Joined: Sat Mar 26, 2005 12:41 am

Post by marleythe9 »

lol soo mean.. i thout the 2.20 Client source came with HGserver too
<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' />
Ghaleon
Regular
Posts: 66
Joined: Sun Jul 17, 2005 7:10 am

Post by Ghaleon »

Okay question..




if (iGenLevel == 0) return;

// Weapon Drop:
// 1.4% chance Valuable Drop 60% that it is a Weapon
if (iDice(1,10000) <= 6000) {
if (iDice(1,10000) <= 8000) {
// 70% the Weapon is Melee
switch (iGenLevel) {

case 1: // Slime, Giant-Ant, Amphis, Rabbit, Cat
switch (iDice(1,3)) {
case 1: iItemID = 1; break; // Dagger
case 2: iItemID = 8; break; // ShortSword
case 3: iItemID = 59; break; // LightAxe
}
break;


If I wanted to change slime, giant-ant, amphis, cats and rabbits to drop say a ring of abaddon, I would replace the part where it says itemid = 59 to the item number of the ring of abaddon?? and rename where it says lightaxe to ring of abaddon?

and where it says this >>

// Weapon Drop:
// 1.4% chance Valuable Drop 60% that it is a Weapon
if (iDice(1,10000) <= 6000) {
if (iDice(1,10000) <= 8000) {
// 70% the Weapon is Melee

do I just manaully change the percentages if i want to higher then chance rate of a valuable drop??



also, once I do all of this and save it, then what?
Jaap
Loyal fan
Posts: 390
Joined: Thu Apr 22, 2004 8:21 am

Post by Jaap »

To question one: yes
To question two: compile it, run it
Post Reply