Advancement towards PUP Application

A few PUPS can now be applied.
Some effect names do not match the buff.iff table yet
This commit is contained in:
CharonInferar
2014-06-11 16:44:29 +02:00
parent 06a086508e
commit 5e8180c5fd
5 changed files with 100 additions and 28 deletions
+27
View File
@@ -0,0 +1,27 @@
import sys
from java.lang import Float
def setup(core, actor, buff):
#powerup = actor.getUseTarget()
powerupID = actor.getAttachment('LastUsedPUP')
powerup = core.objectService.getObject(long(powerupID))
effectName = powerup.getAttachment("effectName");
powerValue = powerup.getAttachment("powerValue");
effectName = effectName.replace('@stat_n:', '')
actor.sendSystemMessage('en %s' % effectName, 0)
actor.sendSystemMessage('pv %s' % powerValue, 0)
buff.setDuration(Float(1800.0))
if effectName:
buff.setEffect1Name(effectName)
if powerValue:
buff.setEffect1Value(Float(powerValue))
return
def add(core, actor, buff):
return
def remove(core, actor, buff):
return
+11
View File
@@ -0,0 +1,11 @@
import sys
from java.lang import Long
def setup():
return
def run(core, actor, target, objectid):
object = core.objectService.getObject(long(objectid))
target.setAttachment('UsedObjectID',Long(objectid))
core.objectService.useObject(actor, target)
return