SRL Archive - General

Autoing with SCAR + JRE + Firefox +WINE under linux.. WORKS


botmaster

2007-11-25 09:30:03

First post in a LOOONG LONG time. I finally figured out on how to make SCAR work the crosshair in Linux. This means that SOME linux compatibility for scripts is possible, even without rewriting the entire code.
Here's a screenshot:



I haven't tested movemouse and some other stuff yet, but I'm fairly confident that it works if GetClientDimensions(x, y) work.

So autoing on Linux is possible with SCAR - don't know if that's old news. At any rate, previous experiments with me running Firefox, SCAR, and sun's JRE on a Wine server failed miserably, resulting in a crash of WINE. And it was always when I ran the RS applet, so I knew it had something to do with the JRE - this was my main concern at any rate, because running a Virtual Machine inside a Virtual Machine (double virtualization) REALLY slows down the system. And plus, the WINE API might not be able to handle the JRE's commands.

Then, it came to me *insert enlightenment here*: The JRE was running OUTSIDE a graphic environment, meaning that painting onto the client using Java's canvas functions failed.

So then - I emulated a desktop. All I did was edit Wine's configuration to use a desktop to contain all the apps. And voila - I had a fixed coordinate system for both SCAR, and JAVA's devicespace drawing functions.

Mwhahah… :D I'm so proud of myself now. XD

Now all I need to figure out is how to run multiple WINE servers at the same time - then I can run multiple autoers on the same machine, without graphic output or the mouse becoming useless. *evil laugh*. I'm such a genius :D .

There's several drawback's though. Primarily, not all SCAR's functionality is preserved. There are several annoying memory read/write errors when using the menubar of SCAR, resulting in some disabled features (inaccessible Edit, Script, and Help menus).

But otherwise, it runs as smooth as any other application would - and my system is dated 2004 at the latest (3 years old…).

Yeh. I might leave my dormant state. Imagine the new possibilities this gives you:
  • Clustered servers consisting out of old, cheap/free hardware purely for autoing are feasible.
  • Autoing on more than one account also becomes a possibility, without running a resource-intensive VM.
  • Less time to build a respectable autoing army.
  • Much much more…

If this is old news… well, so what. Just had to give my 2 cts. to this topic.

Markus

2007-11-25 13:05:25

Great!
One thing to test: Last time I worked with WINE it moved the physical mouse on a movemouse, but now the apps are seperated, you should try and see what mouse Scar moves :D
About those memory errors: try switching the compability modes (ie. Windows 2000 instead of XP)

buck cakes

2007-11-25 15:28:44

wow. i just installed ubuntu and crossover yesterday, but i couldnt get the crosshair to work . Keep us posted because VMs are taking up all of my CPU power.

mastaraymond

2007-11-25 15:37:37

How much faster is it to emulate a windows xp? Wouldn't it be faster to run it under WinXP instead of Linux?

munk

2007-11-25 19:38:01

From: mastaraymond
How much faster is it to emulate a windows xp? Wouldn't it be faster to run it under WinXP instead of Linux?


using WINE doesnt actually emulate a windows anything, just reassembles the source or something. idk. here:

http://www.winehq.org/site/about


I am really happy to see someone still trying at this. I gave up so long ago. Id really like to get SCAR running on my knoppix :D

Markus

2007-11-26 02:34:08

Scar on Knoppix, wtf are you crazy?!?!

Santa_Clause

2007-11-26 02:57:58

What exactly is Knoppix?

munk

2007-11-26 03:16:04

From: Markus
Scar on Knoppix, wtf are you crazy?!?!

maybe i am:rolleyes:
From: Santa_Clause
What exactly is Knoppix?

its a linux distro…not really a distro, more a technology. Its a LIVE OS, meaning you can run it off the cd, or from a usb drive. Alot of linux distros use knoppix technology now, I personally use DSL(Damn Small Linux), which is only 30mb but has about a gig of useful apps.

Markus

2007-11-26 03:45:15

DSL is 50mb ;)
But why, it's a bit slow, unless you got a really fast CD/DVD drive, as it needs to load tons of stuff. And Knoppix still uses Wine 0.9.12, so you'd need to upgrade it taking a lot of time (and ram), or you might get compability problems.

mastaraymond

2007-11-26 09:28:43

From: botmaster
First post in a LOOONG LONG time. I finally figured out on how to make SCAR work the crosshair in Linux. This means that SOME linux compatibility for scripts is possible, even without rewriting the entire code.
Here's a screenshot:



I haven't tested movemouse and some other stuff yet, but I'm fairly confident that it works if GetClientDimensions(x, y) work.

So autoing on Linux is possible with SCAR - don't know if that's old news. At any rate, previous experiments with me running Firefox, SCAR, and sun's JRE on a Wine server failed miserably, resulting in a crash of WINE. And it was always when I ran the RS applet, so I knew it had something to do with the JRE - this was my main concern at any rate, because running a Virtual Machine inside a Virtual Machine (double virtualization) REALLY slows down the system. And plus, the WINE API might not be able to handle the JRE's commands.

Then, it came to me *insert enlightenment here*: The JRE was running OUTSIDE a graphic environment, meaning that painting onto the client using Java's canvas functions failed.

So then - I emulated a desktop. All I did was edit Wine's configuration to use a desktop to contain all the apps. And voila - I had a fixed coordinate system for both SCAR, and JAVA's devicespace drawing functions.

Mwhahah… :D I'm so proud of myself now. XD

Now all I need to figure out is how to run multiple WINE servers at the same time - then I can run multiple autoers on the same machine, without graphic output or the mouse becoming useless. *evil laugh*. I'm such a genius :D .

There's several drawback's though. Primarily, not all SCAR's functionality is preserved. There are several annoying memory read/write errors when using the menubar of SCAR, resulting in some disabled features (inaccessible Edit, Script, and Help menus).

But otherwise, it runs as smooth as any other application would - and my system is dated 2004 at the latest (3 years old…).

Yeh. I might leave my dormant state. Imagine the new possibilities this gives you:
  • Clustered servers consisting out of old, cheap/free hardware purely for autoing are feasible.
  • Autoing on more than one account also becomes a possibility, without running a resource-intensive VM.
  • Less time to build a respectable autoing army.
  • Much much more…
If this is old news… well, so what. Just had to give my 2 cts. to this topic.

Do i see Wolfenstein Enemy Territory there? :o You aren't haxing, are you? :rolleyes:

botmaster

2007-11-27 10:41:11

From: mastaraymond
Do i see Wolfenstein Enemy Territory there? :o You aren't haxing, are you? :rolleyes:


Me? Haxing ET??? How could I? Now all I need to do for world domination is to circumvent that nasty PunkBuster cheat protection *maniac laugh*.

Jk, I don't hax ET. I'm not THAT fanatical about cheating. Just interested in AI and automation of tasks. Thats the reason I got interested in RS cheating in the first place - AI alrogrithms always fascinated me, and this is the ONLY game that is actually challenging enough - even though its java based crap.