Enchanting
#51
I think it's better to storage the enchantments and the level. Then it's easier to get the levels for the enchantments.

I use your typedef so this is using cEnchantments.
Can you give me a little example to add the enchantment with level? Then i can work faster.
Reply
Thanks given by:
#52
cEnchantmentsArray TheArray;
TheArray.push_back(cEnchantments("Protection=1"));
TheArray.push_back(cEnchantments("Respiration=2"));
Reply
Thanks given by: daniel0916
#53
//Enchant Item
	EnchantItem.m_Enchantments.AddFromString(enchantments[1].ToString());

	//Set Enchanted Item to Window Slot
	m_Player->GetWindow()->SetSlot(*m_Player, 0, EnchantItem);

The Item in the Slot isn't enchanted. Also not when i use directly a enchantment with .SetLevel().
Reply
Thanks given by:
#54
Have anyone a idea how can i make the enchanting progress?

How can i get the enchantments who i should add? I have the available enchantments.
I think i need all enchanting levels and the player level of them for every enchanting. Should i make a map with this?

Hope someone has ideas.
Reply
Thanks given by:
#55
I don't have an answer to that question, but I think you should really push your progress to a fork on GitHub so xoft can better examine your code Smile
Reply
Thanks given by:
#56
(02-01-2014, 04:11 AM)tigerw Wrote: ... so xoft can better examine your code Smile

So everyone can examine your code.
Reply
Thanks given by:
#57
https://github.com/daniel0916/MCServer/c...c289b8818f
Reply
Thanks given by:
#58
Its quite amazing how your code look a ton like mineBig Grin.
I just started as i needed the new packet as well! and i wrote it a bit before you posted, a ton looks the same, though i work with hooks for plugin :p.
If i get the hook, i can finish enchant tru plugin Smile.
Reply
Thanks given by:
#59
(02-01-2014, 05:10 AM)ThuGie Wrote: If i get the hook, i can finish enchant tru plugin Smile.

How do you know the enchantments which you are adding to the item?
Reply
Thanks given by:
#60
I simply, do in lua
local Item2 = cItem(E_ITEM_DIAMOND_SWORD, 1, 0, "1=1")
And then Window:SetSlot(a_Player,SlotNum, Item2)

Ofcourse, when you show the options aka what level it has etc, you should store those,
For when you get the 0x11 packet, and then actually run the code above to apply the enchantment.
Reply
Thanks given by:




Users browsing this thread: 9 Guest(s)