All pastes #45231 Raw Edit

Someone

public text v1 · immutable
#45231 ·published 2006-03-11 11:56 UTC
rendered paste body
if ((dice < _LEVEL_CHANCE) || levelPartyCrystals)
            {
                // Remove old crystal from the killer's inventory
            	final L2ItemInstance oldCrystal = player.getInventory().destroyItemByItemId("Absorb", oldCrystalId, 1, player, this);
                if (oldCrystal != null) 
                {
                    // Add new crystal to the killer's inventory
                	player.getInventory().addItem("Absorb", newCrystalId, 1, player, this);
                    final SystemMessage sms = new SystemMessage(SystemMessage.EARNED_ITEM);

                    // Send a sound event and text message to the player
                    player.sendPacket(new PlaySound("ItemSound.quest_itemget"));
                    sms.addItemName(newCrystalId);
                    player.sendPacket(sms);
                    // Send Server->Client packets to notify the killer and update his Inventory
                }
                player.sendPacket(new ItemList(player, false));
            }
            else if ((dice >= 100.0 - _BREAK_CHANCE) && !levelPartyCrystals)
            {
                // Remove old crystal from the killer's inventory
            	final L2ItemInstance oldCrystal = player.getInventory().destroyItemByItemId("Absorb", oldCrystalId, 1, player, this);
                killer.sendPacket(new PlaySound("ItemSound3.sys_enchant_failed"));
                sm.addString("The soul crystal scattered itself.");
                killer.sendPacket(sm);
                _absorbed = false;
                _absorbersList = null;
                return;
            }
            else
            {
                sm.addString("The soul crystal has failed to absorb the soul.");
                player.sendPacket(sm);
            }