mirror of
https://github.com/ProjectSWGCore/NGECore2.git
synced 2026-09-11 21:45:43 -04:00
Fixed Supply Drop command for officers.
The Tactical Supply Drop command was removed from the game and was merged with the Medical Supply Drop and then became Supply Drop. The script can properly check if the actor has the tactical serum expertise box or not.
This commit is contained in:
@@ -0,0 +1,52 @@
|
||||
from engine.resources.container import StaticContainerPermissions
|
||||
import time
|
||||
import sys
|
||||
|
||||
def setup(core, actor, target, command):
|
||||
return
|
||||
|
||||
def run(core, actor, target, commandString):
|
||||
doStimDrop(core, actor)
|
||||
return
|
||||
|
||||
def doStimDrop(core, actor):
|
||||
actor.sendSystemMessage('Stims incoming Mr. Bossman!', 0)
|
||||
stcSvc = core.staticService
|
||||
shuttle = stcSvc.spawnObject('object/creature/npc/theme_park/shared_lambda_shuttle.iff', actor.getPlanet().getName(), long(0), actor.getPosition().x, actor.getPosition().y, actor.getPosition().z, actor.getOrientation().y, actor.getOrientation().w)
|
||||
shuttle.setPosture(0)
|
||||
time.sleep(10) # Wait time before shuttle arrives after command is called
|
||||
shuttle.setPosture(2)
|
||||
time.sleep(20) # wait time for the crate to show (length of landing animation for shuttle)
|
||||
spawnCrate(core, actor, shuttle)
|
||||
time.sleep(5) # Wait time for the shuttle to leave after crate is spawned
|
||||
shuttle.setPosture(0)
|
||||
time.sleep(20) # How long the take-off sequence is, until the Shuttle is destroyed
|
||||
core.objectService.destroyObject(shuttle)
|
||||
return
|
||||
|
||||
def spawnCrate(core, actor, shuttle):
|
||||
crate = core.staticService.spawnObject('object/tangible/container/loot/shared_npe_loot_crate_low.iff', shuttle.getPlanet().getName(), long(0), shuttle.getPosition().x, shuttle.getPosition().y, shuttle.getPosition().z, shuttle.getOrientation().y, shuttle.getOrientation().w)
|
||||
crate.setCustomName('Supply Crate')
|
||||
|
||||
group = core.objectService.getObject(actor.getGroupId())
|
||||
|
||||
permissions = StaticContainerPermissions()
|
||||
permissions.canRemove(group, crate)
|
||||
permissions.canView(group, crate)
|
||||
crate.setContainerPermissions(permissions)
|
||||
|
||||
if actor.hasSkill('expertise_of_tactical_sup_1'):
|
||||
for i in range(0, 8):
|
||||
tactical = core.objectService.createObject('object/tangible/medicine/instant_stimpack/shared_stimpack_syren.iff', actor.getPlanet()) #FIXME: Use the correct template
|
||||
tactical.setCustomName('Tactical Serum A')
|
||||
crate.add(tactical)
|
||||
|
||||
for i in range(0, 8):
|
||||
stimpack = core.objectService.createObject('object/tangible/medicine/instant_stimpack/shared_stimpack_e.iff', actor.getPlanet()) #FIXME: Use the correct template
|
||||
stimpack.setCustomName('Field Stimpack A')
|
||||
crate.add(stimpack)
|
||||
|
||||
time.sleep(60)
|
||||
core.objectService.destroyObject(crate)
|
||||
|
||||
return
|
||||
@@ -1,13 +0,0 @@
|
||||
import sys
|
||||
|
||||
def setup(core, actor, buff):
|
||||
return
|
||||
|
||||
def run(core, actor, target, commandString):
|
||||
print (' shuttle called!')
|
||||
lambdaShuttle = stcSvc.spawnObject('object/creature/npc/theme_park/shared_event_lambda_shuttle.iff', actor.getPlanet().getName(),
|
||||
long(0), actor.getPosition().x, actor.getPosition().y, actor.getPosition().z, actor.getOrientation().y, actor.getOrientation().w)
|
||||
|
||||
lambdaShuttle.setPosture(0) # 0 or 2?
|
||||
print ('posture set!')
|
||||
return
|
||||
@@ -1,13 +0,0 @@
|
||||
import sys
|
||||
|
||||
def setup(core, actor, buff):
|
||||
return
|
||||
|
||||
def run(core, actor, target, commandString):
|
||||
print (' shuttle called!')
|
||||
lambdaShuttle = stcSvc.spawnObject('object/creature/npc/theme_park/shared_event_lambda_shuttle.iff', actor.getPlanet().getName(),
|
||||
long(0), actor.getPosition().x, actor.getPosition().y, actor.getPosition().z, actor.getOrientation().y, actor.getOrientation().w)
|
||||
|
||||
lambdaShuttle.setPosture(0) # 0 or 2?
|
||||
print ('posture set!')
|
||||
return
|
||||
@@ -1,13 +0,0 @@
|
||||
import sys
|
||||
|
||||
def setup(core, actor, buff):
|
||||
return
|
||||
|
||||
def run(core, actor, target, commandString):
|
||||
print (' shuttle called!')
|
||||
lambdaShuttle = stcSvc.spawnObject('object/creature/npc/theme_park/shared_event_lambda_shuttle.iff', actor.getPlanet().getName(),
|
||||
long(0), actor.getPosition().x, actor.getPosition().y, actor.getPosition().z, actor.getOrientation().y, actor.getOrientation().w)
|
||||
|
||||
lambdaShuttle.setPosture(0) # 0 or 2?
|
||||
print ('posture set!')
|
||||
return
|
||||
@@ -1,13 +0,0 @@
|
||||
import sys
|
||||
|
||||
def setup(core, actor, buff):
|
||||
return
|
||||
|
||||
def run(core, actor, target, commandString):
|
||||
print (' shuttle called!')
|
||||
lambdaShuttle = stcSvc.spawnObject('object/creature/npc/theme_park/shared_event_lambda_shuttle.iff', actor.getPlanet().getName(),
|
||||
long(0), actor.getPosition().x, actor.getPosition().y, actor.getPosition().z, actor.getOrientation().y, actor.getOrientation().w)
|
||||
|
||||
lambdaShuttle.setPosture(0) # 0 or 2?
|
||||
print ('posture set!')
|
||||
return
|
||||
@@ -1,70 +0,0 @@
|
||||
from engine.resources.container import StaticContainerPermissions
|
||||
import time
|
||||
import sys
|
||||
|
||||
def setup(core, actor, buff):
|
||||
return
|
||||
|
||||
def run(core, actor, target, commandString):
|
||||
doStimDrop(core, actor)
|
||||
return
|
||||
|
||||
def doStimDrop(core, actor):
|
||||
stcSvc = core.staticService
|
||||
time.sleep(10) # Wait time before shuttle arrives after command is called
|
||||
shuttle = stcSvc.spawnObject('object/creature/npc/theme_park/shared_lambda_shuttle.iff', actor.getPlanet().getName(), long(0), actor.getPosition().x, actor.getPosition().y, actor.getPosition().z, actor.getOrientation().y, actor.getOrientation().w)
|
||||
shuttle.setPosture(0)
|
||||
time.sleep(1)
|
||||
shuttle.setPosture(2)
|
||||
time.sleep(20) # wait time for the crate to show (length of landing animation for shuttle)
|
||||
spawnCrate(core, actor, shuttle)
|
||||
time.sleep(5) # Wait time for the shuttle to leave after crate is spawned
|
||||
shuttle.setPosture(0)
|
||||
time.sleep(20) # How long the take-off sequence is, until the Shuttle is destroyed
|
||||
core.objectService.destroyObject(shuttle)
|
||||
return
|
||||
|
||||
def spawnCrate(core, actor, shuttle):
|
||||
crate = core.staticService.spawnObject('object/tangible/container/loot/shared_npe_loot_crate_low.iff', shuttle.getPlanet().getName(), long(0), shuttle.getPosition().x, shuttle.getPosition().y, shuttle.getPosition().z, shuttle.getOrientation().y, shuttle.getOrientation().w)
|
||||
crate.setCustomName('Supply Crate')
|
||||
|
||||
permissions = StaticContainerPermissions()
|
||||
permissions.canRemove(actor, crate)
|
||||
permissions.canView(actor, crate)
|
||||
crate.setContainerPermissions(permissions)
|
||||
|
||||
tac1 = core.objectService.createObject('object/tangible/medicine/instant_stimpack/shared_stimpack_syren.iff', actor.getPlanet())
|
||||
crate.add(tac1)
|
||||
tac2 = core.objectService.createObject('object/tangible/medicine/instant_stimpack/shared_stimpack_syren.iff', actor.getPlanet())
|
||||
crate.add(tac2)
|
||||
tac3 = core.objectService.createObject('object/tangible/medicine/instant_stimpack/shared_stimpack_syren.iff', actor.getPlanet())
|
||||
crate.add(tac3)
|
||||
tac4 = core.objectService.createObject('object/tangible/medicine/instant_stimpack/shared_stimpack_syren.iff', actor.getPlanet())
|
||||
crate.add(tac4)
|
||||
tac5 = core.objectService.createObject('object/tangible/medicine/instant_stimpack/shared_stimpack_syren.iff', actor.getPlanet())
|
||||
crate.add(tac5)
|
||||
tac6 = core.objectService.createObject('object/tangible/medicine/instant_stimpack/shared_stimpack_syren.iff', actor.getPlanet())
|
||||
crate.add(tac6)
|
||||
tac7 = core.objectService.createObject('object/tangible/medicine/instant_stimpack/shared_stimpack_syren.iff', actor.getPlanet())
|
||||
crate.add(tac7)
|
||||
tac8 = core.objectService.createObject('object/tangible/medicine/instant_stimpack/shared_stimpack_syren.iff', actor.getPlanet())
|
||||
crate.add(tac8)
|
||||
|
||||
stim1 = core.objectService.createObject('object/tangible/medicine/instant_stimpack/shared_stimpack_generic_a.iff', actor.getPlanet())
|
||||
crate.add(stim1)
|
||||
stim2 = core.objectService.createObject('object/tangible/medicine/instant_stimpack/shared_stimpack_generic_a.iff', actor.getPlanet())
|
||||
crate.add(stim2)
|
||||
stim3 = core.objectService.createObject('object/tangible/medicine/instant_stimpack/shared_stimpack_generic_a.iff', actor.getPlanet())
|
||||
crate.add(stim3)
|
||||
stim4 = core.objectService.createObject('object/tangible/medicine/instant_stimpack/shared_stimpack_generic_a.iff', actor.getPlanet())
|
||||
crate.add(stim4)
|
||||
stim5 = core.objectService.createObject('object/tangible/medicine/instant_stimpack/shared_stimpack_generic_a.iff', actor.getPlanet())
|
||||
crate.add(stim5)
|
||||
stim6 = core.objectService.createObject('object/tangible/medicine/instant_stimpack/shared_stimpack_generic_a.iff', actor.getPlanet())
|
||||
crate.add(stim6)
|
||||
stim7 = core.objectService.createObject('object/tangible/medicine/instant_stimpack/shared_stimpack_generic_a.iff', actor.getPlanet())
|
||||
crate.add(stim7)
|
||||
stim8 = core.objectService.createObject('object/tangible/medicine/instant_stimpack/shared_stimpack_generic_a.iff', actor.getPlanet())
|
||||
crate.add(stim8)
|
||||
|
||||
return
|
||||
@@ -37,12 +37,8 @@ def removeExpertisePoint(core, actor):
|
||||
# this checks what abilities the player gets by level, need to also call this on level-up
|
||||
def addAbilities(core, actor, player):
|
||||
|
||||
actor.addAbility('of_tactical_sup_1')
|
||||
|
||||
return
|
||||
|
||||
def removeAbilities(core, actor, player):
|
||||
|
||||
actor.removeAbility('of_tactical_sup_1')
|
||||
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user