asdfasdf100500
06-23-2011, 05:02 PM
Hello
I'm trying to write a python based courier runner bot.
So far I've managed to start a convo with an agent and respond to them.
I'm stuck trying to get the mission objectives, anyone know how to get them? Trough the moniker or maybe "agents"-services GetMissionBriefingInformation(['self', 'wnd'], None, None, None) ? Unfortunately I don't know what the parameters are supposed to be.
Any help is much appreciated. Here's what I have so far:
from log import LogError
try:
import eve
import types
import service
import svc
import util
import base
import blue
import datetime, time
class TestingTesting:
def __init__(self):
self.theService = sm.services["agents"]
self.logToFile("start")
testAgentID = 3016177
#starts a convo with an agent
self.theService.InteractWith(testAgentID)
#reference to the convo window
window = self.theService.windows[testAgentID]
#this as well as "window" contains the available answer options to the convo
kakka = self.theService._Agents__GetConversation(window,No ne)
#don't know what to do with this, maybe the mission details can be found here
moniker = getattr(window.sr, "agentMoniker", {})
#this is the right pane (type uicls.Container) of the convo window, don't know how to extract contents
paneRight = getattr(window.sr, "rightPaneBottom", {})
self.logToFile(dir(paneRight))
self.logToFile("test")
self.logToFile(dir(self.theService))
self.logToFile("end")
#always returns None
#self.logToFile(asdf.GetMissionJournalInfo(testAge ntID))
def logToFile(self,message):
f = open('C:\\temp\\moi.txt', 'a')
f.writelines("{0} - {1}\n".format(datetime.datetime.now(),message))
f.close();
#LogError(message)
def initTimer(self):
global TimerInstance
try:
TimerInstance = TestingTesting()
except:
pass
sm.services["cmd"].OpenJukebox = types.MethodType(initTimer, sm.services["cmd"], service.Service)
except Exception, e:
f = open('C:\\temp\\moi.txt', 'a')
f.writelines("{0} - {1}\n".format(datetime.datetime.now(),e))
f.close();
I'm trying to write a python based courier runner bot.
So far I've managed to start a convo with an agent and respond to them.
I'm stuck trying to get the mission objectives, anyone know how to get them? Trough the moniker or maybe "agents"-services GetMissionBriefingInformation(['self', 'wnd'], None, None, None) ? Unfortunately I don't know what the parameters are supposed to be.
Any help is much appreciated. Here's what I have so far:
from log import LogError
try:
import eve
import types
import service
import svc
import util
import base
import blue
import datetime, time
class TestingTesting:
def __init__(self):
self.theService = sm.services["agents"]
self.logToFile("start")
testAgentID = 3016177
#starts a convo with an agent
self.theService.InteractWith(testAgentID)
#reference to the convo window
window = self.theService.windows[testAgentID]
#this as well as "window" contains the available answer options to the convo
kakka = self.theService._Agents__GetConversation(window,No ne)
#don't know what to do with this, maybe the mission details can be found here
moniker = getattr(window.sr, "agentMoniker", {})
#this is the right pane (type uicls.Container) of the convo window, don't know how to extract contents
paneRight = getattr(window.sr, "rightPaneBottom", {})
self.logToFile(dir(paneRight))
self.logToFile("test")
self.logToFile(dir(self.theService))
self.logToFile("end")
#always returns None
#self.logToFile(asdf.GetMissionJournalInfo(testAge ntID))
def logToFile(self,message):
f = open('C:\\temp\\moi.txt', 'a')
f.writelines("{0} - {1}\n".format(datetime.datetime.now(),message))
f.close();
#LogError(message)
def initTimer(self):
global TimerInstance
try:
TimerInstance = TestingTesting()
except:
pass
sm.services["cmd"].OpenJukebox = types.MethodType(initTimer, sm.services["cmd"], service.Service)
except Exception, e:
f = open('C:\\temp\\moi.txt', 'a')
f.writelines("{0} - {1}\n".format(datetime.datetime.now(),e))
f.close();