Files
NGECore2/scripts/radial/npc/bounty_probot.py
Waverunner 6d28ac9cd5 Fixed mission strings, fixed multiple bounty hunting bugs, added stacks for tracking droids from CBT
Fixed bugs for BHing include:
Bounty not being removed from bountyMap (they were still removed from
the db though)
Bounty success/defeat messages were wrong
Seeker not being destroyed from world
Completing bounty mission would not remove it from log (Allowing you to
keep on killing the player and potentially collecting the reward)
Fixed conversation messages on Arakyd Droid to use new ProsePackage
format
2014-05-26 18:58:16 -04:00

35 lines
1.1 KiB
Python

from resources.common import RadialOptions
import sys
def createRadial(core, owner, target, radials):
radials.add(RadialOptions(0, 138, 1, '@mission/mission_generic:probe_droid_summon'))
return
def handleSelection(core, owner, target, option):
if option == 138 and target:
id = owner.getPlayerObject().getBountyMissionId()
if id is None or id == 0:
owner.sendSystemMessage('@mission/mission_generic:bounty_no_mission', 0)
return
mission = core.objectService.getObject(id)
if mission is None:
owner.sendSystemMessage('@mission/mission_generic:bounty_no_mission', 0)
return
if mission.getObjective().isArakydActive():
owner.sendSystemMessage('@mission/mission_generic:probe_droid_too_many', 0)
return
if not core.terrainService.canBuildAtPosition(owner, owner.getPosition().x, owner.getPosition().z):
owner.sendSystemMessage('@mission/mission_generic:probe_droid_bad_location', 0)
return
if target.getUses() == 0:
core.objectService.destroyObject(target)
else:
target.setUses(target.getUses() - 1)
mission.getObjective().handleProbeDroidSummon(core, owner)
return