Compare commits

...

34 Commits

Author SHA1 Message Date
FatBoy 38983cbcc6 fix new AI syntax error 2025-12-27 11:58:03 -06:00
FatBoy 0258fd8c7d boons are nation friendly 2025-12-27 11:56:41 -06:00
FatBoy 96e63f769c fix pets and siege engines 2025-12-27 11:50:51 -06:00
FatBoy cc740a97fc replace werewolf and werebear with undead guard captain drops 2025-12-27 11:45:16 -06:00
FatBoy a62197d32d wall archer defense and ATR increases 2025-12-27 11:40:10 -06:00
FatBoy 96fc6e741d fix add NPC 2025-12-27 11:20:22 -06:00
FatBoy b8f3c4b240 stack resources command 2025-09-30 12:01:52 -05:00
FatBoy 1ecdcf60a5 handle retaliate even when missed 2025-09-30 11:45:06 -05:00
FatBoy cc09fb04ce add more exclusions to junk command 2025-09-30 11:42:07 -05:00
FatBoy 68d525f91c remove distance reduction for mine production 2025-09-30 11:13:54 -05:00
FatBoy b26a260bf3 allow xpac mines to change production 2025-09-30 11:11:53 -05:00
FatBoy ec736f03be fixed bug with vorg rates being WAY too low because of equip drop limits 2025-09-30 11:01:17 -05:00
FatBoy 1f88bb38fc increase player gold and bank gold limits 2025-09-30 10:53:58 -05:00
FatBoy 27946e695c all player inventory gold limit checks to use MBServerStatics.PLAYER_GOLD_LIMIT 2025-09-30 10:51:52 -05:00
FatBoy 72a72e6bde add ranger and assassin bow to rollable items on bowyer 2025-09-30 10:24:09 -05:00
FatBoy ad45a17abe ToL gets an additional NPC slot 2025-09-22 12:03:00 -05:00
FatBoy 4fdbf12691 allow banker, siege engineer and alchemist on ToL 2025-09-22 11:59:53 -05:00
FatBoy 9b6c75d170 runegates are always open all the time 2025-09-22 11:44:58 -05:00
FatBoy b6546b437b random vorg timers 2025-09-22 11:42:17 -05:00
FatBoy d4d320264c autoloot 2025-09-14 19:19:00 -05:00
FatBoy f66902753c junk from inventory 2025-09-14 19:05:36 -05:00
FatBoy 849e30841c junk from inventory 2025-09-14 18:50:19 -05:00
FatBoy da28279fc1 test 2025-09-14 18:46:09 -05:00
FatBoy e8e43185aa test 2025-09-14 10:20:29 -05:00
FatBoy b334399e65 test 2025-09-14 09:11:54 -05:00
FatBoy 5225898434 create system allowing players to delete items form inventory for gold value (junk hut in bag) 2025-09-14 08:57:03 -05:00
FatBoy bcdaa81357 create system allowing players to delete items form inventory for gold value (junk hut in bag) 2025-09-14 07:54:18 -05:00
MagicBot 3649c629b7 Revert "DamageType defined as in JSON"
This reverts commit 1c31070fc8.
2024-04-01 12:04:12 -04:00
MagicBot 1c31070fc8 DamageType defined as in JSON 2024-04-01 12:01:59 -04:00
MagicBot bff41967db Revert "Out of combat mode when patrolling."
This reverts commit d3692d0fb7.
2023-09-08 13:07:15 -04:00
MagicBot d3692d0fb7 Out of combat mode when patrolling. 2023-09-08 13:04:29 -04:00
FatBoy 074a799d01 added health recovery to mobs 2023-08-22 20:58:52 -05:00
FatBoy 36ffd08a72 guard minions logic work 2023-08-22 20:52:45 -05:00
FatBoy 58f828b3cd items removed properly from inventory, NPCs nop longer stock base items 2023-08-22 20:52:26 -05:00
18 changed files with 250 additions and 100 deletions
+2 -1
View File
@@ -2855,7 +2855,8 @@ public class Enum {
GuardWallArcher(null, false, true, false, false, false),
Wanderer(null, false, true, true, false, false),
HamletGuard(null, false, true, false, false, false),
AggroWanderer(null, false, false, true, false, false);
AggroWanderer(null, false, false, true, false, false),
Siege(null, false, false, false, false, false);
private static HashMap<Integer, MobBehaviourType> _behaviourTypes = new HashMap<>();
public MobBehaviourType BehaviourHelperType;
+4 -3
View File
@@ -14,6 +14,7 @@ import engine.gameManager.ChatManager;
import engine.objects.AbstractGameObject;
import engine.objects.Item;
import engine.objects.PlayerCharacter;
import engine.server.MBServerStatics;
/**
* @author Eighty
@@ -46,10 +47,10 @@ public class AddGoldCmd extends AbstractDevCmd {
throwbackError(pc, "Quantity must be a number, " + words[0] + " is invalid");
return;
}
if (amt < 1 || amt > 10000000) {
throwbackError(pc, "Quantity must be between 1 and 10000000 (10 million)");
if (amt < 1 || amt > MBServerStatics.PLAYER_GOLD_LIMIT) {
throwbackError(pc, "Quantity must be between 1 and " + MBServerStatics.PLAYER_GOLD_LIMIT);
return;
} else if ((curAmt + amt) > 10000000) {
} else if ((curAmt + amt) > MBServerStatics.PLAYER_GOLD_LIMIT) {
throwbackError(pc, "This would place your inventory over 10,000,000 gold.");
return;
}
+21 -18
View File
@@ -13,6 +13,7 @@ import engine.Enum.GameObjectType;
import engine.InterestManagement.WorldGrid;
import engine.devcmd.AbstractDevCmd;
import engine.gameManager.*;
import engine.math.Vector3fImmutable;
import engine.objects.*;
import org.pmw.tinylog.Logger;
@@ -70,28 +71,30 @@ public class AddNPCCmd extends AbstractDevCmd {
throwbackError(pc, "Failed to find zone to place npc in.");
return;
}
Building building = null;
if (target != null)
if (target.getObjectType() == GameObjectType.Building) {
Building parentBuilding = (Building) target;
BuildingManager.addHirelingForWorld(parentBuilding, pc, parentBuilding.getLoc(), parentBuilding.getParentZone(), contract, level);
return;
building = (Building)target;
}
NPC npc = NPC.createNPC(name, contractID,
pc.getLoc(), null, zone, (short) level, null);
if (npc != null) {
WorldGrid.addObject(npc, pc);
ChatManager.chatSayInfo(pc,
"NPC with ID " + npc.getDBID() + " added");
this.setResult(String.valueOf(npc.getDBID()));
} else {
throwbackError(pc, "Failed to create npc of contract type "
+ contractID);
Logger.error(
"Failed to create npc of contract type " + contractID);
NPC created;
Guild guild = null;
Vector3fImmutable loc;
if(building != null){
guild = building.getGuild();
loc = building.loc;
} else{
loc = pc.loc;
}
created = NPC.createNPC(name, contractID, loc, guild, zone, (short)level, building);
created.bindLoc = loc;
if(building != null) {
created.buildingUUID = building.getObjectUUID();
created.building = building;
NPCManager.slotCharacterInBuilding(created);
}
created.setLoc(created.bindLoc);
created.updateDatabase();
throwbackInfo(pc, "Created NPC with UUID: " + created.getObjectUUID());
}
@Override
+48 -4
View File
@@ -29,10 +29,7 @@ import engine.server.world.WorldServer;
import engine.session.Session;
import org.pmw.tinylog.Logger;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Set;
import java.util.*;
public enum ChatManager {
@@ -189,6 +186,53 @@ public enum ChatManager {
return;
}
if(text.startsWith("./junk")){
//junk command
PlayerCharacter pc = (PlayerCharacter)player;
for(Item i : pc.getCharItemManager().getInventory()){
ItemBase ib = i.getItemBase();
if(ib.isGlass() || ib.getType().equals(Enum.ItemType.CONTRACT) || ib.isVorg() || ib.getType().equals(Enum.ItemType.RUNE)
|| ib.getType().equals(Enum.ItemType.SCROLL) || ib.getType().equals(Enum.ItemType.POTION) || ib.getType().equals(Enum.ItemType.RESOURCE)
|| ib.getType().equals(Enum.ItemType.OFFERING) || ib.getType().equals(Enum.ItemType.REALMCHARTER))
continue;
int value = ib.getBaseValue();
if(pc.getCharItemManager().getGoldInventory().getNumOfItems() + value > MBServerStatics.PLAYER_GOLD_LIMIT)
continue; // cannot hold gold value
pc.getCharItemManager().addGoldToInventory(value,false);
pc.getCharItemManager().junk(i);
}
pc.getCharItemManager().updateInventory();
}
if(text.startsWith("./stackresources")){
HashMap<Integer,Integer> resources = new HashMap<>();
PlayerCharacter pc = (PlayerCharacter)player;
for(Item i : pc.getCharItemManager().getInventory()){
ItemBase ib = i.getItemBase();
if(ib.getType().equals(Enum.ItemType.RESOURCE)){
if(resources.containsKey(ib.getUUID())){
//already logged this resource, add to count
int count = resources.get(ib.getUUID());
count += i.getNumOfItems();
resources.put(ib.getUUID(),count);
}else{
//have not logged this resource yet
resources.put(ib.getUUID(),i.getNumOfItems());
}
pc.getCharItemManager().junk(i);
}
}
for(int id : resources.keySet()){
ItemBase ib = ItemBase.getItemBase(id);
MobLoot ml = new MobLoot(pc,ib,resources.get(id),false);
Item i = ml.promoteToItem(pc);
pc.getCharItemManager().addItemToInventory(i);
}
pc.getCharItemManager().updateInventory();
}
if (ChatManager.isDevCommand(text) == true) {
ChatManager.processDevCommand(player, text);
return;
+7 -2
View File
@@ -763,9 +763,14 @@ public enum CombatManager {
//return if passive (Block, Parry, Dodge) fired
if (passiveFired)
return;
if (passiveFired) {
try {
handleRetaliate(tarAc, ac);
}catch(Exception ignored){
}
return;
}
errorTrack = 9;
//Hit and no passives
+8 -5
View File
@@ -171,6 +171,10 @@ public enum LootManager {
if (itemUUID == 0)
return null;
if(itemUUID == 980103 || itemUUID == 980104 || itemUUID == 980110 || itemUUID == 980111){
itemUUID = 980100;
}
if (ItemBase.getItemBase(itemUUID).getType().ordinal() == Enum.ItemType.RESOURCE.ordinal()) {
int amount = ThreadLocalRandom.current().nextInt(tableRow.minSpawn, tableRow.maxSpawn + 1);
return new MobLoot(mob, ItemBase.getItemBase(itemUUID), amount, false);
@@ -319,8 +323,10 @@ public enum LootManager {
MobLoot toAdd = getGenTableItem(tableID, mob, inHotzone);
if (toAdd != null)
if (toAdd != null) {
toAdd.setIsID(true);
mob.getCharItemManager().addItemToInventory(toAdd);
}
} catch (Exception e) {
//TODO chase down loot generation error, affects roughly 2% of drops
@@ -331,7 +337,6 @@ public enum LootManager {
public static void GenerateEquipmentDrop(Mob mob) {
//do equipment here
int dropCount = 0;
if (mob.getEquip() != null)
for (MobEquipment me : mob.getEquip().values()) {
@@ -346,12 +351,10 @@ public enum LootManager {
MobLoot ml = new MobLoot(mob, me.getItemBase(), false);
if (ml != null && dropCount < 1) {
if (ml != null){
ml.setIsID(true);
ml.setDurabilityCurrent((short) (ml.getDurabilityCurrent() - ThreadLocalRandom.current().nextInt(5) + 1));
mob.getCharItemManager().addItemToInventory(ml);
dropCount = 1;
//break; // Exit on first successful roll.
}
}
}
+27 -36
View File
@@ -685,6 +685,8 @@ public class MobAI {
break;
case Pet1:
PetLogic(mob);
case Siege:
PetLogic(mob);
break;
case HamletGuard:
HamletGuardLogic(mob);
@@ -693,6 +695,8 @@ public class MobAI {
DefaultLogic(mob);
break;
}
if(mob.isAlive())
RecoverHealth(mob);
} catch (Exception e) {
Logger.info(mob.getObjectUUID() + " " + mob.getName() + " Failed At: DetermineAction" + " " + e.getMessage());
}
@@ -808,7 +812,7 @@ public class MobAI {
chaseTarget(mob);
break;
case GuardMinion:
if (!mob.npcOwner.isAlive() || ((Mob) mob.npcOwner).despawned)
if (!mob.npcOwner.isAlive() && mob.getCombatTarget() == null)
randomGuardPatrolPoint(mob);
else {
if (mob.getCombatTarget() != null) {
@@ -827,6 +831,7 @@ public class MobAI {
chaseTarget(mob);
}
break;
}
} catch (Exception e) {
Logger.info(mob.getObjectUUID() + " " + mob.getName() + " Failed At: CheckMobMovement" + " " + e.getMessage());
@@ -1043,7 +1048,6 @@ public class MobAI {
mob.setCombatTarget(newTarget);
}
CheckMobMovement(mob);
CheckForAttack(mob);
} catch (Exception e) {
@@ -1054,24 +1058,9 @@ public class MobAI {
public static void GuardMinionLogic(Mob mob) {
try {
if (!mob.npcOwner.isAlive()) {
if (mob.getCombatTarget() == null) {
CheckForPlayerGuardAggro(mob);
} else {
AbstractWorldObject newTarget = ChangeTargetFromHateValue(mob);
if (newTarget != null) {
if (newTarget.getObjectType().equals(Enum.GameObjectType.PlayerCharacter)) {
if (GuardCanAggro(mob, (PlayerCharacter) newTarget))
mob.setCombatTarget(newTarget);
} else
mob.setCombatTarget(newTarget);
}
}
boolean isComanded = mob.npcOwner.isAlive();
if (!isComanded) {
GuardCaptainLogic(mob);
}else {
if (mob.npcOwner.getCombatTarget() != null)
mob.setCombatTarget(mob.npcOwner.getCombatTarget());
@@ -1110,22 +1099,6 @@ public class MobAI {
CheckMobMovement(mob);
CheckForAttack(mob);
//recover health
if (mob.getTimestamps().containsKey("HEALTHRECOVERED") == false)
mob.getTimestamps().put("HEALTHRECOVERED", System.currentTimeMillis());
if (mob.isSit() && mob.getTimeStamp("HEALTHRECOVERED") < System.currentTimeMillis() + 3000)
if (mob.getHealth() < mob.getHealthMax()) {
float recoveredHealth = mob.getHealthMax() * ((1 + mob.getBonuses().getFloatPercentAll(Enum.ModType.HealthRecoverRate, Enum.SourceType.None)) * 0.01f);
mob.setHealth(mob.getHealth() + recoveredHealth);
mob.getTimestamps().put("HEALTHRECOVERED", System.currentTimeMillis());
if (mob.getHealth() > mob.getHealthMax())
mob.setHealth(mob.getHealthMax());
}
} catch (Exception e) {
Logger.info(mob.getObjectUUID() + " " + mob.getName() + " Failed At: PetLogic" + " " + e.getMessage());
}
@@ -1379,4 +1352,22 @@ public class MobAI {
}
return null;
}
public static void RecoverHealth(Mob mob){
//recover health
if (mob.getTimestamps().containsKey("HEALTHRECOVERED") == false)
mob.getTimestamps().put("HEALTHRECOVERED", System.currentTimeMillis());
if (mob.isSit() && mob.getTimeStamp("HEALTHRECOVERED") < System.currentTimeMillis() + 3000)
if (mob.getHealth() < mob.getHealthMax()) {
float recoveredHealth = mob.getHealthMax() * ((1 + mob.getBonuses().getFloatPercentAll(Enum.ModType.HealthRecoverRate, Enum.SourceType.None)) * 0.01f);
mob.setHealth(mob.getHealth() + recoveredHealth);
mob.getTimestamps().put("HEALTHRECOVERED", System.currentTimeMillis());
if (mob.getHealth() > mob.getHealthMax())
mob.setHealth(mob.getHealthMax());
}
}
}
+31 -3
View File
@@ -560,12 +560,40 @@ public class ClientMessagePump implements NetMsgHandler {
if (!itemManager.inventoryContains(i))
return;
if (i.isCanDestroy())
if (itemManager.delete(i) == true) {
if (i.isCanDestroy()) {
if (itemManager.delete(i)) {
Dispatch dispatch = Dispatch.borrow(sourcePlayer, msg);
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
}
}
ItemBase ib = i.getItemBase();
if(ib == null)
return;
if(ib.getUUID() == 7) // don't allow gold to junk for gold
return;
int value = ib.getBaseValue();
Item gold = itemManager.getGoldInventory();
int curAmt;
if (gold == null)
curAmt = 0;
else
curAmt = gold.getNumOfItems();
if ((curAmt + value) > MBServerStatics.PLAYER_GOLD_LIMIT) {
ChatManager.chatSystemInfo(sourcePlayer, "This would place your inventory over " + MBServerStatics.PLAYER_GOLD_LIMIT + " gold.");
return;
}
itemManager.addGoldToInventory(value, false);
itemManager.updateInventory();
//test
}
private static void ackBankWindowOpened(AckBankWindowOpenedMsg msg, ClientConnection origin) {
@@ -1259,7 +1287,7 @@ public class ClientMessagePump implements NetMsgHandler {
cost *= profit;
if (gold.getNumOfItems() + cost > 10000000) {
if (gold.getNumOfItems() + cost > MBServerStatics.PLAYER_GOLD_LIMIT) {
return;
}
@@ -147,7 +147,7 @@ public class MerchantMsgHandler extends AbstractClientMsgHandler {
Building shrineBuilding;
Shrine shrine;
if (npc.getGuild() != player.getGuild())
if (!npc.getGuild().getNation().equals(player.getGuild().getNation()))
return;
shrineBuilding = npc.getBuilding();
+4 -1
View File
@@ -335,13 +335,16 @@ public class Blueprint {
availableSlots = 3;
break;
case 8:
availableSlots = 1;
availableSlots = 3;
break;
default:
availableSlots = 0;
break;
}
if(this.buildingGroup.equals(BuildingGroup.TOL)){
availableSlots += 1;
}
return availableSlots;
}
+2 -3
View File
@@ -970,7 +970,6 @@ public class CharacterItemManager {
// if (i.getObjectType() != GameObjectType.MobLoot)
// CharacterItemManager.junkedItems.add(i);
calculateWeights();
if (updateInventory)
@@ -2335,7 +2334,7 @@ public class CharacterItemManager {
}
if (this.getGoldInventory().getNumOfItems() + goldFrom2 > 10000000) {
if (this.getGoldInventory().getNumOfItems() + goldFrom2 > MBServerStatics.PLAYER_GOLD_LIMIT) {
PlayerCharacter pc = (PlayerCharacter) this.absCharacter;
if (pc.getClientConnection() != null)
ErrorPopupMsg.sendErrorPopup(pc, 202);
@@ -2343,7 +2342,7 @@ public class CharacterItemManager {
}
if (tradingWith.getGoldInventory().getNumOfItems() + goldFrom1 > 10000000) {
if (tradingWith.getGoldInventory().getNumOfItems() + goldFrom1 > MBServerStatics.PLAYER_GOLD_LIMIT) {
PlayerCharacter pc = (PlayerCharacter) tradingWith.absCharacter;
if (pc.getClientConnection() != null)
ErrorPopupMsg.sendErrorPopup(pc, 202);
+6
View File
@@ -86,6 +86,12 @@ public class Contract extends AbstractGameObject {
this.iconID = rs.getInt("iconID");
this.vendorID = rs.getInt("vendorID");
this.allowedBuildings = EnumBitSet.asEnumBitSet(rs.getLong("allowedBuildingTypeID"), Enum.BuildingGroup.class);
switch(this.contractID){
case 866: //banker
case 865: //siege engineer
case 899: //alchemist
this.allowedBuildings.add(Enum.BuildingGroup.TOL);
}
this.equipmentSet = rs.getInt("equipSetID");
this.inventorySet = rs.getInt("inventorySet");
+4
View File
@@ -914,4 +914,8 @@ public class ItemBase {
public void setAutoID(boolean autoID) {
this.autoID = autoID;
}
public boolean isVorg(){
return (this.name.contains("Vorgrim") || this.name.contains("Bellugh") || this.name.contains("Crimson Circle"));
}
}
+14 -16
View File
@@ -381,8 +381,22 @@ public class Mine extends AbstractGameObject {
}
public boolean validForMine(Resource r) {
//check expacs individually
switch(this.getObjectUUID()){
case 58:
case 59:
return (MineProduction.MAGIC.resources.containsKey(r.UUID) || r.UUID == Resource.BLOODSTONE.UUID);
case 60:
return (MineProduction.LUMBER.resources.containsKey(r.UUID) || r.UUID == Resource.WORMWOOD.UUID);
case 61:
return (MineProduction.GOLD.resources.containsKey(r.UUID) || r.UUID == Resource.GALVOR.UUID);
case 62:
return (MineProduction.ORE.resources.containsKey(r.UUID) || r.UUID == Resource.OBSIDIAN.UUID);
}
if (this.mineType == null)
return false;
return this.mineType.validForMine(r, this.isExpansion());
}
@@ -556,22 +570,6 @@ public class Mine extends AbstractGameObject {
}
//add base production on top;
totalModded += baseProduction;
//skip distance check for expansion.
if (this.isExpansion())
return (int) totalModded;
if (this.owningGuild.isEmptyGuild() == false) {
if (this.owningGuild.getOwnedCity() != null) {
float distanceSquared = this.owningGuild.getOwnedCity().getLoc().distanceSquared2D(mineBuilding.getLoc());
if (distanceSquared > sqr(10000 * 3))
totalModded *= .25f;
else if (distanceSquared > sqr(10000 * 2))
totalModded *= .50f;
else if (distanceSquared > sqr(10000))
totalModded *= .75f;
}
}
return (int) totalModded;
}
+59 -2
View File
@@ -41,6 +41,7 @@ import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedHashMap;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ThreadLocalRandom;
import java.util.concurrent.locks.ReentrantReadWriteLock;
import static engine.math.FastMath.acos;
@@ -848,8 +849,7 @@ public class Mob extends AbstractIntelligenceAgent {
owner.getSiegeMinionMap().put(mob, slot);
mob.setNpcOwner(owner);
mob.BehaviourType = MobBehaviourType.Pet1;
mob.BehaviourType.canRoam = false;
mob.BehaviourType = MobBehaviourType.Siege;
return mob;
}
@@ -1242,6 +1242,58 @@ public class Mob extends AbstractIntelligenceAgent {
}
}
killCleanup();
if (attacker.getObjectType() == GameObjectType.PlayerCharacter) {
autoLoot((PlayerCharacter)attacker, this);
}
for(MobEquipment equip : this.equip.values()){
if(equip.getItemBase().getName().contains("vorg") || equip.getItemBase().getName().contains("crimson circle") || equip.getItemBase().getName().contains("bellugh")){
if(equip.getDropChance() > 0){
this.spawnTime = ThreadLocalRandom.current().nextInt(600,2700);
}
}
}
}
public static void autoLoot(PlayerCharacter pc, Mob mob){
for (Item loot : mob.charItemManager.getInventory(true)) {
try {
if (loot != null && loot.getObjectType() == GameObjectType.MobLoot) {
if (loot.getItemBaseID() == 7) {
if (GroupManager.getGroup(pc) != null && GroupManager.getGroup(pc).getSplitGold()) {
GroupManager.goldSplit(pc, loot, pc.getClientConnection(), mob);
} else {
if (mob.charItemManager.getGoldInventory().getNumOfItems() > 0) {
if (pc.charItemManager.getGoldInventory().getNumOfItems() + loot.getNumOfItems() <= MBServerStatics.PLAYER_GOLD_LIMIT) {
pc.charItemManager.addGoldToInventory(loot.getNumOfItems(), false);
mob.charItemManager.delete(loot);
}
}
}
} else {
if (pc.charItemManager.hasRoomInventory(loot.getItemBase().getWeight())) {
Item convert = ((MobLoot) loot).promoteToItem(pc);
if (convert != null) {
pc.charItemManager.addItemToInventory(convert);
if (GroupManager.getGroup(pc) != null && GroupManager.getGroup(pc).getSplitGold()) {
String name = loot.getName();
String text = pc.getFirstName() + " has looted " + name + '.';
ChatManager.chatGroupInfoCanSee(pc, text);
}
mob.charItemManager.delete(loot);
}
}
}
}
}catch(Exception ignored){
}
}
pc.charItemManager.updateInventory();
mob.charItemManager.updateInventory();
//if(mob.charItemManager.getInventory().size() < 1)
// mob.despawn();
}
public void updateLocation() {
@@ -1457,6 +1509,11 @@ public class Mob extends AbstractIntelligenceAgent {
try {
calculateAtrDefenseDamage();
if(this.BehaviourType.equals(MobBehaviourType.GuardWallArcher)){
this.atrHandOne = 0;
this.atrHandTwo = this.getRank() * 250;
this.defenseRating = this.getRank() * 200;
}
} catch (Exception e) {
Logger.error(this.getMobBaseID() + " /" + e.getMessage());
}
+4
View File
@@ -1061,6 +1061,10 @@ public class NPC extends AbstractCharacter {
break;
}
ItemBase itemBase;
if (this.contract.getVendorID() == 104) { // bowyer
fullItemList.add(7000514); //Shadow Bow
fullItemList.add(7000515); //Beastman's Bow
}
for (Integer itemID : fullItemList) {
itemBase = ItemBase.getItemBase(itemID);
boolean exclude = itemBase.getPercentRequired() == 0 && itemBase.getType() == ItemType.WEAPON;
+6 -3
View File
@@ -32,9 +32,12 @@ public class Runegate {
// Chaos, Khar and Oblivion are on by default
_portals[Enum.PortalType.CHAOS.ordinal()].activate(false);
_portals[Enum.PortalType.OBLIV.ordinal()].activate(false);
_portals[Enum.PortalType.MERCHANT.ordinal()].activate(false);
//_portals[Enum.PortalType.CHAOS.ordinal()].activate(false);
//_portals[Enum.PortalType.OBLIV.ordinal()].activate(false);
//_portals[Enum.PortalType.MERCHANT.ordinal()].activate(false);
for(Portal portal : _portals){
portal.activate(false);
}
}
+2 -2
View File
@@ -33,11 +33,11 @@ public class MBServerStatics {
// hit box
// calcs
public static final boolean PRINT_INCOMING_OPCODES = false; // print
public static final int BANK_GOLD_LIMIT = 25000000;
public static final int BANK_GOLD_LIMIT = 50000000;
// incoming
// opcodes to
// console
public static final int PLAYER_GOLD_LIMIT = 10000000;
public static final int PLAYER_GOLD_LIMIT = 20000000;
// buildings, npcs
/*
* Login cache flags