|
|
@ -9,6 +9,7 @@ import engine.gameManager.ZoneManager; |
|
|
|
import engine.objects.*; |
|
|
|
import engine.objects.*; |
|
|
|
|
|
|
|
|
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.ArrayList; |
|
|
|
|
|
|
|
import java.util.concurrent.ThreadLocalRandom; |
|
|
|
|
|
|
|
|
|
|
|
public class simulateBootyCmd extends AbstractDevCmd { |
|
|
|
public class simulateBootyCmd extends AbstractDevCmd { |
|
|
|
public simulateBootyCmd() { |
|
|
|
public simulateBootyCmd() { |
|
|
@ -50,32 +51,14 @@ public class simulateBootyCmd extends AbstractDevCmd { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Enum.GameObjectType objType = target.getObjectType(); |
|
|
|
Enum.GameObjectType objType = target.getObjectType(); |
|
|
|
int objectUUID = target.getObjectUUID(); |
|
|
|
|
|
|
|
String output; |
|
|
|
String output; |
|
|
|
|
|
|
|
|
|
|
|
output = "Booty Simulation:" + newline; |
|
|
|
output = "Booty Simulation:" + newline; |
|
|
|
|
|
|
|
|
|
|
|
switch (objType) { |
|
|
|
switch (objType) { |
|
|
|
case Building: |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
case PlayerCharacter: |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
case NPC: |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
case Mob: |
|
|
|
case Mob: |
|
|
|
Mob mob = (Mob) target; |
|
|
|
Mob mob = (Mob) target; |
|
|
|
output += "Name: " + mob.getName() + newline; |
|
|
|
output += "Name: " + mob.getName() + newline; |
|
|
|
int max = (int)(4.882 * mob.level + 127.0); |
|
|
|
|
|
|
|
if(max > 320){ |
|
|
|
|
|
|
|
max = 320; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
int min = (int)(4.469 * mob.level - 3.469); |
|
|
|
|
|
|
|
output += "Roll Range: " + min + " - " + max + newline; |
|
|
|
|
|
|
|
output += "Special Loot:" + newline; |
|
|
|
output += "Special Loot:" + newline; |
|
|
|
if (mob.bootySet != 0) { |
|
|
|
if (mob.bootySet != 0) { |
|
|
|
for (BootySetEntry entry : NPCManager._bootySetMap.get(mob.bootySet)) { |
|
|
|
for (BootySetEntry entry : NPCManager._bootySetMap.get(mob.bootySet)) { |
|
|
@ -91,6 +74,7 @@ public class simulateBootyCmd extends AbstractDevCmd { |
|
|
|
ArrayList<Item> Contracts = new ArrayList<Item>(); |
|
|
|
ArrayList<Item> Contracts = new ArrayList<Item>(); |
|
|
|
ArrayList<Item> Offerings = new ArrayList<Item>(); |
|
|
|
ArrayList<Item> Offerings = new ArrayList<Item>(); |
|
|
|
ArrayList<Item> OtherDrops = new ArrayList<Item>(); |
|
|
|
ArrayList<Item> OtherDrops = new ArrayList<Item>(); |
|
|
|
|
|
|
|
ArrayList<Item> EquipmentDrops = new ArrayList<Item>(); |
|
|
|
int failures = 0; |
|
|
|
int failures = 0; |
|
|
|
int goldAmount = 0; |
|
|
|
int goldAmount = 0; |
|
|
|
for (int i = 0; i < 100; ++i) { |
|
|
|
for (int i = 0; i < 100; ++i) { |
|
|
@ -128,10 +112,22 @@ public class simulateBootyCmd extends AbstractDevCmd { |
|
|
|
} catch (Exception ex) { |
|
|
|
} catch (Exception ex) { |
|
|
|
failures++; |
|
|
|
failures++; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
if (mob.getEquip() != null) { |
|
|
|
int respawnTime = mob.getMobBase().getSpawnTime(); |
|
|
|
for (MobEquipment me : mob.getEquip().values()) { |
|
|
|
if (mob.spawnTime > 0) { |
|
|
|
|
|
|
|
respawnTime = mob.spawnTime; |
|
|
|
if (me.getDropChance() == 0) |
|
|
|
|
|
|
|
continue; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
float equipmentRoll = ThreadLocalRandom.current().nextInt(99) + 1; |
|
|
|
|
|
|
|
float dropChance = me.getDropChance() * 100; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (equipmentRoll > (dropChance)) |
|
|
|
|
|
|
|
continue; |
|
|
|
|
|
|
|
MobLoot ml = new MobLoot(mob, me.getItemBase(), false); |
|
|
|
|
|
|
|
if (ml != null) |
|
|
|
|
|
|
|
EquipmentDrops.add(ml); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
output += "MobBase BootySet: " + mob.getMobBase().bootySet + newline; |
|
|
|
output += "MobBase BootySet: " + mob.getMobBase().bootySet + newline; |
|
|
|
output += "Mob BootySet: " + mob.bootySet + newline; |
|
|
|
output += "Mob BootySet: " + mob.bootySet + newline; |
|
|
@ -145,18 +141,18 @@ public class simulateBootyCmd extends AbstractDevCmd { |
|
|
|
output += "HOTZONE TABLE [" + entry.bootyType + "] " + entry.lootTable + 1 + newline; |
|
|
|
output += "HOTZONE TABLE [" + entry.bootyType + "] " + entry.lootTable + 1 + newline; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
output += "Time Required To Gain Simulated Booty: " + respawnTime * 100 + " Seconds" + newline; |
|
|
|
|
|
|
|
output += "GLASS DROPS: " + GlassItems.size() + newline; |
|
|
|
output += "GLASS DROPS: " + GlassItems.size() + newline; |
|
|
|
output += "RUNE DROPS: " + Runes.size() + newline; |
|
|
|
output += "RUNE DROPS: " + Runes.size() + newline; |
|
|
|
output += "CONTRACTS DROPS: " + Contracts.size() + newline; |
|
|
|
output += "CONTRACTS DROPS: " + Contracts.size() + newline; |
|
|
|
for (Item contract : Contracts){ |
|
|
|
|
|
|
|
output += contract.getName() + newline; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
output += "RESOURCE DROPS: " + Resources.size() + newline; |
|
|
|
output += "RESOURCE DROPS: " + Resources.size() + newline; |
|
|
|
output += "OFFERINGS DROPPED: " + Offerings.size() + newline; |
|
|
|
output += "OFFERINGS DROPPED: " + Offerings.size() + newline; |
|
|
|
output += "OTHER ITEMS DROPPED: " + OtherDrops.size() + newline; |
|
|
|
output += "ENCHANTED ITEMS DROPPED: " + OtherDrops.size() + newline; |
|
|
|
|
|
|
|
output += "TOTAL GOLD DROPPED: " + goldAmount + newline; |
|
|
|
|
|
|
|
output += "EQUIPMENT DROPPED: " + EquipmentDrops.size() + newline; |
|
|
|
output += "FAILED ROLLS: " + failures + newline; |
|
|
|
output += "FAILED ROLLS: " + failures + newline; |
|
|
|
break; |
|
|
|
break; |
|
|
|
|
|
|
|
default: |
|
|
|
|
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
throwbackInfo(pc, output); |
|
|
|
throwbackInfo(pc, output); |
|
|
|
} |
|
|
|
} |
|
|
|