Jump to content
  • 0

Enchant system for aCis (Normal/Blessed/Crystal Scrolls)


numl0ckas

Question

11 answers to this question

Recommended Posts

  • 0

Just create ur own, it requires minimum java knowledge. Experiment with RequestEnchant

 

For example my formula is:

		int chance;
		if (item.getEnchantLevel() >= 7)
		{
			if (scrollTemplate.isBlessed())
				chance=90;
			else if (scrollTemplate.isCrystal())
				chance=65;
			else 
				chance=75;
			if (item.getEnchantLevel()>=15)
				chance=chance-5;
			if (item.crystalizesOnFail())
				chance=chance-5;
		}
		else 
			chance = 100;

 

it ignores the shitty configs and you have full control of your enchant system

Link to comment
Share on other sites

  • 0

If you want just rates you can use this code at AbstractEnchantPacket:

 

if (isBlessed())

chance = Config.BLESSED_CHANCE;

 

if (isCrystal())

chance = Config.CRYSTAL_CHANCE;

Link to comment
Share on other sites

  • 0

		public final double getChance(L2ItemInstance enchantItem)
	{
		if (!isValid(enchantItem))
			return -1;

		boolean fullBody = enchantItem.getItem().getBodyPart() == L2Item.SLOT_FULL_ARMOR;
		if (enchantItem.getEnchantLevel() < Config.ENCHANT_SAFE_MAX || (fullBody && enchantItem.getEnchantLevel() < Config.ENCHANT_SAFE_MAX_FULL))
			return 1;

		double chance = 0;

		// Armor formula : 0.66^(current-2), chance is lower and lower for each enchant.
		if (enchantItem.isArmor())
			chance = Math.pow(Config.ENCHANT_CHANCE_ARMOR, (enchantItem.getEnchantLevel() - 2));
		// Weapon formula is 70% for fighter weapon, 40% for mage weapon. Special rates after +14.
		else if (enchantItem.isWeapon())
		{
			if (((L2Weapon) enchantItem.getItem()).isMagical())
				chance = (enchantItem.getEnchantLevel() > 14) ? Config.ENCHANT_CHANCE_WEAPON_MAGIC_15PLUS  : Config.ENCHANT_CHANCE_WEAPON_MAGIC;
			else
				chance = (enchantItem.getEnchantLevel() > 14) ? Config.ENCHANT_CHANCE_WEAPON_NONMAGIC_15PLUS : Config.ENCHANT_CHANCE_WEAPON_NONMAGIC;
		}

		return chance;
	}
}

 

how make crystal and blessed?

Link to comment
Share on other sites

  • 0

Thanks for answer, im in aCis customer, i thinked its bugged

 

If you're a customer, well. Like Tryskell said, go to custom section and find Hasha's enchant system.

Link to comment
Share on other sites

  • 0

up

I think it has been lost during one of the forums rollback, as many attached files. PM Hasha on forums to see if he can update the topic (in case he still has the diffs).

Link to comment
Share on other sites

  • 0

Hasha dont added any difs or something, wtf? :D http://acis.i-live.eu/index.php?topic=2520.0

 

Hahaha, like Tryskell said :D

 

Once again attachements get facked up. But no worry, I'm goin' to update the topic, so check it soon :)

 

Edit: Done.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.


×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock