def addTemplate(core):
    mobileTemplate = MobileTemplate()

    mobileTemplate.setCreatureName("fbase_scout_trooper_extreme")
    mobileTemplate.setLevel(88)
    mobileTemplate.setDifficulty(Difficulty.ELITE)
    mobileTemplate.setMinSpawnDistance(4)
    mobileTemplate.setMaxSpawnDistance(8)
    mobileTemplate.setDeathblow(False)
    mobileTemplate.setScale(1)
    mobileTemplate.setSocialGroup("imperial")
    mobileTemplate.setAssistRange(6)
    mobileTemplate.setStalker(False)
    mobileTemplate.setFaction("imperial")
    mobileTemplate.setFactionStatus(FactionStatus.Combatant)

    templates = Vector()
    templates.add("object/mobile/shared_dressed_scout_trooper_white_white.iff")
    templates.add("object/mobile/shared_dressed_scout_trooper_m.iff")
    templates.add("object/mobile/shared_dressed_scout_trooper_black_black.iff")
    mobileTemplate.setTemplates(templates)

    weaponTemplates = Vector()
    weapontemplate = WeaponTemplate(
        "object/weapon/ranged/carbine/shared_carbine_e11.iff", WeaponType.CARBINE, 1.0, 15, "energy"
    )
    weaponTemplates.add(weapontemplate)
    mobileTemplate.setWeaponTemplateVector(weaponTemplates)

    attacks = Vector()
    mobileTemplate.setDefaultAttack("rangedShot")
    mobileTemplate.setAttacks(attacks)

    core.spawnService.addMobileTemplate("grizzled_elite_scouttrooper", mobileTemplate)
    return
Example #2
0
def addTemplate(core):
    mobileTemplate = MobileTemplate()

    mobileTemplate.setCreatureName("injured_verne")
    mobileTemplate.setLevel(61)
    mobileTemplate.setDifficulty(Difficulty.NORMAL)
    mobileTemplate.setMinSpawnDistance(4)
    mobileTemplate.setMaxSpawnDistance(8)
    mobileTemplate.setDeathblow(False)
    mobileTemplate.setScale(1)
    mobileTemplate.setMeatType("Wild Meat")
    mobileTemplate.setMeatAmount(30)
    mobileTemplate.setHideType("Leathery Hide")
    mobileTemplate.setHideAmount(25)
    mobileTemplate.setBoneType("Animal Bones")
    mobileTemplate.setBoneAmount(22)
    mobileTemplate.setSocialGroup("verne")
    mobileTemplate.setAssistRange(0)
    mobileTemplate.setStalker(False)
    mobileTemplate.setOptionsBitmask(Options.AGGRESSIVE + Options.ATTACKABLE)

    templates = Vector()
    templates.add("object/mobile/shared_verne.iff")
    mobileTemplate.setTemplates(templates)

    attacks = Vector()
    mobileTemplate.setDefaultAttack("creatureMeleeAttack")
    mobileTemplate.setAttacks(attacks)

    core.spawnService.addMobileTemplate("injured_verne", mobileTemplate)
Example #3
0
def setup(core, object):
    stcSvc = core.staticService
    cell = object.getCellByCellNumber(4)

    if cell:
        stcSvc.spawnObject(
            "object/tangible/terminal/shared_terminal_player_structure.iff",
            object.getPlanet().getName(),
            cell.getObjectID(),
            float(-13.28604),
            float(-2.110639),
            float(-6.443224),
            float(0.707107),
            float(0.707107),
        )
        stcSvc.spawnObject(
            "object/tangible/terminal/shared_terminal_cloning.iff",
            object.getPlanet().getName(),
            cell.getObjectID(),
            float(-13.57625),
            float(-2.5),
            float(3.1),
            float(0.707107),
            float(0.707107),
        )

    spawnPoints = Vector()
    spawnPoints.add(SpawnPoint(-9.8, -1.2, -6.6, 0, 1, 4))

    object.setAttachment("spawnPoints", spawnPoints)

    return
def addTemplate(core):
    mobileTemplate = MobileTemplate()

    mobileTemplate.setCreatureName("purbole_stalker")
    mobileTemplate.setLevel(64)
    mobileTemplate.setDifficulty(Difficulty.NORMAL)
    mobileTemplate.setMinSpawnDistance(4)
    mobileTemplate.setMaxSpawnDistance(8)
    mobileTemplate.setDeathblow(True)
    mobileTemplate.setScale(1)
    mobileTemplate.setMeatType("Carnivore Meat")
    mobileTemplate.setMeatAmount(15)
    mobileTemplate.setHideType("Bristly Hide")
    mobileTemplate.setHideAmount(11)
    mobileTemplate.setBoneType("Animal Bones")
    mobileTemplate.setBoneAmount(11)
    mobileTemplate.setSocialGroup("purbole")
    mobileTemplate.setAssistRange(0)
    mobileTemplate.setStalker(True)
    mobileTemplate.setOptionsBitmask(Options.AGGRESSIVE | Options.ATTACKABLE)

    templates = Vector()
    templates.add("object/mobile/shared_purbole.iff")
    mobileTemplate.setTemplates(templates)

    attacks = Vector()
    mobileTemplate.setDefaultAttack("creatureMeleeAttack")
    mobileTemplate.setAttacks(attacks)

    core.spawnService.addMobileTemplate("purbole_stalker", mobileTemplate)
Example #5
0
def run(core, actor, target, commandString):

    if actor.getCombatFlag() > 0:
        return

    cell = actor.getContainer()
    building = actor.getGrandparent()
    ghost = actor.getSlottedObject("ghost")

    if not ghost or not cell or not building or not core.housingService.getPermissions(actor, cell):
        return

    if ghost.getAmountOfVendors() >= actor.getSkillModBase("manage_vendor"):
        actor.sendSystemMessage("@player_structure:full_vendors", 0)
        return

    suiOptions = HashMap()
    suiOptions.put(Long(1), "@player_structure:terminal")
    suiOptions.put(Long(2), "@player_structure:droid")
    # TODO add creatures
    window = core.suiService.createListBox(
        ListBoxType.LIST_BOX_OK_CANCEL,
        "@player_structure:vendor_type_t",
        "@player_structure:vendor_type_d",
        suiOptions,
        actor,
        None,
        5,
    )
    returnList = Vector()
    returnList.add("List.lstList:SelectedRow")
    window.addHandler(0, "", Trigger.TRIGGER_OK, returnList, handleFirstWindow)
    core.suiService.openSUIWindow(window)
    return
Example #6
0
def addTemplate(core):
    mobileTemplate = MobileTemplate()

    mobileTemplate.setCreatureName("heroic_tusken_blood_hunter")
    mobileTemplate.setLevel(90)
    mobileTemplate.setDifficulty(Difficulty.NORMAL)

    mobileTemplate.setMinSpawnDistance(4)
    mobileTemplate.setMaxSpawnDistance(8)
    mobileTemplate.setDeathblow(True)
    mobileTemplate.setScale(1)
    mobileTemplate.setSocialGroup("heroic mos espa citizien")
    mobileTemplate.setAssistRange(12)
    mobileTemplate.setStalker(True)
    mobileTemplate.setOptionsBitmask(128)

    templates = Vector()
    templates.add("object/mobile/shared_dressed_commando_trainer_trandoshan_male_01.iff")
    templates.add("object/mobile/shared_dressed_commoner_tatooine_trandoshan_female_01.iff")
    templates.add("object/mobile/shared_dressed_commoner_tatooine_trandoshan_male_01.iff")
    mobileTemplate.setTemplates(templates)

    weaponTemplates = Vector()
    weapontemplate = WeaponTemplate(
        "object/weapon/ranged/rifle/shared_rifle_t21.iff", WeaponType.RIFLE, 1.0, 24, "energy"
    )
    weaponTemplates.add(weapontemplate)
    mobileTemplate.setWeaponTemplateVector(weaponTemplates)

    attacks = Vector()
    mobileTemplate.setDefaultAttack("rangedShotrifle")
    mobileTemplate.setAttacks(attacks)

    core.spawnService.addMobileTemplate("heroic_tusken_blood_hunter", mobileTemplate)
    return
def handleCitizenList(core, owner, target, option):
    # wasnt there a new list layout in NGE ?
    window = core.suiService.createSUIWindow("Script.listBox", owner, target, 0)
    window.setProperty("bg.caption.lblTitle:Text", "@city/city:citizen_list_t")
    window.setProperty("Prompt.lblPrompt:Text", "@city/city:citizen_list_prompt")

    playerCity = main.NGECore.getInstance().playerCityService.getPlayerCity(owner)
    index = 1
    for citizen in playerCity.getCitizens():
        citizenObject = core.objectService.getObject(citizen)
        if not citizenObject:
            continue
        name = citizenObject.getCustomName()
        if citizenObject.getPlayerObject().getCitizenship() == 2:
            name += " (Militia)"
        window.addListBoxMenuItem(name, index)
        index += 1

    window.setProperty("btnOk:visible", "True")
    window.setProperty("btnCancel:visible", "True")
    window.setProperty("btnOk:Text", "@ok")
    window.setProperty("btnCancel:Text", "@cancel")
    playerCity = main.NGECore.getInstance().playerCityService.getPlayerCity(owner)
    returnList = Vector()
    returnList.add("txtInput:LocalText")
    window.addHandler(0, "", Trigger.TRIGGER_OK, returnList, setCitizenListCallBack)
    core.suiService.openSUIWindow(window)
    return
Example #8
0
def addTemplate(core):
    mobileTemplate = MobileTemplate()

    mobileTemplate.setCreatureName("junk_dealer")
    mobileTemplate.setLevel(1)
    mobileTemplate.setDifficulty(Difficulty.NORMAL)
    mobileTemplate.setSocialGroup("township")
    mobileTemplate.setOptionsBitmask(Options.INVULNERABLE | Options.CONVERSABLE)
    mobileTemplate.setConversationFileName("junk_dealer")

    templates = Vector()
    templates.add("object/mobile/shared_junk_dealer_m_01.iff")
    templates.add("object/mobile/shared_junk_dealer_f_01.iff")
    templates.add("object/mobile/shared_junk_dealer_m_02.iff")
    templates.add("object/mobile/shared_junk_dealer_f_02.iff")
    templates.add("object/mobile/shared_junk_dealer_m_03.iff")
    templates.add("object/mobile/shared_junk_dealer_f_03.iff")
    mobileTemplate.setTemplates(templates)

    weaponTemplates = Vector()
    weapontemplate = WeaponTemplate(
        "object/weapon/melee/unarmed/shared_unarmed_default.iff", WeaponType.UNARMED, 1.0, 6, "kinetic"
    )
    weaponTemplates.add(weapontemplate)
    mobileTemplate.setWeaponTemplateVector(weaponTemplates)

    attacks = Vector()
    mobileTemplate.setDefaultAttack("creatureMeleeAttack")
    mobileTemplate.setAttacks(attacks)

    core.spawnService.addMobileTemplate("junkdealer", mobileTemplate)
    return
def handleCityRankInfo(core, owner, target, option):
    window = core.suiService.createSUIWindow("Script.listBox", owner, target, 0)
    window.setProperty("bg.caption.lblTitle:Text", "@city/city:rank_info_t")
    window.setProperty("Prompt.lblPrompt:Text", "@city/city:rank_info_d")

    playerCity = main.NGECore.getInstance().playerCityService.getPlayerCity(owner)

    window.addListBoxMenuItem("City : " + playerCity.getCityName(), 0)
    window.addListBoxMenuItem("@city/city:radius_prompt : %s" % playerCity.getCityRadius(), 1)
    window.addListBoxMenuItem("@city/city:city_rank_prompt : @city/city:rank" + str(playerCity.getRank()), 2)
    window.addListBoxMenuItem("@city/city:reg_citizen_prompt : %s" % len(playerCity.getCitizens()), 3)
    if playerCity.getRank() >= 3 and playerCity.getSpecialization() > -1:
        window.addListBoxMenuItem(
            "@city/city:specialization_prompt : @city/city:"
            + playerCity.getSpecializationSTFNamesAsList().get(playerCity.getSpecialization()),
            4,
        )

    window.setProperty("btnOk:visible", "True")
    window.setProperty("btnCancel:visible", "True")
    window.setProperty("btnOk:Text", "@ok")
    window.setProperty("btnCancel:Text", "@cancel")
    window.setProperty("btnCancel:Text", "@cancel")
    playerCity = main.NGECore.getInstance().playerCityService.getPlayerCity(owner)
    returnList = Vector()
    returnList.add("txtInput:LocalText")
    window.addHandler(0, "", Trigger.TRIGGER_OK, returnList, setCityInfoCallBack)
    window.addHandler(1, "", Trigger.TRIGGER_CANCEL, returnList, setCitizenListCallBack)
    core.suiService.openSUIWindow(window)
    return
def setup(core, object):
    objSvc = core.objectService
    objSvc.createChildObject(
        object,
        "object/tangible/terminal/shared_terminal_cloning.iff",
        float(-0.42),
        float(-0.38),
        float(-0.4),
        float(1),
        float(0),
        10,
    )

    objSvc.createChildObject(
        object, "object/mobile/shared_21b_surgical_droid.iff", float(3.8), float(0.3), float(5.1), float(0), float(0), 1
    )

    spawnPoints = Vector()
    spawnPoints.add(SpawnPoint(0.445015, 0.271775, 1.39199, 0.707038, 0.707176, 9))

    object.setAttachment("spawnPoints", spawnPoints)

    core.mapService.addLocation(
        object.getPlanet(), "Cloning Facility", object.getPosition().x, object.getPosition().z, 5, 0, 0
    )

    return
Example #11
0
def addTemplate(core):
    mobileTemplate = MobileTemplate()

    mobileTemplate.setCreatureName("heroic_tusken_mos_espa_expert")
    mobileTemplate.setLevel(90)
    mobileTemplate.setDifficulty(0)
    mobileTemplate.setAttackRange(12)
    mobileTemplate.setAttackSpeed(1.0)
    mobileTemplate.setWeaponType(2)
    mobileTemplate.setMinSpawnDistance(4)
    mobileTemplate.setMaxSpawnDistance(8)
    mobileTemplate.setDeathblow(True)
    mobileTemplate.setScale(1)
    mobileTemplate.setSocialGroup("heroic mos espa citizien")
    mobileTemplate.setAssistRange(12)
    mobileTemplate.setStalker(True)
    mobileTemplate.setOptionsBitmask(128)

    templates = Vector()
    templates.add("object/mobile/shared_dressed_twi_female_scientist_01.iff")
    templates.add("object/mobile/shared_warren_research_scientist.iff")
    templates.add("object/mobile/shared_warren_scientist_s03.iff")
    mobileTemplate.setTemplates(templates)

    weaponTemplates = Vector()
    weapontemplate = WeaponTemplate("object/weapon/ranged/pistol/shared_pistol_scout_blaster.iff", 2, 1.0)
    weaponTemplates.add(weapontemplate)
    mobileTemplate.setWeaponTemplateVector(weaponTemplates)

    attacks = Vector()
    mobileTemplate.setDefaultAttack("rangedShot")
    mobileTemplate.setAttacks(attacks)

    core.spawnService.addMobileTemplate("heroic_tusken_mos_espa_expert", mobileTemplate)
    return
Example #12
0
def screenOne(core, owner):
    window = core.suiService.createSUIWindow("Script.listBox", owner, owner, 0)
    window.setProperty("bg.caption.lblTitle:Text", "Spawn Terminal")
    window.setProperty(
        "Prompt.lblPrompt:Text",
        "Please select a planet and town. Our development team is working hard on fixing the crash to desktop problem. Try to avoid player populated areas. LEAVE THIS SPOT AS SOON AS POSSIBLE. Thank you.",
    )
    window.setProperty("btnOk:visible", "True")
    window.setProperty("btnCancel:visible", "True")
    window.setProperty("btnOk:Text", "@ok")
    window.setProperty("btnCancel:Text", "@cancel")
    returnList = Vector()
    returnList.add("List.lstList:SelectedRow")
    window.addHandler(0, "", Trigger.TRIGGER_OK, returnList, screenOneCallback)
    window.addListBoxMenuItem("Corellia", 0)
    window.addListBoxMenuItem("Dantooine", 1)
    window.addListBoxMenuItem("Dathomir", 2)
    window.addListBoxMenuItem("Endor", 3)
    window.addListBoxMenuItem("Lok", 4)
    window.addListBoxMenuItem("Naboo", 5)
    window.addListBoxMenuItem("Rori", 6)
    window.addListBoxMenuItem("Talus", 7)
    window.addListBoxMenuItem("Tatooine", 8)
    window.addListBoxMenuItem("Yavin 4", 9)
    core.suiService.openSUIWindow(window)
Example #13
0
class Evidence(object):
    def __init__(self, *literals):
        self.vector = Vector()
        self.addAll(*literals)

    def add(self, *strings):
        """
            adds a single piece of evidence. You may pass
                * a list of strings that directly use the probcog evidence format, i.e. a list (function, arg1, arg2, value)
                * a single string with an MLN-style literal definition, e.g. "function(arg1,arg2,value)" or "!pred(arg1)"
                * a single string with a single BLOG-style assignment, e.g. "function(arg1,arg2)=value"
        """
        if len(strings) == 1:
            strings = parseLiteral(strings[0].strip())
        jarr = jarray.array(strings, String)
        self.vector.add(jarr)

    def addAll(self, *literals):
        for lit in literals:
            self.add(lit)

    def getData(self):
        return self.vector

    def clear(self):
        self.vector.clear()
def addSpawnArea(core):
    mixedGroups = Vector()
    mixedGroups.add("dantooine_force_sensitive")
    mixedGroups.add("graul_mauler_lair_group_1")
    mixedGroups.add("dantooine_graul_mauler")
    core.spawnService.addMixedSpawnArea(mixedGroups, 20, 6574, 1966, "dantooine")
    return
Example #15
0
def addLairGroup(core):
    spawnTemplate1 = LairSpawnTemplate(-1, "lok_gurk_lair", 5, 20)
    spawnTemplates = Vector()
    spawnTemplates.add(spawnTemplate1)

    core.spawnService.addLairGroup("lok_bosstest", spawnTemplates)
    return
def addSpawnArea(core):
    mixedGroups = Vector()
    mixedGroups.add("quenker_lair_group_1")
    mixedGroups.add("huurton_lair_group_1")
    mixedGroups.add("quenker_group_south_1")
    core.spawnService.addMixedSpawnArea(mixedGroups, 1495, -3502, 2396, "dantooine")
    return
Example #17
0
def addSpawnArea(core):
    dynamicGroups = Vector()
    dynamicGroups.add("force_sensitives_wild_1")
    dynamicGroups.add("graul_mauler_nw_group_1")
    dynamicGroups.add("voritors_wild_1")
    core.spawnService.addDynamicSpawnArea(dynamicGroups, 61, 6615, 1966, "dantooine")
    return
Example #18
0
def addTemplate(core):
    mobileTemplate = MobileTemplate()

    mobileTemplate.setCustomName("a chassis broker")
    mobileTemplate.setLevel(1)
    mobileTemplate.setDifficulty(Difficulty.NORMAL)
    mobileTemplate.setSocialGroup("township")
    mobileTemplate.setOptionsBitmask(Options.INVULNERABLE)

    templates = Vector()
    templates.add("object/mobile/shared_space_chassis_broker_01.iff")
    templates.add("object/mobile/shared_space_chassis_broker_02.iff")
    templates.add("object/mobile/shared_space_chassis_broker_03.iff")
    templates.add("object/mobile/shared_space_chassis_broker_04.iff")
    templates.add("object/mobile/shared_space_chassis_broker_05.iff")
    mobileTemplate.setTemplates(templates)

    weaponTemplates = Vector()
    weapontemplate = WeaponTemplate(
        "object/weapon/melee/unarmed/shared_unarmed_default.iff", WeaponType.UNARMED, 1.0, 6, "kinetic"
    )
    weaponTemplates.add(weapontemplate)
    mobileTemplate.setWeaponTemplateVector(weaponTemplates)

    attacks = Vector()
    mobileTemplate.setDefaultAttack("creatureMeleeAttack")
    mobileTemplate.setAttacks(attacks)

    core.spawnService.addMobileTemplate("chassisbroker", mobileTemplate)
    return
def handleAdjustTaxes(core, owner, target, option):

    playerCity = main.NGECore.getInstance().playerCityService.getPlayerCity(owner)
    if playerCity.getRank() < 2:
        owner.sendSystemMessage("@city/city:no_rank_taxes", 0)
        return

    window = core.suiService.createSUIWindow("Script.listBox", owner, target, 0)
    window.setProperty("bg.caption.lblTitle:Text", "@city/city:adjust_taxes_t")
    window.setProperty("Prompt.lblPrompt:Text", "@city/city:adjust_taxes_d")

    window.addListBoxMenuItem("@city/city:set_tax_t_income", 0)
    window.addListBoxMenuItem("@city/city:set_tax_t_property", 1)
    window.addListBoxMenuItem("@city/city:set_tax_t_sales", 2)
    window.addListBoxMenuItem("@city/city:set_tax_t_travel", 3)
    window.addListBoxMenuItem("@city/city:set_tax_t_garage", 4)

    window.setProperty("btnOk:visible", "True")
    window.setProperty("btnCancel:visible", "True")
    window.setProperty("btnOk:Text", "@ok")
    window.setProperty("btnCancel:Text", "@cancel")

    returnList = Vector()
    returnList.add("List.lstList:SelectedRow")
    window.addHandler(0, "", Trigger.TRIGGER_OK, returnList, setAdjustTaxesCallBack)
    window.addHandler(1, "", Trigger.TRIGGER_CANCEL, returnList, setSpecializationCancelCallBack)
    core.suiService.openSUIWindow(window)
    return
def addTemplate(core):
    mobileTemplate = MobileTemplate()

    mobileTemplate.setCreatureName("veteran_stormtrooper_captain")
    mobileTemplate.setLevel(72)
    mobileTemplate.setDifficulty(Difficulty.NORMAL)
    mobileTemplate.setMinSpawnDistance(4)
    mobileTemplate.setMaxSpawnDistance(8)
    mobileTemplate.setDeathblow(True)
    mobileTemplate.setScale(1)
    mobileTemplate.setSocialGroup("imperial")
    mobileTemplate.setAssistRange(6)
    mobileTemplate.setStalker(False)
    mobileTemplate.setFaction("imperial")
    mobileTemplate.setFactionStatus(FactionStatus.Combatant)

    templates = Vector()
    templates.add("object/mobile/shared_dressed_stormtrooper_captain_black_black.iff")
    templates.add("object/mobile/shared_dressed_stormtrooper_captain_black_gold.iff")
    templates.add("object/mobile/shared_dressed_stormtrooper_captain_white_white.iff")
    mobileTemplate.setTemplates(templates)

    weaponTemplates = Vector()
    weapontemplate = WeaponTemplate(
        "object/weapon/ranged/carbine/shared_carbine_e11.iff", WeaponType.CARBINE, 1.0, 15, "energy"
    )
    weaponTemplates.add(weapontemplate)
    mobileTemplate.setWeaponTemplateVector(weaponTemplates)

    attacks = Vector()
    mobileTemplate.setDefaultAttack("rangedShot")
    mobileTemplate.setAttacks(attacks)

    core.spawnService.addMobileTemplate("vet_stormtrooper_captain", mobileTemplate)
    return
def handleSpecialization(core, owner, target, option):

    playerCity = main.NGECore.getInstance().playerCityService.getPlayerCity(owner)
    if playerCity.getRank() < 3:
        owner.sendSystemMessage("@city/city:no_rank_spec", 0)
        return

    window = core.suiService.createSUIWindow("Script.listBox", owner, target, 0)
    window.setProperty("bg.caption.lblTitle:Text", "@city/city:city_specs_t")
    window.setProperty("Prompt.lblPrompt:Text", "@city/city:city_specs_d")

    window.addListBoxMenuItem("@city/city:city_spec_cloning", 0)
    window.addListBoxMenuItem("@city/city:city_spec_bm_incubator", 1)
    window.addListBoxMenuItem("@city/city:city_spec_storyteller", 2)
    window.addListBoxMenuItem("@city/city:city_spec_entertainer", 3)
    window.addListBoxMenuItem("@city/city:city_spec_missions", 4)
    window.addListBoxMenuItem("@city/city:city_spec_industry", 5)
    window.addListBoxMenuItem("@city/city:city_spec_doctor", 6)
    window.addListBoxMenuItem("@city/city:city_spec_research", 7)
    window.addListBoxMenuItem("@city/city:city_spec_sample_rich", 8)

    window.setProperty("btnOk:visible", "True")
    window.setProperty("btnCancel:visible", "True")
    window.setProperty("btnOk:Text", "@ok")
    window.setProperty("btnCancel:Text", "@cancel")

    returnList = Vector()
    returnList.add("List.lstList:SelectedRow")
    window.addHandler(0, "", Trigger.TRIGGER_OK, returnList, setSpecializationCallBack)
    window.addHandler(1, "", Trigger.TRIGGER_CANCEL, returnList, setSpecializationCancelCallBack)
    core.suiService.openSUIWindow(window)
    return
Example #22
0
def startConversation(core, actor, npc):
    convSvc = core.conversationService

    probotRequester = core.objectService.getObject(long(npc.getAttachment("probotRequester")))

    if probotRequester is None:
        core.objectService.destroyObject(npc)
        return

    if probotRequester.getObjectId() != actor.getObjectId():
        convSvc.sendConversationMessage(actor, npc, OutOfBand.ProsePackage("@conversation/bounty_probot:s_6"))
        return

    mission = core.objectService.getObject(long(npc.getAttachment("attachedMission")))

    if mission is None:
        convSvc.sendConversationMessage(actor, npc, OutOfBand.ProsePackage("@conversation/bounty_probot:s_4"))
        return

    objective = mission.getObjective()

    if objective is None:
        convSvc.sendConversationMessage(actor, npc, OutOfBand.ProsePackage("@conversation/bounty_probot:s_4"))
        return

    convSvc.sendConversationMessage(actor, npc, OutOfBand.ProsePackage("@conversation/bounty_probot:s_5"))

    options = Vector()
    options.add(ConversationOption(OutOfBand.ProsePackage("@conversation/bounty_probot:s_8"), 0))
    convSvc.sendConversationOptions(actor, npc, options, handleBioTransmit)
    return
Example #23
0
class Popen4(Popen3):
    """Popen object that joins the stdout and stderr streams into a single  
    output stream."""

    childerr = None

    def __init__(self, cmd, bufsize=-1):
        Popen3.__init__(self, cmd, 1, bufsize)
        self.closed = Vector()  # use a vector for synchronization close()
        self.fromchild = self._join(self._fromchild, self._childerr, bufsize)

    def _join(self, stdout, stderr, bufsize):
        """create a stream that joins two output streams"""
        self._pipeOut = PipedOutputStream()
        joinedStream = PipedInputStream(self._pipeOut)
        self._outReader = _makeReaderThread(
            stdout, self._pipeOut.write, bufsize, "%s-stdout" % self.process, self._close
        )
        self._errReader = _makeReaderThread(
            stderr, self._pipeOut.write, bufsize, "%s-stderr" % self.process, self._close
        )
        return FileUtil.wrap(joinedStream, 0)

    def _close(self):
        """Must be closed twice (once for each of the two joined pipes)"""
        self.closed.add(None)
        if self.closed.size() > 1:
            self._pipeOut.close()
Example #24
0
def addLairGroup(core):
    spawnTemplate1 = LairSpawnTemplate(-1, "naboo_chuba_lair_neutral_small", 5, 20)

    spawnTemplates = Vector()
    spawnTemplates.add(spawnTemplate1)

    core.spawnService.addLairGroup("naboo_starter", spawnTemplates)
Example #25
0
def addTemplate(core):
    mobileTemplate = MobileTemplate()

    mobileTemplate.setCreatureName("kamurith_defiler")
    mobileTemplate.setLevel(68)
    mobileTemplate.setDifficulty(Difficulty.NORMAL)
    mobileTemplate.setMinSpawnDistance(4)
    mobileTemplate.setMaxSpawnDistance(8)
    mobileTemplate.setDeathblow(True)
    mobileTemplate.setScale(1)
    mobileTemplate.setMeatType("Carnivore Meat")
    mobileTemplate.setMeatAmount(90)
    mobileTemplate.setHideType("Leathery Hide")
    mobileTemplate.setHideAmount(65)
    mobileTemplate.setBoneType("Avian Bones")
    mobileTemplate.setBoneAmount(50)
    mobileTemplate.setSocialGroup("kamurith")
    mobileTemplate.setAssistRange(12)
    mobileTemplate.setStalker(False)
    mobileTemplate.setOptionsBitmask(Options.AGGRESSIVE | Options.ATTACKABLE)

    templates = Vector()
    templates.add("object/mobile/shared_vexed_voritor_lizard.iff")
    mobileTemplate.setTemplates(templates)

    attacks = Vector()
    mobileTemplate.setDefaultAttack("creatureMeleeAttack")
    mobileTemplate.setAttacks(attacks)

    core.spawnService.addMobileTemplate("kamurith_defiler", mobileTemplate)
def addSpawnArea(core):
	mixedGroups = Vector()
	mixedGroups.add('quenker_lair_group_1')
	mixedGroups.add('huurton_lair_group_1')
	mixedGroups.add('dantooine_quenker')
	core.spawnService.addMixedSpawnArea(mixedGroups, 1495, -3502, 2396, 'dantooine')
	return
Example #27
0
def addTemplate(core):
    mobileTemplate = MobileTemplate()

    mobileTemplate.setCreatureName("rancor_monstrous_brute")
    mobileTemplate.setLevel(82)
    mobileTemplate.setDifficulty(Difficulty.ELITE)
    mobileTemplate.setMinSpawnDistance(4)
    mobileTemplate.setMaxSpawnDistance(8)
    mobileTemplate.setDeathblow(True)
    mobileTemplate.setScale(1)
    mobileTemplate.setMeatType("Carnivore Meat")
    mobileTemplate.setMeatAmount(950)
    mobileTemplate.setHideType("Leathery Hide")
    mobileTemplate.setHideAmount(878)
    mobileTemplate.setBoneType("Animal Bones")
    mobileTemplate.setBoneAmount(778)
    mobileTemplate.setSocialGroup("rancor")
    mobileTemplate.setAssistRange(24)
    mobileTemplate.setStalker(False)
    mobileTemplate.setOptionsBitmask(Options.AGGRESSIVE | Options.ATTACKABLE)

    templates = Vector()
    templates.add("object/mobile/shared_rancor.iff")
    mobileTemplate.setTemplates(templates)

    attacks = Vector()
    attacks.add("bm_dampen_pain_5")
    attacks.add("bm_shaken_3")
    attacks.add("bm_stomp_5")
    mobileTemplate.setDefaultAttack("creatureMeleeAttack")
    mobileTemplate.setAttacks(attacks)

    core.spawnService.addMobileTemplate("monstrous_brute", mobileTemplate)
def addTemplate(core):
    mobileTemplate = MobileTemplate()

    mobileTemplate.setCreatureName("malkloc_plainswalker_female")
    mobileTemplate.setLevel(79)
    mobileTemplate.setDifficulty(Difficulty.NORMAL)
    mobileTemplate.setMinSpawnDistance(4)
    mobileTemplate.setMaxSpawnDistance(8)
    mobileTemplate.setDeathblow(True)
    mobileTemplate.setScale(1)
    mobileTemplate.setMeatType("Herbivore Meat")
    mobileTemplate.setMeatAmount(2000)
    mobileTemplate.setHideType("Leathery Hide")
    mobileTemplate.setHideAmount(1800)
    mobileTemplate.setBoneType("Animal Bones")
    mobileTemplate.setBoneAmount(1350)
    mobileTemplate.setSocialGroup("malkloc plainswalker")
    mobileTemplate.setAssistRange(0)
    mobileTemplate.setStalker(False)
    mobileTemplate.setOptionsBitmask(Options.AGGRESSIVE + Options.ATTACKABLE)

    templates = Vector()
    templates.add("object/mobile/shared_malkloc.iff")
    mobileTemplate.setTemplates(templates)

    attacks = Vector()
    mobileTemplate.setDefaultAttack("creatureMeleeAttack")
    mobileTemplate.setAttacks(attacks)

    core.spawnService.addMobileTemplate("female_malkloc_plainswalker", mobileTemplate)
def addTemplate(core):
    mobileTemplate = MobileTemplate()

    mobileTemplate.setCreatureName("ancient_bull_rancor")
    mobileTemplate.setLevel(83)
    mobileTemplate.setDifficulty(Difficulty.BOSS)
    mobileTemplate.setMinSpawnDistance(4)
    mobileTemplate.setMaxSpawnDistance(8)
    mobileTemplate.setDeathblow(True)
    mobileTemplate.setScale(1.1)
    mobileTemplate.setMeatType("Carnivore Meat")
    mobileTemplate.setMeatAmount(1100)
    mobileTemplate.setHideType("Leathery Hide")
    mobileTemplate.setHideAmount(1000)
    mobileTemplate.setBoneType("Animal Bones")
    mobileTemplate.setBoneAmount(950)
    mobileTemplate.setSocialGroup("rancor")
    mobileTemplate.setAssistRange(12)
    mobileTemplate.setStalker(False)
    mobileTemplate.setOptionsBitmask(Options.AGGRESSIVE | Options.ATTACKABLE)

    templates = Vector()
    templates.add("object/mobile/shared_rancor.iff")
    mobileTemplate.setTemplates(templates)

    attacks = Vector()
    mobileTemplate.setDefaultAttack("creatureMeleeAttack")
    mobileTemplate.setAttacks(attacks)

    core.spawnService.addMobileTemplate("ancient_bull_rancor", mobileTemplate)
Example #30
0
def handleFirstScreen(core, actor, npc, selection):

    convSvc = core.conversationService
    if selection == 0:
        prose = ProsePackage("conversation/clone_droid", "s_10")
        outOfBand = OutOfBand()
        outOfBand.addProsePackage(prose)
        convSvc.sendConversationMessage(actor, npc, outOfBand)
        prose2 = ProsePackage("conversation/clone_droid", "s_12")
        outOfBand2 = OutOfBand()
        outOfBand2.addProsePackage(prose2)
        option1 = ConversationOption(outOfBand2, 0)

        options = Vector()
        options.add(option1)

        convSvc.sendConversationOptions(actor, npc, options, handleSecondScreen)

        return

    if selection == 1:
        core.buffService.removeBuffFromCreature(actor, actor.getBuffByName("cloning_sickness"))
        core.conversationService.sendStopConversation(actor, npc, "conversation/clone_droid", "s_14")
        return
    return