I think. It don't give nil in c++. But thanks.
How can i get a window from his id? the enchantment packet returns me the id. But now i need the window from them.
(01-21-2014, 01:58 AM)tonibm19 Wrote: [ -> ]http://mc-server.xoft.cz/LuaAPI/cWindow.html
There is a GetWindowID() function
Why don't you fork MCServer code on github and commit the code you have there?
Then we can have a look and if we can, help.
This only return the id. But i need to get the window from the id.
Wait i will push my changes to github.
I tried it, the major problem is that we now can't check if an item is enchantable. Maybe we cound do a g_IsItemEnchantable function
No you could use:
if (a_ItemType == E_ITEM_BOOK
|| ItemCategory->IsTool(a_ItemType)
|| ItemCategory->IsArmor(a_ItemType))
{
// Do stuff
}
Yeah, that was how i wanted to do it as well,
Using this you can also only add the enchants the object is capable of,
If it was coded in the server, you are unable to enchant custom stuff, like a log that has a enchant, for fun of course..
Ah i see you are directly writing this in c++ ?
I was planning to do it tru lua plugin.
(01-21-2014, 03:38 AM)ThuGie Wrote: [ -> ]Ah i see you are directly writing this in c++ ?
I was planning to do it tru lua plugin.
Yes. I will implemented it in MCServer.
How would you like to receive the enchant packet from the client with a plugin?
Should i use IsEnchantable or the Method from STR_Warrior?
I want to do an enchanting plugin too, it was my objective, until I tested LuaWindow and Minecraft crashed
