[reg]/egg Command

Submit your code requests, and if you are good at coding come help others with their requests.
juggalo2
Spamtastic
Posts: 1144
Joined: Sun Jul 17, 2005 5:28 pm

Post by juggalo2 »

ok well i have it but it dosnt work its saposted to read teh egg and then hatch it.
i dont realy have time to fix but if soem one wants to fix it be usefull to alot of ppl fort a nice server.

Code: Select all

if (memcmp(cp, "/Egg ", 9) == 0) {
Command_Egg(iClientH, cp, dwMsgSize - 21);
return;
}




void CGame::Command_Egg(int iClientH, char *pData,DWORD dwMsgSize)

{
 char seps[] = "= \t\n";
 char   cName_Master[10], cWaypoint[11], cSA; 
 int    pX, pY, j, iNum, iNamingValue, iItemID;
 register int i, x;
 short sItemIndex;
 BOOL   bMaster;
 int iSoxH, iSoX;
    
	if (m_pClientList[iClientH] == NULL) return;
	if ((memcmp(m_pMapList[m_pClientList[iClientH]->m_cMapIndex]->m_cName, "gshop_1", 9) != 0) &&
  (memcmp(m_pMapList[m_pClientList[iClientH]->m_cMapIndex]->m_cName, "gshop_2", 9) != 0) &&
  (memcmp(m_pMapList[m_pClientList[iClientH]->m_cMapIndex]->m_cName, "wrhus_1", 9) != 0) &&
  (memcmp(m_pMapList[m_pClientList[iClientH]->m_cMapIndex]->m_cName, "wrhus_2", 9) != 0) &&
  (memcmp(m_pMapList[m_pClientList[iClientH]->m_cMapIndex]->m_cName, "icebound", 9) != 0)) return;

       
     iSoX = 0;
  for (i = 0; i < DEF_MAXITEMS; i++)
  if (m_pClientList[iClientH]->m_pItemList[i] != NULL) {
  	switch (m_pClientList[iClientH]->m_pItemList[i]->m_sIDnum) {
  	case 1950: iSoX++; iSoxH = i; break; // ½ºÅæ ¿Àºê Á¦¸®¸¶ 
  	}
  }
  if (iSoX > 0) {  	
  	iNamingValue = m_pMapList[ m_pClientList[iClientH]->m_cMapIndex ]->iGetEmptyNamingValue();
  	if (iNamingValue == -1) {
  
  	}
  	else 
{
switch (iDice(1,38)) {
case 1:iItemID=188;break;//
case 2:iItemID=189;break;//
case 3:iItemID=190;break;//
case 4:iItemID=191;break;//
case 5:iItemID=192;break;//
case 6:iItemID=193;break;//
case 7:iItemID=194;break;//
case 8:iItemID=195;break;//
case 9:iItemID=196;break;//
case 10:iItemID=197;break;//
case 11:iItemID=198;break;//
case 12:iItemID=199;break;//
case 13:iItemID=200;break;//
case 14:iItemID=201;break;//
case 15:iItemID=202;break;//
case 16:iItemID=203;break;//
case 17:iItemID=204;break;//
case 18:iItemID=205;break;//
case 19:iItemID=206;break;//
case 20:iItemID=207;break;//
case 21:iItemID=208;break;//
case 22:iItemID=209;break;//
case 23:iItemID=210;break;//
case 24:iItemID=211;break;//
case 25:iItemID=212;break;//
case 26:iItemID=213;break;//
case 27:iItemID=214;break;//
case 28:iItemID=215;break;//
case 29:iItemID=216;break;//
case 30:iItemID=217;break;//
case 31:iItemID=218;break;//
case 32:iItemID=219;break;//
case 33:iItemID=220;break;//
case 34:iItemID=221;break;//
case 35:iItemID=222;break;//
case 36:iItemID=223;break;//
case 37:iItemID=224;break;//
case 38:iItemID=225;break;//
	}

    iNum = 10;
	cSA = 0;
	pX = m_pClientList[iClientH]->m_sX;
	pY = m_pClientList[iClientH]->m_sY;

	wsprintf(G_cTxt, "(!) Egg950 Hatch: SummonMob (%s)-(%d)", iNum);
	PutLogList(G_cTxt);

	iNamingValue = m_pMapList[m_pClientList[iClientH]->m_cMapIndex]->iGetEmptyNamingValue();
	if (iNamingValue != -1) {
	
  ZeroMemory(cName_Master, sizeof(cName_Master));
  wsprintf(cName_Master, "XX%d", iNamingValue);
  cName_Master[0] = '_';
  cName_Master[1] = m_pClientList[iClientH]->m_cMapIndex + 65;
  	}
	}	
       for (x = 1; x < DEF_MAXCLIENTS; x++)
  if ((m_pClientList[x] != NULL) && (m_pClientList[x]->m_bIsInitComplete == TRUE)) {
  	SendNotifyMsg(NULL, x, DEF_COMMONTYPE_ITEMDROP, pX, pY, iItemID, NULL, NULL, NULL);
  }
  ItemDepleteHandler(iClientH, sItemIndex, TRUE, TRUE);
     }	
}




~~~in game.h
void Egg950(int iClientH, char *pData, DWORD dwMsgSize);

Code: Select all


Item  = 1950 Egg950      	0 0 26    0 0 0   0 0 0     1    0     16   39  -50000   8000  -1   0   0   0    0   0   -1  31   4
Item  = 1951 Egg951      	0 0 26    0 0 0   0 0 0     1    0     16   39  -40000    100  -1   0   0   0    0   0   -1  31   9
Item  = 1952 Egg952      	0 0 26    0 0 0   0 0 0     1    0     16   39      -1  30000  -1   0   0   0    0   0   -1  31   6
Item  = 1953 Egg953      	0 0 26    0 0 0   0 0 0     1    0     16   39  -20000   3000  -1   0   0   0    0   0   -1  31  10
Item  = 1954 Egg954      	0 0 26    0 0 0   0 0 0     1    0     16   39  -25000   5000  -1   0   0   0    0   0   -1  31   8
Item  = 1955 Egg955      	0 0 26    0 0 0   0 0 0     1    0     16   39  -30000  10000  -1   0   0   0    0   0   -1  31  13
Item  = 1956 Egg956      	0 0 26    0 0 0   0 0 0     1    0     16   39  -10000   3000  -1   0   0   0    0   0   -1  31   5
Item  = 1957 Egg957      	0 0 26    0 0 0   0 0 0     1    0     16   39  -25000   5000  -1   0   0   0    0   0   -1  31   3
Item  = 1958 Egg958      	0 0 26    0 0 0   0 0 0     1    0     16   39  -40000    100  -1   0   0   0    0   0   -1  31  15
Item  = 1959 Egg959      	0 0 26    0 0 0   0 0 0     1    0     16   39  -15000   5000  -1   0   0   0    0   0   -1  31   7
Item  = 1960 Egg960      	0 0 26    0 0 0   0 0 0     1    0     16   39  -40000  20000  -1   0   0   0    0   0   -1  31   9
Item  = 1961 Egg961      	0 0  0    0 0 0   0 0 0     1    0     16   39  -65000  20000  -1   0   0   0    0   0   -1  31   5
<img src='http://lifeplaysu420.com/unknow/nightsign.png' border='0' alt='user posted image' /><br>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br>Wanna make money for surfing the net sing up at <br><a href='http://www.cashfiesta.com/php/join.php? ... yprivitera' target='_blank'>cash fiesta</a><br>its all free hey why ntot make money while fucking around on the computer<br><br><br>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
snoopy81
Loyal fan
Posts: 338
Joined: Mon Jul 12, 2004 7:13 pm

Post by snoopy81 »

OhOh !
So my old idea to fix the v2.191 2nd drop bug has evoluted. . .
Originally, the Eggs hatching was performed out from game. The admin uses HBMaster to perform the task. The reasons were:
- Too hard for me to code all 2nd drops in v2.191 gserver.
- Easyer to change HBmaster sources than build another hack for v2.191 gserver if need to fix iyem lists and probabilities.
- The admin can see all items that are hatched, giving him a chance to fix abnormal hatchings (there was many bugs at the beginning...)
- The RP history off Eggs explained perfectlly why they neede to wait some time to hatch.

But now, there is a far better reason for witch I never rewrote this functions into gserver: Eggs became a "Trading money" , and if you must wait a while before hatching, it gives you some extra time to think about it. An other "fun" reason s that when you get an Egg, ZemStone will not save it if you die.... So it's an extra reason to be very cautious, or recall...

Anyways, the initial drop list and drop rates from Eggs was concieved to hatch the 2nd drop rare item list.
_\_ _<br> / , \__/ . \ Admin of Equilibrium Project<br> II\ \___ . O<br> III \_/ \ _ / <a href='http://www.equiprojet.com' target='_blank'>http://www.equiprojet.com</a><br> II I¯I
juggalo2
Spamtastic
Posts: 1144
Joined: Sun Jul 17, 2005 5:28 pm

Post by juggalo2 »

well with ur tool snoopy i dont use the same cfgs so evry time i use it half teh eggs dont hatch into enyhting but alot of they i that i realy dont have its still adds in char files so it ends up buging the char wich then i would have to un bug them. but if i hade all eth same items as ur server has and teh same names the tool would work the balls and plues im gonna make it ounce i fix teh code to only be ablke to hatch an egg every 5 to 10 min
<img src='http://lifeplaysu420.com/unknow/nightsign.png' border='0' alt='user posted image' /><br>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br>Wanna make money for surfing the net sing up at <br><a href='http://www.cashfiesta.com/php/join.php? ... yprivitera' target='_blank'>cash fiesta</a><br>its all free hey why ntot make money while fucking around on the computer<br><br><br>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
diuuude
Outpost bitch
Posts: 592
Joined: Wed Dec 28, 2005 11:57 pm

Post by diuuude »

hum... eggs don't always give an item when hatching. And, Eggs don't hatch with 5 - 10 minutes...


The item.cfgs used on the server Snoopy made with the eggs patch were the ones from revival project, you can download it on his old website.
<a href='http://www.technohell.net' target='_blank'><b><span style='color:red'>>>> Helbreath Ressources Website Here <<<</span></b></a><br>C++ Sources, Tools, Server Files, Help on Forum, C++ Snippets, Toplist... Updated often, come visit us !
juggalo2
Spamtastic
Posts: 1144
Joined: Sun Jul 17, 2005 5:28 pm

Post by juggalo2 »

diuuude wrote: hum... eggs don't always give an item when hatching. And, Eggs don't hatch with 5 - 10 minutes...


The item.cfgs used on the server Snoopy made with the eggs patch were the ones from revival project, you can download it on his old website.
i know this i also said tahts im not useing his cfgs thats why im maken the code cuz with the topll and my cfg half teh items arnt in my server
<img src='http://lifeplaysu420.com/unknow/nightsign.png' border='0' alt='user posted image' /><br>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br>Wanna make money for surfing the net sing up at <br><a href='http://www.cashfiesta.com/php/join.php? ... yprivitera' target='_blank'>cash fiesta</a><br>its all free hey why ntot make money while fucking around on the computer<br><br><br>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
locobans
Outpost Junkie
Posts: 2264
Joined: Tue Jul 13, 2004 3:51 am
Location: Behind You
Contact:

Post by locobans »

Would be good that they hatch when the Admin restart the HGserver.
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>
juggalo2
Spamtastic
Posts: 1144
Joined: Sun Jul 17, 2005 5:28 pm

Post by juggalo2 »

how about piut it on qa timr liek after 1 hour or 2 hours of plaring all ur egges will hath in ur bag when ur press /egg like /rep
<img src='http://lifeplaysu420.com/unknow/nightsign.png' border='0' alt='user posted image' /><br>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br>Wanna make money for surfing the net sing up at <br><a href='http://www.cashfiesta.com/php/join.php? ... yprivitera' target='_blank'>cash fiesta</a><br>its all free hey why ntot make money while fucking around on the computer<br><br><br>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
locobans
Outpost Junkie
Posts: 2264
Joined: Tue Jul 13, 2004 3:51 am
Location: Behind You
Contact:

Post by locobans »

Naw...I think that automatically everytime HGserver starts up will hatch all eggs located on player's Bag :P
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>
kahn
Loyal fan
Posts: 203
Joined: Thu Oct 07, 2004 1:20 am

Post by kahn »

but i think what life is trying to do is make a CMD in game so players can hatch the eggs their self every Horu or 2 thats just 1 mans opion
locobans
Outpost Junkie
Posts: 2264
Joined: Tue Jul 13, 2004 3:51 am
Location: Behind You
Contact:

Post by locobans »

Who said that wasn't what he was trying to make?
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>
juggalo2
Spamtastic
Posts: 1144
Joined: Sun Jul 17, 2005 5:28 pm

Post by juggalo2 »

eaxactly whats i said liek 2 post up
<img src='http://lifeplaysu420.com/unknow/nightsign.png' border='0' alt='user posted image' /><br>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br>Wanna make money for surfing the net sing up at <br><a href='http://www.cashfiesta.com/php/join.php? ... yprivitera' target='_blank'>cash fiesta</a><br>its all free hey why ntot make money while fucking around on the computer<br><br><br>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
diuuude
Outpost bitch
Posts: 592
Joined: Wed Dec 28, 2005 11:57 pm

Post by diuuude »

I am currently working on a new item i called "pandora's box" working on the same idea as the eggs. When a monster drops a pandora's box, you jus have to dble click on it to hatch it and get your item if success. It uses the special-ability-time of your char to hatch a pandora's box so you can't hatch often and you'll not be able to use special ability right after hatching (medusa, blood...).


Works fine for now but you have to logout and then re-login to see your new item... Gonna fix it, add a new sprite for the client, set the notify msg and i'll release the source when it'll be 100% working, i think it could help you.
<a href='http://www.technohell.net' target='_blank'><b><span style='color:red'>>>> Helbreath Ressources Website Here <<<</span></b></a><br>C++ Sources, Tools, Server Files, Help on Forum, C++ Snippets, Toplist... Updated often, come visit us !
locobans
Outpost Junkie
Posts: 2264
Joined: Tue Jul 13, 2004 3:51 am
Location: Behind You
Contact:

Post by locobans »

diuuude wrote: I am currently working on a new item i called "pandora's box" working on the same idea as the eggs. When a monster drops a pandora's box, you jus have to dble click on it to hatch it and get your item if success. It uses the special-ability-time of your char to hatch a pandora's box so you can't hatch often and you'll not be able to use special ability right after hatching (medusa, blood...).


Works fine for now but you have to logout and then re-login to see your new item... Gonna fix it, add a new sprite for the client, set the notify msg and i'll release the source when it'll be 100% working, i think it could help you.
That's a nice feature/code.

I'll be one of the people that will use it when you release. Good luck!
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>
slawsoo
just visiting
Posts: 9
Joined: Wed Apr 19, 2006 5:32 pm

Post by slawsoo »

Code: Select all

D:\2.24b Sources\Game.cpp(56816) : error C2143: syntax error : missing ';' before 'if'
D:\2.24b Sources\Game.cpp(56816) : error C2143: syntax error : missing ';' before '{'
D:\2.24b Sources\Game.cpp(56816) : error C2447: missing function header (old-style formal list?)
D:\2.24b Sources\Game.cpp(56824) : error C2039: 'Command_Egg' : is not a member of 'CGame'
        d:\2.24b sources\game.h(204) : see declaration of 'CGame'
D:\2.24b Sources\Game.cpp(56835) : error C2065: 'm_pClientList' : undeclared identifier
D:\2.24b Sources\Game.cpp(56835) : error C2109: subscript requires array or pointer type
D:\2.24b Sources\Game.cpp(56836) : error C2065: 'm_pMapList' : undeclared identifier
D:\2.24b Sources\Game.cpp(56836) : error C2109: subscript requires array or pointer type
D:\2.24b Sources\Game.cpp(56836) : error C2227: left of '->m_cMapIndex' must point to class/struct/union
D:\2.24b Sources\Game.cpp(56836) : error C2227: left of '->m_cName' must point to class/struct/union
D:\2.24b Sources\Game.cpp(56837) : error C2109: subscript requires array or pointer type
D:\2.24b Sources\Game.cpp(56837) : error C2227: left of '->m_cMapIndex' must point to class/struct/union
D:\2.24b Sources\Game.cpp(56837) : error C2227: left of '->m_cName' must point to class/struct/union
D:\2.24b Sources\Game.cpp(56838) : error C2109: subscript requires array or pointer type
D:\2.24b Sources\Game.cpp(56838) : error C2227: left of '->m_cMapIndex' must point to class/struct/union
D:\2.24b Sources\Game.cpp(56838) : error C2227: left of '->m_cName' must point to class/struct/union
D:\2.24b Sources\Game.cpp(56839) : error C2109: subscript requires array or pointer type
D:\2.24b Sources\Game.cpp(56839) : error C2227: left of '->m_cMapIndex' must point to class/struct/union
D:\2.24b Sources\Game.cpp(56839) : error C2227: left of '->m_cName' must point to class/struct/union
D:\2.24b Sources\Game.cpp(56840) : error C2109: subscript requires array or pointer type
D:\2.24b Sources\Game.cpp(56840) : error C2227: left of '->m_cMapIndex' must point to class/struct/union
D:\2.24b Sources\Game.cpp(56840) : error C2227: left of '->m_cName' must point to class/struct/union
D:\2.24b Sources\Game.cpp(56845) : error C2109: subscript requires array or pointer type
D:\2.24b Sources\Game.cpp(56845) : error C2227: left of '->m_pItemList' must point to class/struct/union
D:\2.24b Sources\Game.cpp(56846) : error C2109: subscript requires array or pointer type
D:\2.24b Sources\Game.cpp(56846) : error C2227: left of '->m_pItemList' must point to class/struct/union
D:\2.24b Sources\Game.cpp(56846) : error C2227: left of '->m_sIDnum' must point to class/struct/union
D:\2.24b Sources\Game.cpp(56851) : error C2109: subscript requires array or pointer type
D:\2.24b Sources\Game.cpp(56851) : error C2227: left of '->m_cMapIndex' must point to class/struct/union
D:\2.24b Sources\Game.cpp(56851) : error C2227: left of '->iGetEmptyNamingValue' must point to class/struct/union
D:\2.24b Sources\Game.cpp(56857) : error C2065: 'iDice' : undeclared identifier
D:\2.24b Sources\Game.cpp(56900) : error C2109: subscript requires array or pointer type
D:\2.24b Sources\Game.cpp(56900) : error C2227: left of '->m_sX' must point to class/struct/union
D:\2.24b Sources\Game.cpp(56901) : error C2109: subscript requires array or pointer type
D:\2.24b Sources\Game.cpp(56901) : error C2227: left of '->m_sY' must point to class/struct/union
D:\2.24b Sources\Game.cpp(56906) : error C2109: subscript requires array or pointer type
D:\2.24b Sources\Game.cpp(56906) : error C2227: left of '->m_cMapIndex' must point to class/struct/union
D:\2.24b Sources\Game.cpp(56906) : error C2227: left of '->iGetEmptyNamingValue' must point to class/struct/union
D:\2.24b Sources\Game.cpp(56912) : error C2109: subscript requires array or pointer type
D:\2.24b Sources\Game.cpp(56912) : error C2227: left of '->m_cMapIndex' must point to class/struct/union
D:\2.24b Sources\Game.cpp(56916) : error C2109: subscript requires array or pointer type
D:\2.24b Sources\Game.cpp(56916) : error C2109: subscript requires array or pointer type
D:\2.24b Sources\Game.cpp(56916) : error C2227: left of '->m_bIsInitComplete' must point to class/struct/union
D:\2.24b Sources\Game.cpp(56917) : error C2065: 'SendNotifyMsg' : undeclared identifier
D:\2.24b Sources\Game.cpp(56919) : error C2065: 'ItemDepleteHandler' : undeclared identifier
Map.cpp
Skipping... (no relevant changes detected)
wmain.cpp
Error executing cl.exe.

HGserver.exe - 45 error(s), 6 warning(s)
WTF?! :/
<a href='http://www.helbreath.org' target='_blank'><img src='http://www.helbreath.org/banner.gif' border='0' alt='user posted image' /></a><br>
juggalo2
Spamtastic
Posts: 1144
Joined: Sun Jul 17, 2005 5:28 pm

Post by juggalo2 »

lol that wasnt a code code it was never done :P it say reg not src
<img src='http://lifeplaysu420.com/unknow/nightsign.png' border='0' alt='user posted image' /><br>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br>Wanna make money for surfing the net sing up at <br><a href='http://www.cashfiesta.com/php/join.php? ... yprivitera' target='_blank'>cash fiesta</a><br>its all free hey why ntot make money while fucking around on the computer<br><br><br>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Post Reply