Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void playerKillEvent(EntityPlayer player, Entity killed) {
- int points = 20;
- if (player.username.contains("fakePlayer")) {
- int ammoID = 0;
- int giveAmount = 0;
- if (player.inventory.mainInventory[1] != null && player.inventory.mainInventory[1].getItem() instanceof ItemGun) {
- ammoID = ((ItemGun)player.inventory.mainInventory[1].getItem()).ammoType.ordinal();
- if (player.worldObj.rand.nextInt(8) == 0) {
- giveAmount = ((ItemGun)player.inventory.mainInventory[1].getItem()).magSize * 2;
- }
- }
- ZCUtil.setAmmoData(player.username, ammoID, giveAmount + ZCUtil.getAmmoData(player.username, ammoID));
- c_EnhAI ent = (c_EnhAI)c_CoroAIUtil.playerToAILookup.get(player.username);
- if (ent != null) {
- JobBase jb = ent.job.getJobClass();
- if (jb instanceof JobProtect) {
- String owner = ((JobProtect)jb).playerName;
- if (owner != null && owner.length() > 0) {
- EntityPlayer ownerPlayer = player.worldObj.getPlayerEntityByName(owner);
- if (ownerPlayer != null) {
- givePoints(ownerPlayer, points / 2);
- }
- }
- }
- }
- } else {
- givePoints(player, points);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement