A cool thing with python and tuples is that you can unpack them when assigning.
Python:
p = (10, 20)
# Attempting to assign a tuple to multiple values at once will unpack the sequence into their respective variables.
px, py = p
print px # 10 print py # 20
I'll also copy-paste from the sidebar a response to your other question.
Zren: In nearly every modern browser you can right click a non-plugin web page element (not flash/java) and click Inspect Element. It will show an HTML tree which will probably contain the applet's URL as one of the <applet> tag's attribute values. I'm 99% certain that the applet Javex distributes won't work outside of the official website. If it could, that's just begging to be abused.
Note that relative urls, (Eg: file.ext) while at the page domain.com/folder/ would have the url at domain.com/folder/file.ext.
Also note that Runescape's game page uses an iFrame (a webpage inside a webpage).
Mmmmmm chicken.
Sponsor Sponsor
Nathan4102
Posted: Sat Apr 06, 2013 4:56 pm Post subject: RE:Custom types and Embed Java in Python
Ooh, named tuples look waay better then that class stuff, I'll use that. Thanks
For the runescape thing, I don't get it! Other bots have runescape running in their client, with none of the other webpage components there. Maybe I'll get it soon, or maybe I could just get it from another bot
Here are two interesting lines I found in the source, not too sure what they mean exactly though...
CODE:
<applet name="runescape" id="game" width="100%" height="100%" alt="For assistance please visit http://services.runescape.com/m=rswiki/en/Technical_Help" archive="gamepackNWlsTOAXf/HLG172Sko0S5rmkaoY9yb7_2950476.jar" code="Rs2Applet.class" mayscript="" title="Java(TM)"><param name="java_arguments" value="-Xmx256m -Xss2m -Dsun.java2d.noddraw=true -XX:CompileThreshold=1500 -Xincgc -XX:+UseConcMarkSweepGC -XX:+UseParNewGC"><param name="image" value="http://www.runescape.com/img/game/splash2.gif"><param name="centerimage" value="true"><param name="separate_jvm" value="true"><param name="boxborder" value="false"><param name="boxbgcolor" value="black"><param name="1" value="false"><param name="25" value="0"><param name="34" value="0"><param name="14" value="31"><param name="29" value="0"><param name="17" value="wwGlrZHF5gJ8wW8HfhfOujindKOAuD9ZZef7rnsbjgA"><param name="18" value="false"><param name="12" value="false"><param name="4" value="1102"><param name="20" value="18716"><param name="6" value="0"><param name="26" value="false"><param name="7" value="NWlsTOAXf/HLG172Sko0S5rmkaoY9yb7"><param name="10" value=""><param name="-1" value="gqM74oPrSY-mQtDoS5pOYA"><param name="15" value="false"><param name="16" value=""><param name="9" value="DAA6C526B37AE38F6C6B5560CFFDB7D9FCF560873E2BDF432CE51F364635C42B9C0CE655B789847BF0480F77536D2145"><param name="31" value="-967523993"><param name="2" value=""><param name="11" value="true"><param name="33" value=""><param name="5" value="0"><param name="0" value="HgemRmgCxHEjA3nirgZyoA"><param name="23" value="true"><param name="28" value=""><param name="35" value="lobby3.runescape.com"><param name="27" value=".runescape.com"><param name="13" value="true,false,0,43,200,18,0,21,354,-15,Verdana,11,0xF4ECE9,candy_bar_middle.gif,candy_bar_back.gif,candy_bar_outline_left.gif,candy_bar_outline_right.gif,candy_bar_outline_top.gif,candy_bar_outline_bottom.gif,loadbar_body_left.gif,loadbar_body_right.gif,loadbar_body_fill.gif,6"><param name="8" value="false"><param name="30" value="0"><param name="24" value="0"><param name="32" value="0"><div class="nojava"><h1>Please Update Java</h1><p>It appears that you do not have Java installed, or your version of Java is out of date. To play this game for free please <a target="_blank" href="http://www.java.com/en/download/index.jsp">click here</a> to download the latest version of Java. Alternatively, <a target="_blank" href="http://www.runescape.com/downloads.ws">click here</a> to get the downloadable version of the game.</p><p>If you have already installed the downloadable version, please look for the <img src="http://www.runescape.com/img/game/rs_icon.gif" alt="RS"> icon on your computer desktop and double-click to play.</p></div></applet>
Posted: Sat Apr 06, 2013 5:54 pm Post subject: Re: RE:Custom types and Embed Java in Python
Nathan4102 @ 4/6/2013, 4:56 pm wrote:
Ooh, named tuples look waay better then that class stuff, I'll use that. Thanks
For the runescape thing, I don't get it! Other bots have runescape running in their client, with none of the other webpage components there. Maybe I'll get it soon, or maybe I could just get it from another bot
Here are two interesting lines I found in the source, not too sure what they mean exactly though...
CODE:
<applet name="runescape" id="game" width="100%" height="100%" alt="For assistance please visit http://services.runescape.com/m=rswiki/en/Technical_Help" archive="gamepackNWlsTOAXf/HLG172Sko0S5rmkaoY9yb7_2950476.jar" code="Rs2Applet.class" mayscript="" title="Java(TM)"><param name="java_arguments" value="-Xmx256m -Xss2m -Dsun.java2d.noddraw=true -XX:CompileThreshold=1500 -Xincgc -XX:+UseConcMarkSweepGC -XX:+UseParNewGC"><param name="image" value="http://www.runescape.com/img/game/splash2.gif"><param name="centerimage" value="true"><param name="separate_jvm" value="true"><param name="boxborder" value="false"><param name="boxbgcolor" value="black"><param name="1" value="false"><param name="25" value="0"><param name="34" value="0"><param name="14" value="31"><param name="29" value="0"><param name="17" value="wwGlrZHF5gJ8wW8HfhfOujindKOAuD9ZZef7rnsbjgA"><param name="18" value="false"><param name="12" value="false"><param name="4" value="1102"><param name="20" value="18716"><param name="6" value="0"><param name="26" value="false"><param name="7" value="NWlsTOAXf/HLG172Sko0S5rmkaoY9yb7"><param name="10" value=""><param name="-1" value="gqM74oPrSY-mQtDoS5pOYA"><param name="15" value="false"><param name="16" value=""><param name="9" value="DAA6C526B37AE38F6C6B5560CFFDB7D9FCF560873E2BDF432CE51F364635C42B9C0CE655B789847BF0480F77536D2145"><param name="31" value="-967523993"><param name="2" value=""><param name="11" value="true"><param name="33" value=""><param name="5" value="0"><param name="0" value="HgemRmgCxHEjA3nirgZyoA"><param name="23" value="true"><param name="28" value=""><param name="35" value="lobby3.runescape.com"><param name="27" value=".runescape.com"><param name="13" value="true,false,0,43,200,18,0,21,354,-15,Verdana,11,0xF4ECE9,candy_bar_middle.gif,candy_bar_back.gif,candy_bar_outline_left.gif,candy_bar_outline_right.gif,candy_bar_outline_top.gif,candy_bar_outline_bottom.gif,loadbar_body_left.gif,loadbar_body_right.gif,loadbar_body_fill.gif,6"><param name="8" value="false"><param name="30" value="0"><param name="24" value="0"><param name="32" value="0"><div class="nojava"><h1>Please Update Java</h1><p>It appears that you do not have Java installed, or your version of Java is out of date. To play this game for free please <a target="_blank" href="http://www.java.com/en/download/index.jsp">click here</a> to download the latest version of Java. Alternatively, <a target="_blank" href="http://www.runescape.com/downloads.ws">click here</a> to get the downloadable version of the game.</p><p>If you have already installed the downloadable version, please look for the <img src="http://www.runescape.com/img/game/rs_icon.gif" alt="RS"> icon on your computer desktop and double-click to play.</p></div></applet>
Maybe, we could the first code, and create the applet ourselves. Idk, I have no idea how to do this :/
Nathan4102
Posted: Sun Apr 07, 2013 11:38 am Post subject: RE:Custom types and Embed Java in Python
I think im gonna post-pone this project for now, I'd need to learn some HTML and Java it looks like in order to understand how to get runescape in a python client. And even after that, I'd need to figure out how to create and control a virtual mouse and keyboard inside the client...
I've always wanted to make a mario like game... I guess I'll do that next! :p
Cancer Sol
Posted: Sun Apr 07, 2013 12:17 pm Post subject: Re: Custom types and Embed Java in Python
Haha, good luck then!
I was just thinking of the same thing, like I have to learn some HTML to understand it first, and maybe some java.
I don't think I'm going to make it for quite awhile
For your free pascal bot, you ran it through a browser right?
Did it have a virtual mouse? And also, can the bot still run if you have a virtual mouse, like will it detect pixels properly?
Nathan4102
Posted: Sun Apr 07, 2013 12:20 pm Post subject: RE:Custom types and Embed Java in Python
Mine just ran out of an IDE into a browser, I had no fancy virtual mouse or client stuff. And bots with virtual mouses do work, powerbot is an example.
Cancer Sol
Posted: Sun Apr 07, 2013 12:29 pm Post subject: Re: RE:Custom types and Embed Java in Python
Nathan4102 @ 4/7/2013, 12:20 pm wrote:
Mine just ran out of an IDE into a browser, I had no fancy virtual mouse or client stuff. And bots with virtual mouses do work, powerbot is an example.
But then, isn't powerbot memory-based? That's so complicated, and it can get you banned easier I think >.<
What do you mean by it ran out of an IDE into a browser?
The user would run the script from an ide and it would open their default browser?
Nathan4102
Posted: Sun Apr 07, 2013 12:31 pm Post subject: RE:Custom types and Embed Java in Python
I don't really know much about injection bots :/
And the user would open runescape in a browser, set safe mode, open the IDE, and run the script. The IDE would then minimize and start clicking on the browser.
Sponsor Sponsor
Cancer Sol
Posted: Sun Apr 07, 2013 12:33 pm Post subject: Re: RE:Custom types and Embed Java in Python
Nathan4102 @ 4/7/2013, 12:31 pm wrote:
I don't really know much about injection bots :/
And the user would open runescape in a browser, set safe mode, open the IDE, and run the script. The IDE would then minimize and start clicking on the browser.
Oh, I see. But what about those paid bots you made? Did you just make an .exe for them?
And for safe mode, I'm kinda confused. It's not the safe mode thingy for when you boot your os right?
Nathan4102
Posted: Sun Apr 07, 2013 12:35 pm Post subject: RE:Custom types and Embed Java in Python
I just sold a text file with the code, which isn't really secure since it could easily be leaked, but thats all I could do at the time :p
RS safe mode is different then OS safe mode. RS safe mode is a graphics setting which just sets all settings to minimum. It makes botting a lot easier since less things move around, and everything looks simpler.
Cancer Sol
Posted: Mon Apr 08, 2013 10:52 pm Post subject: RE:Custom types and Embed Java in Python
I could've sworn I made a post already.. but,
How much did you sell it for and where?
How does the IDE open a text file?
Maybe I should try that with Code::Blocks to see
if it can do that
But do you think anyone will buy a shitty runescape bot as an exe file?
Nathan4102
Posted: Tue Apr 09, 2013 8:25 am Post subject: RE:Custom types and Embed Java in Python
Prices ranged from $1 - $100 for a copy, and I think any IDE will open a .txt. I don't think anyone would buy a .exe from a guy with no sales, it's kind of sketchy
Cancer Sol
Posted: Tue Apr 09, 2013 3:45 pm Post subject: RE:Custom types and Embed Java in Python
Haha, alright. I can't believe it how people would still buy a bot that can't do random events that well xD
Nathan4102
Posted: Tue Apr 09, 2013 3:58 pm Post subject: RE:Custom types and Embed Java in Python
Yeah, that was definetly a downfall. A lot of them worked in places where you can't get randoms, like soul wars.