Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Lance

Pages: 1 2 [3] 4 5 ... 9
31
JavaOp Board / Re: Plugin Packages
« on: February 25, 2010, 02:07:29 pm »
Excellent! If you'd like, feel free to post a guide on the GoogleCode wiki.

I've quit using Eclipse. It's pretty bulky for my needs.
PM'd :)

32
JavaOp Board / Shaman join throws java.lang.NullPointerException
« on: February 25, 2010, 09:27:46 am »
When a shaman joins the channel, I get this:
Code: [Select]
[TIME] WARNING: Error processing event: java.lang.NullPointerException
and events are no longer received from that shaman! If I make the bot leave the clan channel and come back, it does not see the shaman in the channel.

After throwing in a .prinstackTrace() in BnetEventProcess, and running eclipse debug, I got this:
Code: [Select]
java.lang.NullPointerException
at com.javaop.users.Statstring.getClient(Statstring.java:33)
at com.javaop.SwingGui.JavaOpPanel.userFlags(Unknown Source)
at com.javaop.pluginmanagers.PluginRegistration.userFlags(PluginRegistration.java:538)
at com.javaop.bot.BotCore.userFlags(BotCore.java:487)
at com.javaop.BnetEventProcess.PluginMain.processEvent(PluginMain.java:249)
at com.javaop.BnetEventProcess.PluginMain.access$1(PluginMain.java:220)
at com.javaop.BnetEventProcess.PluginMain$Callback.run(PluginMain.java:208)
at java.util.TimerThread.mainLoop(Timer.java:534)
at java.util.TimerThread.run(Timer.java:484)

This has been a problem for a while, starting around 2.1.1 if I remember right.

EDIT: It looks like "String[] tokens" is not being set by com.javaop.users.Statstring because the statstring passed to the constructor is null.

33
JavaOp Board / Re: Plugin Packages
« on: February 25, 2010, 08:50:13 am »
I cannot get my custom plugin to work even after the namespace "com.javaop.*" changes I made to the packages :<

I took a look at the commands plugin and discovered it is not protocol-specific; sorry I used it as an example in my previous post.

Open up build.xml. Under the clean section, add
Code: [Select]
<delete dir="YourPluginsName/bin"/
Under build, add
Code: [Select]
<mkdir dir="YourPluginsName/bin"/>
<javac srcdir="YourPluginsName/src" destdir="YourPluginsName/bin"
classpath="javaop2/bin"/>

Under jar, add
Code: [Select]
<jar destfile="${pluginpath}/YourPluginsName.jar" basedir="YourPluginsName/bin">
<manifest><attribute name="Main-Class" value="com.javaop.YourPluginsName.YourPluginsEntryPoint"/></manifest>
</jar>

..replacing the obvious. That should get your plugin to build with the rest of the bot just by typing ant.

What if I just want to use eclipse, though? :'(

EDIT: Just had to make the manifest manually and not export source and project files (.classpath, .project) :D It works! :)

34
JavaOp Board / StayConnected Problem
« on: February 24, 2010, 09:33:41 pm »
If I try to connect to Battle.Net with a bad password and StayConnected enabled, StayConnected will detect the password failure socket disconnect and repeatedly attempt to reconnect me with the bad password, using up my login attempts and eventually getting the bot a temporary ban. How can this be fixed?

Thanks :)

35
JavaOp Board / Modularization
« on: February 24, 2010, 09:25:43 pm »
I am posting in this thread classes that I think should be moved from the core to plugins so JavaOp is more modular.

I think Battle.net should have its own plugin (named Bnet, possibly making BnetLogin and BnetEventProcess parts of the plugin) to hold the protocol-specific classes. Of course there are plugins that use these classes from the core, but there is nothing wrong with having more than one project on the build path right? :P

com.javaop.util
BnetEvent > Bnet
BnetPacket > Bnet
BnlsPacket > Bnet
Profile > Bnet

com.javaop.users
Statstring > Bnet
War3Statstring > Bnet

com.javaop.constants
PacketConstants > Bnet (This is heavily based on the Bnet protocol :P)

com.javaop.bot
PacketThread > Bnet (This class is horribly dependant on the Bnet protocol and needs to be modularized somehow)

Once those are moved, adding IRC functionality and such will be a breeze ;D

36
JavaOp Board / Re: Plugin Packages
« on: February 24, 2010, 09:01:22 pm »
I think you'll enjoy the plugin restructuring in 2.1.3.

If I understand how it works correctly, there's not a lot of overhead except for having to do four times the work when the bot first starts. This adds maybe a few milliseconds to the loading process, really nothing to lose sleep over. Once loaded, they're all added to the bot's memory in the same way they would be if they're in one jar (albeit, perhaps in a different place) and should function at the same speed.

Currently I don't think you can expose more than one plugin per jar, so it'd be difficult to implement the idea without a major rewriting of the plugin loading process, unless they were all combined into one plugin with all their functionality.

I think that commands should definitely stay separate, because eventually (read: in year 2035), I'd like to add IRC to JavaOp, which would need to interact with the commands just as much as Bnet would. Also, Battle.net 2.0 would have it's own login plugin.

I cannot get my custom plugin to work even after the namespace "com.javaop.*" changes I made to the packages :<

I took a look at the commands plugin and discovered it is not protocol-specific; sorry I used it as an example in my previous post.

37
JavaOp Board / Re: 2.1.3 rc 1
« on: February 23, 2010, 12:52:36 pm »
Open up a console and use the svn command to check out, then type ant in the root directory. I bet it has something to do with me changing to not using Eclipse project files anymore.

The ant build works as you said :)

I also figured out a way to get this working in eclipse; with the refactoring tool, prepend "com.javaop." to all of the source package names! :)

38
JavaOp Board / Re: 2.1.3 rc 1
« on: February 22, 2010, 06:56:12 pm »
Oh, I know what's going on..

I think you're going to have to go through each project and add javaop2 as a dependency.. :(

That is not it; this (new) workspace only contains the javaop2 core project. :(

The screen shot shows the problems are originating from the core itself; it cannot be a project build path problem :P

39
JavaOp Board / Re: 2.1.3 rc 1
« on: February 21, 2010, 05:59:44 pm »
Try rm -rf ~/workspace. Of course, that'll hose any other projects you have in there too so be careful.

I just did svn commit and svn update, and I can confirm rev55 is working. It would appear that you still had some residue from prior to the namespace switch.
I imported it into a new workspace and nothing changed :(

40
JavaOp Board / Re: 2.1.3 rc 1
« on: February 21, 2010, 01:32:18 pm »
Funny you say that because I deleted my SVN directory yesterday!

Earlier yesterday, before I imported JavaOp2 RC1, Eclipse stopped working properly (the Java perspective was completely hosed, it was not even showing errors) after my package manager updated it. Because of this, I removed eclipse and started rage rm -rf'ing directories ("~/.subversion", "~/.eclipse", and "~/workspace/.metadata" at least). Then, I reinstalled eclipse and subclipse, fired up eclipse, added the javaop repo, imported the javaop2 project, and got excited just to be burned by this; lol:


41
JavaOp Board / Re: 2.1.3 rc 1
« on: February 20, 2010, 11:59:24 am »
I am getting about ~800 errors from the core fresh from the SVN, so I cant compile :P

42
JavaOp Board / Plugin Packages
« on: February 17, 2010, 11:07:30 pm »
The Simple Event Processor, Command, and Channel List plugins are useless without the Battle.net Login one, so why have four plugin files instead of one? The 4-file dilemma is what led me to making this suggestion to create a package-type plugin system. The Simple Event Processor and Channel List plugins have no packages and one class! Surely, the overhead that comes with loading them is not worth it.

One jar (Bnet.jar) would contain the src/plugins package:
-src.plugins.Main (this is not a folder, but a class to retrieve a list of plugins, provide access to PublicExposedFunctions, provide activate(), deactivate(), and load(); and provide an interface to extend)
-src.plugins.LoginProcessor (Formerly BNetLogin.jar)
-src.plugins.SimpleEventProcessor
-src.plugins.Commands
-src.plugins.Channel List

Also, parts of the product could still be disabled individually (like Commands).

This will most likely require a massive rewriting of the bot, but it is just an idea anyway... for now :)

Thanks for reading! :)

43
JavaOp Board / Re: CD-Key Exception
« on: February 17, 2010, 10:31:22 pm »
Odd, you're right. I don't know why I was getting password errors.. probably running unfixed code while my fiance was yelling at me to come to bed. Ahh, late night programming.

So now all I have to do is change the namespace of every single class, fix the 300 bugs that makes, and then 2.1.3 should be ready to ship.

Sorry to be the one to add three more things to the list  :P, though these are just minor graphical problems.

You may already be aware of one or two of these issues, but just in case you are not I am listing them here.

No icons are showing in the Channel List. This is from the stack trace:
Code: [Select]
Loading Alpha
Activating plugin: Simple event processor
Activating plugin: Commands
Activating plugin: Swing Gui
Exception in Metacity for theme "Nodoka": Variable "mini_icon_width" not defined
Activating plugin: Channel list plugin
Activating plugin: Battle.net Login Plugin
Activating plugin: _Default
Error: client icon not found:
Error: client icon not found:
Error: client icon not found:
Error: client icon not found:
Error: client icon not found:
Error: client icon not found:

Also, when I type the text into the message box for a loaded bot, I cannot see what I am typing because the text is the same color as the background. Highlighting the text is the only way to see what is in the box at the moment.

Last, the title bars for individual bots are not displaying properly, and the product icon seems to have the wrong size. To see examples of this, please refer to my previous screenshots.

Running FC11 by the way.

Thanks :)

44
JavaOp Board / Re: CD-Key Exception
« on: February 17, 2010, 09:05:41 am »
It works! Just had to remove that extra cdkey folder in the root directory :)

Thanks Joe!

45
JavaOp Board / Re: CD-Key Exception
« on: February 16, 2010, 09:18:05 pm »
Flushed Alpha.jbb just to make sure it was not the settings (just got the default <CDKEY HERE> error), then I entered the new settings and saved them, but I still got this:



This is resolved by changing lines 24 and 25 in packets.SidAccountLogon which are:
Code: [Select]
String username = pubFuncs.getLocalSetting("Battle.net Logon Plugin", "username");
String password = pubFuncs.getLocalSetting("Battle.net Logon Plugin", "password").toLowerCase();
To:
Code: [Select]
String username = pubFuncs.getLocalSetting("Battle.net Login Plugin", "username");
String password = pubFuncs.getLocalSetting("Battle.net Login Plugin", "password").toLowerCase();

But it seems to have exposed another problem:


Thanks :)

Pages: 1 2 [3] 4 5 ... 9