|
You last visited: Today at 16:40
Advertisement
Conquer online programming
Discussion on Conquer online programming within the CO2 Programming forum part of the Conquer Online 2 category.
07/24/2011, 05:31
|
#16
|
elite*gold: 20
Join Date: Aug 2007
Posts: 1,749
Received Thanks: 2,199
|
Quote:
Originally Posted by iDanielx
Hello,
I had few questions came in my mind and I found elitepvpers a good place asking for any of the programming's questions.
Currently I'm a Visual basic.net professional, and sql server too. So when i left co i decided to either start making private servers or focus on doing bots and proxies.
My first question is shall I start private server programming using Visual basic or wait until I have time to read about Java syntax and work with java? My opinion is that java is more powerful so that i should wait until i have some time to go through java, what do you think?
Second, what are the requirements or the things that I should know to start developing co private server?
I need your advices even if you'll say something that i didn't ask about.
thanks 
|
If you want to make bots, I don't see any reason not to use VB.NET. It's basically the same as C#, except it doesn't support pointers, and it has some other "limitations" too - It goes both ways though, VB.NET has a lot of features that C# doesn't, so since you already know VB.NET, I'd say stick with it.
Developing a proxy using VB.NET isn't anymore difficult than developing one using C#. The same counts for memory based bots - If you want, I've released a process hooking VB.NET source that you could take a look at, if you're interested in that kind of stuff, of course.
|
|
|
07/24/2011, 08:50
|
#17
|
elite*gold: 0
Join Date: May 2011
Posts: 1,769
Received Thanks: 756
|
Quote:
Originally Posted by IAmHawtness
If you want to make bots, I don't see any reason not to use VB.NET. It's basically the same as C#, except it doesn't support pointers, and it has some other "limitations" too - It goes both ways though, VB.NET has a lot of features that C# doesn't, so since you already know VB.NET, I'd say stick with it.
Developing a proxy using VB.NET isn't anymore difficult than developing one using C#. The same counts for memory based bots - If you want, I've released a process hooking VB.NET source that you could take a look at, if you're interested in that kind of stuff, of course.
|
What many features does VB.NET have, that C# doesn't? As far as I know, then the output is the same as they are both sharing same CLI.
|
|
|
07/24/2011, 11:04
|
#18
|
elite*gold: 20
Join Date: Aug 2007
Posts: 1,749
Received Thanks: 2,199
|
Quote:
Originally Posted by BaussHacker
What many features does VB.NET have, that C# doesn't? As far as I know, then the output is the same as they are both sharing same CLI.
|
VB.NET has some more "user-friendly" features, keywords like WithEvents and Handles, On Error, IsNumeric, "With Object"..
And yes, the code that is compiled is almost identical in both languages
|
|
|
07/24/2011, 19:50
|
#19
|
elite*gold: 0
Join Date: Jul 2011
Posts: 14
Received Thanks: 0
|
IAmHawtness Thanks I've looked through the code.
Thank you all for your advices.
|
|
|
07/24/2011, 19:56
|
#20
|
elite*gold: 0
Join Date: May 2011
Posts: 1,769
Received Thanks: 756
|
Quote:
Originally Posted by IAmHawtness
VB.NET has some more "user-friendly" features, keywords like WithEvents and Handles, On Error, IsNumeric, "With Object"..
And yes, the code that is compiled is almost identical in both languages
|
Well it's not features that are important really. I would again suggest C#, if you want to continue to other more advanced things after or maybe learn C++ or whatever.
|
|
|
07/24/2011, 20:24
|
#21
|
elite*gold: 20
Join Date: Aug 2007
Posts: 1,749
Received Thanks: 2,199
|
Quote:
Originally Posted by BaussHacker
Well it's not features that are important really. I would again suggest C#, if you want to continue to other more advanced things after or maybe learn C++ or whatever.
|
Actually, if he already knows the BASIC syntax and wants to move toward some more "advanced" programming, he could use one of the many BASIC compilers out there.
Take FreeBASIC for example, which is almost identical to C++ but with a BASIC syntax. It can do anything that C++ can, it supports pointers, inline assembly, macros, etc.
One of the only major drawbacks is that it doesn't support classes (yet), and interfaces, although it supports user defined types which are basically the same as classes, except they don't support inheritance.
|
|
|
07/24/2011, 21:34
|
#22
|
elite*gold: 0
Join Date: May 2011
Posts: 1,769
Received Thanks: 756
|
Quote:
Originally Posted by IAmHawtness
Actually, if he already knows the BASIC syntax and wants to move toward some more "advanced" programming, he could use one of the many BASIC compilers out there.
Take FreeBASIC for example, which is almost identical to C++ but with a BASIC syntax. It can do anything that C++ can, it supports pointers, inline assembly, macros, etc.
One of the only major drawbacks is that it doesn't support classes (yet), and interfaces, although it supports user defined types which are basically the same as classes, except they don't support inheritance.
|
So it's like a C version of VB?
|
|
|
07/24/2011, 21:38
|
#23
|
elite*gold: 20
Join Date: Aug 2007
Posts: 1,749
Received Thanks: 2,199
|
Quote:
Originally Posted by BaussHacker
So it's like a C version of VB? 
|
Yeah, it's exactly like C with VB syntax, except it supports a tiny amount of object-oriented programming 
It's still being worked on though, and classes/inheritance/interfaces will probably be implemented some time. The "Class" keyword is already implemented, just not used.
|
|
|
07/24/2011, 21:43
|
#24
|
elite*gold: 0
Join Date: May 2011
Posts: 1,769
Received Thanks: 756
|
Quote:
Originally Posted by IAmHawtness
Yeah, it's exactly like C with VB syntax, except it supports a tiny amount of object-oriented programming 
It's still being worked on though, and classes/inheritance/interfaces will probably be implemented some time. The "Class" keyword is already implemented, just not used.
|
I should look into it one time. Didn't know such thing existed.
|
|
|
07/25/2011, 12:26
|
#25
|
elite*gold: 28
Join Date: Jun 2010
Posts: 2,226
Received Thanks: 868
|
Quote:
Originally Posted by IAmHawtness
Actually, if he already knows the BASIC syntax and wants to move toward some more "advanced" programming, he could use one of the many BASIC compilers out there.
Take FreeBASIC for example, which is almost identical to C++ but with a BASIC syntax. It can do anything that C++ can, it supports pointers, inline assembly, macros, etc.
One of the only major drawbacks is that it doesn't support classes (yet), and interfaces, although it supports user defined types which are basically the same as classes, except they don't support inheritance.
|
Code:
DIM page
DIM notpage
DIM a,b
screen 12, , 2 'This sets the screen for 2 pages
notpage = 1 'This sets the backpage
DO
IF page = 0 THEN page = 1 ELSE page = 0 'These two lines flip the page and the
IF notpage = 1 THEN notpage = 0 ELSE notpage = 1 'backpage
SCREENSET page, notpage 'This flips the page
CLS 'First we clear the screen
b = b + 1
IF b > 100 THEN b = 0
FOR a = 1 TO 128
PSET (b,a),a 'Then we draw a line. It moves without flickering.
NEXT a
LOOP
:S
|
|
|
07/25/2011, 16:59
|
#26
|
elite*gold: 20
Join Date: Aug 2007
Posts: 1,749
Received Thanks: 2,199
|
Quote:
Originally Posted by _DreadNought_
Code:
DIM page
DIM notpage
DIM a,b
screen 12, , 2 'This sets the screen for 2 pages
notpage = 1 'This sets the backpage
DO
IF page = 0 THEN page = 1 ELSE page = 0 'These two lines flip the page and the
IF notpage = 1 THEN notpage = 0 ELSE notpage = 1 'backpage
SCREENSET page, notpage 'This flips the page
CLS 'First we clear the screen
b = b + 1
IF b > 100 THEN b = 0
FOR a = 1 TO 128
PSET (b,a),a 'Then we draw a line. It moves without flickering.
NEXT a
LOOP
:S
|
Code:
#Include "windows.bi"
#Include "win/winsock.bi"
#Include "detours.bi"
'Real functions
Dim Shared OpenMutex_T As Function (dwDesiredAccess As DWORD, bInheritHandle As BOOL, lpName As LPCTSTR) As HANDLE
Dim Shared ShellExecuteA_T As Function(hWnd As HWND, lpOperation As LPCTSTR, lpFile As LPCTSTR, lpParameters As LPCTSTR, lpDirectory As LPCTSTR, nShowCmd As UInteger) As HINSTANCE
'Detoured functions
Declare Function OpenMutex_F (dwDesiredAccess As DWORD, bInheritHandle As BOOL, lpName As LPCTSTR) As HANDLE
Declare Function ShellExecuteA_F(hWnd As HWND, lpOperation As LPCTSTR, lpFile As LPCTSTR, lpParameters As LPCTSTR, lpDirectory As LPCTSTR, nShowCmd As UInteger) As HINSTANCE
Function DllMain (hinstDLL As HINSTANCE, fdwReason As DWORD, lpvReserved As LPVOID) As BOOL
Select Case fdwReason
Case DLL_PROCESS_ATTACH
AllocConsole
OpenMutex_T = Cast(Function(dwDesiredAccess As DWORD, bInheritHandle As BOOL, lpName As LPCTSTR) As HANDLE, GetProcAddress(GetModuleHandle("kernel32"), "OpenMutexA"))
ShellExecuteA_T = Cast(Function(hwnd As HWND, lpOperation As LPCTSTR, lpFile As LPCTSTR, lpParameters As LPCTSTR, lpDirectory As LPCTSTR, nShowCmd As UInteger) As HINSTANCE, GetProcAddress(GetModuleHandle("SHELL32"), "ShellExecuteA"))
DetourRestoreAfterWith()
DetourTransactionBegin()
DetourUpdateThread(GetCurrentThread())
DetourAttach(Cast(PVOID, @OpenMutex_T), @OpenMutex_F)
DetourAttach(Cast(PVOID, @ShellExecuteA_T), @ShellExecuteA_F)
Dim er As Long = DetourTransactionCommit()
If er > 0 Then
Print "Error: 0x" & Hex(er)
Else
FreeConsole()
EndIf
Case DLL_PROCESS_DETACH
Case DLL_THREAD_ATTACH
Case DLL_THREAD_DETACH
End Select
Return 1
End Function
Function OpenMutex_F (dwDesiredAccess As DWORD, bInheritHandle As BOOL, lpName As LPCTSTR) As HANDLE
If *lpName = "TQ_CONQUER00" Then
*lpName = "COMultiClient_ " & Str(GetCurrentProcessId)
EndIf
Return OpenMutex_T(dwDesiredAccess, bInheritHandle, lpName)
End Function
Function ShellExecuteA_F(hwnd As HWND, lpOperation As LPCTSTR, lpFile As LPCTSTR, lpParameters As LPCTSTR, lpDirectory As LPCTSTR, nShowCmd As UInteger) As HINSTANCE
If Not *lpFile = "http://co.91.com/signout/" Then
Return ShellExecuteA_T(hwnd, lpOperation, lpFile, lpParameters, lpDirectory, nShowCmd)
Else
Return FALSE
End If
End Function
|
|
|
07/27/2011, 21:16
|
#27
|
elite*gold: 0
Join Date: May 2011
Posts: 1,769
Received Thanks: 756
|
Quote:
Originally Posted by IAmHawtness
Code:
#Include "windows.bi"
#Include "win/winsock.bi"
#Include "detours.bi"
'Real functions
Dim Shared OpenMutex_T As Function (dwDesiredAccess As DWORD, bInheritHandle As BOOL, lpName As LPCTSTR) As HANDLE
Dim Shared ShellExecuteA_T As Function(hWnd As HWND, lpOperation As LPCTSTR, lpFile As LPCTSTR, lpParameters As LPCTSTR, lpDirectory As LPCTSTR, nShowCmd As UInteger) As HINSTANCE
'Detoured functions
Declare Function OpenMutex_F (dwDesiredAccess As DWORD, bInheritHandle As BOOL, lpName As LPCTSTR) As HANDLE
Declare Function ShellExecuteA_F(hWnd As HWND, lpOperation As LPCTSTR, lpFile As LPCTSTR, lpParameters As LPCTSTR, lpDirectory As LPCTSTR, nShowCmd As UInteger) As HINSTANCE
Function DllMain (hinstDLL As HINSTANCE, fdwReason As DWORD, lpvReserved As LPVOID) As BOOL
Select Case fdwReason
Case DLL_PROCESS_ATTACH
AllocConsole
OpenMutex_T = Cast(Function(dwDesiredAccess As DWORD, bInheritHandle As BOOL, lpName As LPCTSTR) As HANDLE, GetProcAddress(GetModuleHandle("kernel32"), "OpenMutexA"))
ShellExecuteA_T = Cast(Function(hwnd As HWND, lpOperation As LPCTSTR, lpFile As LPCTSTR, lpParameters As LPCTSTR, lpDirectory As LPCTSTR, nShowCmd As UInteger) As HINSTANCE, GetProcAddress(GetModuleHandle("SHELL32"), "ShellExecuteA"))
DetourRestoreAfterWith()
DetourTransactionBegin()
DetourUpdateThread(GetCurrentThread())
DetourAttach(Cast(PVOID, @OpenMutex_T), @OpenMutex_F)
DetourAttach(Cast(PVOID, @ShellExecuteA_T), @ShellExecuteA_F)
Dim er As Long = DetourTransactionCommit()
If er > 0 Then
Print "Error: 0x" & Hex(er)
Else
FreeConsole()
EndIf
Case DLL_PROCESS_DETACH
Case DLL_THREAD_ATTACH
Case DLL_THREAD_DETACH
End Select
Return 1
End Function
Function OpenMutex_F (dwDesiredAccess As DWORD, bInheritHandle As BOOL, lpName As LPCTSTR) As HANDLE
If *lpName = "TQ_CONQUER00" Then
*lpName = "COMultiClient_ " & Str(GetCurrentProcessId)
EndIf
Return OpenMutex_T(dwDesiredAccess, bInheritHandle, lpName)
End Function
Function ShellExecuteA_F(hwnd As HWND, lpOperation As LPCTSTR, lpFile As LPCTSTR, lpParameters As LPCTSTR, lpDirectory As LPCTSTR, nShowCmd As UInteger) As HINSTANCE
If Not *lpFile = "http://co.91.com/signout/" Then
Return ShellExecuteA_T(hwnd, lpOperation, lpFile, lpParameters, lpDirectory, nShowCmd)
Else
Return FALSE
End If
End Function

|
Do you know what Freebasic was made in? ;o
I would guess maybe C++?
|
|
|
07/27/2011, 21:39
|
#28
|
elite*gold: 20
Join Date: Aug 2007
Posts: 1,749
Received Thanks: 2,199
|
Quote:
Originally Posted by BaussHacker
Do you know what Freebasic was made in? ;o
I would guess maybe C++?
|
The compiler itself is actually coded in FreeBASIC (you can find the FreeBASIC source code here:  )
|
|
|
07/27/2011, 21:53
|
#29
|
elite*gold: 0
Join Date: May 2011
Posts: 1,769
Received Thanks: 756
|
Quote:
Originally Posted by IAmHawtness
The compiler itself is actually coded in FreeBASIC (you can find the FreeBASIC source code here:  )
|
It's kinda ironic it's coded in its own language
|
|
|
07/27/2011, 22:10
|
#30
|
elite*gold: 20
Join Date: Aug 2007
Posts: 1,749
Received Thanks: 2,199
|
Quote:
Originally Posted by BaussHacker
It's kinda ironic it's coded in its own language 
|
Yeah, I know. Kinda shows how powerful the language is too though
|
|
|
All times are GMT +2. The time now is 16:40.
|
|