mirror of
https://github.com/ProjectSWGCore/NGECore2.git
synced 2026-07-14 00:02:07 -04:00
30 lines
528 B
Python
30 lines
528 B
Python
import sys
|
|
|
|
def setup():
|
|
return
|
|
|
|
def run(core, actor, target, commandString):
|
|
|
|
combatSvc = core.combatService
|
|
|
|
if not target:
|
|
return
|
|
|
|
if not target.getClient():
|
|
return
|
|
|
|
if actor == target:
|
|
actor.sendSystemMessage('You cannot challenge yourself.', 0)
|
|
return
|
|
|
|
if combatSvc.areInDuel(actor, target):
|
|
return
|
|
|
|
if actor.getDuelList().contains(target):
|
|
actor.sendSystemMessage('You already challenged ' + target.getCustomName() + ' to a duel.', 0)
|
|
return
|
|
|
|
combatSvc.handleDuel(actor, target)
|
|
|
|
return
|
|
|