Update to latest version 1.2 for Wurm Unlimited 1.8
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
apply plugin: 'java'
|
apply plugin: 'java'
|
||||||
|
|
||||||
group "mod.sin"
|
group "mod.sin"
|
||||||
version "1.1"
|
version "1.2"
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
@@ -11,7 +11,7 @@ repositories {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compile 'org.gotti.wurmunlimited:server-modlauncher:0.37'
|
compile 'org.gotti.wurmunlimited:server-modlauncher:0.39-beta1'
|
||||||
compile 'com.github.Sindusk:sindusklibrary:v1.7'
|
compile 'com.github.Sindusk:sindusklibrary:v1.7'
|
||||||
compile 'com.github.Sindusk:DiscordRelay:v1.2'
|
compile 'com.github.Sindusk:DiscordRelay:v1.2'
|
||||||
compile 'com.github.Sindusk:DUSKombat:v1.0'
|
compile 'com.github.Sindusk:DUSKombat:v1.0'
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package mod.sin.creatures;
|
|||||||
|
|
||||||
import com.wurmonline.server.bodys.BodyTemplate;
|
import com.wurmonline.server.bodys.BodyTemplate;
|
||||||
import com.wurmonline.server.bodys.Wound;
|
import com.wurmonline.server.bodys.Wound;
|
||||||
|
import com.wurmonline.server.combat.ArmourTemplate;
|
||||||
import com.wurmonline.server.combat.ArmourTypes;
|
import com.wurmonline.server.combat.ArmourTypes;
|
||||||
import com.wurmonline.server.items.Materials;
|
import com.wurmonline.server.items.Materials;
|
||||||
import com.wurmonline.server.skills.SkillList;
|
import com.wurmonline.server.skills.SkillList;
|
||||||
@@ -30,25 +31,25 @@ public class Reaper implements ModCreature, CreatureTypes {
|
|||||||
"The reaper, here to claim the souls of the living.", "model.creature.gmdark",
|
"The reaper, here to claim the souls of the living.", "model.creature.gmdark",
|
||||||
types, BodyTemplate.TYPE_HUMAN, (short) 20, (byte) 0, (short) 350, (short) 100, (short) 60, "sound.death.dragon",
|
types, BodyTemplate.TYPE_HUMAN, (short) 20, (byte) 0, (short) 350, (short) 100, (short) 60, "sound.death.dragon",
|
||||||
"sound.death.dragon", "sound.combat.hit.dragon", "sound.combat.hit.dragon",
|
"sound.death.dragon", "sound.combat.hit.dragon", "sound.combat.hit.dragon",
|
||||||
0.10f, 35.0f, 45.0f, 22.0f, 40.0f, 0.0f, 1.0f, 500,
|
0.09f, 37.0f, 48.0f, 25.0f, 45.0f, 0.0f, 1.0f, 500,
|
||||||
new int[]{}, 20, 70, Materials.MATERIAL_MEAT_HUMANOID);
|
new int[]{}, 20, 70, Materials.MATERIAL_MEAT_HUMANOID);
|
||||||
|
|
||||||
builder.skill(SkillList.BODY_STRENGTH, 60.0f);
|
builder.skill(SkillList.BODY_STRENGTH, 70.0f);
|
||||||
builder.skill(SkillList.BODY_STAMINA, 70.0f);
|
builder.skill(SkillList.BODY_STAMINA, 70.0f);
|
||||||
builder.skill(SkillList.BODY_CONTROL, 60.0f);
|
builder.skill(SkillList.BODY_CONTROL, 60.0f);
|
||||||
builder.skill(SkillList.MIND_LOGICAL, 35.0f);
|
builder.skill(SkillList.MIND_LOGICAL, 35.0f);
|
||||||
builder.skill(SkillList.MIND_SPEED, 45.0f);
|
builder.skill(SkillList.MIND_SPEED, 45.0f);
|
||||||
builder.skill(SkillList.SOUL_STRENGTH, 80.0f);
|
builder.skill(SkillList.SOUL_STRENGTH, 80.0f);
|
||||||
builder.skill(SkillList.SOUL_DEPTH, 80.0f);
|
builder.skill(SkillList.SOUL_DEPTH, 80.0f);
|
||||||
builder.skill(SkillList.WEAPONLESS_FIGHTING, 80.0f);
|
builder.skill(SkillList.WEAPONLESS_FIGHTING, 85.0f);
|
||||||
builder.skill(SkillList.GROUP_FIGHTING, 80.0f);
|
builder.skill(SkillList.GROUP_FIGHTING, 85.0f);
|
||||||
|
|
||||||
builder.boundsValues(-0.5f, -1.0f, 0.5f, 1.42f);
|
builder.boundsValues(-0.5f, -1.0f, 0.5f, 1.42f);
|
||||||
builder.handDamString("slice");
|
builder.handDamString("slice");
|
||||||
builder.kickDamString("reap");
|
builder.kickDamString("reap");
|
||||||
builder.maxAge(200);
|
builder.maxAge(200);
|
||||||
builder.armourType(ArmourTypes.ARMOUR_SCALE_DRAGON);
|
builder.armourType(ArmourTemplate.ARMOUR_TYPE_LEATHER_DRAGON);
|
||||||
builder.baseCombatRating(55.0f);
|
builder.baseCombatRating(58.0f);
|
||||||
builder.combatDamageType(Wound.TYPE_PIERCE);
|
builder.combatDamageType(Wound.TYPE_PIERCE);
|
||||||
builder.maxGroupAttackSize(100);
|
builder.maxGroupAttackSize(100);
|
||||||
|
|
||||||
|
|||||||
@@ -20,10 +20,9 @@ public class AffinityOrb implements ItemTypes, MiscConstants {
|
|||||||
itemBuilder.name(name, "affinity orbs", "A valuable orb that infuses the user with hidden knowledge.");
|
itemBuilder.name(name, "affinity orbs", "A valuable orb that infuses the user with hidden knowledge.");
|
||||||
itemBuilder.descriptions("brilliantly glowing", "strongly glowing", "faintly glowing", "barely glowing");
|
itemBuilder.descriptions("brilliantly glowing", "strongly glowing", "faintly glowing", "barely glowing");
|
||||||
itemBuilder.itemTypes(new short[]{
|
itemBuilder.itemTypes(new short[]{
|
||||||
ItemTypes.ITEM_TYPE_MAGIC,
|
ItemTypes.ITEM_TYPE_NODROP,
|
||||||
ItemTypes.ITEM_TYPE_FULLPRICE,
|
ItemTypes.ITEM_TYPE_FULLPRICE,
|
||||||
ItemTypes.ITEM_TYPE_NOSELLBACK,
|
ItemTypes.ITEM_TYPE_NOSELLBACK
|
||||||
ItemTypes.ITEM_TYPE_ALWAYS_BANKABLE
|
|
||||||
});
|
});
|
||||||
itemBuilder.imageNumber((short) 919);
|
itemBuilder.imageNumber((short) 919);
|
||||||
itemBuilder.behaviourType((short) 1);
|
itemBuilder.behaviourType((short) 1);
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ public class EternalOrb implements ItemTypes, MiscConstants {
|
|||||||
itemBuilder.difficulty(5.0f);
|
itemBuilder.difficulty(5.0f);
|
||||||
itemBuilder.weightGrams(500);
|
itemBuilder.weightGrams(500);
|
||||||
itemBuilder.material(Materials.MATERIAL_CRYSTAL);
|
itemBuilder.material(Materials.MATERIAL_CRYSTAL);
|
||||||
itemBuilder.value(200000);
|
itemBuilder.value(100000);
|
||||||
itemBuilder.isTraded(true);
|
itemBuilder.isTraded(true);
|
||||||
|
|
||||||
ItemTemplate template = itemBuilder.build();
|
ItemTemplate template = itemBuilder.build();
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ public class EternalReservoir implements ItemTypes, MiscConstants {
|
|||||||
ItemTypes.ITEM_TYPE_NOTAKE,
|
ItemTypes.ITEM_TYPE_NOTAKE,
|
||||||
ItemTypes.ITEM_TYPE_DECORATION,
|
ItemTypes.ITEM_TYPE_DECORATION,
|
||||||
ItemTypes.ITEM_TYPE_USE_GROUND_ONLY,
|
ItemTypes.ITEM_TYPE_USE_GROUND_ONLY,
|
||||||
|
ItemTypes.ITEM_TYPE_HASDATA,
|
||||||
ItemTypes.ITEM_TYPE_NEVER_SHOW_CREATION_WINDOW_OPTION,
|
ItemTypes.ITEM_TYPE_NEVER_SHOW_CREATION_WINDOW_OPTION,
|
||||||
ItemTypes.ITEM_TYPE_NOT_MISSION
|
ItemTypes.ITEM_TYPE_NOT_MISSION
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ public class BattleYoyo implements ItemTypes, MiscConstants {
|
|||||||
itemBuilder.behaviourType((short) 35);
|
itemBuilder.behaviourType((short) 35);
|
||||||
itemBuilder.combatDamage(35);
|
itemBuilder.combatDamage(35);
|
||||||
itemBuilder.decayTime(Long.MAX_VALUE);
|
itemBuilder.decayTime(Long.MAX_VALUE);
|
||||||
itemBuilder.dimensions(5, 10, 80);
|
itemBuilder.dimensions(5, 10, 20);
|
||||||
itemBuilder.primarySkill(SkillList.YOYO);
|
itemBuilder.primarySkill(SkillList.YOYO);
|
||||||
itemBuilder.bodySpaces(MiscConstants.EMPTY_BYTE_PRIMITIVE_ARRAY);
|
itemBuilder.bodySpaces(MiscConstants.EMPTY_BYTE_PRIMITIVE_ARRAY);
|
||||||
itemBuilder.modelName("model.toy.yoyo.");
|
itemBuilder.modelName("model.toy.yoyo.");
|
||||||
|
|||||||
@@ -84,6 +84,9 @@ public class Arena {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void sendHotaMessage(String message){
|
public static void sendHotaMessage(String message){
|
||||||
|
if (SupplyDepots.host != null) {
|
||||||
|
MiscChanges.sendGlobalFreedomChat(SupplyDepots.host, message, 200, 200, 200);
|
||||||
|
}
|
||||||
DiscordRelay.sendToDiscord("arena", message, true);
|
DiscordRelay.sendToDiscord("arena", message, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -114,18 +117,9 @@ public class Arena {
|
|||||||
}
|
}
|
||||||
statue.setAuxData((byte)winStreak);
|
statue.setAuxData((byte)winStreak);
|
||||||
}
|
}
|
||||||
int r = winStreak * 50 & 255;
|
int r = (winStreak + Server.rand.nextInt(5)) * 50 & 255;
|
||||||
int g = 0;
|
int g = (winStreak + Server.rand.nextInt(5)) * 80 & 255;
|
||||||
int b = 0;
|
int b = (winStreak + Server.rand.nextInt(5)) * 120 & 255;
|
||||||
if (winStreak > 5 && winStreak < 16) {
|
|
||||||
r = 0;
|
|
||||||
}
|
|
||||||
if (winStreak > 5 && winStreak < 20) {
|
|
||||||
g = winStreak * 50 & 255;
|
|
||||||
}
|
|
||||||
if (winStreak > 5 && winStreak < 30) {
|
|
||||||
b = winStreak * 50 & 255;
|
|
||||||
}
|
|
||||||
statue.setColor(WurmColor.createColor(r, g, b));
|
statue.setColor(WurmColor.createColor(r, g, b));
|
||||||
statue.getColor();
|
statue.getColor();
|
||||||
Zone z = Zones.getZone(statue.getTileX(), statue.getTileY(), true);
|
Zone z = Zones.getZone(statue.getTileX(), statue.getTileY(), true);
|
||||||
@@ -180,16 +174,16 @@ public class Arena {
|
|||||||
statue.insertItem(token, true);
|
statue.insertItem(token, true);
|
||||||
i--;
|
i--;
|
||||||
}
|
}
|
||||||
// Add 3-5 seryll lumps of medium ql
|
// Add 4-6 seryll lumps of medium ql
|
||||||
i = 3+Server.rand.nextInt(3); // 3-5 lumps
|
i = 4+Server.rand.nextInt(3); // 4-6 lumps
|
||||||
while(i > 0){
|
while(i > 0){
|
||||||
Item seryll = ItemFactory.createItem(ItemList.seryllBar, 40f+(60f*Server.rand.nextFloat()), null);
|
Item seryll = ItemFactory.createItem(ItemList.seryllBar, 40f+(60f*Server.rand.nextFloat()), null);
|
||||||
statue.insertItem(seryll, true);
|
statue.insertItem(seryll, true);
|
||||||
i--;
|
i--;
|
||||||
}
|
}
|
||||||
// Add 2-4 silver
|
// Add 3-6 silver
|
||||||
long iron = 20000; // 2 silver
|
long iron = 30000; // 3 silver
|
||||||
iron += Server.rand.nextInt(20000); // add up to 2 more silver
|
iron += Server.rand.nextInt(30000); // add up to 3 more silver
|
||||||
Item[] coins = Economy.getEconomy().getCoinsFor(iron);
|
Item[] coins = Economy.getEconomy().getCoinsFor(iron);
|
||||||
for(Item coin : coins){
|
for(Item coin : coins){
|
||||||
statue.insertItem(coin, true);
|
statue.insertItem(coin, true);
|
||||||
@@ -482,12 +476,6 @@ public class Arena {
|
|||||||
replace = "$_ = com.wurmonline.server.Servers.localServer.PVPSERVER && !lVehicle.isLocked();";
|
replace = "$_ = com.wurmonline.server.Servers.localServer.PVPSERVER && !lVehicle.isLocked();";
|
||||||
Util.instrumentDescribed(thisClass, ctCreature, "setVehicle", desc3, "isThisAChaosServer", replace);
|
Util.instrumentDescribed(thisClass, ctCreature, "setVehicle", desc3, "isThisAChaosServer", replace);
|
||||||
|
|
||||||
// - Allow managing animals on Arena - //
|
|
||||||
CtClass ctManageMenu = classPool.get("com.wurmonline.server.behaviours.ManageMenu");
|
|
||||||
replace = "$_ = false;";
|
|
||||||
Util.instrumentDeclared(thisClass, ctManageMenu, "getBehavioursFor", "isThisAPvpServer", replace);
|
|
||||||
Util.instrumentDeclared(thisClass, ctManageMenu, "action", "isThisAPvpServer", replace);
|
|
||||||
|
|
||||||
// - Multiply mine door bash damage by 3 on Arena - //
|
// - Multiply mine door bash damage by 3 on Arena - //
|
||||||
CtClass ctTerraforming = classPool.get("com.wurmonline.server.behaviours.Terraforming");
|
CtClass ctTerraforming = classPool.get("com.wurmonline.server.behaviours.Terraforming");
|
||||||
replace = "if(com.wurmonline.server.Servers.localServer.PVPSERVER){"
|
replace = "if(com.wurmonline.server.Servers.localServer.PVPSERVER){"
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import com.wurmonline.server.items.ItemSpellEffects;
|
|||||||
import com.wurmonline.server.items.NotOwnedException;
|
import com.wurmonline.server.items.NotOwnedException;
|
||||||
import com.wurmonline.server.skills.NoSuchSkillException;
|
import com.wurmonline.server.skills.NoSuchSkillException;
|
||||||
import com.wurmonline.server.skills.SkillList;
|
import com.wurmonline.server.skills.SkillList;
|
||||||
|
import com.wurmonline.server.spells.SpellEffect;
|
||||||
import com.wurmonline.shared.constants.Enchants;
|
import com.wurmonline.shared.constants.Enchants;
|
||||||
import mod.sin.items.ChaosCrystal;
|
import mod.sin.items.ChaosCrystal;
|
||||||
import mod.sin.items.EnchantersCrystal;
|
import mod.sin.items.EnchantersCrystal;
|
||||||
@@ -63,7 +64,18 @@ public class Crystals {
|
|||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
if(target.getSpellEffects() != null){
|
if(target.getSpellEffects() != null){
|
||||||
diff += target.getSpellEffects().getEffects().length*10;
|
for (SpellEffect eff : target.getSpellEffects().getEffects()){
|
||||||
|
// Double power-based penalty for BotD
|
||||||
|
if (eff.type == Enchants.BUFF_BLESSINGDARK){
|
||||||
|
diff += eff.getPower() * 0.1f;
|
||||||
|
}
|
||||||
|
if (eff.type != Enchants.BUFF_BLOODTHIRST) {
|
||||||
|
diff += eff.getPower() * 0.1f;
|
||||||
|
}else{
|
||||||
|
// Bloodthirst penalty (1 per 1000 power)
|
||||||
|
diff += eff.getPower() * 0.001f;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return diff;
|
return diff;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -92,6 +92,15 @@ public class EconomicChanges {
|
|||||||
replace = "$_ = "+EconomicChanges.class.getName()+".getNewVillageTiles(vill.getNumTiles());";
|
replace = "$_ = "+EconomicChanges.class.getName()+".getNewVillageTiles(vill.getNumTiles());";
|
||||||
Util.instrumentDeclared(thisClass, ctGuardPlan, "getMonthlyCost", "getNumTiles", replace);
|
Util.instrumentDeclared(thisClass, ctGuardPlan, "getMonthlyCost", "getNumTiles", replace);
|
||||||
|
|
||||||
|
Util.setReason("Disable upkeep on arena for now until a fix can be found.");
|
||||||
|
replace = "if(com.wurmonline.server.Servers.localServer.PVPSERVER){"
|
||||||
|
+ " $_ = false;"
|
||||||
|
+ "}else{" +
|
||||||
|
" $_ = $proceed($$);" +
|
||||||
|
"}";
|
||||||
|
//replace = "$_ = false;";
|
||||||
|
Util.instrumentDeclared(thisClass, ctGuardPlan, "getMonthlyCost", "isUpkeep", replace);
|
||||||
|
|
||||||
/*Util.setReason("Allow players to get a full deed refund.");
|
/*Util.setReason("Allow players to get a full deed refund.");
|
||||||
replace = "{ return "+EconomicChanges.class.getName()+".getNewDisbandMoney(this, this.getVillage()); }";
|
replace = "{ return "+EconomicChanges.class.getName()+".getNewDisbandMoney(this, this.getVillage()); }";
|
||||||
Util.setBodyDeclared(thisClass, ctGuardPlan, "getDisbandMoneyLeft", replace);*/
|
Util.setBodyDeclared(thisClass, ctGuardPlan, "getDisbandMoneyLeft", replace);*/
|
||||||
@@ -114,8 +123,8 @@ public class EconomicChanges {
|
|||||||
replace = "$1 = "+EconomicChanges.class.getName()+".getNewShopDiff($0, $1, $0.shopDiff);";
|
replace = "$1 = "+EconomicChanges.class.getName()+".getNewShopDiff($0, $1, $0.shopDiff);";
|
||||||
Util.insertBeforeDeclared(thisClass, ctTrade, "addShopDiff", replace);
|
Util.insertBeforeDeclared(thisClass, ctTrade, "addShopDiff", replace);
|
||||||
|
|
||||||
} catch ( NotFoundException | IllegalArgumentException | ClassCastException e) {
|
} catch ( NotFoundException | IllegalArgumentException | ClassCastException e) {
|
||||||
throw new HookException(e);
|
throw new HookException(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,10 +6,10 @@ import java.lang.reflect.Method;
|
|||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.LinkedList;
|
import java.util.LinkedList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
|
|
||||||
import com.wurmonline.server.Servers;
|
import com.wurmonline.server.Servers;
|
||||||
|
import com.wurmonline.server.combat.ArmourTemplate;
|
||||||
import mod.sin.items.caches.*;
|
import mod.sin.items.caches.*;
|
||||||
import org.gotti.wurmunlimited.modloader.ReflectionUtil;
|
import org.gotti.wurmunlimited.modloader.ReflectionUtil;
|
||||||
import org.gotti.wurmunlimited.modloader.classhooks.HookManager;
|
import org.gotti.wurmunlimited.modloader.classhooks.HookManager;
|
||||||
@@ -17,7 +17,6 @@ import org.gotti.wurmunlimited.modloader.classhooks.InvocationHandlerFactory;
|
|||||||
import org.gotti.wurmunlimited.modsupport.actions.ModActions;
|
import org.gotti.wurmunlimited.modsupport.actions.ModActions;
|
||||||
|
|
||||||
import com.wurmonline.server.behaviours.ActionEntry;
|
import com.wurmonline.server.behaviours.ActionEntry;
|
||||||
import com.wurmonline.server.combat.Armour;
|
|
||||||
import com.wurmonline.server.combat.Weapon;
|
import com.wurmonline.server.combat.Weapon;
|
||||||
import com.wurmonline.server.creatures.Creature;
|
import com.wurmonline.server.creatures.Creature;
|
||||||
import com.wurmonline.server.items.Item;
|
import com.wurmonline.server.items.Item;
|
||||||
@@ -116,7 +115,6 @@ public class ItemMod {
|
|||||||
CORPSE_DECORATION.createTemplate();
|
CORPSE_DECORATION.createTemplate();
|
||||||
DEPTH_DRILL.createTemplate();
|
DEPTH_DRILL.createTemplate();
|
||||||
DISINTEGRATION_ROD.createTemplate();
|
DISINTEGRATION_ROD.createTemplate();
|
||||||
//ELECTRUM_LUMP.createTemplate();
|
|
||||||
ENCHANT_ORB.createTemplate();
|
ENCHANT_ORB.createTemplate();
|
||||||
ETERNAL_ORB.createTemplate();
|
ETERNAL_ORB.createTemplate();
|
||||||
EVISCERATOR.createTemplate();
|
EVISCERATOR.createTemplate();
|
||||||
@@ -200,7 +198,6 @@ public class ItemMod {
|
|||||||
//COIN_DECORATION.initCreationEntry();
|
//COIN_DECORATION.initCreationEntry();
|
||||||
//CORPSE_DECORATION.initCreationEntry();
|
//CORPSE_DECORATION.initCreationEntry();
|
||||||
DEPTH_DRILL.initCreationEntry();
|
DEPTH_DRILL.initCreationEntry();
|
||||||
//ELECTRUM_LUMP.initCreationEntry();
|
|
||||||
EVISCERATOR.initCreationEntry();
|
EVISCERATOR.initCreationEntry();
|
||||||
KNUCKLES.initCreationEntry();
|
KNUCKLES.initCreationEntry();
|
||||||
MASS_STORAGE_UNIT.initCreationEntry();
|
MASS_STORAGE_UNIT.initCreationEntry();
|
||||||
@@ -227,47 +224,28 @@ public class ItemMod {
|
|||||||
GLIMMERSCALE_HOSE.initCreationEntry();
|
GLIMMERSCALE_HOSE.initCreationEntry();
|
||||||
GLIMMERSCALE_SLEEVE.initCreationEntry();
|
GLIMMERSCALE_SLEEVE.initCreationEntry();
|
||||||
GLIMMERSCALE_VEST.initCreationEntry();*/
|
GLIMMERSCALE_VEST.initCreationEntry();*/
|
||||||
|
|
||||||
// Allow sickle heads from steel & moon metals:
|
|
||||||
// [3/28/18] Disabled: Implemented in WU 1.6.
|
|
||||||
/*CreationEntryCreator.createSimpleEntry(SkillList.SMITHING_WEAPON_BLADES, ItemList.anvilLarge, ItemList.steelBar,
|
|
||||||
ItemList.sickleBlade, false, true, 0.0f, false, false, CreationCategories.BLADES);
|
|
||||||
CreationEntryCreator.createSimpleEntry(SkillList.SMITHING_WEAPON_BLADES, ItemList.anvilLarge, ItemList.adamantineBar,
|
|
||||||
ItemList.sickleBlade, false, true, 0.0f, false, false, CreationCategories.BLADES);
|
|
||||||
CreationEntryCreator.createSimpleEntry(SkillList.SMITHING_WEAPON_BLADES, ItemList.anvilLarge, ItemList.glimmerSteelBar,
|
|
||||||
ItemList.sickleBlade, false, true, 0.0f, false, false, CreationCategories.BLADES);
|
|
||||||
CreationEntryCreator.createSimpleEntry(SkillList.SMITHING_WEAPON_BLADES, ItemList.anvilLarge, ItemList.seryllBar,
|
|
||||||
ItemList.sickleBlade, false, true, 0.0f, false, false, CreationCategories.BLADES);
|
|
||||||
// Allow steel staff to be created from moon metals:
|
|
||||||
CreationEntryCreator.createSimpleEntry(SkillList.SMITHING_WEAPON_BLADES, ItemList.anvilLarge, ItemList.adamantineBar,
|
|
||||||
ItemList.staffSteel, false, true, 0.0f, false, false, CreationCategories.BLADES);
|
|
||||||
CreationEntryCreator.createSimpleEntry(SkillList.SMITHING_WEAPON_BLADES, ItemList.anvilLarge, ItemList.glimmerSteelBar,
|
|
||||||
ItemList.staffSteel, false, true, 0.0f, false, false, CreationCategories.BLADES);
|
|
||||||
CreationEntryCreator.createSimpleEntry(SkillList.SMITHING_WEAPON_BLADES, ItemList.anvilLarge, ItemList.seryllBar,
|
|
||||||
ItemList.staffSteel, false, true, 0.0f, false, false, CreationCategories.BLADES);*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void createCustomArmours(){
|
public static void createCustomArmours(){
|
||||||
try {
|
try {
|
||||||
logger.info("Beginning custom armour creation.");
|
logger.info("Beginning custom armour creation.");
|
||||||
Map<Integer, Armour> armours = ReflectionUtil.getPrivateField(null, ReflectionUtil.getField(Armour.class, "armours"));
|
|
||||||
|
|
||||||
armours.put(SpectralBoot.templateId, new Armour(SpectralBoot.templateId, 0.002f, 0.3f));
|
new ArmourTemplate(SpectralBoot.templateId, ArmourTemplate.ARMOUR_TYPE_LEATHER_DRAGON, 0.002f);
|
||||||
armours.put(SpectralCap.templateId, new Armour(SpectralCap.templateId, 0.003f, 0.3f));
|
new ArmourTemplate(SpectralCap.templateId, ArmourTemplate.ARMOUR_TYPE_LEATHER_DRAGON, 0.003f);
|
||||||
armours.put(SpectralGlove.templateId, new Armour(SpectralGlove.templateId, 0.002f, 0.3f));
|
new ArmourTemplate(SpectralGlove.templateId, ArmourTemplate.ARMOUR_TYPE_LEATHER_DRAGON, 0.002f);
|
||||||
armours.put(SpectralHose.templateId, new Armour(SpectralHose.templateId, 0.0075f, 0.3f));
|
new ArmourTemplate(SpectralHose.templateId, ArmourTemplate.ARMOUR_TYPE_LEATHER_DRAGON, 0.0075f);
|
||||||
armours.put(SpectralJacket.templateId, new Armour(SpectralJacket.templateId, 0.01f, 0.3f));
|
new ArmourTemplate(SpectralJacket.templateId, ArmourTemplate.ARMOUR_TYPE_LEATHER_DRAGON, 0.01f);
|
||||||
armours.put(SpectralSleeve.templateId, new Armour(SpectralSleeve.templateId, 0.004f, 0.3f));
|
new ArmourTemplate(SpectralSleeve.templateId, ArmourTemplate.ARMOUR_TYPE_LEATHER_DRAGON, 0.004f);
|
||||||
|
|
||||||
armours.put(GlimmerscaleBoot.templateId, new Armour(GlimmerscaleBoot.templateId, 0.002f, 0.15f));
|
new ArmourTemplate(GlimmerscaleBoot.templateId, ArmourTemplate.ARMOUR_TYPE_SCALE_DRAGON, 0.002f);
|
||||||
armours.put(GlimmerscaleGlove.templateId, new Armour(GlimmerscaleGlove.templateId, 0.001f, 0.15f));
|
new ArmourTemplate(GlimmerscaleGlove.templateId, ArmourTemplate.ARMOUR_TYPE_SCALE_DRAGON, 0.001f);
|
||||||
armours.put(GlimmerscaleHelmet.templateId, new Armour(GlimmerscaleHelmet.templateId, 0.008f, 0.15f));
|
new ArmourTemplate(GlimmerscaleHelmet.templateId, ArmourTemplate.ARMOUR_TYPE_SCALE_DRAGON, 0.008f);
|
||||||
armours.put(GlimmerscaleHose.templateId, new Armour(GlimmerscaleHose.templateId, 0.05f, 0.15f));
|
new ArmourTemplate(GlimmerscaleHose.templateId, ArmourTemplate.ARMOUR_TYPE_SCALE_DRAGON, 0.05f);
|
||||||
armours.put(GlimmerscaleSleeve.templateId, new Armour(GlimmerscaleSleeve.templateId, 0.008f, 0.15f));
|
new ArmourTemplate(GlimmerscaleSleeve.templateId, ArmourTemplate.ARMOUR_TYPE_SCALE_DRAGON, 0.008f);
|
||||||
armours.put(GlimmerscaleVest.templateId, new Armour(GlimmerscaleVest.templateId, 0.05f, 0.15f));
|
new ArmourTemplate(GlimmerscaleVest.templateId, ArmourTemplate.ARMOUR_TYPE_SCALE_DRAGON, 0.05f);
|
||||||
|
|
||||||
//ReflectionUtil.setPrivateField(null, ReflectionUtil.getField(Armour.class, "armours"), armours);
|
//ReflectionUtil.setPrivateField(null, ReflectionUtil.getField(Armour.class, "armours"), armours);
|
||||||
} catch (IllegalArgumentException | IllegalAccessException | ClassCastException | NoSuchFieldException e) {
|
} catch (IllegalArgumentException | ClassCastException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -277,7 +255,7 @@ public class ItemMod {
|
|||||||
logger.info("Beginning custom weapon creation.");
|
logger.info("Beginning custom weapon creation.");
|
||||||
new Weapon(BattleYoyo.templateId, 6.85f, 3.85f, 0.008f, 2, 2, 0.0f, 0d);
|
new Weapon(BattleYoyo.templateId, 6.85f, 3.85f, 0.008f, 2, 2, 0.0f, 0d);
|
||||||
new Weapon(Club.templateId, 8.1f, 4.5f, 0.002f, 3, 3, 0.4f, 0.5d);
|
new Weapon(Club.templateId, 8.1f, 4.5f, 0.002f, 3, 3, 0.4f, 0.5d);
|
||||||
new Weapon(Knuckles.templateId, 3.6f, 2.2f, 0.002f, 1, 1, 0.2f, 0.5d);
|
new Weapon(Knuckles.templateId, 3.7f, 2.2f, 0.002f, 1, 1, 0.2f, 0.5d);
|
||||||
new Weapon(Warhammer.templateId, 9.40f, 5.6f, 0.008f, 4, 3, 1f, 0d);
|
new Weapon(Warhammer.templateId, 9.40f, 5.6f, 0.008f, 4, 3, 1f, 0d);
|
||||||
//new Weapon(ItemList.stoneChisel, 50f, 1f, 0.5f, 8, 1, 3f, -5f);
|
//new Weapon(ItemList.stoneChisel, 50f, 1f, 0.5f, 8, 1, 3f, -5f);
|
||||||
// Titan weaponry
|
// Titan weaponry
|
||||||
@@ -360,6 +338,10 @@ public class ItemMod {
|
|||||||
ReflectionUtil.setPrivateField(creatureCage, ReflectionUtil.getField(creatureCage.getClass(), "value"), 100000);
|
ReflectionUtil.setPrivateField(creatureCage, ReflectionUtil.getField(creatureCage.getClass(), "value"), 100000);
|
||||||
ReflectionUtil.setPrivateField(creatureCage, ReflectionUtil.getField(creatureCage.getClass(), "fullprice"), true);
|
ReflectionUtil.setPrivateField(creatureCage, ReflectionUtil.getField(creatureCage.getClass(), "fullprice"), true);
|
||||||
|
|
||||||
|
// Resurrection Stones to 2 silver instead of 5 silver.
|
||||||
|
ItemTemplate resurrectionStone = ItemTemplateFactory.getInstance().getTemplate(ItemList.resurrectionStone);
|
||||||
|
ReflectionUtil.setPrivateField(resurrectionStone, ReflectionUtil.getField(resurrectionStone.getClass(), "value"), 20000);
|
||||||
|
|
||||||
// Set transmutation rod to 2 gold instead of 50 silver.
|
// Set transmutation rod to 2 gold instead of 50 silver.
|
||||||
//ItemTemplate transmutationRod = ItemTemplateFactory.getInstance().getTemplate(668);
|
//ItemTemplate transmutationRod = ItemTemplateFactory.getInstance().getTemplate(668);
|
||||||
//ReflectionUtil.setPrivateField(transmutationRod, ReflectionUtil.getField(transmutationRod.getClass(), "value"), 2000000);
|
//ReflectionUtil.setPrivateField(transmutationRod, ReflectionUtil.getField(transmutationRod.getClass(), "value"), 2000000);
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ import com.wurmonline.server.items.SimpleCreationEntry;
|
|||||||
import com.wurmonline.server.players.Player;
|
import com.wurmonline.server.players.Player;
|
||||||
import com.wurmonline.server.players.PlayerInfo;
|
import com.wurmonline.server.players.PlayerInfo;
|
||||||
import com.wurmonline.server.players.PlayerInfoFactory;
|
import com.wurmonline.server.players.PlayerInfoFactory;
|
||||||
|
import com.wurmonline.server.players.Titles;
|
||||||
import com.wurmonline.server.skills.Skill;
|
import com.wurmonline.server.skills.Skill;
|
||||||
import com.wurmonline.server.skills.SkillList;
|
import com.wurmonline.server.skills.SkillList;
|
||||||
import com.wurmonline.server.villages.Village;
|
import com.wurmonline.server.villages.Village;
|
||||||
@@ -33,10 +34,7 @@ import org.nyxcode.wurm.discordrelay.DiscordRelay;
|
|||||||
import java.sql.Connection;
|
import java.sql.Connection;
|
||||||
import java.sql.PreparedStatement;
|
import java.sql.PreparedStatement;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
import java.util.HashMap;
|
import java.util.*;
|
||||||
import java.util.Map;
|
|
||||||
import java.util.Objects;
|
|
||||||
import java.util.Optional;
|
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
|
|
||||||
public class MiscChanges {
|
public class MiscChanges {
|
||||||
@@ -99,7 +97,9 @@ public class MiscChanges {
|
|||||||
}
|
}
|
||||||
catch (NoSuchCreatureException ignored) {}
|
catch (NoSuchCreatureException ignored) {}
|
||||||
}
|
}
|
||||||
Players.getInstance().broadCastDeathInfo(player, attackerString.toString());
|
if(!attackerString.toString().isEmpty()) {
|
||||||
|
Players.getInstance().broadCastDeathInfo(player, attackerString.toString());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void broadCastDeaths(Creature player, String slayers){
|
public static void broadCastDeaths(Creature player, String slayers){
|
||||||
@@ -296,6 +296,20 @@ public class MiscChanges {
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static Titles.Title[] cleanTitles(Titles.Title[] titles){
|
||||||
|
ArrayList<Titles.Title> arrTitles = new ArrayList<>();
|
||||||
|
for(Titles.Title title : titles){
|
||||||
|
logger.info("Checking title "+title);
|
||||||
|
if(title != null){
|
||||||
|
logger.info("Title "+title.getName()+" is valid.");
|
||||||
|
arrTitles.add(title);
|
||||||
|
}else{
|
||||||
|
logger.info("Title invalid. Discarding.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return arrTitles.toArray(new Titles.Title[0]);
|
||||||
|
}
|
||||||
|
|
||||||
public static void preInit(){
|
public static void preInit(){
|
||||||
try{
|
try{
|
||||||
ClassPool classPool = HookManager.getInstance().getClassPool();
|
ClassPool classPool = HookManager.getInstance().getClassPool();
|
||||||
@@ -311,7 +325,7 @@ public class MiscChanges {
|
|||||||
"Website/Maps: https://www.sarcasuals.com/",
|
"Website/Maps: https://www.sarcasuals.com/",
|
||||||
"Server Discord: https://discord.gg/r8QNXAC",
|
"Server Discord: https://discord.gg/r8QNXAC",
|
||||||
"Server Data: https://docs.google.com/spreadsheets/d/1yjqTHoxUan4LIldI3jgrXZgXj1M2ENQ4MXniPUz0rE4",
|
"Server Data: https://docs.google.com/spreadsheets/d/1yjqTHoxUan4LIldI3jgrXZgXj1M2ENQ4MXniPUz0rE4",
|
||||||
"Server Wiki/Documentation: https://docs.google.com/document/d/1GeaygilS-Z-d1TuGB7awOe9sJNV4o5BTZw_a2ATJy98"};
|
"Server Wiki/Documentation: https://docs.google.com/document/d/1cbPi7-vZnjaiYrENhaefzjK_Wz7_F1CcPYJtC6uCi98/edit?usp=sharing"};
|
||||||
StringBuilder str = new StringBuilder("{"
|
StringBuilder str = new StringBuilder("{"
|
||||||
+ " com.wurmonline.server.Message mess;");
|
+ " com.wurmonline.server.Message mess;");
|
||||||
for (String anInfoTabLine : infoTabLine) {
|
for (String anInfoTabLine : infoTabLine) {
|
||||||
@@ -659,13 +673,13 @@ public class MiscChanges {
|
|||||||
"$_ = $proceed($$);";
|
"$_ = $proceed($$);";
|
||||||
Util.instrumentDeclared(thisClass, ctPlayerInfo, "calculateSleep", "setSleep", replace);
|
Util.instrumentDeclared(thisClass, ctPlayerInfo, "calculateSleep", "setSleep", replace);
|
||||||
|
|
||||||
Util.setReason("Fix intrateleport block bug.");
|
/*Util.setReason("Fix intrateleport block bug.");
|
||||||
replace = "if($6.contains(\"blocked\")){" +
|
replace = "if($6.contains(\"blocked\")){" +
|
||||||
" logger.info(\"Detected a blocked movement, resetting position back to old.\");" +
|
" logger.info(\"Detected a blocked movement, resetting position back to old.\");" +
|
||||||
" $1 = $0.getMovementScheme().xOld;" +
|
" $1 = $0.getMovementScheme().xOld;" +
|
||||||
" $2 = $0.getMovementScheme().yOld;" +
|
" $2 = $0.getMovementScheme().yOld;" +
|
||||||
"}";
|
"}";
|
||||||
Util.insertBeforeDeclared(thisClass, ctCreature, "intraTeleport", replace);
|
Util.insertBeforeDeclared(thisClass, ctCreature, "intraTeleport", replace);*/
|
||||||
|
|
||||||
Util.setReason("Allow royal smith to improve smithing items faster.");
|
Util.setReason("Allow royal smith to improve smithing items faster.");
|
||||||
replace = "if("+MiscChanges.class.getName()+".royalSmithImprove($1, improve)){" +
|
replace = "if("+MiscChanges.class.getName()+".royalSmithImprove($1, improve)){" +
|
||||||
@@ -855,6 +869,17 @@ public class MiscChanges {
|
|||||||
"}";
|
"}";
|
||||||
Util.insertBeforeDescribed(thisClass, ctItemBehaviour, "action", desc14, replace);
|
Util.insertBeforeDescribed(thisClass, ctItemBehaviour, "action", desc14, replace);
|
||||||
|
|
||||||
|
/*Util.setReason("Fix title NPE from sorting.");
|
||||||
|
CtClass ctTitleCompoundQuestion = classPool.get("com.wurmonline.server.questions.TitleCompoundQuestion");
|
||||||
|
replace = "titles = "+MiscChanges.class.getName()+".cleanTitles(titles);" +
|
||||||
|
"int i = 0;" +
|
||||||
|
"while(i < titles.length){" +
|
||||||
|
" logger.info(\"Title: \"+titles[i]);" +
|
||||||
|
" i++;" +
|
||||||
|
"}" +
|
||||||
|
"$_ = $proceed($$);";
|
||||||
|
Util.instrumentDeclared(thisClass, ctTitleCompoundQuestion, "sendQuestion", "sort", replace);*/
|
||||||
|
|
||||||
} catch (CannotCompileException | NotFoundException | IllegalArgumentException | ClassCastException e) {
|
} catch (CannotCompileException | NotFoundException | IllegalArgumentException | ClassCastException e) {
|
||||||
throw new HookException(e);
|
throw new HookException(e);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ public class PlayerTitles {
|
|||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
public static void awardCustomTitles(Player p){
|
public static void awardCustomTitles(Player p){
|
||||||
|
/* Disabled until a fix for title implementations is done.
|
||||||
String name = p.getName();
|
String name = p.getName();
|
||||||
if(donatorTitles.contains(name)){
|
if(donatorTitles.contains(name)){
|
||||||
Titles.Title donator = Titles.Title.getTitle(800);
|
Titles.Title donator = Titles.Title.getTitle(800);
|
||||||
@@ -38,7 +39,7 @@ public class PlayerTitles {
|
|||||||
if(customTitles.containsKey(name)){
|
if(customTitles.containsKey(name)){
|
||||||
Titles.Title customTitle = Titles.Title.getTitle(customTitles.get(name));
|
Titles.Title customTitle = Titles.Title.getTitle(customTitles.get(name));
|
||||||
p.addTitle(customTitle);
|
p.addTitle(customTitle);
|
||||||
}
|
}*/
|
||||||
}
|
}
|
||||||
public static void preInit(){
|
public static void preInit(){
|
||||||
// Donations
|
// Donations
|
||||||
|
|||||||
@@ -223,7 +223,7 @@ public class SupplyDepots {
|
|||||||
}
|
}
|
||||||
public static void giveCacheReward(Creature performer){
|
public static void giveCacheReward(Creature performer){
|
||||||
Item inv = performer.getInventory();
|
Item inv = performer.getInventory();
|
||||||
Item enchantOrb = ItemUtil.createEnchantOrb(40f+(Math.min(Server.rand.nextFloat()*40f, Server.rand.nextFloat()*40f)));
|
Item enchantOrb = ItemUtil.createEnchantOrb(60f+(Math.min(Server.rand.nextFloat()*60f, Server.rand.nextFloat()*60f)));
|
||||||
if(enchantOrb != null) {
|
if(enchantOrb != null) {
|
||||||
inv.insertItem(enchantOrb);
|
inv.insertItem(enchantOrb);
|
||||||
}
|
}
|
||||||
@@ -232,16 +232,16 @@ public class SupplyDepots {
|
|||||||
int[] cacheIds = {
|
int[] cacheIds = {
|
||||||
ArmourCache.templateId,
|
ArmourCache.templateId,
|
||||||
ArtifactCache.templateId,
|
ArtifactCache.templateId,
|
||||||
CrystalCache.templateId, CrystalCache.templateId,
|
CrystalCache.templateId, CrystalCache.templateId, CrystalCache.templateId,
|
||||||
DragonCache.templateId, DragonCache.templateId,
|
DragonCache.templateId, DragonCache.templateId,
|
||||||
GemCache.templateId,
|
GemCache.templateId,
|
||||||
MoonCache.templateId, MoonCache.templateId,
|
MoonCache.templateId, MoonCache.templateId,
|
||||||
RiftCache.templateId,
|
RiftCache.templateId,
|
||||||
TreasureMapCache.templateId
|
TreasureMapCache.templateId
|
||||||
};
|
};
|
||||||
int i = 2+Server.rand.nextInt(2); // 2-3 caches.
|
int i = 3+Server.rand.nextInt(2); // 2-3 caches.
|
||||||
while(i > 0){
|
while(i > 0){
|
||||||
Item cache = ItemFactory.createItem(cacheIds[Server.rand.nextInt(cacheIds.length)], 20f+(60f*Server.rand.nextFloat()), "");
|
Item cache = ItemFactory.createItem(cacheIds[Server.rand.nextInt(cacheIds.length)], 40f+(50f*Server.rand.nextFloat()), "");
|
||||||
inv.insertItem(cache, true);
|
inv.insertItem(cache, true);
|
||||||
i--;
|
i--;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -144,7 +144,7 @@ implements WurmServerMod, Configurable, PreInitable, Initable, ItemTemplatesCrea
|
|||||||
Bloodlust.preInit();
|
Bloodlust.preInit();
|
||||||
AntiCheat.preInit();
|
AntiCheat.preInit();
|
||||||
Mastercraft.preInit();
|
Mastercraft.preInit();
|
||||||
Mastercraft.addNewTitles();
|
//Mastercraft.addNewTitles();
|
||||||
SupplyDepots.preInit();
|
SupplyDepots.preInit();
|
||||||
KeyEvent.preInit();
|
KeyEvent.preInit();
|
||||||
//GemAugmentation.preInit();
|
//GemAugmentation.preInit();
|
||||||
|
|||||||
@@ -525,6 +525,19 @@ public class MethodsBestiary {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static void setSkill(int templateId, int skillId, float value){
|
||||||
|
try{
|
||||||
|
CreatureTemplate template = CreatureTemplateFactory.getInstance().getTemplate(templateId);
|
||||||
|
if(template != null){
|
||||||
|
Skills skills = ReflectionUtil.getPrivateField(template, ReflectionUtil.getField(template.getClass(), "skills"));
|
||||||
|
skills.learnTemp(skillId, value);
|
||||||
|
ReflectionUtil.setPrivateField(template, ReflectionUtil.getField(template.getClass(), "skills"), skills);
|
||||||
|
}
|
||||||
|
} catch (NoSuchCreatureTemplateException | IllegalArgumentException | IllegalAccessException | ClassCastException | NoSuchFieldException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private static void setWorgFields(int templateId) {
|
private static void setWorgFields(int templateId) {
|
||||||
try {
|
try {
|
||||||
CreatureTemplate template = CreatureTemplateFactory.getInstance().getTemplate(templateId);
|
CreatureTemplate template = CreatureTemplateFactory.getInstance().getTemplate(templateId);
|
||||||
@@ -594,18 +607,18 @@ public class MethodsBestiary {
|
|||||||
setUniqueTypes(CreatureTemplate.CYCLOPS_CID);
|
setUniqueTypes(CreatureTemplate.CYCLOPS_CID);
|
||||||
|
|
||||||
// Dragon natural armour increases:
|
// Dragon natural armour increases:
|
||||||
setNaturalArmour(CreatureTemplate.DRAGON_BLUE_CID, 0.035f);
|
setNaturalArmour(CreatureTemplate.DRAGON_BLUE_CID, 0.025f);
|
||||||
setNaturalArmour(CreatureTemplate.DRAGON_WHITE_CID, 0.035f);
|
setNaturalArmour(CreatureTemplate.DRAGON_WHITE_CID, 0.025f);
|
||||||
setNaturalArmour(CreatureTemplate.DRAGON_BLACK_CID, 0.045f);
|
setNaturalArmour(CreatureTemplate.DRAGON_BLACK_CID, 0.035f);
|
||||||
setNaturalArmour(CreatureTemplate.DRAGON_WHITE_CID, 0.035f);
|
setNaturalArmour(CreatureTemplate.DRAGON_WHITE_CID, 0.025f);
|
||||||
// Drake natural armour increases:
|
// Drake natural armour increases:
|
||||||
setNaturalArmour(CreatureTemplate.DRAKE_RED_CID, 0.065f);
|
setNaturalArmour(CreatureTemplate.DRAKE_RED_CID, 0.055f);
|
||||||
setNaturalArmour(CreatureTemplate.DRAKE_BLUE_CID, 0.065f);
|
setNaturalArmour(CreatureTemplate.DRAKE_BLUE_CID, 0.055f);
|
||||||
setNaturalArmour(CreatureTemplate.DRAKE_WHITE_CID, 0.075f);
|
setNaturalArmour(CreatureTemplate.DRAKE_WHITE_CID, 0.065f);
|
||||||
setNaturalArmour(CreatureTemplate.DRAKE_GREEN_CID, 0.065f);
|
setNaturalArmour(CreatureTemplate.DRAKE_GREEN_CID, 0.055f);
|
||||||
setNaturalArmour(CreatureTemplate.DRAKE_BLACK_CID, 0.055f);
|
setNaturalArmour(CreatureTemplate.DRAKE_BLACK_CID, 0.045f);
|
||||||
// Goblin leader natural armour increase:
|
// Goblin leader natural armour increase:
|
||||||
setNaturalArmour(CreatureTemplate.GOBLIN_LEADER_CID, 0.055f);
|
setNaturalArmour(CreatureTemplate.GOBLIN_LEADER_CID, 0.045f);
|
||||||
|
|
||||||
// Worg armour reduction on Arena
|
// Worg armour reduction on Arena
|
||||||
if(Servers.localServer.PVPSERVER) {
|
if(Servers.localServer.PVPSERVER) {
|
||||||
@@ -630,6 +643,9 @@ public class MethodsBestiary {
|
|||||||
|
|
||||||
// Set worg fields
|
// Set worg fields
|
||||||
setWorgFields(CreatureTemplate.WORG_CID);
|
setWorgFields(CreatureTemplate.WORG_CID);
|
||||||
|
|
||||||
|
// Set skills for certain creatures
|
||||||
|
setSkill(CreatureTemplate.CYCLOPS_CID, SkillList.GROUP_FIGHTING, 80.0f);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected static void sendParticleEffect(Communicator comm, long creatureId, Creature creature, String particle, float duration){
|
protected static void sendParticleEffect(Communicator comm, long creatureId, Creature creature, String particle, float duration){
|
||||||
|
|||||||
@@ -1,12 +1,5 @@
|
|||||||
package mod.sin.wyvern.bounty;
|
package mod.sin.wyvern.bounty;
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.Random;
|
|
||||||
import java.util.logging.Logger;
|
|
||||||
|
|
||||||
import com.wurmonline.server.FailedException;
|
import com.wurmonline.server.FailedException;
|
||||||
import com.wurmonline.server.Server;
|
import com.wurmonline.server.Server;
|
||||||
import com.wurmonline.server.Servers;
|
import com.wurmonline.server.Servers;
|
||||||
@@ -17,9 +10,6 @@ import com.wurmonline.server.items.ItemFactory;
|
|||||||
import com.wurmonline.server.items.ItemTemplate;
|
import com.wurmonline.server.items.ItemTemplate;
|
||||||
import com.wurmonline.server.items.NoSuchTemplateException;
|
import com.wurmonline.server.items.NoSuchTemplateException;
|
||||||
import com.wurmonline.server.players.Player;
|
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.piddagoras.duskombat.DamageEngine;
|
import mod.piddagoras.duskombat.DamageEngine;
|
||||||
import mod.sin.armour.SpectralHide;
|
import mod.sin.armour.SpectralHide;
|
||||||
import mod.sin.creatures.Reaper;
|
import mod.sin.creatures.Reaper;
|
||||||
@@ -27,9 +17,19 @@ import mod.sin.creatures.SpectralDrake;
|
|||||||
import mod.sin.items.AffinityOrb;
|
import mod.sin.items.AffinityOrb;
|
||||||
import mod.sin.items.caches.RiftCache;
|
import mod.sin.items.caches.RiftCache;
|
||||||
import mod.sin.items.caches.TitanCache;
|
import mod.sin.items.caches.TitanCache;
|
||||||
import mod.sin.wyvern.*;
|
import mod.sin.wyvern.Bounty;
|
||||||
|
import mod.sin.wyvern.MiscChanges;
|
||||||
|
import mod.sin.wyvern.RareSpawns;
|
||||||
|
import mod.sin.wyvern.Titans;
|
||||||
import mod.sin.wyvern.util.ItemUtil;
|
import mod.sin.wyvern.util.ItemUtil;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Random;
|
||||||
|
import java.util.logging.Logger;
|
||||||
|
|
||||||
public class PlayerBounty {
|
public class PlayerBounty {
|
||||||
public static final Logger logger = Logger.getLogger(PlayerBounty.class.getName());
|
public static final Logger logger = Logger.getLogger(PlayerBounty.class.getName());
|
||||||
protected static final Random random = new Random();
|
protected static final Random random = new Random();
|
||||||
@@ -109,7 +109,7 @@ public class PlayerBounty {
|
|||||||
fightStrength = "legendary";
|
fightStrength = "legendary";
|
||||||
}
|
}
|
||||||
player.getCommunicator().sendSafeServerMessage("The spirit recognizes you as a "+fightStrength+" warrior, and rewards you accordingly.");
|
player.getCommunicator().sendSafeServerMessage("The spirit recognizes you as a "+fightStrength+" warrior, and rewards you accordingly.");
|
||||||
player.addTitle(Title.getTitle(701));
|
//player.addTitle(Title.getTitle(701));
|
||||||
}catch (NoSuchTemplateException | FailedException e) {
|
}catch (NoSuchTemplateException | FailedException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
@@ -148,7 +148,7 @@ public class PlayerBounty {
|
|||||||
player.getInventory().insertItem(riftCache, true);
|
player.getInventory().insertItem(riftCache, true);
|
||||||
}
|
}
|
||||||
if(Titans.isTitan(mob)){
|
if(Titans.isTitan(mob)){
|
||||||
player.addTitle(Title.getTitle(700));
|
//player.addTitle(Title.getTitle(700));
|
||||||
Item affinityOrb = ItemFactory.createItem(AffinityOrb.templateId, 99f, mob.getName());
|
Item affinityOrb = ItemFactory.createItem(AffinityOrb.templateId, 99f, mob.getName());
|
||||||
player.getInventory().insertItem(affinityOrb, true);
|
player.getInventory().insertItem(affinityOrb, true);
|
||||||
Item titanCache = ItemFactory.createItem(TitanCache.templateId, 99f, mob.getName());
|
Item titanCache = ItemFactory.createItem(TitanCache.templateId, 99f, mob.getName());
|
||||||
|
|||||||
@@ -72,9 +72,9 @@ public class Mastercraft {
|
|||||||
try {
|
try {
|
||||||
ExtendTitleEnum.builder("com.wurmonline.server.players.Titles$Title");
|
ExtendTitleEnum.builder("com.wurmonline.server.players.Titles$Title");
|
||||||
// GM/Developer Titles
|
// GM/Developer Titles
|
||||||
ExtendTitleEnum.getSingletonInstance().addExtendEntry("Game_Master", 500, "Game Master", "Game Master", -1, "NORMAL");
|
ExtendTitleEnum.getSingletonInstance().addExtendEntry("Game_Master", 2500, "Game Master", "Game Master", -1, "NORMAL");
|
||||||
ExtendTitleEnum.getSingletonInstance().addExtendEntry("Developer", 501, "Developer", "Developer", -1, "NORMAL");
|
ExtendTitleEnum.getSingletonInstance().addExtendEntry("Developer", 2501, "Developer", "Developer", -1, "NORMAL");
|
||||||
ExtendTitleEnum.getSingletonInstance().addExtendEntry("Pet_Me", 502, "Pet Me", "Pet Me", -1, "NORMAL");
|
ExtendTitleEnum.getSingletonInstance().addExtendEntry("Pet_Me", 2502, "Pet Me", "Pet Me", -1, "NORMAL");
|
||||||
|
|
||||||
// Troll Titles
|
// Troll Titles
|
||||||
ExtendTitleEnum.getSingletonInstance().addExtendEntry("Macro_King", 550, "Macro King", "Macro King", -1, "NORMAL");
|
ExtendTitleEnum.getSingletonInstance().addExtendEntry("Macro_King", 550, "Macro King", "Macro King", -1, "NORMAL");
|
||||||
@@ -114,70 +114,6 @@ public class Mastercraft {
|
|||||||
ExtendTitleEnum.getSingletonInstance().addExtendEntry("Piratemax_Slave", 810, "Slave", "Slave", -1, "NORMAL");
|
ExtendTitleEnum.getSingletonInstance().addExtendEntry("Piratemax_Slave", 810, "Slave", "Slave", -1, "NORMAL");
|
||||||
ExtendTitleEnum.getSingletonInstance().addExtendEntry("Eltacolad_TrueTaco", 811, "The One True Taco", "The One True Taco", -1, "NORMAL");
|
ExtendTitleEnum.getSingletonInstance().addExtendEntry("Eltacolad_TrueTaco", 811, "The One True Taco", "The One True Taco", -1, "NORMAL");
|
||||||
|
|
||||||
// Characteristic Titles
|
|
||||||
ExtendTitleEnum.getSingletonInstance().addExtendEntry("MindLogic_Normal", 1000, "Logical", "Logical", 100, "NORMAL");
|
|
||||||
ExtendTitleEnum.getSingletonInstance().addExtendEntry("MindLogic_Minor", 1001, "Intelligent", "Intelligent", 100, "MINOR");
|
|
||||||
ExtendTitleEnum.getSingletonInstance().addExtendEntry("MindLogic_Master", 1002, "Brilliant", "Brilliant", 100, "MASTER");
|
|
||||||
ExtendTitleEnum.getSingletonInstance().addExtendEntry("MindLogic_Legendary", 1003, "Mentalist", "Mentalist", 100, "LEGENDARY");
|
|
||||||
ExtendTitleEnum.getSingletonInstance().addExtendEntry("MindSpeed_Normal", 1004, "Keen", "Keen", 101, "NORMAL");
|
|
||||||
ExtendTitleEnum.getSingletonInstance().addExtendEntry("MindSpeed_Minor", 1005, "Thinker", "Thinker", 101, "MINOR");
|
|
||||||
ExtendTitleEnum.getSingletonInstance().addExtendEntry("MindSpeed_Master", 1006, "Clever", "Clever", 101, "MASTER");
|
|
||||||
ExtendTitleEnum.getSingletonInstance().addExtendEntry("MindSpeed_Legendary", 1007, "Mind Over Matter", "Mind Over Matter", 101, "LEGENDARY");
|
|
||||||
ExtendTitleEnum.getSingletonInstance().addExtendEntry("BodyStrength_Normal", 1008, "Strong", "Strong", 102, "NORMAL");
|
|
||||||
ExtendTitleEnum.getSingletonInstance().addExtendEntry("BodyStrength_Minor", 1009, "Fortified", "Fortified", 102, "MINOR");
|
|
||||||
ExtendTitleEnum.getSingletonInstance().addExtendEntry("BodyStrength_Master", 1010, "Unyielding", "Unyielding", 102, "MASTER");
|
|
||||||
ExtendTitleEnum.getSingletonInstance().addExtendEntry("BodyStrength_Legendary", 1011, "Force of Nature", "Force of Nature", 102, "LEGENDARY");
|
|
||||||
ExtendTitleEnum.getSingletonInstance().addExtendEntry("BodyStamina_Normal", 1012, "Enduring", "Enduring", 103, "NORMAL");
|
|
||||||
ExtendTitleEnum.getSingletonInstance().addExtendEntry("BodyStamina_Minor", 1013, "Resilient", "Resilient", 103, "MINOR");
|
|
||||||
ExtendTitleEnum.getSingletonInstance().addExtendEntry("BodyStamina_Master", 1014, "Vigorous", "Vigorous", 103, "MASTER");
|
|
||||||
ExtendTitleEnum.getSingletonInstance().addExtendEntry("BodyStamina_Legendary", 1015, "Unstoppable", "Unstoppable", 103, "LEGENDARY");
|
|
||||||
ExtendTitleEnum.getSingletonInstance().addExtendEntry("BodyControl_Normal", 1016, "Nimble", "Nimble", 104, "NORMAL");
|
|
||||||
ExtendTitleEnum.getSingletonInstance().addExtendEntry("BodyControl_Minor", 1017, "Deft", "Deft", 104, "MINOR");
|
|
||||||
ExtendTitleEnum.getSingletonInstance().addExtendEntry("BodyControl_Master", 1018, "Skillful", "Skillful", 104, "MASTER");
|
|
||||||
ExtendTitleEnum.getSingletonInstance().addExtendEntry("BodyControl_Legendary", 1019, "Manipulator", "Manipulator", 104, "LEGENDARY");
|
|
||||||
ExtendTitleEnum.getSingletonInstance().addExtendEntry("SoulStrength_Normal", 1020, "Spirited", "Spirited", 105, "NORMAL");
|
|
||||||
ExtendTitleEnum.getSingletonInstance().addExtendEntry("SoulStrength_Minor", 1021, "Diviner", "Diviner", 105, "MINOR");
|
|
||||||
ExtendTitleEnum.getSingletonInstance().addExtendEntry("SoulStrength_Master", 1022, "Anima", "Anima", 105, "MASTER");
|
|
||||||
ExtendTitleEnum.getSingletonInstance().addExtendEntry("SoulStrength_Legendary", 1023, "Prophet", "Prophet", 105, "LEGENDARY");
|
|
||||||
ExtendTitleEnum.getSingletonInstance().addExtendEntry("SoulDepth_Normal", 1024, "Sensible", "Sensible", 106, "NORMAL");
|
|
||||||
ExtendTitleEnum.getSingletonInstance().addExtendEntry("SoulDepth_Minor", 1025, "Medium", "Medium", 106, "MINOR");
|
|
||||||
ExtendTitleEnum.getSingletonInstance().addExtendEntry("SoulDepth_Master", 1026, "Spiritual", "Spiritual", 106, "MASTER");
|
|
||||||
ExtendTitleEnum.getSingletonInstance().addExtendEntry("SoulDepth_Legendary", 1027, "Planewalker", "Planewalker", 106, "LEGENDARY");
|
|
||||||
|
|
||||||
// Skill Titles (Full)
|
|
||||||
ExtendTitleEnum.getSingletonInstance().addExtendEntry("Staff_Normal", 1100, "Acolyte", "Acolyte", 10090, "NORMAL");
|
|
||||||
ExtendTitleEnum.getSingletonInstance().addExtendEntry("Staff_Minor", 1101, "Disciple", "Disciple", 10090, "MINOR");
|
|
||||||
ExtendTitleEnum.getSingletonInstance().addExtendEntry("Staff_Master", 1102, "Monk", "Monk", 10090, "MASTER");
|
|
||||||
ExtendTitleEnum.getSingletonInstance().addExtendEntry("Staff_Legendary", 1103, "Sensei", "Sensei", 10090, "LEGENDARY");
|
|
||||||
ExtendTitleEnum.getSingletonInstance().addExtendEntry("Scythe_Normal", 1104, "Mower", "Mower", 10047, "NORMAL");
|
|
||||||
ExtendTitleEnum.getSingletonInstance().addExtendEntry("Scythe_Minor", 1105, "Harvester", "Harvester", 10047, "MINOR");
|
|
||||||
ExtendTitleEnum.getSingletonInstance().addExtendEntry("Scythe_Master", 1106, "Scythian", "Scythian", 10047, "MASTER");
|
|
||||||
ExtendTitleEnum.getSingletonInstance().addExtendEntry("Scythe_Legendary", 1107, "Reaper", "Reaper", 10047, "LEGENDARY");
|
|
||||||
ExtendTitleEnum.getSingletonInstance().addExtendEntry("Defensive_Normal", 1108, "Resistant", "Resistant", 10054, "NORMAL");
|
|
||||||
ExtendTitleEnum.getSingletonInstance().addExtendEntry("Defensive_Minor", 1109, "Guardian", "Guardian", 10054, "MINOR");
|
|
||||||
ExtendTitleEnum.getSingletonInstance().addExtendEntry("Defensive_Master", 1110, "Bulwark", "Bulwark", 10054, "MASTER");
|
|
||||||
ExtendTitleEnum.getSingletonInstance().addExtendEntry("Defensive_Legendary", 1111, "Unbreakable", "Unbreakable", 10054, "LEGENDARY");
|
|
||||||
ExtendTitleEnum.getSingletonInstance().addExtendEntry("Aggressive_Normal", 1112, "Angry", "Angry", 10053, "NORMAL");
|
|
||||||
ExtendTitleEnum.getSingletonInstance().addExtendEntry("Aggressive_Minor", 1113, "Violent", "Violent", 10053, "MINOR");
|
|
||||||
ExtendTitleEnum.getSingletonInstance().addExtendEntry("Aggressive_Master", 1114, "Battleborn", "Battleborn", 10053, "MASTER");
|
|
||||||
ExtendTitleEnum.getSingletonInstance().addExtendEntry("Aggressive_Legendary", 1115, "Warmonger", "Warmonger", 10053, "LEGENDARY");
|
|
||||||
ExtendTitleEnum.getSingletonInstance().addExtendEntry("Normal_Normal", 1116, "Infantry", "Infantry", 10055, "NORMAL");
|
|
||||||
ExtendTitleEnum.getSingletonInstance().addExtendEntry("Normal_Minor", 1117, "Marauder", "Marauder", 10055, "MINOR");
|
|
||||||
ExtendTitleEnum.getSingletonInstance().addExtendEntry("Normal_Master", 1118, "Gladiator", "Gladiator", 10055, "MASTER");
|
|
||||||
ExtendTitleEnum.getSingletonInstance().addExtendEntry("Normal_Legendary", 1119, "Templar", "Templar", 10055, "LEGENDARY");
|
|
||||||
ExtendTitleEnum.getSingletonInstance().addExtendEntry("Weaponless_Normal", 1120, "Scrapper", "Scrapper", 10052, "NORMAL");
|
|
||||||
ExtendTitleEnum.getSingletonInstance().addExtendEntry("Weaponless_Minor", 1121, "Brawler", "Brawler", 10052, "MINOR");
|
|
||||||
ExtendTitleEnum.getSingletonInstance().addExtendEntry("Weaponless_Master", 1122, "Boxer", "Boxer", 10052, "MASTER");
|
|
||||||
ExtendTitleEnum.getSingletonInstance().addExtendEntry("Weaponless_Legendary", 1123, "Martial Artist", "Martial Artist", 10052, "LEGENDARY");
|
|
||||||
ExtendTitleEnum.getSingletonInstance().addExtendEntry("BladesSmithing_Normal", 1124, "Bladesmith", "Bladesmith", SkillList.SMITHING_WEAPON_BLADES, "NORMAL");
|
|
||||||
ExtendTitleEnum.getSingletonInstance().addExtendEntry("BladesSmithing_Minor", 1125, "Renowned Bladesmith", "Renowned Bladesmith", SkillList.SMITHING_WEAPON_BLADES, "MINOR");
|
|
||||||
ExtendTitleEnum.getSingletonInstance().addExtendEntry("BladesSmithing_Master", 1126, "Master Bladesmith", "Master Bladesmith", SkillList.SMITHING_WEAPON_BLADES, "MASTER");
|
|
||||||
ExtendTitleEnum.getSingletonInstance().addExtendEntry("BladesSmithing_Legendary", 1127, "Legendary Bladesmith", "Legendary Bladesmith", SkillList.SMITHING_WEAPON_BLADES, "LEGENDARY");
|
|
||||||
ExtendTitleEnum.getSingletonInstance().addExtendEntry("HeadSmithing_Normal", 1128, "Headsmither", "Headsmither", SkillList.SMITHING_WEAPON_HEADS, "NORMAL");
|
|
||||||
ExtendTitleEnum.getSingletonInstance().addExtendEntry("HeadSmithing_Minor", 1129, "Renowned Headsmither", "Renowned Headsmither", SkillList.SMITHING_WEAPON_HEADS, "MINOR");
|
|
||||||
ExtendTitleEnum.getSingletonInstance().addExtendEntry("HeadSmithing_Master", 1130, "Master Headsmither", "Master Headsmither", SkillList.SMITHING_WEAPON_HEADS, "MASTER");
|
|
||||||
ExtendTitleEnum.getSingletonInstance().addExtendEntry("HeadSmithing_Legendary", 1131, "Legendary Headsmither", "Legendary Headsmither", SkillList.SMITHING_WEAPON_HEADS, "LEGENDARY");
|
|
||||||
|
|
||||||
// Skill Titles (100)
|
// Skill Titles (100)
|
||||||
ExtendTitleEnum.getSingletonInstance().addExtendEntry("Archery_Legendary", 1500, "Legendary Marksman", "Legendary Marksman", 1030, "LEGENDARY");
|
ExtendTitleEnum.getSingletonInstance().addExtendEntry("Archery_Legendary", 1500, "Legendary Marksman", "Legendary Marksman", 1030, "LEGENDARY");
|
||||||
ExtendTitleEnum.getSingletonInstance().addExtendEntry("Body_Legendary", 1501, "Hercules", "Hercules", 1, "LEGENDARY");
|
ExtendTitleEnum.getSingletonInstance().addExtendEntry("Body_Legendary", 1501, "Hercules", "Hercules", 1, "LEGENDARY");
|
||||||
|
|||||||
Reference in New Issue
Block a user