[REQ] Selling NPCs

All Helbreath Client Source Discussion here.
Post Reply
€M4NU€L
Outpost bitch
Posts: 517
Joined: Sat Nov 19, 2005 9:07 pm
Location: I watch gay porn
Contact:

Post by €M4NU€L »

Hello guys i was looking shop and blacksmith codes that Sells things but i can't find it... i want codes because i have new NPCs and i want them to sell too so no wonder if someone knows and be honorable to post codes :)
<span style='color:blue'>Helbreath Thermal</span> <span style='color:green'>BETA</span> <span style='color:red'>Soon</span>:<br><br>www.youporngay.com<br><br><img src='http://img264.imageshack.us/img264/1041 ... piopk7.jpg' border='0' alt='user posted image' /><br><img src='http://img257.imageshack.us/img257/3762 ... eakxj1.jpg' border='0' alt='user posted image' /><br><img src='http://arthur.crepin.free.fr/images/use ... mpsons.png' border='0' alt='user posted image' /><br><img src='http://img329.imageshack.us/img329/5797/pesgamerrr3.gif' border='0' alt='user posted image' /><br><br><u><b>BLACK GAY LIST:</b></u><br><br><span style='color:red'>€M4NU€L</span>:<br>I look like a girl and he's always complaining someone.
Tafka12
&lt;3 bd long time
Posts: 772
Joined: Wed Dec 28, 2005 6:32 pm

Post by Tafka12 »

search in game.h's , look for functions what has smth to do with selling/buying/talking to NPC result/those Npcs
<img src='http://www.hot.ee/carvanho/taavi.png' border='0' alt='user posted image' /><br><br><img src='http://www.hot.ee/carvanho/Elvine.png' border='0' alt='user posted image' /><br><img src='http://www.hot.ee/carvanho/LieroX.png' border='0' alt='user posted image' /><br><img src='http://www.hot.ee/carvanho/Football.png' border='0' alt='user posted image' />
Orkl
Loyal fan
Posts: 376
Joined: Sat Sep 17, 2005 2:31 pm

Post by Orkl »

I've found some code for you in the client..

->>Game.cpp

FUNCTION::

Code: Select all

void CGame::CommandProcessor(short msX, short msY, short indexX, short indexY, char cLB, char cRB)
You can find this code:

Code: Select all

	case 15: // ShopKeeper-W°
      	switch (cName[0]) {
      	case '1':
        EnableDialogBox(20, 5, 11, 1);
        tX = msX - 117;
        tY = msY - 50;
        if (tX < 0) tX = 0;
        if ((tX + 235) > 639) tX = 639 - 235;
        if (tY < 0) tY = 0;
        if ((tY + 100) > 479) tY = 479 - 100;
        m_stDialogBoxInfo[20].sX  = tX;
        m_stDialogBoxInfo[20].sY  = tY;
        m_stDialogBoxInfo[20].sV3 = 15;
        break;
      	}
      	break;
That enables the dialog box for the shop keeper.

Then

FUNCTION::

Code: Select all

void CGame::EnableDialogBox(int iBoxID, int cType, int sV1, int sV2, char * pString)
Find:

Code: Select all

	case 11:
  if (m_bIsDialogEnabled[11] == FALSE) 
  {	switch (cType) {
  	case NULL:
    break;
  	default:
    _LoadShopMenuContents(cType);
    m_stDialogBoxInfo[11].sV1 = cType;
    m_stDialogBoxInfo[11].cMode	= 0;
    m_stDialogBoxInfo[11].sView = 0;
    m_stDialogBoxInfo[11].bFlag = TRUE;
    m_stDialogBoxInfo[11].sV3   = 1; 
    break;
  }	}
  break;
This enables the dialog boxes, as you can see it makes a call to _LoadShopMenuContents


FUNCTION:

Code: Select all

void CGame::_LoadShopMenuContents(char cType)
Outlines the loading of the contents (obviously)

When you call cType with that function, it will load the corresponding contents#

example:

Code: Select all

_LoadShopMenuContents(1);
Will load contents1.txt for the dialog box.

From the clients point of view, you'd need to call the shop dialog box for the other NPC, aswell as creating a new contents file that can be loaded, you'd need to add to EnableDialogBox function so that the correct contents file can be loaded (client side).

I've had a brief look through the server source and it seems that this would only need to be done client side.

I haven't tried anything as of yet, but if you cant get it to work. I'll give it a shot.

Hope this helps!
<!--QuoteBegin-crazymnig88+--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (crazymnig88)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->by notepad??? it didn't show any code, just show words wif no mean<!--QuoteEnd--></td></tr></table><div class='signature'><!--QuoteEEnd--><br><!--QuoteBegin-charlie+--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (charlie)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->he'll probably save it as 600pagebook.bmp<br><br>400gb file plzkthnx<!--QuoteEnd--></td></tr></table><div class='signature'><!--QuoteEEnd-->
Post Reply