Перейти к содержанию
Авторизация  
CalypsoToolz

Бесконечные Соски

Рекомендуемые сообщения

Подскажите что нужно удалить/изменить

 

Вот BlessedSpiritShot.java

Скрытый текст
package items;

 

import l2p.extensions.scripts.ScriptFile;

import l2p.gameserver.cache.Msg;

import l2p.gameserver.handler.IItemHandler;

import l2p.gameserver.handler.ItemHandler;

import l2p.gameserver.model.L2Playable;

import l2p.gameserver.model.L2Player;

import l2p.gameserver.model.items.L2ItemInstance;

import l2p.gameserver.serverpackets.ExAutoSoulShot;

import l2p.gameserver.serverpackets.MagicSkillUse;

import l2p.gameserver.serverpackets.SystemMessage;

import l2p.gameserver.tables.ItemTable;

import l2p.gameserver.templates.L2Item;

import l2p.gameserver.templates.L2Weapon;

 

public class BlessedSpiritShot implements IItemHandler, ScriptFile

{

// all the items ids that this handler knowns

private static final int[] _itemIds = {3947, 3948, 3949, 3950, 3951, 3952, 22072, 22073, 22074, 22075, 22076};

private static final short[] _skillIds = {2061, 2160, 2161, 2162, 2163, 2164};

 

public void useItem(L2Playable playable, L2ItemInstance item, Boolean ctrl)

{

if(playable == null || !playable.isPlayer())

{

return;

}

L2Player player = (L2Player) playable;

L2ItemInstance weaponInst = player.getActiveWeaponInstance();

L2Weapon weaponItem = player.getActiveWeaponItem();

int SoulshotId = item.getItemId();

boolean isAutoSoulShot = false;

L2Item itemTemplate = ItemTable.getInstance().getTemplate(item.getItemId());

if(player.getAutoSoulShot().contains(SoulshotId))

{

isAutoSoulShot = true;

}

if(weaponInst == null)

{

if(!isAutoSoulShot)

{

player.sendPacket(Msg.CANNOT_USE_SPIRITSHOTS);

}

return;

}

if(weaponInst.getChargedSpiritshot() == L2ItemInstance.CHARGED_BLESSED_SPIRITSHOT)

// already charged by blessed spirit shot

// btw we cant charge only when bsps is charged

{

return;

}

int spiritshotId = item.getItemId();

int grade = weaponItem.getCrystalType().externalOrdinal;

int blessedsoulSpiritConsumption = weaponItem.getSpiritShotCount();

long count = item.getCount();

if(blessedsoulSpiritConsumption == 0)

{

// Can't use Spiritshots

if(isAutoSoulShot)

{

player.removeAutoSoulShot(SoulshotId);

player.sendPacket(new ExAutoSoulShot(SoulshotId, false), new SystemMessage(SystemMessage.THE_AUTOMATIC_USE_OF_S1_WILL_NOW_BE_CANCELLED).addSt

ring(itemTemplate.getName()));

return;

}

player.sendPacket(Msg.CANNOT_USE_SPIRITSHOTS);

return;

}

if(grade == 0 && spiritshotId != 3947 // NG

|| grade == 1 && spiritshotId != 3948 && spiritshotId != 22072 // D

|| grade == 2 && spiritshotId != 3949 && spiritshotId != 22073 // C

|| grade == 3 && spiritshotId != 3950 && spiritshotId != 22074 // B

|| grade == 4 && spiritshotId != 3951 && spiritshotId != 22075 // A

|| grade == 5 && spiritshotId != 3952 && spiritshotId != 22076 // S

)

{

if(isAutoSoulShot)

{

return;

}

player.sendPacket(Msg.SPIRITSHOT_DOES_NOT_MATCH_WEAPON_GRADE);

return;

}

if(count < blessedsoulSpiritConsumption)

{

if(isAutoSoulShot)

{

player.removeAutoSoulShot(SoulshotId);

player.sendPacket(new ExAutoSoulShot(SoulshotId, false), new SystemMessage(SystemMessage.THE_AUTOMATIC_USE_OF_S1_WILL_NOW_BE_CANCELLED).addSt

ring(itemTemplate.getName()));

return;

}

player.sendPacket(Msg.NOT_ENOUGH_SPIRITSHOTS);

return;

}

weaponInst.setChargedSpiritshot(L2ItemInstance.CHARGED_BLESSED_SPIRITSHOT);

player.getInventory().destroyItem(item, blessedsoulSpiritConsumption, false);

player.sendPacket(Msg.POWER_OF_MANA_ENABLED);

player.broadcastPacket(new MagicSkillUse(player, player, _skillIds[grade], 1, 0, 0));

}

 

public final int[] getItemIds()

{

return _itemIds;

}

 

public void onLoad()

{

ItemHandler.getInstance().registerItemHandler(this);

}

 

public void onReload()

{

}

 

public void onShutdown()

{

}

}

 

Вот SoulShots.java

Скрытый текст

package items;

 

import l2p.extensions.scripts.ScriptFile;

import l2p.gameserver.cache.Msg;

import l2p.gameserver.handler.IItemHandler;

import l2p.gameserver.handler.ItemHandler;

import l2p.gameserver.model.L2Playable;

import l2p.gameserver.model.L2Player;

import l2p.gameserver.model.items.L2ItemInstance;

import l2p.gameserver.serverpackets.ExAutoSoulShot;

import l2p.gameserver.serverpackets.MagicSkillUse;

import l2p.gameserver.serverpackets.SystemMessage;

import l2p.gameserver.skills.Stats;

import l2p.gameserver.tables.ItemTable;

import l2p.gameserver.templates.L2Item;

import l2p.gameserver.templates.L2Weapon;

import l2p.gameserver.templates.L2Weapon.WeaponType;

import l2p.util.Rnd;

 

public class SoulShots implements IItemHandler, ScriptFile

{

private static final int[] _itemIds = {5789, 1835, 1463, 1464, 1465, 1466, 1467, 13037, 13045, 13055, 22082, 22083,

22084, 22085, 22086};

private static final short[] _skillIds = {2039, 2150, 2151, 2152, 2153, 2154};

 

public void useItem(L2Playable playable, L2ItemInstance item, Boolean ctrl)

{

if(playable == null || !playable.isPlayer())

{

return;

}

L2Player player = (L2Player) playable;

L2Weapon weaponItem = player.getActiveWeaponItem();

L2ItemInstance weaponInst = player.getActiveWeaponInstance();

int SoulshotId = item.getItemId();

boolean isAutoSoulShot = false;

L2Item itemTemplate = ItemTable.getInstance().getTemplate(item.getItemId());

if(player.getAutoSoulShot().contains(SoulshotId))

{

isAutoSoulShot = true;

}

if(weaponInst == null)

{

if(!isAutoSoulShot)

{

player.sendPacket(Msg.CANNOT_USE_SOULSHOTS);

}

return;

}

// soulshot is already active

if(weaponInst.getChargedSoulshot() != L2ItemInstance.CHARGED_NONE)

{

return;

}

int grade = weaponItem.getCrystalType().externalOrdinal;

int soulShotConsumption = weaponItem.getSoulShotCount();

long count = item.getCount();

if(soulShotConsumption == 0)

{

// Can't use soulshots

if(isAutoSoulShot)

{

player.removeAutoSoulShot(SoulshotId);

player.sendPacket(new ExAutoSoulShot(SoulshotId, false), new SystemMessage(SystemMessage.THE_AUTOMATIC_USE_OF_S1_WILL_NOW_BE_CANCELLED).addSt

ring(itemTemplate.getName()));

return;

}

player.sendPacket(Msg.CANNOT_USE_SOULSHOTS);

return;

}

if(grade == 0 && SoulshotId != 5789 && SoulshotId != 1835 // NG

|| grade == 1 && SoulshotId != 1463 && SoulshotId != 22082 && SoulshotId != 13037 // D

|| grade == 2 && SoulshotId != 1464 && SoulshotId != 22083 && SoulshotId != 13045 // C

|| grade == 3 && SoulshotId != 1465 && SoulshotId != 22084 // B

|| grade == 4 && SoulshotId != 1466 && SoulshotId != 22085 && SoulshotId != 13055 // A

|| grade == 5 && SoulshotId != 1467 && SoulshotId != 22086 // S

)

{

// wrong grade for weapon

if(isAutoSoulShot)

{

return;

}

player.sendPacket(Msg.SOULSHOT_DOES_NOT_MATCH_WEAPON_GRADE);

return;

}

if(weaponItem.getItemType() == WeaponType.BOW || weaponItem.getItemType() == WeaponType.CROSSBOW)

{

int newSS = (int) player.calcStat(Stats.SS_USE_BOW, soulShotConsumption, null, null);

if(newSS < soulShotConsumption && Rnd.chance(player.calcStat(Stats.SS_USE_BOW_CHANCE, soulShotConsumption, null, null)))

{

soulShotConsumption = newSS;

}

}

if(count < soulShotConsumption)

{

player.sendPacket(Msg.NOT_ENOUGH_SOULSHOTS);

return;

}

weaponInst.setChargedSoulshot(L2ItemInstance.CHARGED_SOULSHOT);

player.getInventory().destroyItem(item, soulShotConsumption, false);

player.sendPacket(Msg.POWER_OF_THE_SPIRITS_ENABLED);

player.broadcastPacket(new MagicSkillUse(player, player, _skillIds[grade], 1, 0, 0));

}

 

public final int[] getItemIds()

{

return _itemIds;

}

 

public void onLoad()

{

ItemHandler.getInstance().registerItemHandler(this);

}

 

public void onReload()

{

}

 

public void onShutdown()

{

}

}

 

Вот SpiritShot.java

Скрытый текст

package items;

 

import l2p.extensions.scripts.ScriptFile;

import l2p.gameserver.cache.Msg;

import l2p.gameserver.handler.IItemHandler;

import l2p.gameserver.handler.ItemHandler;

import l2p.gameserver.model.L2Playable;

import l2p.gameserver.model.L2Player;

import l2p.gameserver.model.items.L2ItemInstance;

import l2p.gameserver.serverpackets.ExAutoSoulShot;

import l2p.gameserver.serverpackets.MagicSkillUse;

import l2p.gameserver.serverpackets.SystemMessage;

import l2p.gameserver.tables.ItemTable;

import l2p.gameserver.templates.L2Item;

import l2p.gameserver.templates.L2Weapon;

 

public class SpiritShot implements IItemHandler, ScriptFile

{

// all the items ids that this handler knowns

private static final int[] _itemIds = {5790, 2509, 2510, 2511, 2512, 2513, 2514, 22077, 22078, 22079, 22080, 22081};

private static final short[] _skillIds = {2061, 2155, 2156, 2157, 2158, 2159};

 

public void useItem(L2Playable playable, L2ItemInstance item, Boolean ctrl)

{

if(playable == null || !playable.isPlayer())

{

return;

}

L2Player player = (L2Player) playable;

L2ItemInstance weaponInst = player.getActiveWeaponInstance();

L2Weapon weaponItem = player.getActiveWeaponItem();

int SoulshotId = item.getItemId();

boolean isAutoSoulShot = false;

L2Item itemTemplate = ItemTable.getInstance().getTemplate(item.getItemId());

if(player.getAutoSoulShot().contains(SoulshotId))

{

isAutoSoulShot = true;

}

if(weaponInst == null)

{

if(!isAutoSoulShot)

{

player.sendPacket(Msg.CANNOT_USE_SPIRITSHOTS);

}

return;

}

// spiritshot is already active

if(weaponInst.getChargedSpiritshot() != L2ItemInstance.CHARGED_NONE)

{

return;

}

int SpiritshotId = item.getItemId();

int grade = weaponItem.getCrystalType().externalOrdinal;

int soulSpiritConsumption = weaponItem.getSpiritShotCount();

long count = item.getCount();

if(soulSpiritConsumption == 0)

{

// Can't use Spiritshots

if(isAutoSoulShot)

{

player.removeAutoSoulShot(SoulshotId);

player.sendPacket(new ExAutoSoulShot(SoulshotId, false), new SystemMessage(SystemMessage.THE_AUTOMATIC_USE_OF_S1_WILL_NOW_BE_CANCELLED).addSt

ring(itemTemplate.getName()));

return;

}

player.sendPacket(Msg.CANNOT_USE_SPIRITSHOTS);

return;

}

if(grade == 0 && SpiritshotId != 5790 && SpiritshotId != 2509 // NG

|| grade == 1 && SpiritshotId != 2510 && SpiritshotId != 22077 // D

|| grade == 2 && SpiritshotId != 2511 && SpiritshotId != 22078 // C

|| grade == 3 && SpiritshotId != 2512 && SpiritshotId != 22079 // B

|| grade == 4 && SpiritshotId != 2513 && SpiritshotId != 22080 // A

|| grade == 5 && SpiritshotId != 2514 && SpiritshotId != 22081 // S

)

{

// wrong grade for weapon

if(isAutoSoulShot)

{

return;

}

player.sendPacket(Msg.SPIRITSHOT_DOES_NOT_MATCH_WEAPON_GRADE);

return;

}

if(count < soulSpiritConsumption)

{

if(isAutoSoulShot)

{

player.removeAutoSoulShot(SoulshotId);

player.sendPacket(new ExAutoSoulShot(SoulshotId, false), new SystemMessage(SystemMessage.THE_AUTOMATIC_USE_OF_S1_WILL_NOW_BE_CANCELLED).addSt

ring(itemTemplate.getName()));

return;

}

player.sendPacket(Msg.NOT_ENOUGH_SPIRITSHOTS);

return;

}

weaponInst.setChargedSpiritshot(L2ItemInstance.CHARGED_SPIRITSHOT);

player.getInventory().destroyItem(item, soulSpiritConsumption, false);

player.sendPacket(Msg.POWER_OF_MANA_ENABLED);

player.broadcastPacket(new MagicSkillUse(player, player, _skillIds[grade], 1, 0, 0));

}

 

public final int[] getItemIds()

{

return _itemIds;

}

 

public void onLoad()

{

ItemHandler.getInstance().registerItemHandler(this);

}

 

public void onReload()

{

}

 

public void onShutdown()

{

}

}

Поделиться сообщением


Ссылка на сообщение
Поделиться на другие сайты
Подскажите что нужно удалить/изменить

 

Вот BlessedSpiritShot.java

Скрытый текст
package items;

 

import l2p.extensions.scripts.ScriptFile;

import l2p.gameserver.cache.Msg;

import l2p.gameserver.handler.IItemHandler;

import l2p.gameserver.handler.ItemHandler;

import l2p.gameserver.model.L2Playable;

import l2p.gameserver.model.L2Player;

import l2p.gameserver.model.items.L2ItemInstance;

import l2p.gameserver.serverpackets.ExAutoSoulShot;

import l2p.gameserver.serverpackets.MagicSkillUse;

import l2p.gameserver.serverpackets.SystemMessage;

import l2p.gameserver.tables.ItemTable;

import l2p.gameserver.templates.L2Item;

import l2p.gameserver.templates.L2Weapon;

 

public class BlessedSpiritShot implements IItemHandler, ScriptFile

{

// all the items ids that this handler knowns

private static final int[] _itemIds = {3947, 3948, 3949, 3950, 3951, 3952, 22072, 22073, 22074, 22075, 22076};

private static final short[] _skillIds = {2061, 2160, 2161, 2162, 2163, 2164};

 

public void useItem(L2Playable playable, L2ItemInstance item, Boolean ctrl)

{

if(playable == null || !playable.isPlayer())

{

return;

}

L2Player player = (L2Player) playable;

L2ItemInstance weaponInst = player.getActiveWeaponInstance();

L2Weapon weaponItem = player.getActiveWeaponItem();

int SoulshotId = item.getItemId();

boolean isAutoSoulShot = false;

L2Item itemTemplate = ItemTable.getInstance().getTemplate(item.getItemId());

if(player.getAutoSoulShot().contains(SoulshotId))

{

isAutoSoulShot = true;

}

if(weaponInst == null)

{

if(!isAutoSoulShot)

{

player.sendPacket(Msg.CANNOT_USE_SPIRITSHOTS);

}

return;

}

if(weaponInst.getChargedSpiritshot() == L2ItemInstance.CHARGED_BLESSED_SPIRITSHOT)

// already charged by blessed spirit shot

// btw we cant charge only when bsps is charged

{

return;

}

int spiritshotId = item.getItemId();

int grade = weaponItem.getCrystalType().externalOrdinal;

int blessedsoulSpiritConsumption = weaponItem.getSpiritShotCount();

long count = item.getCount();

if(blessedsoulSpiritConsumption == 0)

{

// Can't use Spiritshots

if(isAutoSoulShot)

{

player.removeAutoSoulShot(SoulshotId);

player.sendPacket(new ExAutoSoulShot(SoulshotId, false), new SystemMessage(SystemMessage.THE_AUTOMATIC_USE_OF_S1_WILL_NOW_BE_CANCELLED).addSt

ring(itemTemplate.getName()));

return;

}

player.sendPacket(Msg.CANNOT_USE_SPIRITSHOTS);

return;

}

if(grade == 0 && spiritshotId != 3947 // NG

|| grade == 1 && spiritshotId != 3948 && spiritshotId != 22072 // D

|| grade == 2 && spiritshotId != 3949 && spiritshotId != 22073 // C

|| grade == 3 && spiritshotId != 3950 && spiritshotId != 22074 // B

|| grade == 4 && spiritshotId != 3951 && spiritshotId != 22075 // A

|| grade == 5 && spiritshotId != 3952 && spiritshotId != 22076 // S

)

{

if(isAutoSoulShot)

{

return;

}

player.sendPacket(Msg.SPIRITSHOT_DOES_NOT_MATCH_WEAPON_GRADE);

return;

}

if(count < blessedsoulSpiritConsumption)

{

if(isAutoSoulShot)

{

player.removeAutoSoulShot(SoulshotId);

player.sendPacket(new ExAutoSoulShot(SoulshotId, false), new SystemMessage(SystemMessage.THE_AUTOMATIC_USE_OF_S1_WILL_NOW_BE_CANCELLED).addSt

ring(itemTemplate.getName()));

return;

}

player.sendPacket(Msg.NOT_ENOUGH_SPIRITSHOTS);

return;

}

weaponInst.setChargedSpiritshot(L2ItemInstance.CHARGED_BLESSED_SPIRITSHOT);

player.getInventory().destroyItem(item, blessedsoulSpiritConsumption, false);

player.sendPacket(Msg.POWER_OF_MANA_ENABLED);

player.broadcastPacket(new MagicSkillUse(player, player, _skillIds[grade], 1, 0, 0));

}

 

public final int[] getItemIds()

{

return _itemIds;

}

 

public void onLoad()

{

ItemHandler.getInstance().registerItemHandler(this);

}

 

public void onReload()

{

}

 

public void onShutdown()

{

}

}

 

Вот SoulShots.java

Скрытый текст

package items;

 

import l2p.extensions.scripts.ScriptFile;

import l2p.gameserver.cache.Msg;

import l2p.gameserver.handler.IItemHandler;

import l2p.gameserver.handler.ItemHandler;

import l2p.gameserver.model.L2Playable;

import l2p.gameserver.model.L2Player;

import l2p.gameserver.model.items.L2ItemInstance;

import l2p.gameserver.serverpackets.ExAutoSoulShot;

import l2p.gameserver.serverpackets.MagicSkillUse;

import l2p.gameserver.serverpackets.SystemMessage;

import l2p.gameserver.skills.Stats;

import l2p.gameserver.tables.ItemTable;

import l2p.gameserver.templates.L2Item;

import l2p.gameserver.templates.L2Weapon;

import l2p.gameserver.templates.L2Weapon.WeaponType;

import l2p.util.Rnd;

 

public class SoulShots implements IItemHandler, ScriptFile

{

private static final int[] _itemIds = {5789, 1835, 1463, 1464, 1465, 1466, 1467, 13037, 13045, 13055, 22082, 22083,

22084, 22085, 22086};

private static final short[] _skillIds = {2039, 2150, 2151, 2152, 2153, 2154};

 

public void useItem(L2Playable playable, L2ItemInstance item, Boolean ctrl)

{

if(playable == null || !playable.isPlayer())

{

return;

}

L2Player player = (L2Player) playable;

L2Weapon weaponItem = player.getActiveWeaponItem();

L2ItemInstance weaponInst = player.getActiveWeaponInstance();

int SoulshotId = item.getItemId();

boolean isAutoSoulShot = false;

L2Item itemTemplate = ItemTable.getInstance().getTemplate(item.getItemId());

if(player.getAutoSoulShot().contains(SoulshotId))

{

isAutoSoulShot = true;

}

if(weaponInst == null)

{

if(!isAutoSoulShot)

{

player.sendPacket(Msg.CANNOT_USE_SOULSHOTS);

}

return;

}

// soulshot is already active

if(weaponInst.getChargedSoulshot() != L2ItemInstance.CHARGED_NONE)

{

return;

}

int grade = weaponItem.getCrystalType().externalOrdinal;

int soulShotConsumption = weaponItem.getSoulShotCount();

long count = item.getCount();

if(soulShotConsumption == 0)

{

// Can't use soulshots

if(isAutoSoulShot)

{

player.removeAutoSoulShot(SoulshotId);

player.sendPacket(new ExAutoSoulShot(SoulshotId, false), new SystemMessage(SystemMessage.THE_AUTOMATIC_USE_OF_S1_WILL_NOW_BE_CANCELLED).addSt

ring(itemTemplate.getName()));

return;

}

player.sendPacket(Msg.CANNOT_USE_SOULSHOTS);

return;

}

if(grade == 0 && SoulshotId != 5789 && SoulshotId != 1835 // NG

|| grade == 1 && SoulshotId != 1463 && SoulshotId != 22082 && SoulshotId != 13037 // D

|| grade == 2 && SoulshotId != 1464 && SoulshotId != 22083 && SoulshotId != 13045 // C

|| grade == 3 && SoulshotId != 1465 && SoulshotId != 22084 // B

|| grade == 4 && SoulshotId != 1466 && SoulshotId != 22085 && SoulshotId != 13055 // A

|| grade == 5 && SoulshotId != 1467 && SoulshotId != 22086 // S

)

{

// wrong grade for weapon

if(isAutoSoulShot)

{

return;

}

player.sendPacket(Msg.SOULSHOT_DOES_NOT_MATCH_WEAPON_GRADE);

return;

}

if(weaponItem.getItemType() == WeaponType.BOW || weaponItem.getItemType() == WeaponType.CROSSBOW)

{

int newSS = (int) player.calcStat(Stats.SS_USE_BOW, soulShotConsumption, null, null);

if(newSS < soulShotConsumption && Rnd.chance(player.calcStat(Stats.SS_USE_BOW_CHANCE, soulShotConsumption, null, null)))

{

soulShotConsumption = newSS;

}

}

if(count < soulShotConsumption)

{

player.sendPacket(Msg.NOT_ENOUGH_SOULSHOTS);

return;

}

weaponInst.setChargedSoulshot(L2ItemInstance.CHARGED_SOULSHOT);

player.getInventory().destroyItem(item, soulShotConsumption, false);

player.sendPacket(Msg.POWER_OF_THE_SPIRITS_ENABLED);

player.broadcastPacket(new MagicSkillUse(player, player, _skillIds[grade], 1, 0, 0));

}

 

public final int[] getItemIds()

{

return _itemIds;

}

 

public void onLoad()

{

ItemHandler.getInstance().registerItemHandler(this);

}

 

public void onReload()

{

}

 

public void onShutdown()

{

}

}

 

Вот SpiritShot.java

Скрытый текст

package items;

 

import l2p.extensions.scripts.ScriptFile;

import l2p.gameserver.cache.Msg;

import l2p.gameserver.handler.IItemHandler;

import l2p.gameserver.handler.ItemHandler;

import l2p.gameserver.model.L2Playable;

import l2p.gameserver.model.L2Player;

import l2p.gameserver.model.items.L2ItemInstance;

import l2p.gameserver.serverpackets.ExAutoSoulShot;

import l2p.gameserver.serverpackets.MagicSkillUse;

import l2p.gameserver.serverpackets.SystemMessage;

import l2p.gameserver.tables.ItemTable;

import l2p.gameserver.templates.L2Item;

import l2p.gameserver.templates.L2Weapon;

 

public class SpiritShot implements IItemHandler, ScriptFile

{

// all the items ids that this handler knowns

private static final int[] _itemIds = {5790, 2509, 2510, 2511, 2512, 2513, 2514, 22077, 22078, 22079, 22080, 22081};

private static final short[] _skillIds = {2061, 2155, 2156, 2157, 2158, 2159};

 

public void useItem(L2Playable playable, L2ItemInstance item, Boolean ctrl)

{

if(playable == null || !playable.isPlayer())

{

return;

}

L2Player player = (L2Player) playable;

L2ItemInstance weaponInst = player.getActiveWeaponInstance();

L2Weapon weaponItem = player.getActiveWeaponItem();

int SoulshotId = item.getItemId();

boolean isAutoSoulShot = false;

L2Item itemTemplate = ItemTable.getInstance().getTemplate(item.getItemId());

if(player.getAutoSoulShot().contains(SoulshotId))

{

isAutoSoulShot = true;

}

if(weaponInst == null)

{

if(!isAutoSoulShot)

{

player.sendPacket(Msg.CANNOT_USE_SPIRITSHOTS);

}

return;

}

// spiritshot is already active

if(weaponInst.getChargedSpiritshot() != L2ItemInstance.CHARGED_NONE)

{

return;

}

int SpiritshotId = item.getItemId();

int grade = weaponItem.getCrystalType().externalOrdinal;

int soulSpiritConsumption = weaponItem.getSpiritShotCount();

long count = item.getCount();

if(soulSpiritConsumption == 0)

{

// Can't use Spiritshots

if(isAutoSoulShot)

{

player.removeAutoSoulShot(SoulshotId);

player.sendPacket(new ExAutoSoulShot(SoulshotId, false), new SystemMessage(SystemMessage.THE_AUTOMATIC_USE_OF_S1_WILL_NOW_BE_CANCELLED).addSt

ring(itemTemplate.getName()));

return;

}

player.sendPacket(Msg.CANNOT_USE_SPIRITSHOTS);

return;

}

if(grade == 0 && SpiritshotId != 5790 && SpiritshotId != 2509 // NG

|| grade == 1 && SpiritshotId != 2510 && SpiritshotId != 22077 // D

|| grade == 2 && SpiritshotId != 2511 && SpiritshotId != 22078 // C

|| grade == 3 && SpiritshotId != 2512 && SpiritshotId != 22079 // B

|| grade == 4 && SpiritshotId != 2513 && SpiritshotId != 22080 // A

|| grade == 5 && SpiritshotId != 2514 && SpiritshotId != 22081 // S

)

{

// wrong grade for weapon

if(isAutoSoulShot)

{

return;

}

player.sendPacket(Msg.SPIRITSHOT_DOES_NOT_MATCH_WEAPON_GRADE);

return;

}

if(count < soulSpiritConsumption)

{

if(isAutoSoulShot)

{

player.removeAutoSoulShot(SoulshotId);

player.sendPacket(new ExAutoSoulShot(SoulshotId, false), new SystemMessage(SystemMessage.THE_AUTOMATIC_USE_OF_S1_WILL_NOW_BE_CANCELLED).addSt

ring(itemTemplate.getName()));

return;

}

player.sendPacket(Msg.NOT_ENOUGH_SPIRITSHOTS);

return;

}

weaponInst.setChargedSpiritshot(L2ItemInstance.CHARGED_SPIRITSHOT);

player.getInventory().destroyItem(item, soulSpiritConsumption, false);

player.sendPacket(Msg.POWER_OF_MANA_ENABLED);

player.broadcastPacket(new MagicSkillUse(player, player, _skillIds[grade], 1, 0, 0));

}

 

public final int[] getItemIds()

{

return _itemIds;

}

 

public void onLoad()

{

ItemHandler.getInstance().registerItemHandler(this);

}

 

public void onReload()

{

}

 

public void onShutdown()

{

}

}

В конфигах смотри.Там есть изменения на соски и стрелы.

Поделиться сообщением


Ссылка на сообщение
Поделиться на другие сайты
В конфигах смотри.Там есть изменения на соски и стрелы.

Я смотрел - не нашел, может подскажешь в каком именно?

Поделиться сообщением


Ссылка на сообщение
Поделиться на другие сайты

Почему вам так тяжело сразу указать вашу Сборку?!....

Поделиться сообщением


Ссылка на сообщение
Поделиться на другие сайты

например у меня pw

 

# Кушать сулшоты?

UseSoulShots = False

 

# Кушать стрелы?

ConsumeArrows = False

 

 

Находится в allsettings в конце.

Поделиться сообщением


Ссылка на сообщение
Поделиться на другие сайты

kdp, а почему бы вам не открыть глаза, и не прочитать название темы? а по делу, на форуме есть конфиг для фрозенов, переписать не составит труда!

Поделиться сообщением


Ссылка на сообщение
Поделиться на другие сайты

Для публикации сообщений создайте учётную запись или авторизуйтесь

Вы должны быть пользователем, чтобы оставить комментарий

Создать учетную запись

Зарегистрируйте новую учётную запись в нашем сообществе. Это очень просто!

Регистрация нового пользователя

Войти

Уже есть аккаунт? Войти в систему.

Войти
Авторизация  

  • Последние посетители   0 пользователей онлайн

    Ни одного зарегистрированного пользователя не просматривает данную страницу

×
×
  • Создать...