From e3d4fd8aaaf35ed957c93bb8f562dad050a00d49 Mon Sep 17 00:00:00 2001 From: Ziggeh Date: Tue, 10 Dec 2013 00:07:39 +0100 Subject: [PATCH] Added Profession Master Badges --- scripts/collections/master_bounty_hunter_1a.py | 12 ++++++++++++ scripts/collections/master_commando_1a.py | 12 ++++++++++++ scripts/collections/master_entertainer_1a.py | 12 ++++++++++++ scripts/collections/master_force_sensitive_1a.py | 12 ++++++++++++ scripts/collections/master_medic_1a.py | 12 ++++++++++++ scripts/collections/master_officer_1a.py | 12 ++++++++++++ scripts/collections/master_smuggler_1a.py | 12 ++++++++++++ scripts/collections/master_spy_1a.py | 12 ++++++++++++ scripts/collections/master_trader_0a.py | 15 +++++++++++++++ scripts/collections/master_trader_0b.py | 14 ++++++++++++++ scripts/collections/master_trader_0c.py | 15 +++++++++++++++ scripts/collections/master_trader_0d.py | 14 ++++++++++++++ src/services/PlayerService.java | 3 ++- 13 files changed, 156 insertions(+), 1 deletion(-) create mode 100644 scripts/collections/master_bounty_hunter_1a.py create mode 100644 scripts/collections/master_commando_1a.py create mode 100644 scripts/collections/master_entertainer_1a.py create mode 100644 scripts/collections/master_force_sensitive_1a.py create mode 100644 scripts/collections/master_medic_1a.py create mode 100644 scripts/collections/master_officer_1a.py create mode 100644 scripts/collections/master_smuggler_1a.py create mode 100644 scripts/collections/master_spy_1a.py create mode 100644 scripts/collections/master_trader_0a.py create mode 100644 scripts/collections/master_trader_0b.py create mode 100644 scripts/collections/master_trader_0c.py create mode 100644 scripts/collections/master_trader_0d.py diff --git a/scripts/collections/master_bounty_hunter_1a.py b/scripts/collections/master_bounty_hunter_1a.py new file mode 100644 index 00000000..c81bc04a --- /dev/null +++ b/scripts/collections/master_bounty_hunter_1a.py @@ -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 \ No newline at end of file diff --git a/scripts/collections/master_commando_1a.py b/scripts/collections/master_commando_1a.py new file mode 100644 index 00000000..beb5e848 --- /dev/null +++ b/scripts/collections/master_commando_1a.py @@ -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 \ No newline at end of file diff --git a/scripts/collections/master_entertainer_1a.py b/scripts/collections/master_entertainer_1a.py new file mode 100644 index 00000000..e2dc3c3c --- /dev/null +++ b/scripts/collections/master_entertainer_1a.py @@ -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 \ No newline at end of file diff --git a/scripts/collections/master_force_sensitive_1a.py b/scripts/collections/master_force_sensitive_1a.py new file mode 100644 index 00000000..b2ae17a5 --- /dev/null +++ b/scripts/collections/master_force_sensitive_1a.py @@ -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 \ No newline at end of file diff --git a/scripts/collections/master_medic_1a.py b/scripts/collections/master_medic_1a.py new file mode 100644 index 00000000..d19ba11b --- /dev/null +++ b/scripts/collections/master_medic_1a.py @@ -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 \ No newline at end of file diff --git a/scripts/collections/master_officer_1a.py b/scripts/collections/master_officer_1a.py new file mode 100644 index 00000000..589869ae --- /dev/null +++ b/scripts/collections/master_officer_1a.py @@ -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 \ No newline at end of file diff --git a/scripts/collections/master_smuggler_1a.py b/scripts/collections/master_smuggler_1a.py new file mode 100644 index 00000000..f7d741f1 --- /dev/null +++ b/scripts/collections/master_smuggler_1a.py @@ -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 \ No newline at end of file diff --git a/scripts/collections/master_spy_1a.py b/scripts/collections/master_spy_1a.py new file mode 100644 index 00000000..1ff5be54 --- /dev/null +++ b/scripts/collections/master_spy_1a.py @@ -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 \ No newline at end of file diff --git a/scripts/collections/master_trader_0a.py b/scripts/collections/master_trader_0a.py new file mode 100644 index 00000000..bff48590 --- /dev/null +++ b/scripts/collections/master_trader_0a.py @@ -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 \ No newline at end of file diff --git a/scripts/collections/master_trader_0b.py b/scripts/collections/master_trader_0b.py new file mode 100644 index 00000000..55a1c3d3 --- /dev/null +++ b/scripts/collections/master_trader_0b.py @@ -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 \ No newline at end of file diff --git a/scripts/collections/master_trader_0c.py b/scripts/collections/master_trader_0c.py new file mode 100644 index 00000000..018141b4 --- /dev/null +++ b/scripts/collections/master_trader_0c.py @@ -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 \ No newline at end of file diff --git a/scripts/collections/master_trader_0d.py b/scripts/collections/master_trader_0d.py new file mode 100644 index 00000000..a9223ac6 --- /dev/null +++ b/scripts/collections/master_trader_0d.py @@ -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 \ No newline at end of file diff --git a/src/services/PlayerService.java b/src/services/PlayerService.java index 8a986c22..55d8d2ee 100644 --- a/src/services/PlayerService.java +++ b/src/services/PlayerService.java @@ -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) {