xP3NG3Rx

[C++] ItemName reneval on the ground

16 posts in this topic

Hello.

I saw this stuff on this and on another board also with bugs or it was incomplete, and I made it to myself.
Feel free to use it with your brain.

Good to know about this:

  • The name of those items which have attributes will be golden.
  • The skillbook and skillforget items will show the name of skill also.
  • If the item isn't yours than the ownership color will be red instead of yellow.

* Készségkönyv = Skillbook(id:50300)
* Feledés könyve = Skillforget book(id:70037)

PS.: If you have problems with the implementation: start to upgrade your programming knowledges and don't disturb me in private message, I won't answer.
Thank you for understanding.

https://mega.nz/#!KAh3DQqL!yQQX9o4N8sTsS7Woa4W07C8t5jwp0TV5xg7MHLSFz5Y

Edited by xP3NG3Rx
Forgotten download link added :d
  • Like 17
  • Thanks 6

Share this post


Link to post
Share on other sites

@xP3NG3Rx

 

hdEKpusXQrSF9lIbkFMkWw.png

 

It's that line:

void    CreateItem(DWORD dwVirtualID, DWORD dwVirtualNumber, float x, float y, float z, bool bDrop = true, long alSockets[ITEM_SOCKET_SLOT_MAX_NUM] = {}, TPlayerItemAttribute aAttrs[ITEM_ATTRIBUTE_SLOT_MAX_NUM] = {});


 

Share this post


Link to post
Share on other sites
20 hours ago, avertuss said:

@xP3NG3Rx

 

hdEKpusXQrSF9lIbkFMkWw.png

 

It's that line:


void    CreateItem(DWORD dwVirtualID, DWORD dwVirtualNumber, float x, float y, float z, bool bDrop = true, long alSockets[ITEM_SOCKET_SLOT_MAX_NUM] = {}, TPlayerItemAttribute aAttrs[ITEM_ATTRIBUTE_SLOT_MAX_NUM] = {});


 

PS.: If you have problems with the implementation: start to upgrade your programming knowledges and don't disturb me in private message, I won't answer.
Thank you for understanding.

Share this post


Link to post
Share on other sites

item.cpp: In member function 'const char* CItem::GetName()':
item.cpp:2354:25: error: 'CMobManager' has not been declared
     const CMob * pMob = CMobManager::instance().Get(dwMobVnum);
                         ^
item.cpp:2356:63: error: invalid use of incomplete type 'const class CMob'
      len = snprintf(szItemName, sizeof(szItemName), "%s", pMob->m_table.szLocaleName);
                                                               ^
In file included from item.cpp:4:0:
char.h:561:7: error: forward declaration of 'const class CMob'
 class CMob;

Share this post


Link to post
Share on other sites

Cane help any one?

http://prntscr.com/k8gd6m

PythonSlotWindow.cpp

void CSlotWindow::SetSlotLevelImage(DWORD dwIndex, CGraphicImage * levelImage)
{
	TSlot * pSlot;
	if (!GetSlotPointer(dwIndex, &pSlot) || !levelImage)
		return;
	assert(NULL == pSlot->pInstanceLevel);
	pSlot->pInstanceLevel = CGraphicImageInstance::New();
	pSlot->pInstanceLevel->SetDiffuseColor(1.0, 1.0, 1.0, 1.0);
	pSlot->pInstanceLevel->SetImagePointer(levelImage);
}

 

Share this post


Link to post
Share on other sites
5 hours ago, Syriza said:

 

@xP3NG3Rx

@WeedHex

@Abel(Tiger)

After implementing this my Skillbooks in Inventory does not have the skill name anymore.

 

Instead of Sword Aura Skillbook now it is Skillbook just..

 

 

Please guys i need this i implemented everything correct

Rename maybe?

Share this post


Link to post
Share on other sites

Amazing release! There are even more ways of improving this, as making also a different color if the dropped item belongs to a group member, and also making the Z key only try to iterate through items that belongs to you or a party member of yours (prioritizing yours), this system was a perfect base for my idea! Thank you @xP3NG3Rx!

  • Like 1

Share this post


Link to post
Share on other sites

Hi,

 

i will compile client but he says an error. Ok, im trying my 0-8-15 C++ knows.

 

PyObject * itemCreateItem(PyObject * poSelf, PyObject * poArgs)
{
	int iVirtualID;
	if (!PyTuple_GetInteger(poArgs, 0, &iVirtualID))
		return Py_BadArgument();
	int iVirtualNumber;
	if (!PyTuple_GetInteger(poArgs, 1, &iVirtualNumber))
		return Py_BadArgument();

	float x;
	if (!PyTuple_GetFloat(poArgs, 2, &x))
		return Py_BadArgument();
	float y;
	if (!PyTuple_GetFloat(poArgs, 3, &y))
		return Py_BadArgument();
	float z;
	if (!PyTuple_GetFloat(poArgs, 4, &z))
		return Py_BadArgument();
	
	bool bDrop = true;
	PyTuple_GetBoolean(poArgs, 5, &bDrop);

#ifdef ENABLE_EXTENDED_ITEMNAME_ON_GROUND
	CPythonItem::Instance().CreateItem(iVirtualID, iVirtualNumber, x, y, z, bDrop, alSockets, aAttrs);
#else
	CPythonItem::Instance().CreateItem(iVirtualID, iVirtualNumber, x, y, z, bDrop);
#endif

	return Py_BuildNone();
}

this is not released, i'm trying self. But VisualStudio says:

 

C2065    'alSockets' : undeclared identifier    UserInterface   PythonItemModule.cpp

C2065    'aAttrs' : undeclared identifier    UserInterface   PythonItemModule.cpp

 

Can one help me :(

 

Sorry for my bad english.....

 

Thanks.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.