Recent Posts

Pages: [1] 2 3 ... 10
1
Committed User Contributions / Re: Fix for spear weapon enchant
« Last post by Mobius on July 13, 2019, 09:44:25 AM »
Code: [Select]
if ((item.getWeaponItem().getBodyPart() == Item.SLOT_LR_HAND) && (item.getWeaponItem().getItemType() != WeaponType.POLE))
Committed with revision 5626.
Thanks :D
2
Committed User Contributions / Fafurion Fix for spear weapon enchant
« Last post by npocToz on July 13, 2019, 12:32:34 AM »
Code: [Select]
Hi there! I am learning Java now so just randomly checking code (Yeah, I did play Lineage 2 a lot few years ago, that's why I'm interested in opensource l2j).

old
Code: [Select]
org.l2jmobius.gameserver.model.stats.IStatsFunction.java
Code: [Select]
static double calcEnchantedPAtkBonus(ItemInstance item, double blessedBonus, int enchant)
{
switch (item.getItem().getCrystalTypePlus())
{
case R:
{
if (item.getWeaponItem().getBodyPart() == Item.SLOT_LR_HAND)
{
if (item.getWeaponItem().getItemType().isRanged())
{
return (12 * blessedBonus * enchant) + (24 * blessedBonus * Math.max(0, enchant - 3));
}
return (7 * blessedBonus * enchant) + (14 * blessedBonus * Math.max(0, enchant - 3));
}
return (6 * blessedBonus * enchant) + (12 * blessedBonus * Math.max(0, enchant - 3));
}
case S:
{
if (item.getWeaponItem().getBodyPart() == Item.SLOT_LR_HAND)
{
if (item.getWeaponItem().getItemType().isRanged())
{
// P. Atk. increases by 10 for bows.
// Starting at +4, P. Atk. bonus double.
return (10 * enchant) + (20 * Math.max(0, enchant - 3));
}
// P. Atk. increases by 6 for two-handed swords, two-handed blunts, dualswords, and two-handed combat weapons.
// Starting at +4, P. Atk. bonus double.
return (6 * enchant) + (12 * Math.max(0, enchant - 3));
}
// P. Atk. increases by 5 for one-handed swords, one-handed blunts, daggers, spears, and other weapons.
// Starting at +4, P. Atk. bonus double.
return (5 * enchant) + (10 * Math.max(0, enchant - 3));
}
case A:
{
if (item.getWeaponItem().getBodyPart() == Item.SLOT_LR_HAND)
{
if (item.getWeaponItem().getItemType().isRanged())
{
// P. Atk. increases by 8 for bows.
// Starting at +4, P. Atk. bonus double.
return (8 * enchant) + (16 * Math.max(0, enchant - 3));
}
// P. Atk. increases by 5 for two-handed swords, two-handed blunts, dualswords, and two-handed combat weapons.
// Starting at +4, P. Atk. bonus double.
return (5 * enchant) + (10 * Math.max(0, enchant - 3));
}
// P. Atk. increases by 4 for one-handed swords, one-handed blunts, daggers, spears, and other weapons.
// Starting at +4, P. Atk. bonus double.
return (4 * enchant) + (8 * Math.max(0, enchant - 3));
}
case B:
case C:
{
if (item.getWeaponItem().getBodyPart() == Item.SLOT_LR_HAND)
{
if (item.getWeaponItem().getItemType().isRanged())
{
// P. Atk. increases by 6 for bows.
// Starting at +4, P. Atk. bonus double.
return (6 * enchant) + (12 * Math.max(0, enchant - 3));
}
// P. Atk. increases by 4 for two-handed swords, two-handed blunts, dualswords, and two-handed combat weapons.
// Starting at +4, P. Atk. bonus double.
return (4 * enchant) + (8 * Math.max(0, enchant - 3));
}
// P. Atk. increases by 3 for one-handed swords, one-handed blunts, daggers, spears, and other weapons.
// Starting at +4, P. Atk. bonus double.
return (3 * enchant) + (6 * Math.max(0, enchant - 3));
}
default:
{
if (item.getWeaponItem().getItemType().isRanged())
{
// Bows increase by 4.
// Starting at +4, P. Atk. bonus double.
return (4 * enchant) + (8 * Math.max(0, enchant - 3));
}
// P. Atk. increases by 2 for all weapons with the exception of bows.
// Starting at +4, P. Atk. bonus double.
return (2 * enchant) + (4 * Math.max(0, enchant - 3));
}
}
}
fixed
Code: [Select]
static double calcEnchantedPAtkBonus(ItemInstance item, double blessedBonus, int enchant)
{
switch (item.getItem().getCrystalTypePlus())
{
case R:
{
if (item.getWeaponItem().getBodyPart() == Item.SLOT_LR_HAND && item.getWeaponItem().getItemType() != POLE)
{
if (item.getWeaponItem().getItemType().isRanged())
{
return (12 * blessedBonus * enchant) + (24 * blessedBonus * Math.max(0, enchant - 3));
}
return (7 * blessedBonus * enchant) + (14 * blessedBonus * Math.max(0, enchant - 3));
}
return (6 * blessedBonus * enchant) + (12 * blessedBonus * Math.max(0, enchant - 3));
}
case S:
{
if (item.getWeaponItem().getBodyPart() == Item.SLOT_LR_HAND && item.getWeaponItem().getItemType() != POLE)
{
if (item.getWeaponItem().getItemType().isRanged())
{
// P. Atk. increases by 10 for bows.
// Starting at +4, P. Atk. bonus double.
return (10 * enchant) + (20 * Math.max(0, enchant - 3));
}
// P. Atk. increases by 6 for two-handed swords, two-handed blunts, dualswords, and two-handed combat weapons.
// Starting at +4, P. Atk. bonus double.
return (6 * enchant) + (12 * Math.max(0, enchant - 3));
}
// P. Atk. increases by 5 for one-handed swords, one-handed blunts, daggers, spears, and other weapons.
// Starting at +4, P. Atk. bonus double.
return (5 * enchant) + (10 * Math.max(0, enchant - 3));
}
case A:
{
if (item.getWeaponItem().getBodyPart() == Item.SLOT_LR_HAND && item.getWeaponItem().getItemType() != POLE)
{
if (item.getWeaponItem().getItemType().isRanged())
{
// P. Atk. increases by 8 for bows.
// Starting at +4, P. Atk. bonus double.
return (8 * enchant) + (16 * Math.max(0, enchant - 3));
}
// P. Atk. increases by 5 for two-handed swords, two-handed blunts, dualswords, and two-handed combat weapons.
// Starting at +4, P. Atk. bonus double.
return (5 * enchant) + (10 * Math.max(0, enchant - 3));
}
// P. Atk. increases by 4 for one-handed swords, one-handed blunts, daggers, spears, and other weapons.
// Starting at +4, P. Atk. bonus double.
return (4 * enchant) + (8 * Math.max(0, enchant - 3));
}
case B:
case C:
{
if (item.getWeaponItem().getBodyPart() == Item.SLOT_LR_HAND && item.getWeaponItem().getItemType() != POLE)
{
if (item.getWeaponItem().getItemType().isRanged())
{
// P. Atk. increases by 6 for bows.
// Starting at +4, P. Atk. bonus double.
return (6 * enchant) + (12 * Math.max(0, enchant - 3));
}
// P. Atk. increases by 4 for two-handed swords, two-handed blunts, dualswords, and two-handed combat weapons.
// Starting at +4, P. Atk. bonus double.
return (4 * enchant) + (8 * Math.max(0, enchant - 3));
}
// P. Atk. increases by 3 for one-handed swords, one-handed blunts, daggers, spears, and other weapons.
// Starting at +4, P. Atk. bonus double.
return (3 * enchant) + (6 * Math.max(0, enchant - 3));
}
default:
{
if (item.getWeaponItem().getItemType().isRanged())
{
// Bows increase by 4.
// Starting at +4, P. Atk. bonus double.
return (4 * enchant) + (8 * Math.max(0, enchant - 3));
}
// P. Atk. increases by 2 for all weapons with the exception of bows.
// Starting at +4, P. Atk. bonus double.
return (2 * enchant) + (4 * Math.max(0, enchant - 3));
}
}
}

https://l2wiki.com/Item_Enchanting
3
Committed User Contributions / Re: Summon buffs (blessing of queen, etc..)
« Last post by Mobius on June 25, 2019, 06:50:19 AM »
Committed with revision 5585.
Thanks :D
4
Committed User Contributions / Interlude Summon buffs (blessing of queen, etc..)
« Last post by Olivka on June 25, 2019, 04:51:33 AM »
Skill not used...

fix for me:

org/l2jmobius/gameserver/ai/SummonAI.java:100

- return;
+ //return;
5
Committed User Contributions / Re: Fixed Appearance Scrolls
« Last post by Mobius on June 24, 2019, 12:54:11 PM »
Committed with revision 5580.
Thanks :D
6
Committed User Contributions / Re: Fixed Appearance Scrolls
« Last post by SmiDmi on June 24, 2019, 11:56:28 AM »
I apologize. It was only part of the file. Just what you need to add. Here is the complete file and I already added a Teddy Bear Appearance Stone there.

data\AppearanceStones.xml
https://drive.google.com/file/d/1wa7qV8tGqqoEnbMicDkZguKduWgaZcjJ/view?usp=sharing

Teddy Bear Appearance Stone
data\stats\items\29200-29299.xml
Code: [Select]
<item id="29207" name="Teddy Bear Appearance Stone" type="EtcItem">
<!-- Appearance Stone which changes your appearance to a teddy bear. Can be used on top or one-piece dress. Changes appearance of all armor to a teddy bear. Armors can be changed back to its original form using a Scroll: Restore Equipment. -->
<set name="icon" val="BranchSys3.icon1.g_scrl_change_chest" />
<set name="immediate_effect" val="true" />
<set name="handler" val="Appearance" />
<set name="is_stackable" val="true" />
<set name="is_clan_depositable" val="false" />
<set name="is_mailable" val="false" />
<set name="is_tradable" val="false" />
<set name="is_dropable" val="false" />
<set name="is_sellable" val="false" />
<set name="is_commissionable" val="false" />
<set name="is_private_storeable" val="false" />
<set name="is_freightable" val="true" />
<set name="commissionItemType" val="OTHER_ITEM" />
<set name="default_action" val="SKILL_REDUCE" />
<set name="etcitem_type" val="SHAPE_SHIFTING_AM_FIXED" />
<skills>
<skill id="28197" level="1" /> <!-- Teddy Bear Appearance Stone -->
</skills>
</item>

Thanks for the information. Now this is my favorite costume))
7
Committed User Contributions / Re: Fixed Items for Starter Kit
« Last post by Mobius on June 24, 2019, 07:56:37 AM »
Committed with revision 5579.
Thanks :D
8
Committed User Contributions / Re: Fix Item Designer Twilight Armor Pack
« Last post by Mobius on June 24, 2019, 07:11:13 AM »
Committed with revision 5578.
Thanks :D
9
Committed User Contributions / Re: Fixed Appearance Scrolls
« Last post by Mobius on June 24, 2019, 06:47:51 AM »
Teddy Bear Costume
<item id="48022" name="Teddy Bear Costume" type="Armor">

Your AppearanceStones.xml is not compareable to the version I have.
What are the additions you made? Can you share a diff patch?
10
Committed User Contributions / Re: Fixed Appearance Scrolls
« Last post by SmiDmi on June 24, 2019, 04:27:19 AM »
data\stats\items\36500-36599.xml
https://drive.google.com/file/d/10B4pRkDquH1f0GshC55RhNZNe17XdHvb/view?usp=sharing

data\stats\items\36600-36699.xml
https://drive.google.com/file/d/1C3avEQKbaPW9Fi2-mtOiULNYOOyiwFgH/view?usp=sharing

data\stats\items\37300-37399.xml
https://drive.google.com/file/d/1cwm4Qt3MPmdPeeARLjE9voYLsa8HYXrE/view?usp=sharing

data\AppearanceStones.xml
https://drive.google.com/file/d/1wa7qV8tGqqoEnbMicDkZguKduWgaZcjJ/view?usp=sharing

I also noticed in comments that someone was looking for a VisualID
Quote
<!-- <appearance_stone id="40297" targetType="WEAPON" type="FIXED" visualId="?" weaponType="BOW" /> --> <!-- Monster Weapon Appearance Stone: Tayga Archer's Bow //TODO: Missing VisualID -->
Monster Weapon Appearance Stone: Tayga Archer's Bow - visualId="40299"

Friends, I am also looking for a VisualID for several items. If someone has information, please help me.
Teddy Bear Appearance Stone (id 29207) - visualId="?"
Cat Plushy Appearance Stone (id 29208) - visualId="?"
Panda Plushy Appearance Stone (id 29209) - visualId="?"
Pages: [1] 2 3 ... 10