Enchanting
#11
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.
Reply
Thanks given by:
#12
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.
Reply
Thanks given by:
#13
(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.
Reply
Thanks given by:
#14
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
Reply
Thanks given by:
#15
No you could use:
if (a_ItemType == E_ITEM_BOOK
 || ItemCategory->IsTool(a_ItemType)
 || ItemCategory->IsArmor(a_ItemType))
{
 // Do stuff
}
Reply
Thanks given by:
#16
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..
Reply
Thanks given by:
#17
https://github.com/daniel0916/MCServer/c...cd96b45adb

I used the IsEnchantable Method but there is wood enchantable. Or i made something false.
Reply
Thanks given by:
#18
Ah i see you are directly writing this in c++ ?
I was planning to do it tru lua plugin.
Reply
Thanks given by:
#19
(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?
Reply
Thanks given by:
#20
I want to do an enchanting plugin too, it was my objective, until I tested LuaWindow and Minecraft crashed Sad
Reply
Thanks given by:




Users browsing this thread: 1 Guest(s)