diff --git a/scripts/commands/setgodmode.py b/scripts/commands/setgodmode.py index 912706e2..753cd3f2 100644 --- a/scripts/commands/setgodmode.py +++ b/scripts/commands/setgodmode.py @@ -16,7 +16,7 @@ def setup(): def run(core, actor, target, commandString): playerObject = actor.getSlottedObject('ghost') - + if not playerObject: return @@ -151,10 +151,14 @@ def run(core, actor, target, commandString): print ('Position.y : %s' % pos.y, 0) actor.sendSystemMessage('Position.z : %s' % pos.z, 0) print ('Position.z : %s' % pos.z, 0) + actor.sendSystemMessage('Orientation.w : %s' % ori.w, 0) + print ('Orientation.x : %s' % ori.w, 0) + actor.sendSystemMessage('Orientation.x : %s' % ori.x, 0) + print ('Orientation.w : %s' % ori.x, 0) actor.sendSystemMessage('Orientation.y : %s' % ori.y, 0) print ('Orientation.y : %s' % ori.y, 0) - actor.sendSystemMessage('Orientation.w : %s' % ori.w, 0) - print ('Orientation.w : %s' % ori.w, 0) + actor.sendSystemMessage('Orientation.z : %s' % ori.z, 0) + print ('Orientation.z : %s' % ori.z, 0) if (actor.getContainer()): building_id = actor.getGrandparent().getObjectID() cid = actor.getContainer().getCellNumber() @@ -164,9 +168,9 @@ def run(core, actor, target, commandString): print('Cell ID : %s' % cid, 0) print('Building ID : %s' % building_id, 0) if cellid == 0: - str = " = stcSvc.spawnObject('', '" + planetName + "', long(%s" % cellid + "), float(%.4f" % pos.x + "), float(%.4f" % pos.y + "), float(%.4f" % pos.z + "), float(%.4f" % ori.y + "), float(%.4f" % ori.w + "))" + str = " = stcSvc.spawnObject('', '" + planetName + "', long(%s" % cellid + "), float(%.4f" % pos.x + "), float(%.4f" % pos.y + "), float(%.4f" % pos.z + "), float(%.4f" % ori.w + "), float(%.4f" % ori.x + "), float(%.4f" % ori.y + "), float(%.4f" % ori.z + "))" elif cellid != 0: - str = "\tbuilding = core.objectService.getObject(long(%s" % building_id + "))\n\t = stcSvc.spawnObject('', '" + planetName + "', building.getCellByCellNumber(long(%s" % cellid + ")), float(%.4f" % pos.x + "), float(%.4f" % pos.y + "), float(%.4f" % pos.z + "), float(%.4f" % ori.y + "), float(%.4f" % ori.w + "))" + str = "\tbuilding = core.objectService.getObject(long(%s" % building_id + "))\n\t = stcSvc.spawnObject('', '" + planetName + "', building.getCellByCellNumber(long(%s" % cellid + ")), float(%.4f" % pos.x + "), float(%.4f" % pos.y + "), float(%.4f" % pos.z + "), float(%.4f" % ori.w + "), float(%.4f" % ori.x + "), float(%.4f" % ori.y + "), float(%.4f" % ori.z + "))" toolkit = Toolkit.getDefaultToolkit() clipboard = toolkit.getSystemClipboard() clipboard.setContents(StringSelection(str), None) diff --git a/scripts/mobiles/generic/static/naboo/panaka.py b/scripts/mobiles/generic/static/naboo/panaka.py new file mode 100644 index 00000000..29b95d9c --- /dev/null +++ b/scripts/mobiles/generic/static/naboo/panaka.py @@ -0,0 +1,33 @@ +import sys +from services.spawn import MobileTemplate +from services.spawn import WeaponTemplate +from resources.datatables import WeaponType +from resources.datatables import Difficulty +from resources.datatables import Options +from java.util import Vector + + +def addTemplate(core): + mobileTemplate = MobileTemplate() + + mobileTemplate.setCustomName('Captain Panaka') + mobileTemplate.setLevel(1) + mobileTemplate.setDifficulty(Difficulty.NORMAL) + mobileTemplate.setSocialGroup("township") + mobileTemplate.setOptionsBitmask(Options.INVULNERABLE) + + templates = Vector() + templates.add('object/mobile/shared_panaka.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('panaka', mobileTemplate) + return \ No newline at end of file diff --git a/scripts/static_spawns/naboo/kaadara.py b/scripts/static_spawns/naboo/kaadara.py index bb48cb72..9c8c32fe 100644 --- a/scripts/static_spawns/naboo/kaadara.py +++ b/scripts/static_spawns/naboo/kaadara.py @@ -1,12 +1,18 @@ - import sys from resources.datatables import Options from resources.datatables import StateStatus def addPlanetSpawns(core, planet): - + + stcSvc = core.staticService + objSvc = core.objectService #junkdealer will be added as soon as i find coords - + stcSvc.spawnObject('junkdealer', 'naboo', long(0), float(5093.8560), float(-191.7385), float(6710.1772), float(0.7283), float(-0.6853)) + stcSvc.spawnObject('junkdealer', 'naboo', long(0), float(5060.5347), float(-191.7385), float(6710.0000), float(0.6257), float(0.7800)) + + #Legacy NPC's + panaka = stcSvc.spawnObject('panaka', 'naboo', long(0), float(5196.5986), float(-192.0000), float(6712.7124), float(0.9984), float(0.0572)) + return