I am currently trying to understand the FlyFF Source by implementing my own systems from scratch.
I just got inspired by a Perin Converter using the Motion System. So I created a new motion which tries to convert penya to perin when clicking the motion.
That also works. I check if user has more or equal to 100.000.000 penya in inventory, if yes, remove the gold, and create a perin in his inventory.
Well removing the penya works flawless. Creating the perin works too, but its first visible to player in inventory after relogging.
I am creating the Perin like that:
Code:
CItemElem itemElement; itemElement.m_dwItemId = II_SYS_SYS_SCR_PERIN; itemElement.m_nItemNum = 1; itemElement.m_nHitPoint = -1; itemElement.m_bCharged = 0; pMover->AddItem(&itemElement);
Is there some kind of refresh inventory?
What is weird is, i looked at the CreateItemFuncTextCmd to learn how items are created, and there is nothing like that.
So how can i create the perin instantly to users inventory not only after relogg?
Thanks in advance.
If someone is interested after its finished then I will release it, if there isn't already such a system released (let me know i was inactive in flyff for 2 years now, its problably already released in some released sources).
Thanks
Edit: Problem is solved. Here a demonstration.






