Пример #1
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
Пример #2
0
def startConversation(core, actor, npc):
    player = actor.getPlayerObject()
    if player is None:
        return
    quest = player.getQuest('smuggle_generic_1')
    if quest is None or quest.isCompleted():
        options = Vector()
        options.add(
            ConversationOption(
                OutOfBand.ProsePackage('@conversation/generic_broker_1:s_17'),
                0))  # Yes.
        options.add(
            ConversationOption(
                OutOfBand.ProsePackage('@conversation/generic_broker_1:s_18'),
                0))  # Not right now.
        core.conversationService.sendConversationMessage(
            actor, npc,
            OutOfBand.ProsePackage('@conversation/generic_broker_1:s_14'))
        core.conversationService.sendConversationOptions(
            actor, npc, options, handleOptionsOne)
        return
    elif player.getFactionStanding() >= 1000:
        core.conversationService.sendStopConversation(
            actor, npc, 'conversation/generic_broker_1', 's_8')
    else:
        core.conversationService.sendStopConversation(
            actor, npc, 'conversation/generic_broker_1', 's_4')
    return
Пример #3
0
def handleOptionsTwo(core, actor, npc, selection):
	options = Vector()
	# You're serious, aren't you?
	options.add(ConversationOption(OutOfBand.ProsePackage('@conversation/tatooine_eisley_nogri:s_15'), 0))
	core.conversationService.sendConversationMessage(actor, npc, OutOfBand.ProsePackage('@conversation/tatooine_eisley_nogri:s_13'))
	core.conversationService.sendConversationOptions(actor, npc, options, handleOptionsThree)
	return
Пример #4
0
def handleOptionsThree(core, actor, npc, selection):
	options = Vector()
	# I have to say that?
	options.add(ConversationOption(OutOfBand.ProsePackage('@conversation/tatooine_eisley_byxle:s_76'), 0))
	core.conversationService.sendConversationMessage(actor, npc, OutOfBand.ProsePackage('@conversation/tatooine_eisley_byxle:s_68'))
	core.conversationService.sendConversationOptions(actor, npc, options, handleOptionsFour)
	return
Пример #5
0
def startConversation(core, actor, npc):
	player = actor.getPlayerObject()
	
	if player is None:
		return
	
	quest = player.getQuest('tatooine_eisley_tdc')
	
	if quest is None:
		options = Vector()
		options.add(ConversationOption(OutOfBand.ProsePackage('@conversation/tatooine_eisley_byxle:s_58'), 0))
		core.conversationService.sendConversationMessage(actor, npc, OutOfBand.ProsePackage('@conversation/tatooine_eisley_byxle:s_56'))
		core.conversationService.sendConversationOptions(actor, npc, options, handleOptionsOne)
		return
	elif quest.isCompleted():
		core.conversationService.sendStopConversation(actor, npc, 'conversation/tatooine_eisley_byxle', 's_48')
	elif quest.getActiveTask() == 8:
		options = Vector()
		# I don't know. He seemed pretty mad.
		options.add(ConversationOption(OutOfBand.ProsePackage('@conversation/tatooine_eisley_byxle:s_29'), 0))
		core.conversationService.sendConversationMessage(actor, npc, OutOfBand.ProsePackage('@conversation/tatooine_eisley_byxle:s_17'))
		core.conversationService.sendConversationOptions(actor, npc, options, handleOptionsFive)
	 	
	else:
	 	core.conversationService.sendStopConversation(actor, npc, 'conversation/tatooine_eisley_byxle', 's_48')
	 	
	return
Пример #6
0
def startConversation(core, actor, npc):
    convSvc = core.conversationService

    convSvc.sendConversationMessage(
        actor, npc,
        OutOfBand.ProsePackage('@conversation/junk_dealer_generic:s_bef51e38'))

    options = Vector()
    options.add(
        ConversationOption(
            OutOfBand.ProsePackage(
                '@conversation/junk_dealer_generic:s_54fab04f'), 0))
    options.add(
        ConversationOption(
            OutOfBand.ProsePackage('@conversation/junk_dealer_generic:s_48'),
            1))
    options.add(
        ConversationOption(
            OutOfBand.ProsePackage(
                '@conversation/junk_dealer_generic:s_3aa18b2d'), 2))

    buyBack = actor.getAttachment('buy_back')

    if buyBack is not None and buyBack != 0 and core.objectService.objsInContainer(
            actor, core.objectService.getObject(buyBack)) > 0:
        options.add(
            ConversationOption(
                OutOfBand.ProsePackage(
                    '@conversation/junk_dealer_generic:s_43'), 3))

    convSvc.sendConversationOptions(actor, npc, options, handleFirstScreen)
    return
Пример #7
0
def handleOptionsFive(core, actor, npc, selection):
	options = Vector()
	# Thanks.
	options.add(ConversationOption(OutOfBand.ProsePackage('@conversation/tatooine_eisley_byxle:s_69'), 0))
	core.conversationService.sendConversationMessage(actor, npc, OutOfBand.ProsePackage('@conversation/tatooine_eisley_byxle:s_30'))
	core.conversationService.sendConversationOptions(actor, npc, options, handleOptionsSix)
	return
Пример #8
0
def handleOptionsOne(core, actor, npc, selection):
	options = Vector()
	# I am just delivering what Byxle gave me.
	options.add(ConversationOption(OutOfBand.ProsePackage('@conversation/tatooine_eisley_drixa:s_41'), 0))
	core.conversationService.sendConversationMessage(actor, npc, OutOfBand.ProsePackage('@conversation/tatooine_eisley_drixa:s_9'))
	core.conversationService.sendConversationOptions(actor, npc, options, handleOptionsTwo)
	return
Пример #9
0
def handleOptionsTwo(core, actor, npc, selection):
	options = Vector()
	# Of course
	options.add(ConversationOption(OutOfBand.ProsePackage('@conversation/tatooine_eisley_drixa:s_30'), 0))
	core.conversationService.sendConversationMessage(actor, npc, OutOfBand.ProsePackage('@conversation/tatooine_eisley_drixa:s_28'))
	core.conversationService.sendConversationOptions(actor, npc, options, handleOptionsThree)
	return
Пример #10
0
def handleLootScreenSelection6(core, actor, npc, selection):
	
	convSvc = core.conversationService	
	prose = ProsePackage('conversation/junk_dealer_generic', 's_14efaaa2')
	outOfBand = OutOfBand()
	outOfBand.addProsePackage(prose)
	convSvc.sendConversationMessage(actor, npc, outOfBand)
	if selection == 0:
		template = 'object/tangible/loot/collectible/kits/shared_orange_rug_kit.iff'
		addLootKit(core, actor, npc,template)
		
	if selection == 1:
		template = 'object/tangible/loot/collectible/kits/shared_blue_rug_kit.iff'
		addLootKit(core, actor, npc,template)
	
	if selection == 2:
		template = 'object/tangible/loot/collectible/kits/shared_gong_kit.iff'
		addLootKit(core, actor, npc,template)
		
	if selection == 3:
		template = 'object/tangible/loot/collectible/kits/shared_light_table_kit.iff'
		addLootKit(core, actor, npc,template)
		
	if selection == 4:
		template = 'object/tangible/loot/collectible/kits/shared_sculpture_kit.iff'
		addLootKit(core, actor, npc,template)
	
	return
Пример #11
0
def startConversation(core, actor, npc):
    player = actor.getPlayerObject()

    if player is None:
        return

    quest = player.getQuest('tatooine_eisley_tdc')
    if quest is None:
        # Too busy getting this cargo ready, no time to talk.
        core.conversationService.sendStopConversation(
            actor, npc, 'conversation/tatooine_eisley_nogri', 's_48')
    elif quest.isCompleted() or quest.getActiveTask() > 3:
        core.conversationService.sendStopConversation(
            actor, npc, 'conversation/tatooine_eisley_nogri', 's_42')
    else:
        options = Vector()
        # Got it right here.
        options.add(
            ConversationOption(
                OutOfBand.ProsePackage(
                    '@conversation/tatooine_eisley_nogri:s_7'), 0))
        core.conversationService.sendConversationMessage(
            actor, npc,
            OutOfBand.ProsePackage('@conversation/tatooine_eisley_nogri:s_5'))
        core.conversationService.sendConversationOptions(
            actor, npc, options, handleOptionsOne)
    return
Пример #12
0
def handleOptionsTwo(core, actor, npc, selection):
    if (selection == 0):  # So what do I do now?
        options = Vector()
        options.add(
            ConversationOption(
                OutOfBand.ProsePackage(
                    '@conversation/c_newbie_secondchance:s_68'), 0))
        core.conversationService.sendConversationMessage(
            actor, npc,
            OutOfBand.ProsePackage('@conversation/c_newbie_secondchance:s_66'))
        core.conversationService.sendConversationOptions(
            actor, npc, options, handleOptionsThree)
        return

    elif (selection == 1):  # I'm not doing anything you ask
        options = Vector()
        options.add(
            ConversationOption(
                OutOfBand.ProsePackage(
                    '@conversation/c_newbie_secondchance:s_122'), 0))
        core.conversationService.sendConversationMessage(
            actor, npc,
            OutOfBand.ProsePackage(
                '@conversation/c_newbie_secondchance:s_172'))
        core.conversationService.sendConversationOptions(
            actor, npc, options, handleOptionsTwo)
        return
    return
Пример #13
0
def handleOptionsOne(core, actor, npc, selection):
	options = Vector()
	# So what do I need to do?
	options.add(ConversationOption(OutOfBand.ProsePackage('@conversation/tatooine_eisley_byxle:s_62'), 0))
	core.conversationService.sendConversationMessage(actor, npc, OutOfBand.ProsePackage('@conversation/tatooine_eisley_byxle:s_60'))
	core.conversationService.sendConversationOptions(actor, npc, options, handleOptionsTwo)
	return
Пример #14
0
def handleOptionsSeven(core, actor, npc, selection):
	options = Vector()
	# [Look in the bag]
	options.add(ConversationOption(OutOfBand.ProsePackage('@conversation/tatooine_eisley_nogri:s_40'), 0))
	core.conversationService.sendConversationMessage(actor, npc, OutOfBand.ProsePackage('@conversation/tatooine_eisley_nogri:s_38'))
	core.conversationService.sendConversationOptions(actor, npc, options, handleOptionsEight)
	return
Пример #15
0
def handleOptionsOne(core, actor, npc, selection):
	options = Vector()
	# That's how you know it's fresh.
	options.add(ConversationOption(OutOfBand.ProsePackage('@conversation/tatooine_eisley_nogri:s_11'), 0))
	core.conversationService.sendConversationMessage(actor, npc, OutOfBand.ProsePackage('@conversation/tatooine_eisley_nogri:s_9'))
	core.conversationService.sendConversationOptions(actor, npc, options, handleOptionsTwo)
	return
Пример #16
0
def handleOptionsTwo(core, actor, npc, selection):
	options = Vector()
	# Ok, Sure. I can do that for you.
	options.add(ConversationOption(OutOfBand.ProsePackage('@conversation/tatooine_eisley_byxle:s_66'), 0))
	core.conversationService.sendConversationMessage(actor, npc, OutOfBand.ProsePackage('@conversation/tatooine_eisley_byxle:s_64'))
	core.conversationService.sendConversationOptions(actor, npc, options, handleOptionsThree)
	return
Пример #17
0
def handleOptionsThree(core, actor, npc, selection):
	options = Vector()
	# TDC isn't fast food, it's good food delivered fast.
	options.add(ConversationOption(OutOfBand.ProsePackage('@conversation/tatooine_eisley_drixa:s_38'), 0))
	core.conversationService.sendConversationMessage(actor, npc, OutOfBand.ProsePackage('@conversation/tatooine_eisley_drixa:s_32'))
	core.conversationService.sendConversationOptions(actor, npc, options, handleOptionsFour)
	return
Пример #18
0
def lootKitScreen4(core, actor, npc):
	
	convSvc = core.conversationService
	prose = ProsePackage('conversation/junk_dealer_generic', 's_4d65752')
	outOfBand = OutOfBand()
	outOfBand.addProsePackage(prose)
	convSvc.sendConversationMessage(actor, npc, outOfBand)

	prose2 = ProsePackage('conversation/junk_dealer_generic', 's_d347bee3')
	outOfBand2 = OutOfBand()
	outOfBand2.addProsePackage(prose2)
	prose3 = ProsePackage('conversation/junk_dealer_generic', 's_b60b73f8')
	outOfBand3 = OutOfBand()
	outOfBand3.addProsePackage(prose3)
	
	option1 = ConversationOption(outOfBand2, 0)
	option2 = ConversationOption(outOfBand3, 0)
		
	options = Vector()
	options.add(option1)
	options.add(option2)
	
	convSvc.sendConversationOptions(actor, npc, options, handleLootScreenSelection5)
	
	return
Пример #19
0
def startConversation(core, actor, npc):
	global coreRef
	coreRef = core
	convSvc = core.conversationService
	

	if actor.getBuffByName('cloning_sickness'):
		prose = ProsePackage('conversation/clone_droid', 's_6')
		outOfBand = OutOfBand()
		outOfBand.addProsePackage(prose)
		convSvc.sendConversationMessage(actor, npc, outOfBand)
		prose2 = ProsePackage('conversation/clone_droid', 's_8')
		outOfBand2 = OutOfBand()
		outOfBand2.addProsePackage(prose2)
		prose3 = ProsePackage('conversation/clone_droid', 's_12')
		outOfBand3 = OutOfBand()
		outOfBand3.addProsePackage(prose3)
		option1 = ConversationOption(outOfBand2, 0)
		option2 = ConversationOption(outOfBand3, 1)

		
		options = Vector()
		options.add(option1)
		options.add(option2)

		convSvc.sendConversationOptions(actor, npc, options, handleFirstScreen)
		return
	else:
		core.conversationService.sendStopConversation(actor, npc, 'conversation/clone_droid', 's_4')
		return	
	return
Пример #20
0
def handleOptionsFive(core, actor, npc, selection):
    options = Vector()
    options.add(
        ConversationOption(
            OutOfBand.ProsePackage('@conversation/c_newbie_secondchance:s_83'),
            0))
    core.conversationService.sendConversationMessage(
        actor, npc,
        OutOfBand.ProsePackage('@conversation/c_newbie_secondchance:s_79'))
    core.conversationService.sendConversationOptions(actor, npc, options,
                                                     handleOptionsSix)
    return
def handleOptionsOne(core, actor, npc, selection):
		convSvc = core.conversationService
	
		options = Vector()
		# I have authorization to enter.
		options.add(ConversationOption(OutOfBand.ProsePackage('@conversation/gate_keeper_quarantine_zone:s_12'), 0))
		
		if selection == 0: 
				# What? Let me see your authorization code.
				convSvc.sendConversationMessage(actor, npc, OutOfBand.ProsePackage('@conversation/gate_keeper_quarantine_zone:s_14'))
	
		convSvc.sendConversationOptions(actor, npc, options, handleOptionsTwo)
		return
def startConversation(core, actor, npc):
	global coreRef
	coreRef = core
	convSvc = core.conversationService
	
	
		# The quarantine zone is a restricted area, citizen.
		core.conversationService.sendConversationMessage(actor, npc, OutOfBand.ProsePackage('@conversation/conversation/gate_keeper_quarantine_zone:s_10'))
		
		options = Vector()
		# I have authorization to enter.
		options.add(ConversationOption(OutOfBand.ProsePackage('@conversation/gate_keeper_quarantine_zone:s_12'), 0))
		core.conversationService.sendConversationOptions(actor, npc, handleOptionsOne)
		return
Пример #23
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
Пример #24
0
def handleOptionsOne(core, actor, npc, selection):
    options = Vector()
    options.add(
        ConversationOption(
            OutOfBand.ProsePackage(
                '@conversation/c_newbie_secondchance:s_122'), 0))
    options.add(
        ConversationOption(
            OutOfBand.ProsePackage(
                '@conversation/c_newbie_secondchance:s_170'), 1))
    core.conversationService.sendConversationMessage(
        actor, npc,
        OutOfBand.ProsePackage('@conversation/c_newbie_secondchance:s_120'))
    core.conversationService.sendConversationOptions(actor, npc, options,
                                                     handleOptionsTwo)
    return
Пример #25
0
def startConversation(core, actor, npc):
    convSvc = core.conversationService

    convSvc.sendConversationMessage(
        actor, npc, OutOfBand.ProsePackage('@conversation/respecseller:s_31'))

    options = Vector()
    options.add(
        ConversationOption(
            OutOfBand.ProsePackage('@conversation/respecseller:s_32'), 0))
    options.add(
        ConversationOption(
            OutOfBand.ProsePackage('@conversation/respecseller:s_33'), 1))
    convSvc.sendConversationOptions(actor, npc, options, handleFirstScreen)

    return
Пример #26
0
def handleOptionsOne(core, actor, npc, selection):
    if selection == 0:  # Yes.
        options = Vector()
        options.add(
            ConversationOption(
                OutOfBand.ProsePackage('@conversation/generic_broker_1:s_24'),
                0))  # OK
        core.conversationService.sendConversationMessage(
            actor, npc,
            OutOfBand.ProsePackage('@conversation/generic_broker_1:s_22'))
        core.conversationService.sendConversationOptions(
            actor, npc, options, handleOptionsTwo)
    elif selection == 1:  # Not right now.
        core.conversationService.sendStopConversation(
            actor, npc, 'conversation/generic_broker_1', 's_30')
    return
Пример #27
0
def startConversation(core, actor, npc):
	player = actor.getPlayerObject()
	if player is None:
		return
	quest = player.getQuest('tatooine_eisley_tdc')
	if quest is None:
		core.conversationService.sendStopConversation(actor, npc, 'conversation/tatooine_eisley_drixa', 's_43')						
 	elif quest.isCompleted() == True or quest.getActiveTask() > 1:
		core.conversationService.sendStopConversation(actor, npc, 'conversation/tatooine_eisley_drixa', 's_40')
	else:
		options = Vector()
		# Here's your order.
		options.add(ConversationOption(OutOfBand.ProsePackage('@conversation/tatooine_eisley_drixa:s_7'), 0))
		core.conversationService.sendConversationMessage(actor, npc, OutOfBand.ProsePackage('@conversation/tatooine_eisley_drixa:s_5'))
		core.conversationService.sendConversationOptions(actor, npc, options, handleOptionsOne)
	return
Пример #28
0
def setup(core, actor, target, command):

    if actor.hasCooldown('inside_info'):
        actor.sendSystemMessage('@bounty_hunter:sm_calling_contact_too_often',
                                0)
        return

    elif target.hasCooldown('inside_info_target'):
        actor.sendSystemMessage(
            '@bounty_hunter:sm_calling_contact_too_often_target', 0)
        return

    if target is None:
        target = actor

    bountyItem = core.missionService.getBountyListItem(target.getObjectID())

    if bountyItem is None:
        target.sendSystemMessage('@bounty_hunter:sm_no_bounty_self', 0)

    else:
        hunters = bountyItem.getAssignedHunters()
        if hunters.size() > 0:
            distance = hunterDistance(core, actor, target, hunters)
            if distance != 0:
                target.sendSystemMessage(
                    OutOfBand.ProsePackage(
                        '@bounty_hunter:sm_bounty_hunter_distance', 'DI',
                        int(distance)), 0)
                applyCooldowns(actor, target)
                return
            else:
                target.sendSystemMessage(
                    OutOfBand.ProsePackage(
                        '@bounty_hunter:sm_bounty_amount_target_with_bounties',
                        'TO', str(bountyItem.getCreditReward())), 0)
                applyCooldowns(actor, target)
                return
        else:
            target.sendSystemMessage(
                OutOfBand.ProsePackage(
                    '@bounty_hunter:sm_bounty_amount_target_no_bounties', 'TO',
                    str(bountyItem.getCreditReward())), 0)
            applyCooldowns(actor, target)
            return
        return
    return
Пример #29
0
def handleOptionsSix(core, actor, npc, selection):
    options = Vector()
    options.add(
        ConversationOption(
            OutOfBand.ProsePackage(
                '@conversation/c_newbie_secondchance:s_134'), 0))
    options.add(
        ConversationOption(
            OutOfBand.ProsePackage(
                '@conversation/c_newbie_secondchance:s_138'), 1))
    #options.add(ConversationOption(OutOfBand.ProsePackage('@conversation/c_newbie_secondchance:s_142'), 2))
    core.conversationService.sendConversationMessage(
        actor, npc,
        OutOfBand.ProsePackage('@conversation/c_newbie_secondchance:s_132'))
    core.conversationService.sendConversationOptions(actor, npc, options,
                                                     handleOptionsSeven)
    return
def startConversation(core, actor, npc):
		convSvc = core.conversationService
	
		# The quarantine zone is a restricted area, citizen.
		convSvc.sendConversationMessage(actor, npc, OutOfBand.ProsePackage('@conversation/gate_keeper_quarantine_zone:s_10'))
	
		convSvc.sendConversationOptions(actor, npc, options, handleOptionsOne)
		return
def handleOptionsTwo(core, actor, npc, selection):
		convSvc = core.conversationService
	
		options = Vector()
		# Here...
		options.add(ConversationOption(OutOfBand.ProsePackage('@conversation/gate_keeper_quarantine_zone:s_16'), 1))
	
		if selection == 1: 
				# Well, I see. Everything checks out. I can't say that I envy you, but I certainly appreciate what you are doing for the Empire...whatever you are doing.
				convSvc.sendConversationMessage(actor, npc, OutOfBand.ProsePackage('@conversation/gate_keeper_quarantine_zone:s_19'))
				
				position = Point3D(-5789, 511, -6558)
				core.simulationService.transferToPlanet(owner, core.terrainService.getPlanetByName("dathomir"), position, owner.getOrientation(), None)
				convSvc.sendConversationMessage(actor, npc, OutOfBand.ProsePackage('@conversation/gate_keeper_quarantine_zone:s_14'))
		
				convSvc.sendConversationOptions(actor, npc, options, endConversation)
		return
Пример #32
0
def lootKitScreen3(core, actor, npc):

    convSvc = core.conversationService

    convSvc.sendConversationMessage(
        actor, npc,
        OutOfBand.ProsePackage('@conversation/junk_dealer_generic:s_12fe83a6'))

    options = Vector()
    options.add(
        ConversationOption(
            OutOfBand.ProsePackage(
                '@conversation/junk_dealer_generic:s_e1a103e5'), 0))

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

    return
Пример #33
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		
Пример #34
0
def startConversation(core, actor, npc):
	convSvc = core.conversationService
	prose = ProsePackage('conversation/respecseller', 's_31')
	outOfBand = OutOfBand()
	outOfBand.addProsePackage(prose)
	convSvc.sendConversationMessage(actor, npc, outOfBand)
	prose2 = ProsePackage('conversation/respecseller', 's_32')
	outOfBand2 = OutOfBand()
	outOfBand2.addProsePackage(prose2)
	prose3 = ProsePackage('conversation/respecseller', 's_33')
	outOfBand3 = OutOfBand()
	outOfBand3.addProsePackage(prose3)
	option1 = ConversationOption(outOfBand2, 0)
	option2 = ConversationOption(outOfBand3, 1)
	options = Vector()
	options.add(option1)
	options.add(option2)
	convSvc.sendConversationOptions(actor, npc, options, handleFirstScreen)
	return
Пример #35
0
def lootKitScreen3(core, actor, npc):
	
	convSvc = core.conversationService
	prose = ProsePackage('conversation/junk_dealer_generic', 's_12fe83a6')
	outOfBand = OutOfBand()
	outOfBand.addProsePackage(prose)
	convSvc.sendConversationMessage(actor, npc, outOfBand)

	prose2 = ProsePackage('conversation/junk_dealer_generic', 's_e1a103e5')
	outOfBand2 = OutOfBand()
	outOfBand2.addProsePackage(prose2)
	
	option1 = ConversationOption(outOfBand2, 0)
		
	options = Vector()
	options.add(option1)
	
	convSvc.sendConversationOptions(actor, npc, options, handleLootScreenSelection4)
	
	return
Пример #36
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:
		if actor.getLevel() <= 10:
			cloningFee = 100
		elif actor.getLevel() >= 11:
			cloningFee = (((actor.getLevel() + 17) * actor.getLevel())/2)
		elif actor.getLevel() == 90:
			cloningFee = 5000

			
		if actor.getCashCredits() >= cloningFee:
			core.buffService.removeBuffFromCreature(actor, actor.getBuffByName("cloning_sickness"));
			core.conversationService.sendStopConversation(actor, npc, 'conversation/clone_droid', 's_14')
			actor.setCashCredits(actor.getCashCredits() - int(cloningFee))
			return
		elif actor.getCashCredits() <= cloningFee:
			core.conversationService.sendStopConversation(actor, npc, 'conversation/clone_droid', 's_16')
			return
		return		
Пример #37
0
def startConversation(core, actor, npc):
	global coreRef
	coreRef = core
	convSvc = core.conversationService
	

	if actor.getBuffByName('cloning_sickness'):
	
		level = int(actor.getLevel())
		
		if level <= 10:
			cloningFee = 100
		elif level >= 11:
			cloningFee = (((actor.getLevel() + 17) * actor.getLevel())/2)
		elif level == 90:
			cloningFee = 5000
			
		convSvc.sendConversationMessage(actor, npc, OutOfBand.ProsePackage("@conversation/clone_droid:s_6", int(cloningFee)))
		prose1 = ProsePackage('conversation/clone_droid', 's_8')
		outOfBand2 = OutOfBand()
		outOfBand2.addProsePackage(prose1)
		prose2 = ProsePackage('conversation/clone_droid', 's_12')
		outOfBand3 = OutOfBand()
		outOfBand3.addProsePackage(prose2)
		option1 = ConversationOption(outOfBand2, 0)
		option2 = ConversationOption(outOfBand3, 1)

		
		options = Vector()
		options.add(option1)
		options.add(option2)

		convSvc.sendConversationOptions(actor, npc, options, handleFirstScreen)
		return
	else:
		core.conversationService.sendStopConversation(actor, npc, 'conversation/clone_droid', 's_14')
		return	
	return
Пример #38
0
def startConversation(core, actor, npc):
	global coreRef
	global impRecruiterRef
	coreRef = core
	impRecruiterRef = npc
	convSvc = core.conversationService
	faction = actor.getFaction()
	factionStatus = actor.getFactionStatus()
	
	if actor.getPvpStatus(PvpStatus.GoingOvert) or actor.getPvpStatus(PvpStatus.GoingCovert):
		core.conversationService.sendStopConversation(actor, npc, 'conversation/faction_recruiter_rebel', 's_364')
		return	
	elif actor.getFaction() != 'rebel' and actor.getFaction() != 'imperial':
		prose = ProsePackage('conversation/faction_recruiter_rebel', 's_334')
		outOfBand = OutOfBand()
		outOfBand.addProsePackage(prose)
		convSvc.sendConversationMessage(actor, npc, outOfBand)
		prose2 = ProsePackage('conversation/faction_recruiter_rebel', 's_348')
		outOfBand2 = OutOfBand()
		outOfBand2.addProsePackage(prose2)
		prose3 = ProsePackage('conversation/faction_recruiter_rebel', 's_83')
		outOfBand3 = OutOfBand()
		outOfBand3.addProsePackage(prose3)
		option1 = ConversationOption(outOfBand2, 0)
		option2 = ConversationOption(outOfBand3, 1)

		
		options = Vector()
		options.add(option1)
		options.add(option2)

		convSvc.sendConversationOptions(actor, npc, options, handleFirstScreen)
		return
	elif actor.getFaction() == 'rebel' and actor.getFactionStatus() == FactionStatus.OnLeave:
		prose = ProsePackage('conversation/faction_recruiter_rebel', 's_216')
		outOfBand = OutOfBand()
		outOfBand.addProsePackage(prose)
		convSvc.sendConversationMessage(actor, npc, outOfBand)
		prose2 = ProsePackage('conversation/faction_recruiter_rebel', 's_49')
		outOfBand2 = OutOfBand()
		outOfBand2.addProsePackage(prose2)
		prose3 = ProsePackage('conversation/faction_recruiter_rebel', 's_330')
		outOfBand3 = OutOfBand()
		outOfBand3.addProsePackage(prose3)
		prose4 = ProsePackage('conversation/faction_recruiter_rebel', 's_248')
		outOfBand4 = OutOfBand()
		outOfBand4.addProsePackage(prose4)
		option1 = ConversationOption(outOfBand2, 0)
		option2 = ConversationOption(outOfBand3, 1)
		option3 = ConversationOption(outOfBand4, 1)

		
		options = Vector()
		options.add(option1)
		options.add(option2)
		options.add(option3)

		convSvc.sendConversationOptions(actor, npc, options, handleFirstScreen)		
		return
	elif actor.getFaction() == 'rebel' and actor.getFactionStatus() == FactionStatus.Combatant:
		prose = ProsePackage('conversation/faction_recruiter_rebel', 's_216')
		outOfBand = OutOfBand()
		outOfBand.addProsePackage(prose)
		convSvc.sendConversationMessage(actor, npc, outOfBand)
		prose2 = ProsePackage('conversation/faction_recruiter_rebel', 's_49')
		outOfBand2 = OutOfBand()
		outOfBand2.addProsePackage(prose2)
		prose4 = ProsePackage('conversation/faction_recruiter_rebel', 's_330')
		outOfBand4 = OutOfBand()
		outOfBand4.addProsePackage(prose4)
		prose5 = ProsePackage('conversation/faction_recruiter_rebel', 's_248')
		outOfBand5 = OutOfBand()
		outOfBand5.addProsePackage(prose5)
		option1 = ConversationOption(outOfBand2, 0)
		option2 = ConversationOption(outOfBand4, 1)
		option4 = ConversationOption(outOfBand5, 1)
		
		options = Vector()
		options.add(option1)
		options.add(option2)
		options.add(option4)
		convSvc.sendConversationOptions(actor, npc, options, handleFirstScreen)	
		
		return
	elif actor.getFactionStatus() == FactionStatus.SpecialForces:
		prose = ProsePackage('conversation/faction_recruiter_rebel', 's_216')
		outOfBand = OutOfBand()
		outOfBand.addProsePackage(prose)
		convSvc.sendConversationMessage(actor, npc, outOfBand)
		prose2 = ProsePackage('conversation/faction_recruiter_rebel', 's_49')
		outOfBand2 = OutOfBand()
		outOfBand2.addProsePackage(prose2)
		prose4 = ProsePackage('conversation/faction_recruiter_rebel', 's_330')
		outOfBand4 = OutOfBand()
		outOfBand4.addProsePackage(prose4)
		prose5 = ProsePackage('conversation/faction_recruiter_rebel', 's_248')
		outOfBand5 = OutOfBand()
		outOfBand5.addProsePackage(prose5)
		option1 = ConversationOption(outOfBand2, 0)
		option2 = ConversationOption(outOfBand4, 1)
		option4 = ConversationOption(outOfBand5, 1)
		
		options = Vector()
		options.add(option1)
		options.add(option2)
		options.add(option4)
		convSvc.sendConversationOptions(actor, npc, options, handleFirstScreen)	
		
		return
	elif actor.getFaction() == 'imperial':
		npc.setCurrentAnimation('all_b_emt_backhand')
		core.conversationService.sendStopConversation(actor, npc, 'conversation/faction_recruiter_rebel', 's_230')
		return
	return
Пример #39
0
def handleFirstScreen(core, actor, npc, selection):

	if selection == 0:
		# respec
		# TODO: check for prices
		convSvc = core.conversationService
		prose = ProsePackage('conversation/respecseller', 's_58')
		outOfBand = OutOfBand()
		outOfBand.addProsePackage(prose)
		convSvc.sendConversationMessage(actor, npc, outOfBand)
		prose2 = ProsePackage('conversation/respecseller', 's_60')
		outOfBand2 = OutOfBand()
		outOfBand2.addProsePackage(prose2)
		prose3 = ProsePackage('conversation/respecseller', 's_64')
		outOfBand3 = OutOfBand()
		outOfBand3.addProsePackage(prose3)
		option1 = ConversationOption(outOfBand2, 0)
		option2 = ConversationOption(outOfBand3, 1)
		options = Vector()
		options.add(option1)
		options.add(option2)
		convSvc.sendConversationOptions(actor, npc, options, handleRespecScreen)
		return
	if selection == 1:
		# expertise reset
		# TODO: check for prices
		convSvc = core.conversationService
		prose = ProsePackage('conversation/respecseller', 's_35')
		outOfBand = OutOfBand()
		outOfBand.addProsePackage(prose)
		convSvc.sendConversationMessage(actor, npc, outOfBand)
		prose2 = ProsePackage('conversation/respecseller', 's_71')
		outOfBand2 = OutOfBand()
		outOfBand2.addProsePackage(prose2)
		prose3 = ProsePackage('conversation/respecseller', 's_72')
		outOfBand3 = OutOfBand()
		outOfBand3.addProsePackage(prose3)
		option1 = ConversationOption(outOfBand2, 0)
		option2 = ConversationOption(outOfBand3, 1)
		options = Vector()
		options.add(option1)
		options.add(option2)
		convSvc.sendConversationOptions(actor, npc, options, handleResetScreen)


	return
Пример #40
0
def startConversation(core, actor, npc):
	#core.lootService.prepInv(actor)
	global coreRef
	global junkDealerRef
	global sellItemListRef
	sellItemListRef = core.lootService.getSellableInventoryItems(actor)
	coreRef = core
	junkDealerRef = npc
	convSvc = core.conversationService
	prose = ProsePackage('conversation/junk_dealer_generic', 's_bef51e38')
	outOfBand = OutOfBand()
	outOfBand.addProsePackage(prose)
	convSvc.sendConversationMessage(actor, npc, outOfBand)
	prose2 = ProsePackage('conversation/junk_dealer_generic', 's_54fab04f')
	outOfBand2 = OutOfBand()
	outOfBand2.addProsePackage(prose2)
	prose3 = ProsePackage('conversation/junk_dealer_generic', 's_48')
	outOfBand3 = OutOfBand()
	outOfBand3.addProsePackage(prose3)
	prose4 = ProsePackage('conversation/junk_dealer_generic', 's_3aa18b2d')
	outOfBand4 = OutOfBand()
	outOfBand4.addProsePackage(prose4)
	option1 = ConversationOption(outOfBand2, 0)
	option2 = ConversationOption(outOfBand3, 1)
	option3 = ConversationOption(outOfBand4, 1)
	
	options = Vector()
	options.add(option1)
	options.add(option2)
	options.add(option3)
	
	if len(core.lootService.getBuyHistory(actor,npc))!= 0:
		prose5 = ProsePackage('conversation/junk_dealer_generic', 's_43')
		outOfBand5 = OutOfBand()
		outOfBand5.addProsePackage(prose5)
		option4 = ConversationOption(outOfBand5, 1)
		options.add(option4)
	
	convSvc.sendConversationOptions(actor, npc, options, handleFirstScreen)
	return
Пример #41
0
def handleSecondScreen(core, actor, npc, selection):
	convSvc = core.conversationService
	
	
	if actor.getFaction() != 'rebel' and actor.getFaction() != 'imperial':
		if selection == 0:
			actor.setFaction('rebel')
			actor.setFactionStatus(FactionStatus.OnLeave)
	
			prose = ProsePackage('conversation/faction_recruiter_rebel', 's_99')
			outOfBand = OutOfBand()
			outOfBand.addProsePackage(prose)
			convSvc.sendConversationMessage(actor, npc, outOfBand)
			prose2 = ProsePackage('conversation/faction_recruiter_rebel', 's_358')
			outOfBand2 = OutOfBand()
			outOfBand2.addProsePackage(prose2)
			option1 = ConversationOption(outOfBand2, 0)
	
			
			options = Vector()
			options.add(option1)
	
	
			core.conversationService.sendStopConversation(actor, npc, 'conversation/faction_recruiter_rebel', 's_356')	
			return
		if selection ==1:
			core.conversationService.sendStopConversation(actor, npc, 'conversation/faction_recruiter_rebel', 's_362')	
			return
		return
	elif actor.getFaction() == 'rebel' and actor.getFactionStatus() == FactionStatus.OnLeave:
		if selection == 0:
			actor.setFactionStatus(FactionStatus.Combatant)
			core.conversationService.sendStopConversation(actor, npc, 'conversation/faction_recruiter_rebel', 's_224')
			return
		
		if selection == 1:
			prose = ProsePackage('conversation/faction_recruiter_rebel', 's_64')
			outOfBand = OutOfBand()
			outOfBand.addProsePackage(prose)
			convSvc.sendConversationMessage(actor, npc, outOfBand)
			prose2 = ProsePackage('conversation/faction_recruiter_rebel', 's_66')
			outOfBand2 = OutOfBand()
			outOfBand2.addProsePackage(prose2)
			prose3 = ProsePackage('conversation/faction_recruiter_rebel', 's_226')
			outOfBand3 = OutOfBand()
			outOfBand3.addProsePackage(prose3)
			option1 = ConversationOption(outOfBand2, 0)
			option2 = ConversationOption(outOfBand3, 1)

	
			
			options = Vector()
			options.add(option1)
			options.add(option2)

	
			convSvc.sendConversationOptions(actor, npc, options, handleFourthScreen)
			return
		if selection == 2:
			prose = ProsePackage('conversation/faction_recruiter_rebel', 's_76')
			outOfBand = OutOfBand()
			outOfBand.addProsePackage(prose)
			convSvc.sendConversationMessage(actor, npc, outOfBand)
			prose2 = ProsePackage('conversation/faction_recruiter_rebel', 's_78')
			outOfBand2 = OutOfBand()
			outOfBand2.addProsePackage(prose2)
			prose3 = ProsePackage('conversation/faction_recruiter_rebel', 's_360')
			outOfBand3 = OutOfBand()
			outOfBand3.addProsePackage(prose3)
			option1 = ConversationOption(outOfBand2, 0)
			option2 = ConversationOption(outOfBand3, 1)

	
			
			options = Vector()
			options.add(option1)
			options.add(option2)

	
			convSvc.sendConversationOptions(actor, npc, options, handleThirdScreen)
			return
		if selection == 3:
			core.conversationService.sendStopConversation(actor, npc, 'conversation/faction_recruiter_rebel', 's_97')
			return
		return	
	elif actor.getFaction() == 'rebel' and actor.getFactionStatus() == FactionStatus.Combatant:
		if selection == 0:
			prose = ProsePackage('conversation/faction_recruiter_rebel', 's_88')
			outOfBand = OutOfBand()
			outOfBand.addProsePackage(prose)
			convSvc.sendConversationMessage(actor, npc, outOfBand)
			prose2 = ProsePackage('conversation/faction_recruiter_rebel', 's_90')
			outOfBand2 = OutOfBand()
			outOfBand2.addProsePackage(prose2)
			prose3 = ProsePackage('conversation/faction_recruiter_rebel', 's_94')
			outOfBand3 = OutOfBand()
			outOfBand3.addProsePackage(prose3)
			option1 = ConversationOption(outOfBand2, 0)
			option2 = ConversationOption(outOfBand3, 1)

	
			
			options = Vector()
			options.add(option1)
			options.add(option2)

	
			convSvc.sendConversationOptions(actor, npc, options, handleFithScreen)
			return

		if selection == 1:
			prose = ProsePackage('conversation/faction_recruiter_rebel', 's_64')
			outOfBand = OutOfBand()
			outOfBand.addProsePackage(prose)
			convSvc.sendConversationMessage(actor, npc, outOfBand)
			prose2 = ProsePackage('conversation/faction_recruiter_rebel', 's_66')
			outOfBand2 = OutOfBand()
			outOfBand2.addProsePackage(prose2)
			prose3 = ProsePackage('conversation/faction_recruiter_rebel', 's_226')
			outOfBand3 = OutOfBand()
			outOfBand3.addProsePackage(prose3)
			option1 = ConversationOption(outOfBand2, 0)
			option2 = ConversationOption(outOfBand3, 1)

	
			
			options = Vector()
			options.add(option1)
			options.add(option2)

	
			convSvc.sendConversationOptions(actor, npc, options, handleFourthScreen)
			return
		if selection == 2:
			prose = ProsePackage('conversation/faction_recruiter_rebel', 's_76')
			outOfBand = OutOfBand()
			outOfBand.addProsePackage(prose)
			convSvc.sendConversationMessage(actor, npc, outOfBand)
			prose2 = ProsePackage('conversation/faction_recruiter_rebel', 's_78')
			outOfBand2 = OutOfBand()
			outOfBand2.addProsePackage(prose2)
			prose3 = ProsePackage('conversation/faction_recruiter_rebel', 's_360')
			outOfBand3 = OutOfBand()
			outOfBand3.addProsePackage(prose3)
			option1 = ConversationOption(outOfBand2, 0)
			option2 = ConversationOption(outOfBand3, 1)

	
			
			options = Vector()
			options.add(option1)
			options.add(option2)

	
			convSvc.sendConversationOptions(actor, npc, options, handleThirdScreen)
			return
		if selection == 3:
			return
		return	
	elif actor.getFaction() == 'rebel' and actor.getFactionStatus() == FactionStatus.SpecialForces:
		if selection == 0:
			prose = ProsePackage('conversation/faction_recruiter_rebel', 's_88')
			outOfBand = OutOfBand()
			outOfBand.addProsePackage(prose)
			convSvc.sendConversationMessage(actor, npc, outOfBand)
			prose2 = ProsePackage('conversation/faction_recruiter_rebel', 's_90')
			outOfBand2 = OutOfBand()
			outOfBand2.addProsePackage(prose2)
			prose3 = ProsePackage('conversation/faction_recruiter_rebel', 's_94')
			outOfBand3 = OutOfBand()
			outOfBand3.addProsePackage(prose3)
			option1 = ConversationOption(outOfBand2, 0)
			option2 = ConversationOption(outOfBand3, 1)

	
			
			options = Vector()
			options.add(option1)
			options.add(option2)

	
			convSvc.sendConversationOptions(actor, npc, options, handleFithScreen)
			return

		if selection == 1:
			prose = ProsePackage('conversation/faction_recruiter_rebel', 's_54')
			outOfBand = OutOfBand()
			outOfBand.addProsePackage(prose)
			convSvc.sendConversationMessage(actor, npc, outOfBand)
			prose2 = ProsePackage('conversation/faction_recruiter_rebel', 's_56')
			outOfBand2 = OutOfBand()
			outOfBand2.addProsePackage(prose2)
			prose3 = ProsePackage('conversation/faction_recruiter_rebel', 's_360')
			outOfBand3 = OutOfBand()
			outOfBand3.addProsePackage(prose3)
			option1 = ConversationOption(outOfBand2, 0)
			option2 = ConversationOption(outOfBand3, 1)

	
			
			options = Vector()
			options.add(option1)
			options.add(option2)

	
			convSvc.sendConversationOptions(actor, npc, options, handleSixthScreen)
			return
		if selection == 2:
			prose = ProsePackage('conversation/faction_recruiter_rebel', 's_76')
			outOfBand = OutOfBand()
			outOfBand.addProsePackage(prose)
			convSvc.sendConversationMessage(actor, npc, outOfBand)
			prose2 = ProsePackage('conversation/faction_recruiter_rebel', 's_74')
			outOfBand2 = OutOfBand()
			outOfBand2.addProsePackage(prose2)
			prose3 = ProsePackage('conversation/faction_recruiter_rebel', 's_360')
			outOfBand3 = OutOfBand()
			outOfBand3.addProsePackage(prose3)
			option1 = ConversationOption(outOfBand2, 0)
			option2 = ConversationOption(outOfBand3, 1)

	
			
			options = Vector()
			options.add(option1)
			options.add(option2)

	
			convSvc.sendConversationOptions(actor, npc, options, handleThirdScreen)
			return
		if selection == 3:
			return	
		return
Пример #42
0
def buyBackWindowCallBack(owner, window, eventType, returnList):
	
	convSvc = coreRef.conversationService
	
	if returnList.get(0) == 0:
		startConversation(coreRef,owner,junkDealerRef)
		return
	
	#buy
	if eventType == 0:		
		index = int(returnList.get(0))
		buyHistory = coreRef.lootService.getBuyHistory(owner,junkDealerRef)
		if len(buyHistory) == 0:
			owner.sendSystemMessage('@loot_dealer:no_buy_back_items_found', 1)
			startConversation(coreRef,owner,junkDealerRef)
			return
		
		buyBackItem = buyHistory.get(index)
		
		if buyBackItem == None:
			owner.sendSystemMessage('@loot_dealer:no_buy_back_items_found', 0)
			startConversation(coreRef,owner,junkDealerRef)
			return
		
		if owner.getInventoryItemCount() >= 80:
			prose = ProsePackage('conversation/junk_dealer_generic', 's_47')
			outOfBand = OutOfBand()
			outOfBand.addProsePackage(prose)
			convSvc.sendConversationMessage(owner, junkDealerRef, outOfBand)
			return
			
		junkDealerPrice = buyBackItem.getJunkDealerPrice()
		if junkDealerPrice == 0:
			junkDealerPrice = 20
		owner.setCashCredits(owner.getCashCredits()+junkDealerPrice)
		
		if owner.getCashCredits()>=junkDealerPrice:			
			owner.setCashCredits(owner.getCashCredits()-junkDealerPrice)			
			inventory = owner.getSlottedObject('inventory')							
			inventory.add(buyBackItem)
			owner.sendSystemMessage('You buy back ' + buyBackItem.getCustomName() + ' for %s' % junkDealerPrice + ' credits.', 0)
			# remove from junk dealer history
			coreRef.lootService.removeBoughtBackItemFromHistory(owner,junkDealerRef,buyBackItem)
		else:
			owner.sendSystemMessage('@loot_dealer:prose_no_buy_back', 0)
			
		coreRef.suiService.closeSUIWindow(owner,window.getWindowId());
		handleFirstScreen(coreRef, owner, junkDealerRef, 3)
		return
	
	#cancel
	if eventType == 1:
		owner.sendSystemMessage('Cancel', 0)
		sellItem = returnList.get(0)
		startConversation(coreRef,owner,junkDealerRef)
		return
	
	#examine
	if eventType == 2:
		owner.sendSystemMessage('Ex', 0)
		sellItem = returnList.get(0)
		startConversation(coreRef,owner,junkDealerRef)
		owner.sendSystemMessage('Examine', 0)
		return
Пример #43
0
def handleFirstScreen(core, actor, npc, selection):
	
	convSvc = core.conversationService
	
	if selection == 0:
		# sell items
		
		prose = ProsePackage('conversation/junk_dealer_generic', 's_84a67771')
		outOfBand = OutOfBand()
		outOfBand.addProsePackage(prose)
		convSvc.sendConversationMessage(actor, npc, outOfBand)
			
		sellItemListRef = core.lootService.getSellableInventoryItems(actor)
		
		if len(sellItemListRef) == 0:
			actor.sendSystemMessage('@loot_dealer:no_items', 1)
			startConversation(coreRef,actor,junkDealerRef)
			return # no point
		
		window = core.suiService.createSUIWindow('Script.listBox', actor, npc, 0)
		window.setProperty('bg.caption.lblTitle:Text', '@loot_dealer:sell_title')
		window.setProperty('Prompt.lblPrompt:Text', '@loot_dealer:sell_prompt')
			
		for item in sellItemListRef:
			window.addListBoxMenuItem(item.getCustomName(), 0);
				
		window.setProperty('btnOther:visible', 'True')
		window.setProperty('btnCancel:visible', 'True')
		window.setProperty('btnOk:visible', 'True')
		window.setProperty('btnOther:Text', '@loot_dealer:examine')
		window.setProperty('btnCancel:Text', '@cancel')
		window.setProperty('btnOk:Text', '@loot_dealer:btn_sell')		
		returnList = Vector()
		returnList.add('List.lstList:SelectedRow')
	
		window.addHandler(0, '', Trigger.TRIGGER_OK, returnList, sellWindowCallBack)
		window.addHandler(1, '', Trigger.TRIGGER_CANCEL, returnList, sellWindowCallBack)
		window.addHandler(2, '', Trigger.TRIGGER_UPDATE, returnList, sellWindowCallBack)		
		core.suiService.openSUIWindow(window);
	
		return
		
	if selection == 1:
		# mark items
		window = core.suiService.createSUIWindow('Script.listBox', actor, npc, 0)
		window.setProperty('bg.caption.lblTitle:Text', '@loot_dealer:junk_no_sell_title')
		window.setProperty('Prompt.lblPrompt:Text', '@loot_dealer:junk_no_sell_desc')
		
		sellItemListRef = core.lootService.getSellableInventoryItems(actor)
		
		for item in sellItemListRef:
			nameString = item.getCustomName()
			nameString = 'TestJunkItem'
			if item.isNoSell():
				nameString = '[*No Sell*]' + item.getCustomName()
				window.addListBoxMenuItem(nameString, 0)
			else:
				nameString = '[Sellable]' + item.getCustomName()
				window.addListBoxMenuItem(nameString, 0)
				
		window.setProperty('btnOther:visible', 'True')
		window.setProperty('btnCancel:visible', 'True')
		window.setProperty('btnOk:visible', 'True')
		window.setProperty('btnOther:Text', '@loot_dealer:examine')
		window.setProperty('btnCancel:Text', '@cancel')
		window.setProperty('btnOk:Text', '@loot_dealer:junk_no_sell_button')		
		returnList = Vector()
		returnList.add('List.lstList:SelectedRow')
	
		#window.addHandler(0, '', Trigger.TRIGGER_OK, returnList, noSellWindowCallBack)
		#window.addHandler(1, '', Trigger.TRIGGER_CANCEL, returnList, noSellWindowCallBack)
		window.addHandler(0, '',9, returnList, noSellWindowCallBack)
		window.addHandler(1, '',10, returnList, noSellWindowCallBack)
		window.addHandler(2, '',11, returnList, noSellWindowCallBack)		
		core.suiService.openSUIWindow(window);
		return
	
	if selection == 2:
		lootKitScreen1(core, actor, npc)
	
	
	if selection == 3:
		# buy back
		
		buyHistory = coreRef.lootService.getBuyHistory(actor,npc)
		if len(buyHistory) == 0:
			actor.sendSystemMessage('@loot_dealer:no_buy_back_items_found', 1)
			startConversation(coreRef,actor,npc)
			return
		
		prose = ProsePackage('conversation/junk_dealer_generic', 's_44')
		outOfBand = OutOfBand()
		outOfBand.addProsePackage(prose)
		convSvc.sendConversationMessage(actor, npc, outOfBand)
		
		window = core.suiService.createSUIWindow('Script.listBox', actor, npc, 0)
		window.setProperty('bg.caption.lblTitle:Text', '@loot_dealer:buy_back_title')
		window.setProperty('Prompt.lblPrompt:Text', '@loot_dealer:buy_back_prompt')
		
		buyHistory = core.lootService.getBuyHistory(actor,junkDealerRef)
		if buyHistory==None:
			return
		
		
		
		for item in buyHistory:
			junkDealerPrice = item.getJunkDealerPrice()
			if junkDealerPrice == 0:
				junkDealerPrice = 20
			nameString = '[%s' % junkDealerPrice  + ']' + item.getCustomName() #%
			window.addListBoxMenuItem(nameString, 0)
				
		window.setProperty('btnOther:visible', 'True')
		window.setProperty('btnCancel:visible', 'True')
		window.setProperty('btnOk:visible', 'True')
		window.setProperty('btnOther:Text', '@loot_dealer:examine')
		window.setProperty('btnCancel:Text', '@cancel')
		window.setProperty('btnOk:Text', '@loot_dealer:btn_buy_back')		
		returnList = Vector()
		returnList.add('List.lstList:SelectedRow')
	
		window.addHandler(0, '', Trigger.TRIGGER_OK, returnList, buyBackWindowCallBack)
		window.addHandler(1, '', Trigger.TRIGGER_CANCEL, returnList, buyBackWindowCallBack)
		window.addHandler(2, '', Trigger.TRIGGER_UPDATE, returnList, buyBackWindowCallBack)		
		core.suiService.openSUIWindow(window);
	
		return
Пример #44
0
def lootKitScreen5a(core, actor, npc):
	
	convSvc = core.conversationService
	prose = ProsePackage('conversation/junk_dealer_generic', 's_3fc7eb45')
	outOfBand = OutOfBand()
	outOfBand.addProsePackage(prose)
	convSvc.sendConversationMessage(actor, npc, outOfBand)

	prose2 = ProsePackage('conversation/junk_dealer_generic', 's_ee977dee')
	outOfBand2 = OutOfBand()
	outOfBand2.addProsePackage(prose2)
	prose3 = ProsePackage('conversation/junk_dealer_generic', 's_8f39769')
	outOfBand3 = OutOfBand()
	outOfBand3.addProsePackage(prose3)
	prose4 = ProsePackage('conversation/junk_dealer_generic', 's_fe657cdd')
	outOfBand4 = OutOfBand()
	outOfBand4.addProsePackage(prose4)
	prose5 = ProsePackage('conversation/junk_dealer_generic', 's_9ede4b84')
	outOfBand5 = OutOfBand()
	outOfBand5.addProsePackage(prose5)
	prose6 = ProsePackage('conversation/junk_dealer_generic', 's_87c5851b')
	outOfBand6 = OutOfBand()
	outOfBand6.addProsePackage(prose6)
	
	option1 = ConversationOption(outOfBand2, 0)
	option2 = ConversationOption(outOfBand3, 0)
	option3 = ConversationOption(outOfBand4, 0)
	option4 = ConversationOption(outOfBand5, 0)
	option5 = ConversationOption(outOfBand6, 0)
		
	options = Vector()
	options.add(option1)
	options.add(option2)
	options.add(option3)
	options.add(option4)
	options.add(option5)
	
	convSvc.sendConversationOptions(actor, npc, options, handleLootScreenSelection6)
	
	return
Пример #45
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():
        prose = ProsePackage("conversation/bounty_probot", "s_6")
        outOfBand = OutOfBand()
        outOfBand.addProsePackage(prose)
        convSvc.sendConversationMessage(actor, npc, outOfBand)
        return

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

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

    objective = mission.getObjective()

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

    prose = ProsePackage("conversation/bounty_probot", "s_5")
    outOfBand = OutOfBand()
    outOfBand.addProsePackage(prose)
    convSvc.sendConversationMessage(actor, npc, outOfBand)

    options = Vector()
    optionProse = ProsePackage("conversation/bounty_probot", "s_8")
    optionOOB = OutOfBand()
    optionOOB.addProsePackage(optionProse)
    options.add(ConversationOption(optionOOB, 0))
    convSvc.sendConversationOptions(actor, npc, options, handleBioTransmit)

    return
Пример #46
0
def handleFirstScreen(core, actor, npc, selection):
	
	convSvc = core.conversationService
	if actor.getFaction() != 'rebel' and actor.getFaction() != 'imperial':
		if selection == 0:
			prose = ProsePackage('conversation/faction_recruiter_rebel', 's_352')
			outOfBand = OutOfBand()
			outOfBand.addProsePackage(prose)
			convSvc.sendConversationMessage(actor, npc, outOfBand)
			prose2 = ProsePackage('conversation/faction_recruiter_rebel', 's_354')
			outOfBand2 = OutOfBand()
			outOfBand2.addProsePackage(prose2)
			prose3 = ProsePackage('conversation/faction_recruiter_rebel', 's_360')
			outOfBand3 = OutOfBand()
			outOfBand3.addProsePackage(prose3)
			option1 = ConversationOption(outOfBand2, 0)
			option2 = ConversationOption(outOfBand3, 1)
	
			
			options = Vector()
			options.add(option1)
			options.add(option2)
	
			convSvc.sendConversationOptions(actor, npc, options, handleSecondScreen)
			return
	
			
		if selection == 1:
			return
		
		if selection == 2:
			core.conversationService.sendStopConversation(actor, npc, 'conversation/faction_recruiter_rebel', 's_362')	
			return
		return
	elif actor.getFaction() == 'rebel' and actor.getFactionStatus() == FactionStatus.OnLeave:
		if selection == 0:
			prose = ProsePackage('conversation/faction_recruiter_rebel', 's_50')
			outOfBand = OutOfBand()
			outOfBand.addProsePackage(prose)
			convSvc.sendConversationMessage(actor, npc, outOfBand)
			prose2 = ProsePackage('conversation/faction_recruiter_rebel', 's_95')
			outOfBand2 = OutOfBand()
			outOfBand2.addProsePackage(prose2)
			prose3 = ProsePackage('conversation/faction_recruiter_rebel', 's_93')
			outOfBand3 = OutOfBand()
			outOfBand3.addProsePackage(prose3)
			prose4 = ProsePackage('conversation/faction_recruiter_rebel', 's_74')
			outOfBand4 = OutOfBand()
			outOfBand4.addProsePackage(prose4)
			prose5 = ProsePackage('conversation/faction_recruiter_rebel', 's_360')
			outOfBand5 = OutOfBand()
			outOfBand5.addProsePackage(prose5)
			option1 = ConversationOption(outOfBand2, 0)
			option2 = ConversationOption(outOfBand3, 1)
			option3 = ConversationOption(outOfBand4, 1)
			option4 = ConversationOption(outOfBand5, 1)
	
			
			options = Vector()
			options.add(option1)
			options.add(option2)
			options.add(option3)
			options.add(option4)
	
			convSvc.sendConversationOptions(actor, npc, options, handleSecondScreen)
			return
			
		if selection == 1:
			percent = core.guildService.getGuildObject().getCurrentServerGCWTotalPercentMap().get(actor.getPlanet().getName()).getPercent().intValue()
			convSvc.sendConversationMessage(actor, npc, OutOfBand.ProsePackage("@conversation/faction_recruiter_imperial:s_332", percent, "TO", str(100 - percent)))
			return
		
		if selection == 2:
			return
		return
	elif actor.getFaction() == 'rebel' and actor.getFactionStatus() == FactionStatus.Combatant:	
		if selection == 0:
			prose = ProsePackage('conversation/faction_recruiter_rebel', 's_50')
			outOfBand = OutOfBand()
			outOfBand.addProsePackage(prose)
			convSvc.sendConversationMessage(actor, npc, outOfBand)
			prose2 = ProsePackage('conversation/faction_recruiter_rebel', 's_86')
			outOfBand2 = OutOfBand()
			outOfBand2.addProsePackage(prose2)
			prose3 = ProsePackage('conversation/faction_recruiter_rebel', 's_93')
			outOfBand3 = OutOfBand()
			outOfBand3.addProsePackage(prose3)
			prose4 = ProsePackage('conversation/faction_recruiter_rebel', 's_74')
			outOfBand4 = OutOfBand()
			outOfBand4.addProsePackage(prose4)
			prose5 = ProsePackage('conversation/faction_recruiter_rebel', 's_360')
			outOfBand5 = OutOfBand()
			outOfBand5.addProsePackage(prose5)
			option1 = ConversationOption(outOfBand2, 0)
			option2 = ConversationOption(outOfBand3, 1)
			option3 = ConversationOption(outOfBand4, 1)
			option4 = ConversationOption(outOfBand5, 1)
	
			
			options = Vector()
			options.add(option1)
			options.add(option2)
			options.add(option3)
			options.add(option4)
	
			convSvc.sendConversationOptions(actor, npc, options, handleSecondScreen)
			return

		if selection == 1:
			percent = core.guildService.getGuildObject().getCurrentServerGCWTotalPercentMap().get(actor.getPlanet().getName()).getPercent().intValue()
			convSvc.sendConversationMessage(actor, npc, OutOfBand.ProsePackage("@conversation/faction_recruiter_rebel:s_332", percent, "TO", str(100 - percent)))
			return

		if selection == 2:
			prose = ProsePackage('conversation/faction_recruiter_rebel', 's_76')
			outOfBand = OutOfBand()
			outOfBand.addProsePackage(prose)
			convSvc.sendConversationMessage(actor, npc, outOfBand)
			prose2 = ProsePackage('conversation/faction_recruiter_rebel', 's_78')
			outOfBand2 = OutOfBand()
			outOfBand2.addProsePackage(prose2)
			prose3 = ProsePackage('conversation/faction_recruiter_rebel', 's_360')
			outOfBand3 = OutOfBand()
			outOfBand3.addProsePackage(prose3)
			option1 = ConversationOption(outOfBand2, 0)
			option2 = ConversationOption(outOfBand3, 1)
	
			
			options = Vector()
			options.add(option1)
			options.add(option2)
	
			convSvc.sendConversationOptions(actor, npc, options, handleSecondScreen)
			return
		return
	elif actor.getFaction() == 'rebel' and actor.getFactionStatus() == FactionStatus.SpecialForces:	
		if selection == 0:
			prose = ProsePackage('conversation/faction_recruiter_rebel', 's_50')
			outOfBand = OutOfBand()
			outOfBand.addProsePackage(prose)
			convSvc.sendConversationMessage(actor, npc, outOfBand)
			prose2 = ProsePackage('conversation/faction_recruiter_rebel', 's_90')
			outOfBand2 = OutOfBand()
			outOfBand2.addProsePackage(prose2)
			prose3 = ProsePackage('conversation/faction_recruiter_rebel', 's_95')
			outOfBand3 = OutOfBand()
			outOfBand3.addProsePackage(prose3)
			prose4 = ProsePackage('conversation/faction_recruiter_rebel', 's_78')
			outOfBand4 = OutOfBand()
			outOfBand4.addProsePackage(prose4)
			prose5 = ProsePackage('conversation/faction_recruiter_rebel', 's_360')
			outOfBand5 = OutOfBand()
			outOfBand5.addProsePackage(prose5)
			option1 = ConversationOption(outOfBand2, 0)
			option2 = ConversationOption(outOfBand3, 1)
			option3 = ConversationOption(outOfBand4, 1)
			option4 = ConversationOption(outOfBand5, 1)
	
			
			options = Vector()
			options.add(option1)
			options.add(option2)
			options.add(option3)
			options.add(option4)
	
			convSvc.sendConversationOptions(actor, npc, options, handleSecondScreen)
			return

		if selection == 1:
			percent = core.guildService.getGuildObject().getCurrentServerGCWTotalPercentMap().get(actor.getPlanet().getName()).getPercent().intValue()
			convSvc.sendConversationMessage(actor, npc, OutOfBand.ProsePackage("@conversation/faction_recruiter_rebel:s_332", percent, "TO", str(100 - percent)))
			return

		if selection == 2:
		
			return
		return