コード例 #1
0
from shootblues import Dependency
Dependency("Common.Script.dll")

from shootblues.common import log
import util.Moniker

oldMonikeredCall = None


def _MonikeredCall(self, call, sess):
    global oldMonikeredCall
    methodName, args, kwargs = call

    if methodName == "WarpToStuffAutopilot":
        methodName = "WarpToStuff"
        args = ('item', args[0])
        kwargs = {'throttleCalls': True, 'minRange': 0}
        log("Intercepting autopilot warp attempt")
        return oldMonikeredCall(self, (methodName, args, kwargs), sess)
    else:
        return oldMonikeredCall(self, call, sess)


oldMonikeredCall = util.Moniker.MonikeredCall
util.Moniker.MonikeredCall = _MonikeredCall


def __unload__():
    global oldMonikeredCall
    util.Moniker.MonikeredCall = oldMonikeredCall
コード例 #2
0
from shootblues import Dependency
Dependency("Common.Script.dll")
Dependency("EventNotifications.Script.dll")

from shootblues.common import log
from shootblues.common.eve import runOnMainThread
from shootblues.common.service import forceStart, forceStop
import util
from HTMLParser import HTMLParser

from shootblues.eventnotifications import DefineEvent, fireEvent
DefineEvent("NewTowermail")

TowermailFormat = (
    "{subject} // {timestamp}",
    "Moon: {moonName} // Object: {typeName} // Current Shield Level: {shieldPercentage}%",
    "Pilot: {aggressorName} // Corp: {aggressorCorpName} // Alliance: {aggressorAllianceName}"
)

serviceInstance = None


class MLStripper(HTMLParser):
    def __init__(self):
        self.reset()
        self.fed = []

    def handle_data(self, d):
        self.fed.append(d)

    def get_data(self):