Merge pull request #123 from Ziggeh/master

Added profession badges and changed healing CD reduction to be done through scripts
This commit is contained in:
Treeku
2013-12-09 15:26:29 -08:00
23 changed files with 215 additions and 18 deletions
+10
View File
@@ -0,0 +1,10 @@
import sys
def setup(core, actor, buff):
core.skillModService.addSkillMod(actor, 'expertise_healing_all', 20)
return
def removeBuff(core, actor, buff):
core.skillModService.deductSkillMod(actor, 'expertise_healing_all', 20)
return
@@ -0,0 +1,12 @@
import sys
def setup():
return
def run():
return
def addMasterBadge(core, actor):
if actor.getLevel() == 90:
core.collectionService.addCollection(actor, "new_prof_bountyhunter_master")
return
+12
View File
@@ -0,0 +1,12 @@
import sys
def setup():
return
def run():
return
def addMasterBadge(core, actor):
if actor.getLevel() == 90:
core.collectionService.addCollection(actor, "new_prof_commando_master")
return
@@ -0,0 +1,12 @@
import sys
def setup():
return
def run():
return
def addMasterBadge(core, actor):
if actor.getLevel() == 90:
core.collectionService.addCollection(actor, "new_prof_social_entertainer_master")
return
@@ -0,0 +1,12 @@
import sys
def setup():
return
def run():
return
def addMasterBadge(core, actor):
if actor.getLevel() == 90:
core.collectionService.addCollection(actor, "new_prof_jedi_master")
return
+12
View File
@@ -0,0 +1,12 @@
import sys
def setup():
return
def run():
return
def addMasterBadge(core, actor):
if actor.getLevel() == 90:
core.collectionService.addCollection(actor, "new_prof_medic_master")
return
+12
View File
@@ -0,0 +1,12 @@
import sys
def setup():
return
def run():
return
def addMasterBadge(core, actor):
if actor.getLevel() == 90:
core.collectionService.addCollection(actor, "new_prof_officer_master")
return
+12
View File
@@ -0,0 +1,12 @@
import sys
def setup():
return
def run():
return
def addMasterBadge(core, actor):
if actor.getLevel() == 90:
core.collectionService.addCollection(actor, "new_prof_smuggler_master")
return
+12
View File
@@ -0,0 +1,12 @@
import sys
def setup():
return
def run():
return
def addMasterBadge(core, actor):
if actor.getLevel() == 90:
core.collectionService.addCollection(actor, "new_prof_spy_master")
return
+15
View File
@@ -0,0 +1,15 @@
import sys
def setup():
return
def run():
return
def addMasterBadge(core, actor):
if actor.getLevel() == 90:
core.collectionService.addCollection(actor, "new_prof_crafting_merchant_master")
core.collectionService.addCollection(actor, "new_prof_crafting_artisan_master")
core.collectionService.addCollection(actor, "new_prof_crafting_chef_master")
core.collectionService.addCollection(actor, "new_prof_crafting_tailor_master")
return
+14
View File
@@ -0,0 +1,14 @@
import sys
def setup():
return
def run():
return
def addMasterBadge(core, actor):
if actor.getLevel() == 90:
core.collectionService.addCollection(actor, "new_prof_crafting_merchant_master")
core.collectionService.addCollection(actor, "new_prof_crafting_artisan_master")
core.collectionService.addCollection(actor, "new_prof_crafting_architect_master")
return
+15
View File
@@ -0,0 +1,15 @@
import sys
def setup():
return
def run():
return
def addMasterBadge(core, actor):
if actor.getLevel() == 90:
core.collectionService.addCollection(actor, "new_prof_crafting_merchant_master")
core.collectionService.addCollection(actor, "new_prof_crafting_artisan_master")
core.collectionService.addCollection(actor, "new_prof_crafting_armorsmith_master")
core.collectionService.addCollection(actor, "new_prof_crafting_weaponsmith_master")
return
+14
View File
@@ -0,0 +1,14 @@
import sys
def setup():
return
def run():
return
def addMasterBadge(core, actor):
if actor.getLevel() == 90:
core.collectionService.addCollection(actor, "new_prof_crafting_merchant_master")
core.collectionService.addCollection(actor, "new_prof_crafting_artisan_master")
core.collectionService.addCollection(actor, "new_prof_crafting_droidengineer_master")
return
@@ -0,0 +1,9 @@
import sys
def setup():
return
def run(core, actor, target, commandString):
core.buffService.addBuffToCreature(actor, 'co_first_aid_training')
return
+8
View File
@@ -0,0 +1,8 @@
import sys
def setup(core, actor, target, command):
if actor.getSkillMod('expertise_cooldown_line_of_heal'):
command.setCooldown(command.getCooldown() - actor.getSkillMod('expertise_cooldown_line_of_heal').getBase())
return
def run(core, actor, target, commandString):
return
+8
View File
@@ -0,0 +1,8 @@
import sys
def setup(core, actor, target, command):
if actor.getSkillMod('expertise_cooldown_line_of_heal'):
command.setCooldown(command.getCooldown() - actor.getSkillMod('expertise_cooldown_line_of_heal').getBase())
return
def run(core, actor, target, commandString):
return
+8
View File
@@ -0,0 +1,8 @@
import sys
def setup(core, actor, target, command):
if actor.getSkillMod('expertise_cooldown_line_of_heal'):
command.setCooldown(command.getCooldown() - actor.getSkillMod('expertise_cooldown_line_of_heal').getBase())
return
def run(core, actor, target, commandString):
return
+10
View File
@@ -0,0 +1,10 @@
import sys
def setup(core, actor, target, command):
if actor.getSkillMod('expertise_cooldown_line_of_heal'):
command.setCooldown(command.getCooldown() - actor.getSkillMod('expertise_cooldown_line_of_heal').getBase())
return
def run(core, actor, target, commandString):
return
@@ -6,9 +6,7 @@ def setup():
def run(core, actor, target, commandString):
commandArgs = commandString.split("(^-,=+_)color_13548(,+-=_^)=1")
newString = commandArgs[0]
print (newString)
cmdService = core.commandService
cmdService.callCommand(actor, 'waypoint', None, newString) # No need to re-create a script
core.commandService.callCommand(actor, 'waypoint', None, newString)
return
-1
View File
@@ -74,7 +74,6 @@ def run(core, actor, target, commandString):
waypoint.setActive(True)
waypoint.setColor(WaypointObject.BLUE)
name = commandString.split(" ", 5)
print (name)
if name == "":
name = "Waypoint"
+2 -1
View File
@@ -338,6 +338,7 @@ public class PlayerService implements INetworkDispatch {
creature.playEffectObject("clienteffect/level_granted.cef", "");
creature.getClient().getSession().write((new ClientMfdStatusUpdateMessage((float) ((creature.getLevel() == 90) ? 90 : (creature.getLevel() + 1)), "/GroundHUD.MFDStatus.vsp.role.targetLevel")).serialize());
creature.setLevel(((Integer) experienceTable.getObject(i, 0)).shortValue());
core.scriptService.callScript("scripts/collections/", "addMasterBadge", "master_" + player.getProfession(), core, creature);
// 3. Add the relevant health/action and expertise points.
float luck = (((((float) (core.scriptService.getMethod("scripts/roadmap/", player.getProfession(), "getLuck").__call__().asInt()) + (core.scriptService.getMethod("scripts/roadmap/", creature.getStfName(), "getLuck").__call__().asInt())) / ((float) 90)) * ((float) creature.getLevel())) - ((float) creature.getSkillModBase("luck")));
@@ -470,7 +471,7 @@ public class PlayerService implements INetworkDispatch {
}
}
}
}
}
}
}
} catch (InstantiationException | IllegalAccessException e) {
+3 -1
View File
@@ -307,6 +307,7 @@ public class CombatCommands {
core.commandService.registerCommand("co_hw_dot");
core.commandService.registerCommand("co_ae_hw_dot");
core.commandService.registerCommand("co_position_secured");
core.commandService.registerCommand("co_first_aid_training");
// Entertainer
@@ -424,14 +425,15 @@ public class CombatCommands {
core.commandService.registerCombatCommand("me_traumatize_4");
core.commandService.registerCombatCommand("me_traumatize_5");
core.commandService.registerCombatCommand("me_stasis_1");
core.commandService.registerCommand("me_stasis_self_1");
core.commandService.registerCommand("me_drag_1");
core.commandService.registerCommand("me_enhance_action_1");
core.commandService.registerCommand("me_reckless_stimulation_1");
core.commandService.registerCommand("me_reckless_stimulation_2");
core.commandService.registerCommand("me_reckless_stimulation_3");
core.commandService.registerCommand("me_reckless_stimulation_4");
core.commandService.registerCommand("me_reckless_stimulation_5");
core.commandService.registerCommand("me_reckless_stimulation_6");
core.commandService.registerCommand("me_stasis_self_1");
// Officer
+1 -11
View File
@@ -404,22 +404,12 @@ public class CombatService implements INetworkDispatch {
}
private void sendHealPackets(CreatureObject attacker, CreatureObject target, WeaponObject weapon, CombatCommand command, int actionCounter) {
float cooldown = 0;
CombatAction combatAction = new CombatAction(CRC.StringtoCRC(command.getDefaultAnimations()[0]), attacker.getObjectID(), weapon.getObjectID(), target.getObjectID(), command.getCommandCRC());
ObjControllerMessage objController = new ObjControllerMessage(0x1B, combatAction);
attacker.notifyObserversInRange(objController, true, 125);
cooldown = command.getCooldown();
System.out.println(cooldown);
if(attacker.getSkillMod("expertise_cooldown_line_of_heal") != null)
cooldown -= attacker.getSkillMod("expertise_cooldown_line_of_heal").getBase();
if(attacker.getSkillMod("expertise_cooldown_line_sh") != null)
cooldown -= ((attacker.getSkillMod("expertise_cooldown_line_sh").getBase())/10);
StartTask startTask = new StartTask(actionCounter, attacker.getObjectID(), command.getCommandCRC(), CRC.StringtoCRC(command.getCooldownGroup()), cooldown);
StartTask startTask = new StartTask(actionCounter, attacker.getObjectID(), command.getCommandCRC(), CRC.StringtoCRC(command.getCooldownGroup()), command.getCooldown());
ObjControllerMessage objController2 = new ObjControllerMessage(0x0B, startTask);
attacker.getClient().getSession().write(objController2.serialize());