initial
This commit is contained in:
@@ -21,9 +21,14 @@ import com.wurmonline.server.villages.Villages;
|
||||
import mod.sin.armour.SpectralHide;
|
||||
import mod.sin.creatures.Reaper;
|
||||
import mod.sin.creatures.SpectralDrake;
|
||||
import mod.sin.items.AffinityOrb;
|
||||
import mod.sin.items.ChaosCrystal;
|
||||
import mod.sin.items.EnchantersCrystal;
|
||||
import mod.sin.items.FriyanTablet;
|
||||
import mod.sin.items.caches.GemCache;
|
||||
import mod.sin.items.caches.RiftCache;
|
||||
import mod.sin.items.caches.ToolCache;
|
||||
import mod.sin.items.caches.TreasureMapCache;
|
||||
import mod.sin.wyvern.Bounty;
|
||||
import mod.sin.wyvern.MiscChanges;
|
||||
import mod.sin.wyvern.Arena;
|
||||
@@ -219,6 +224,21 @@ public class LootBounty {
|
||||
if(random.nextInt(100) < 75){
|
||||
corpse.insertItem(ItemFactory.createItem((random.nextBoolean() ? ItemList.adamantineBar : ItemList.glimmerSteelBar), 30+(30*random.nextFloat()), ""));
|
||||
}
|
||||
if(random.nextInt(100) < 25) {
|
||||
Item item = ItemFactory.createItem(ItemUtil.getMysteryEggID(), 50, "");
|
||||
item.setRarity((byte)1);
|
||||
corpse.insertItem(item);
|
||||
}
|
||||
if(random.nextInt(100) < 5) {
|
||||
int[] caches = {
|
||||
TreasureMapCache.templateId,
|
||||
GemCache.templateId,
|
||||
RiftCache.templateId
|
||||
};
|
||||
int cacheSelected = random.nextInt(3);
|
||||
Item item = ItemFactory.createItem(caches[cacheSelected], 20 + random.nextInt(40), "");
|
||||
corpse.insertItem(item);
|
||||
}
|
||||
if(random.nextInt(100) < 5){
|
||||
//int[] maskTemplates = {973, 974, 975, 976, 977, 978, 1099};
|
||||
int[] maskTemplates = {
|
||||
@@ -270,7 +290,8 @@ public class LootBounty {
|
||||
if(templateId == Reaper.templateId || templateId == SpectralDrake.templateId){
|
||||
Server.getInstance().broadCastAlert("The "+mob.getName()+" has been slain. A new creature shall enter the realm shortly.");
|
||||
sendLootHelp = true;
|
||||
}else if(Titans.isTitan(mob)){
|
||||
}
|
||||
else if(Titans.isTitan(mob)){
|
||||
Server.getInstance().broadCastAlert("The Titan "+mob.getName()+" has been defeated!");
|
||||
MiscChanges.sendGlobalFreedomChat(mob, "The Titan "+mob.getName()+" has been defeated!", 255, 105, 180);
|
||||
MiscChanges.sendServerTabMessage("titan", "The Titan "+mob.getName()+" has been defeated!", 255, 105, 180);
|
||||
@@ -310,7 +331,21 @@ public class LootBounty {
|
||||
blessWorldWithMoonVeins(mob);
|
||||
// Spawn 5-10 friyan tablets throughout the world.
|
||||
spawnFriyanTablets();
|
||||
|
||||
|
||||
try {
|
||||
// guaranteed rare egg, 15% chance it's fantastic
|
||||
Item item = ItemFactory.createItem(ItemUtil.getMysteryEggID(), 50, "");
|
||||
item.setRarity((byte)1);
|
||||
if(random.nextInt( 100) < 15) {
|
||||
item.setRarity((byte)3);
|
||||
}
|
||||
corpse.insertItem(item);
|
||||
|
||||
//free affinity orb
|
||||
item = ItemFactory.createItem(AffinityOrb.templateId, 50, "");
|
||||
} catch (FailedException | NoSuchTemplateException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
// Spawn Spectral Drake
|
||||
/*if (mob.isDragon()) { // Spawn the spectral drake and add extra hide/scale
|
||||
handleDragonLoot(mob, corpse);
|
||||
|
||||
@@ -18,14 +18,13 @@ import com.wurmonline.server.items.ItemTemplate;
|
||||
import com.wurmonline.server.items.NoSuchTemplateException;
|
||||
import com.wurmonline.server.players.Player;
|
||||
import com.wurmonline.server.players.Titles.Title;
|
||||
import com.wurmonline.server.skills.NoSuchSkillException;
|
||||
import com.wurmonline.server.skills.SkillList;
|
||||
import mod.sin.armour.SpectralHide;
|
||||
import mod.sin.creatures.Reaper;
|
||||
import mod.sin.creatures.SpectralDrake;
|
||||
import mod.sin.items.AffinityOrb;
|
||||
import mod.sin.items.caches.RiftCache;
|
||||
import mod.sin.items.caches.TitanCache;
|
||||
import mod.sin.kingdomoffices.ItemCreator;
|
||||
import mod.sin.wyvern.*;
|
||||
import mod.sin.wyvern.util.ItemUtil;
|
||||
|
||||
@@ -141,6 +140,7 @@ public class PlayerBounty {
|
||||
}*/
|
||||
if(mob.isUnique()){
|
||||
MiscChanges.addPlayerStat(player.getName(), "UNIQUES");
|
||||
rewardPowerfulLoot(player, mob);
|
||||
}
|
||||
if(RareSpawns.isRareCreature(mob)){
|
||||
Item riftCache = ItemFactory.createItem(RiftCache.templateId, 50f+(30f*Server.rand.nextFloat()), mob.getName());
|
||||
@@ -199,6 +199,9 @@ public class PlayerBounty {
|
||||
strBuilder += " for slaying the " + mob.getName() + ".";
|
||||
player.getCommunicator().sendSafeServerMessage(strBuilder);
|
||||
long playerSteamId = steamIdMap.get(player.getName());
|
||||
Item creatureToken = ItemFactory.createItem(ItemCreator.CREATURE_TOKEN.getTemplateId(), 50, (byte)0, "");
|
||||
inventory.insertItem(creatureToken);
|
||||
player.getCommunicator().sendSafeServerMessage("You also receive a " + creatureToken.getName() + "!");
|
||||
if(playersRewarded.containsKey(mobWurmId)){
|
||||
playersRewarded.get(mobWurmId).add(playerSteamId);
|
||||
}else{
|
||||
|
||||
Reference in New Issue
Block a user