Merge pull request #950 from zingzing175/master

Rebel rank reward system
This commit is contained in:
Treeku
2014-06-29 15:15:07 +01:00
25 changed files with 1812 additions and 18 deletions
+7
View File
@@ -3,6 +3,8 @@ from engine.resources.scene import Point3D
from protocol.swg import ObjControllerMessage
from protocol.swg import UnknownAbilityPacket
from engine.resources.objects import SWGObject
from resources.datatables import GcwRank
from services.gcw import GCWService
def setup():
return
@@ -138,4 +140,9 @@ def run(core, actor, target, commandString):
actor.getClient().getSession().write(packet.serialize())
actor.sendSystemMessage('Sent UnknownAbilityPacket for ability ' + arg1, 0)
return
elif command == 'rank' and arg1:
playerObject.setCurrentRank(int(arg1))
print (playerObject.getCurrentRank())
return
return
+3 -8
View File
@@ -126,13 +126,8 @@ def handleFirstScreen(core, actor, npc, selection):
convSvc.sendConversationMessage(actor, npc, OutOfBand.ProsePackage("@conversation/faction_recruiter_rebel:s_332", percent, "TO", str(100 - percent)))
return
if selection == 2:
convSvc.sendConversationMessage(actor, npc, OutOfBand.ProsePackage('@conversation/faction_recruiter_rebel:s_76'))
options = Vector()
options.add(ConversationOption(OutOfBand.ProsePackage('@conversation/faction_recruiter_rebel:s_78'), 0))
options.add(ConversationOption(OutOfBand.ProsePackage('@conversation/faction_recruiter_rebel:s_360'), 1))
convSvc.sendConversationOptions(actor, npc, options, handleSecondScreen)
core.scriptService.callScript("scripts/", "gcw_rewards_rebel", "handleRebelItems1", core, actor, object, 0);
core.conversationService.sendStopConversation(actor, npc, 'conversation/faction_recruiter_rebel', 's_75')
return
return
elif actor.getFaction() == 'rebel' and actor.getFactionStatus() == FactionStatus.SpecialForces:
@@ -194,7 +189,7 @@ def handleSecondScreen(core, actor, npc, selection):
options = Vector()
options.add(ConversationOption(outOfBand.ProsePackage('@conversation/faction_recruiter_rebel:s_78'), 0))
options.add(ConversationOption(OutOfBand.ProsePackage('@conversation/faction_recruiter_rebel:s_360'), 1))
options.add(ConversationOption(OutOfBand.ProsePackage('@conversation/faction_recruiter_rebel:s_75'), 1))
convSvc.sendConversationOptions(actor, npc, options, handleThirdScreen)
return
File diff suppressed because it is too large Load Diff
@@ -1,4 +1,17 @@
import sys
def setup(core, object):
object.setAttachment('radial_filename', 'datapad/vehicle_pcd')
object.setIntAttribute('no_trade', 1)
object.setStringAttribute('faction_restriction', 'Rebel')
return
def use(core, actor, object):
if object and actor.getAttachment('activeVehicleID') == None:
barc = core.objectService.createObject('object/mobile/vehicle/shared_barc_speeder_rebel.iff', 0, actor.getPlanet(), actor.getPosition(), actor.getOrientation())
barc.setOwnerId(actor.getObjectID())
actor.setAttachment('activeVehicleID', barc.getObjectID())
core.simulationService.add(barc, barc.getPosition().x, barc.getPosition().z, True)
return
@@ -1,8 +1,16 @@
import sys
def setup(core, object):
object.setAttachment('radial_filename', 'creature/vehicle')
return
def use(core, actor, object):
core.buffService.addBuffToCreature(object, 'vehicle_pvp_barc_rebel', object)
vehicle = actor.getContainer()
if vehicle:
if vehicle.getObjectID() == object.getObjectID():
vehicle.remove(actor)
else:
vehicle.add(actor)
return
@@ -1,7 +1,6 @@
import sys
def setup(core, object):
print ('test')
object.setAttachment('CollectionItemName', 'blackfalcon_01')
object.setAttachment('radial_filename', 'item/world_collection')
return
@@ -1,24 +1,40 @@
import sys
def setup(core, object):
object.setAttachment('radial_filename', 'vehicleDeed')
object.setAttachment('radial_filename', 'deeds/vehicleDeed')
return
def use(core, actor, object):
datapad = actor.getSlottedObject('datapad')
pcd = core.objectService.createObject('object/intangible/vehicle/shared_barc_speeder_pcd.iff', actor.getPlanet(), actor.getPosition().x, actor.getPosition().z,actor.getPosition().y)
if object.getStfName() == ('barc_speeder'):
datapad = actor.getSlottedObject('datapad')
pcd = core.objectService.createObject('object/intangible/vehicle/shared_barc_speeder_pcd.iff', actor.getPlanet(), actor.getPosition().x, actor.getPosition().z,actor.getPosition().y)
if datapad and pcd:
if datapad and pcd:
datapad.add(pcd)
core.objectService.destroyObject(object)
datapad.add(pcd)
core.objectService.destroyObject(object)
vehicleId = actor.getAttachment('activeVehicleID')
vehicleId = actor.getAttachment('activeVehicleID')
if vehicleId == None:
vehicle = core.objectService.createObject('object/mobile/vehicle/shared_barc_speeder.iff', actor.getPlanet(), actor.getPosition().x, actor.getPosition().z,actor.getPosition().y)
vehicle.setOwnerId(actor.getObjectID())
core.simulationService.add(vehicle, vehicle.getPosition().x, vehicle.getPosition().z, True)
actor.setAttachment('activeVehicleID', vehicle.getObjectID())
elif object.getStfName() == ('item_deed_barc_rebel_06_01'):
datapad = actor.getSlottedObject('datapad')
pcd = core.objectService.createObject('object/intangible/vehicle/shared_barc_speeder_rebel_pcd.iff', actor.getPlanet(), actor.getPosition().x, actor.getPosition().z,actor.getPosition().y)
if datapad and pcd:
datapad.add(pcd)
core.objectService.destroyObject(object)
vehicleId = actor.getAttachment('activeVehicleID')
if vehicleId == None:
vehicle = core.objectService.createObject('object/mobile/vehicle/shared_barc_speeder_rebel.iff', actor.getPlanet(), actor.getPosition().x, actor.getPosition().z,actor.getPosition().y)
vehicle.setOwnerId(actor.getObjectID())
core.simulationService.add(vehicle, vehicle.getPosition().x, vehicle.getPosition().z, True)
actor.setAttachment('activeVehicleID', vehicle.getObjectID())
return
@@ -1,4 +1,10 @@
import sys
def setup(core, object):
object.setAttachment('radial_filename', 'object/usable')
return
def use(core, actor, object):
if object.getStfName() == ('item_consumable_detect_hidden_02_04'):
core.buffService.addBuffToCreature(actor, 'detectHiddenConsumable100', actor)
return
@@ -1,4 +1,14 @@
import sys
def setup(core, object):
object.setAttachment('radial_filename', 'object/usable')
return
def use(core, actor, object):
if object.getStfName() == ('item_consumable_detect_hidden_02_01'):
core.buffService.addBuffToCreature(actor, 'detectHiddenConsumable20', actor)
elif object.getStfName() == ('item_consumable_detect_hidden_02_02'):
core.buffService.addBuffToCreature(actor, 'detectHiddenConsumable40', actor)
elif object.getStfName() == ('item_consumable_detect_hidden_02_03'):
core.buffService.addBuffToCreature(actor, 'detectHiddenConsumable65', actor)
return
@@ -1,6 +1,10 @@
import sys
def setup(core, object):
object.setStfFilename('static_item_n')
object.setStfName('item_pvp_rebel_painting_03_01')
object.setDetailFilename('static_item_d')
object.setDetailName('item_pvp_rebel_painting_03_01')
return
#No name (Cruiser Escort)
#We Will Never Surrender
@@ -1,4 +1,19 @@
import sys
def setup(core, object):
object.setCustomizationVariable('/private/index_color_1', 44);
object.setCustomizationVariable('/private/index_color_2', 32);
object.setStfFilename('static_item_n')
object.setStfName('armor_pvp_spec_ops_rebel_black_grey_belt_05_01')
object.setDetailFilename('static_item_d')
object.setDetailName('armor_pvp_spec_ops_rebel_black_grey_belt_05_01')
object.setIntAttribute('no_trade')
object.setStringAttribute('faction_restriction', 'Rebel')
object.setStringAttribute('armor_category', '@obj_attr_n:armor_assault')
object.setIntAttribute('cat_armor_standard_protection.kinetic', 6608)
object.setIntAttribute('cat_armor_standard_protection.energy', 4608)
object.setIntAttribute('cat_armor_special_protection.special_protection_type_heat', 5608)
object.setIntAttribute('cat_armor_special_protection.special_protection_type_cold', 5608)
object.setIntAttribute('cat_armor_special_protection.special_protection_type_acid', 5608)
object.setIntAttribute('cat_armor_special_protection.special_protection_type_electricity', 5608)
return
@@ -1,4 +1,18 @@
import sys
def setup(core, object):
object.setCustomizationVariable('/private/index_color_1', 5);
object.setCustomizationVariable('/private/index_color_2', 0);
object.setStfFilename('static_item_n')
object.setStfName('armor_pvp_spec_ops_rebel_black_grey_bicep_l_05_01')
object.setDetailFilename('static_item_d')
object.setDetailName('armor_pvp_spec_ops_rebel_black_grey_bicep_l_05_01')
object.setStringAttribute('faction_restriction', 'Rebel')
object.setStringAttribute('armor_category', '@obj_attr_n:armor_assault')
object.setIntAttribute('cat_armor_standard_protection.kinetic', 6608)
object.setIntAttribute('cat_armor_standard_protection.energy', 4608)
object.setIntAttribute('cat_armor_special_protection.special_protection_type_heat', 5608)
object.setIntAttribute('cat_armor_special_protection.special_protection_type_cold', 5608)
object.setIntAttribute('cat_armor_special_protection.special_protection_type_acid', 5608)
object.setIntAttribute('cat_armor_special_protection.special_protection_type_electricity', 5608)
return
@@ -1,4 +1,18 @@
import sys
def setup(core, object):
object.setCustomizationVariable('/private/index_color_1', 5);
object.setCustomizationVariable('/private/index_color_2', 0);
object.setStfFilename('static_item_n')
object.setStfName('armor_pvp_spec_ops_rebel_black_grey_bicep_r_05_01')
object.setDetailFilename('static_item_d')
object.setDetailName('armor_pvp_spec_ops_rebel_black_grey_bicep_r_05_01')
object.setStringAttribute('faction_restriction', 'Rebel')
object.setStringAttribute('armor_category', '@obj_attr_n:armor_assault')
object.setIntAttribute('cat_armor_standard_protection.kinetic', 6608)
object.setIntAttribute('cat_armor_standard_protection.energy', 4608)
object.setIntAttribute('cat_armor_special_protection.special_protection_type_heat', 5608)
object.setIntAttribute('cat_armor_special_protection.special_protection_type_cold', 5608)
object.setIntAttribute('cat_armor_special_protection.special_protection_type_acid', 5608)
object.setIntAttribute('cat_armor_special_protection.special_protection_type_electricity', 5608)
return
@@ -1,4 +1,18 @@
import sys
def setup(core, object):
object.setCustomizationVariable('/private/index_color_1', 0);
object.setCustomizationVariable('/private/index_color_2', 5);
object.setStfFilename('static_item_n')
object.setStfName('armor_pvp_spec_ops_rebel_black_grey_boots_05_01')
object.setDetailFilename('static_item_d')
object.setDetailName('armor_pvp_spec_ops_rebel_black_grey_boots_05_01')
object.setStringAttribute('faction_restriction', 'Rebel')
object.setStringAttribute('armor_category', '@obj_attr_n:armor_assault')
object.setIntAttribute('cat_armor_standard_protection.kinetic', 6608)
object.setIntAttribute('cat_armor_standard_protection.energy', 4608)
object.setIntAttribute('cat_armor_special_protection.special_protection_type_heat', 5608)
object.setIntAttribute('cat_armor_special_protection.special_protection_type_cold', 5608)
object.setIntAttribute('cat_armor_special_protection.special_protection_type_acid', 5608)
object.setIntAttribute('cat_armor_special_protection.special_protection_type_electricity', 5608)
return
@@ -1,4 +1,18 @@
import sys
def setup(core, object):
object.setCustomizationVariable('/private/index_color_1', 5);
object.setCustomizationVariable('/private/index_color_2', 0);
object.setStfFilename('static_item_n')
object.setStfName('armor_pvp_spec_ops_rebel_black_grey_bracer_l_05_01')
object.setDetailFilename('static_item_d')
object.setDetailName('armor_pvp_spec_ops_rebel_black_grey_bracer_l_05_01')
object.setStringAttribute('faction_restriction', 'Rebel')
object.setStringAttribute('armor_category', '@obj_attr_n:armor_assault')
object.setIntAttribute('cat_armor_standard_protection.kinetic', 6608)
object.setIntAttribute('cat_armor_standard_protection.energy', 4608)
object.setIntAttribute('cat_armor_special_protection.special_protection_type_heat', 5608)
object.setIntAttribute('cat_armor_special_protection.special_protection_type_cold', 5608)
object.setIntAttribute('cat_armor_special_protection.special_protection_type_acid', 5608)
object.setIntAttribute('cat_armor_special_protection.special_protection_type_electricity', 5608)
return
@@ -1,4 +1,18 @@
import sys
def setup(core, object):
object.setCustomizationVariable('/private/index_color_1', 5);
object.setCustomizationVariable('/private/index_color_2', 0);
object.setStfFilename('static_item_n')
object.setStfName('armor_pvp_spec_ops_rebel_black_grey_bracer_r_05_01')
object.setDetailFilename('static_item_d')
object.setDetailName('armor_pvp_spec_ops_rebel_black_grey_bracer_r_05_01')
object.setStringAttribute('faction_restriction', 'Rebel')
object.setStringAttribute('armor_category', '@obj_attr_n:armor_assault')
object.setIntAttribute('cat_armor_standard_protection.kinetic', 6608)
object.setIntAttribute('cat_armor_standard_protection.energy', 4608)
object.setIntAttribute('cat_armor_special_protection.special_protection_type_heat', 5608)
object.setIntAttribute('cat_armor_special_protection.special_protection_type_cold', 5608)
object.setIntAttribute('cat_armor_special_protection.special_protection_type_acid', 5608)
object.setIntAttribute('cat_armor_special_protection.special_protection_type_electricity', 5608)
return
@@ -1,4 +1,18 @@
import sys
def setup(core, object):
object.setCustomizationVariable('/private/index_color_1', 5);
object.setCustomizationVariable('/private/index_color_2', 0);
object.setStfFilename('static_item_n')
object.setStfName('armor_pvp_spec_ops_rebel_black_grey_chest_plate_05_01')
object.setDetailFilename('static_item_d')
object.setDetailName('armor_pvp_spec_ops_rebel_black_grey_chest_plate_05_01')
object.setStringAttribute('faction_restriction', 'Rebel')
object.setStringAttribute('armor_category', '@obj_attr_n:armor_assault')
object.setIntAttribute('cat_armor_standard_protection.kinetic', 6608)
object.setIntAttribute('cat_armor_standard_protection.energy', 4608)
object.setIntAttribute('cat_armor_special_protection.special_protection_type_heat', 5608)
object.setIntAttribute('cat_armor_special_protection.special_protection_type_cold', 5608)
object.setIntAttribute('cat_armor_special_protection.special_protection_type_acid', 5608)
object.setIntAttribute('cat_armor_special_protection.special_protection_type_electricity', 5608)
return
@@ -1,4 +1,18 @@
import sys
def setup(core, object):
object.setCustomizationVariable('/private/index_color_1', 5);
object.setCustomizationVariable('/private/index_color_2', 0);
object.setStfFilename('static_item_n')
object.setStfName('armor_pvp_spec_ops_rebel_black_grey_gloves_05_01')
object.setDetailFilename('static_item_d')
object.setDetailName('armor_pvp_spec_ops_rebel_black_grey_gloves_05_01')
object.setStringAttribute('faction_restriction', 'Rebel')
object.setStringAttribute('armor_category', '@obj_attr_n:armor_assault')
object.setIntAttribute('cat_armor_standard_protection.kinetic', 6608)
object.setIntAttribute('cat_armor_standard_protection.energy', 4608)
object.setIntAttribute('cat_armor_special_protection.special_protection_type_heat', 5608)
object.setIntAttribute('cat_armor_special_protection.special_protection_type_cold', 5608)
object.setIntAttribute('cat_armor_special_protection.special_protection_type_acid', 5608)
object.setIntAttribute('cat_armor_special_protection.special_protection_type_electricity', 5608)
return
@@ -1,4 +1,18 @@
import sys
def setup(core, object):
object.setCustomizationVariable('/private/index_color_1', 5);
object.setCustomizationVariable('/private/index_color_2', 0);
object.setStfFilename('static_item_n')
object.setStfName('armor_pvp_spec_ops_rebel_black_grey_helmet_05_01')
object.setDetailFilename('static_item_d')
object.setDetailName('armor_pvp_spec_ops_rebel_black_grey_helmet_05_01')
object.setStringAttribute('faction_restriction', 'Rebel')
object.setStringAttribute('armor_category', '@obj_attr_n:armor_assault')
object.setIntAttribute('cat_armor_standard_protection.kinetic', 6608)
object.setIntAttribute('cat_armor_standard_protection.energy', 4608)
object.setIntAttribute('cat_armor_special_protection.special_protection_type_heat', 5608)
object.setIntAttribute('cat_armor_special_protection.special_protection_type_cold', 5608)
object.setIntAttribute('cat_armor_special_protection.special_protection_type_acid', 5608)
object.setIntAttribute('cat_armor_special_protection.special_protection_type_electricity', 5608)
return
@@ -1,4 +1,18 @@
import sys
def setup(core, object):
object.setCustomizationVariable('/private/index_color_1', 0);
object.setCustomizationVariable('/private/index_color_2', 5);
object.setStfFilename('static_item_n')
object.setStfName('armor_pvp_spec_ops_rebel_black_grey_leggings_05_01')
object.setDetailFilename('static_item_d')
object.setDetailName('armor_pvp_spec_ops_rebel_black_grey_leggings_05_01')
object.setStringAttribute('faction_restriction', 'Rebel')
object.setStringAttribute('armor_category', '@obj_attr_n:armor_assault')
object.setIntAttribute('cat_armor_standard_protection.kinetic', 6608)
object.setIntAttribute('cat_armor_standard_protection.energy', 4608)
object.setIntAttribute('cat_armor_special_protection.special_protection_type_heat', 5608)
object.setIntAttribute('cat_armor_special_protection.special_protection_type_cold', 5608)
object.setIntAttribute('cat_armor_special_protection.special_protection_type_acid', 5608)
object.setIntAttribute('cat_armor_special_protection.special_protection_type_electricity', 5608)
return
@@ -1,4 +1,22 @@
import sys
def setup(core, object):
object.setStringAttribute('tier', '6')
object.setIntAttribute('no_trade', 1)
object.setStfFilename('static_item_n')
object.setStfName('weapon_carbine_pvp_general_reward_06_01')
object.setDetailFilename('static_item_d')
object.setDetailName('weapon_carbine_pvp_general_reward_06_01')
object.setIntAttribute('cat_stat_mod_bonus.@stat_n:constitution_modified', 10)
object.setIntAttribute('cat_stat_mod_bonus.@stat_n:precision_modified', 10)
object.setStringAttribute('faction_restriction', 'Rebel')
object.setStringAttribute('required_skill', 'None')
object.setDamageType("energy");
object.setWeaponType(1);
object.setAttackSpeed(0.6);
object.setMinDamage(389);
object.setMaxDamage(780);
object.setStringAttribute('wpn_elemental_type', 'Cold')
object.setStringAttribute('wpn_elemental_value', '20')
object.setMaxRange(50);
return
@@ -1,4 +1,22 @@
import sys
def setup(core, object):
object.setStfFilename('static_item_n')
object.setStfName('weapon_heavy_pvp_general_reward_06_01')
object.setDetailFilename('static_item_d')
object.setDetailName('weapon_heavy_pvp_general_reward_06_01')
object.setStringAttribute('tier', '6')
object.setIntAttribute('no_trade', 1)
object.setIntAttribute('cat_stat_mod_bonus.@stat_n:constitution_modified', 10)
object.setIntAttribute('cat_stat_mod_bonus.@stat_n:precision_modified', 10)
object.setStringAttribute('healing_combat_level_required', '75')
object.setStringAttribute('required_skill', 'None')
object.setDamageType("energy");
object.setWeaponType(12);
object.setAttackSpeed(1);
object.setMinDamage(850);
object.setMaxDamage(1350);
object.setStringAttribute('wpn_elemental_type', 'Heat')
object.setStringAttribute('wpn_elemental_value', '50')
object.setMaxRange(64);
return
@@ -0,0 +1,16 @@
import sys
def exceptionalPistol(core, object, owner):
object = core.objectService.createObject('object/weapon/ranged/pistol/shared_pistol_dl44.iff', owner.getPlanet())
object.setStringAttribute('required_skill', 'None')
object.setStringAttribute('faction_restriction', 'Rebel')
object.setAttackSpeed(0.4);
object.setCustomName('Exceptional Rebel DL44 Pistol');
object.setMaxRange(35);
object.setDamageType("energy");
object.setMinDamage(275);
object.setMaxDamage(518);
object.setWeaponType(2);
inventory = owner.getSlottedObject('inventory')
inventory.add(object)
return
@@ -1,4 +1,22 @@
import sys
def setup(core, object):
object.setStfFilename('static_item_n')
object.setStfName('weapon_pistol_pvp_general_reward_06_01')
object.setDetailFilename('static_item_d')
object.setDetailName('weapon_pistol_pvp_general_reward_06_01')
object.setStringAttribute('tier', '6')
object.setIntAttribute('no_trade', 1)
object.setIntAttribute('cat_stat_mod_bonus.@stat_n:constitution_modified', 10)
object.setIntAttribute('cat_stat_mod_bonus.@stat_n:precision_modified', 10)
object.setStringAttribute('healing_combat_level_required', '75')
object.setStringAttribute('required_skill', 'None')
object.setDamageType("energy");
object.setWeaponType(2);
object.setAttackSpeed(0.4);
object.setMinDamage(259);
object.setMaxDamage(518);
object.setStringAttribute('wpn_elemental_type', 'Electricity')
object.setStringAttribute('wpn_elemental_value', '20')
object.setMaxRange(35);
return
@@ -1,4 +1,22 @@
import sys
def setup(core, object):
object.setStfFilename('static_item_n')
object.setStfName('weapon_rifle_pvp_general_reward_06_01')
object.setDetailFilename('static_item_d')
object.setDetailName('weapon_rifle_pvp_general_reward_06_01')
object.setStringAttribute('tier', '6')
object.setIntAttribute('no_trade', 1)
object.setIntAttribute('cat_stat_mod_bonus.@stat_n:constitution_modified', 10)
object.setIntAttribute('cat_stat_mod_bonus.@stat_n:precision_modified', 10)
object.setStringAttribute('healing_combat_level_required', '75')
object.setStringAttribute('required_skill', 'None')
object.setDamageType("energy");
object.setWeaponType(0);
object.setAttackSpeed(0.8);
object.setMinDamage(518);
object.setMaxDamage(1035);
object.setStringAttribute('wpn_elemental_type', 'Acid')
object.setStringAttribute('wpn_elemental_value', '20')
object.setMaxRange(64)
return