DarkOrbit API Class by Requi and Fluttershy

08/05/2013 01:57 Requi#1
Welcome guys to my thread for the new DarkOrbit API by me and FlutterShy (for the autoit version)

Features:
Code:
GetResponse(ByVal sUrl As String, ByVal sPost As String) //WebRequest POST
GetResponse(ByVal sUrl As String) //WebRequest GET
StringBetween(ByRef content As String, ByRef strStart As String, ByRef strEnd As String, Optional ByRef startPos As Integer = 0) //Get a string between 2 strings
StringRegExp(ByVal content As String, ByVal regstring As String)
Login(ByVal username As String, ByVal password As String, ByVal server As String) //Easy Regular Expressions
GetBootys(ByVal content As String) //Get BootyKey count.
GetJackpot(ByVal content As String) //Get Jackpot count with €/$
GetMainInfos(ByVal content As String) //Get all infos of the user. Call it with Arrays. 0 = Name, 1 = Full servername, 2 = Premium Status (Yes/No), 3 = Level, 4 = Company, 5 = Map Location, 6 = Registered Date
GetUserInfos(ByVal content As String) //Get user infos of the user. Call it wht Arrays. 0 = User ID, 1 = Level, 2 = Honor, 3 = Experience
GetHangarInfos(ByVal content As String) //Get infos from hangar. Call it with Arrays. 0 = Actual HP, 1 = Max HP, 2 = Nano Hull, 3, Max Nano hull, 4 = repair voucher, 5 = jump voucher, 7 = Lasercount, 8 = Ammocount, 9 = rocketammocount, 16 = Flaxcount, 17 = iriscount, 14 = dmg/shd ratio, 52 = petname, 53 = petfuel, 54 = pet lvl, 55 = pet hp, 56 = pet fuel, 60 = pet shield/hp ratio
GetUID(ByVal content As String) //Get UserID of account
GetSID(ByVal content As String) //Get current SID
GetCredits(ByVal content As String) //Get current Credits
GetUri(ByVal content As String) //Get current Uridium
EncodeUsername(ByVal string0 As String) //Encode the username, to login with special chars
Code Example:
Code:
If Login("Requi", "isawesome", "de8") = True Then
Dim src As String = GetResponse("http://" & server + ".darkorbit.bigpoint.com/indexInternal.es?action=internalStart")
GetCredits(src)
GetUri(src)
MsgBox(iCredits)
MsgBox(iUridium)
Else
MsgBox("Username is wrong!!!!!!!!")
End If
The code of the API:

The C# API:

Code:
if (DarkOrbitAPI.Login("Requi", "isawesome", "de8")) == true
{
string src = DarkOrbitAPI.GetResponse("http://" & server + ".darkorbit.bigpoint.com/indexInternal.es?action=internalStart");
DarkOrbitAPI.GetCredits(src);
DarkOrbitAPI.GetUri(src);
MessageBox.Show(iCredits);
MessageBox.Show(iUridium);
}
else
{
MessageBox.Show("Username is wrong!!!!!!!!");
}

Regards,
Requi
08/05/2013 01:58 YatoDev#2
I want to share a little collection of functions in AutoIt with our community !

You can use this only in AutoIt !

There are more than 11 funcs that you can use in your scripts!
Example :
Code:
_DO_Login("username","password","server shortcut")
This function login into darkorbit mainpage with userinfo and the windows http client !
It will return the source code in html of the darkorbit webpage

In the header of every function are infos like how to use and how to or what theyre returning.

Login should be like this :
Code:
$htmlSource = _DO_Login("username","password","server shortcut")
$SID = _Get_SID($htmlSource)
$SID will be the Session ID so you dont need to make packets for each connect on a Darkorbit page.

Functions like :
Code:
_Trap_Login_Sid($sServer,$iSessionID)
are for those who are allowed to code with the trapdoor.dll so ignore it if you dont have it or you write an application to Ink!

I hope you like that little UDF and use it in your bot but dont forget credits to me or requi!

Here you can copy the Functions or download the .au3 at the bottom of this post


Download : [Only registered and activated users can see links. Click Here To Register...]
08/05/2013 03:28 »jD«#3
Even tho its a source code download, you still need a VirusTotal.

-jD
08/05/2013 06:50 Requi#4
#updated first post

Fixxed Booty Keys now and improved code. You need to declare the server variable for the API yourself.

Just put this in your frm_Load() Sub:
Code:
server = server.Text //But only if your textbox for the server is called server!
The bootykeys are given in a array.
Call it on this way:
Code:
Green Booty Key = BootyArray(0)
Red Booty Key = BootyArray(1)
Blue Booty Key = BootyArray(2)
But don't forget to call the function at first, that the variable gets a value.

Regards,
Requi
08/05/2013 10:07 »Barney«#5
Good work on it Requi, haven't looked into the source code, but I love this line:

Quote:
'<C> by FlutterShy (Code in Auto(sh)it)'
Fair enough.
08/05/2013 10:20 Requi#6
Any suggestions for a feature?
08/05/2013 10:29 fuso98#7
GG clicker? :rolleyes:

EDIT:
in my bot I used this to check iris info
Code:
			$soruce=_INetGetSource("http://"&$server&".darkorbit.bigpoint.com/indexInternal.es?action=internalDock&dosid="&$SID)
            $array=_Get_Hangar_Infos($soruce)
			$dronenumber=$array[16]+$array[17]+$array[18]+$array[19];nflax+niris+napis+nzeus
			$numberarray=0;to check the new drone info in array[]
            $arraydim=0;to add new array
               For $i=1 to $dronenumber
				  $dronesArray[$arraydim]=$array[20+$numberarray]&" DMG "&$array[21+$numberarray]&" PNT "&$array[22+$numberarray]&$array[23+$numberarray]
				  $numberarray+=4
				  $arraydim+=1
			  Next
08/05/2013 10:33 Requi#8
Quote:
Originally Posted by fuso98 View Post
GG clicker? :rolleyes:
What do you exactly want. It's a API. Not something what you use in your project and it works all without doing anything
08/05/2013 10:37 fuso98#9
I edit my last post, see if it can be helpfull to your api ;)
08/05/2013 10:42 Requi#10
Quote:
Originally Posted by Ðaѓkšidé† View Post
Will someone explain to me:
[Only registered and activated users can see links. Click Here To Register...]
Im not a coder at all so this to me is like 0.o :pimp:
Thnx anyways, i guess...
If you want to make a tool with more functions like reading out credits etc. you don't want to code everytime the same shit.

With this API, you have this function everywhere. Just include it to your project and use the function, which I posted at first post

Quote:
Originally Posted by fuso98 View Post
I edit my last post, see if it can be helpfull to your api ;)
We will code the drones later, because we are too lazy for the math :p
08/05/2013 10:44 Ðaѓkšidé†#11
Quote:
Originally Posted by Requi View Post
If you want to make a tool with more functions like reading out credits etc. you don't want to code everytime the same shit.

With this API, you have this function everywhere. Just include it to your project and use the function, which I posted at first post



We will code the drones later, because we are too lazy for the math :p
Oooh.
Makes sense lol
I need to learn me some AutoIT & C#, holy smokes ...
Thnx :handsdown:
08/05/2013 10:47 fuso98#12
Quote:
Originally Posted by Requi View Post
We will code the drones later, because we are too lazy for the math :p
Yes i know but the script that i post (AutoIT obviusly) work good ;) and there's no problem with it :) if you want you can add it. I just want to help you and requi that sometimes helped me with suggestion on coding.
08/05/2013 10:55 'Heaven.#13
Quote:
Originally Posted by Requi View Post
Any suggestions for a feature?
You can add the Methods from my multitool source.
08/05/2013 10:58 Requi#14
Quote:
Originally Posted by 'Heaven. View Post
You can add the Methods from my multitool source.
I'll look at it, when I slept.
24hours without sleeping again.
08/05/2013 13:54 YatoDev#15
Quote:
Originally Posted by »jD« View Post
Even tho its a source code download, you still need a VirusTotal.

-jD
lol why :D its added later i dont have internet on my computer

Quote:
Originally Posted by chichi011 View Post
Good work on it Requi, haven't looked into the source code, but I love this line:
Fair enough.
Its because the base was coded from me in autoit to use it with the trapdoor.dll and im coding now in .Net so requi decided to import all :D

@Requi :
Should we do a whole .dll with all functions ? but nothink that works with client only on webpage!