mirror of
https://github.com/ProjectSWGCore/NGECore2.git
synced 2026-07-30 00:15:57 -04:00
(Added) Entertainers can now add Cover Charges for their performance (Feature) Using a performance effect that has multiple effect levels will use the highest effect for the entertainers level (Code) Added 2 new methods (Jython and Java version) for Input Boxes that automatically adds the input text to return list. (Code) Moved essential spectating code from /watch script to startSpectating (BugFix) Fixed Null Error when trying to cancel Experience tick if leveled with a cheat. (BugFix) Fixed system messages error on performance abilities
35 lines
979 B
Python
35 lines
979 B
Python
import sys
|
|
|
|
def setup():
|
|
return
|
|
|
|
def run(core, actor, target, commandString):
|
|
entSvc = core.entertainmentService
|
|
|
|
if not target and commandString is not None:
|
|
target = core.chatService.getObjectByFirstName(commandString)
|
|
|
|
if target is None:
|
|
return
|
|
|
|
|
|
if target.getPosition().getDistance2D(actor.getWorldPosition()) > float(20):
|
|
actor.sendSystemMessage(target.getCustomName() + ' is too far away to watch.', 0)
|
|
return
|
|
|
|
if not target.isPlayer():
|
|
actor.sendSystemMessage('@performance:dance_watch_npc', 0)
|
|
return
|
|
|
|
perf = entSvc.getPerformanceByIndex(target.getPerformanceId())
|
|
|
|
if target.getPosture() != 0x09 or not perf or perf.getDanceVisualId() < 0:
|
|
actor.sendSystemMessage(target.getCustomName() + ' is not dancing.',0)
|
|
return
|
|
|
|
if target.getCoverCharge() > 0 or target.getCoverCharge() == None:
|
|
core.entertainmentService.handleCoverCharge(actor, target)
|
|
return
|
|
else:
|
|
core.entertainmentService.startSpectating(actor, target, True)
|
|
return |