I have been looked at some things for a VB Source, just wanted to show what i have.
Here is some of the scripts i got so far.
Tell me what you think, and you think is possible to create a server out of VB. Cuz im kinda new to all the advanced things at VB.
I have not created any systems yet, but if anybody knows VB and want to help, hook me up at PM.
Sub OnScriptedTile(index, Movement) ' Called when char move
Dim X
Dim Y
Dim Map
X = GetCharX(index)
Y = GetCharY(index)
Map = GetCharMap(index)
Select Case Map
Case 1
If X = 5 And Y = 10 Then
'Code
End If
Case 2
If X = 4 And Y = 1 Then
If GetCharDir(index) = 0 Then
End If
End If
End Select
End Sub
Login Message
Code:
Sub JoinGame(index) ' Called when a char log in
GAME_WEBSITE = "elitepvpers.com"
GAME_SERVER = "VisualBasic Server"
Call CharMsg(index, "Welcome to " & GAME_SERVER & " Please visit the offical website at " & GAME_WEBSITE & ".", C_BRIGHTBLUE)
Call SendMOTD(index)
Call SendWhosOnline(index)
If GetCharAccess(index) < 1 Then
Call GlobalMsg(GetCharName(index) & " (" & GetClassName(GetCharClassID(index)) & ") has joined " & GAME_SERVER & "!", C_WHITE)
Call AdminMsg("IP: " & GetCharIP(index), C_WHITE)
Else
Call GlobalMsg(GetCharName(index) & " (" & GetCharAccessName(index) & ") has joined " & GAME_SERVER & "!", C_WHITE)
End If
End Sub
' GlobalMSG is type 2011
' AdminMSG is type 2000, but send to admins GM's & PM's only
Left game
Code:
Sub LeftGame(index) ' Called when char leave the server
If GetCharAccess(index) < 1 Then
Call GlobalMsg(GetCharName(index) & " (" & GetClassName(GetCharClassID(index)) & ") has left " & GetServerName & "!", C_GREY)
Else
Call GlobalMsg(GetCharName(index) & " (" & GetCharAccessName(index) & ") has left " & GetServerName & "!", C_GREY)
End If
End Sub
Stat Points
Code:
Sub UseStatPoint(Index, PointType) ' Called when a char set stat points
If GetCharPOINTS(Index) > 0 Then
Select Case PointType
Case 0
If GetCharSTR(Index) + 1 > 599 Then
Call CharMsg(Index, "You have maxed your strength!", C_RED)
Exit Sub
End If
Call SetCharSTR(Index, GetCharSTR(Index) + 1)
Call CharMsg(Index, "You have gained more strength!", C_GREY)
Case 1
If GetCharVIT(Index) + 1 > 599 Then
Call CharMsg(Index, "You have maxed your VITense!", C_RED)
Exit Sub
End If
Call SetCharVIT(Index, GetCharVIT(Index) + 1)
Call CharMsg(Index, "You have gained more VITense!", C_GREY)
Case 2
If GetCharSPI(Index) + 1 > 599 Then
Call CharMsg(Index, "You have maxed your SPIc!", C_RED)
Exit Sub
End If
Call SetCharSPI(Index, GetCharSPI(Index) + 1)
Call CharMsg(Index, "You have gained more SPIc!", C_GREY)
Case 3
If GetCharAGI(Index) + 1 > 599 Then
Call CharMsg(Index, "You have maxed your AGI!", C_RED)
Exit Sub
End If
Call SetCharAGI(Index, GetCharAGI(Index) + 1)
Call CharMsg(Index, "You have gained more AGI!", C_GREY)
End Select
Call SetCharPOINTS(Index, GetCharPOINTS(Index) - 1)
Else
Call CharMsg(Index, "You have no stat points to train with!", C_GREY)
End If
End Sub
Well, dats all i have done yet, all that knows VB, hook me up to help me thanks
Ive worked with Visual Basic before. If ya need help let me know , hit me up on a pm. Good luck tho.
Thanks
Ill let you know, when I run into a problem.
Right now im just looking into basics things for server.
Like moving, jumping, characters etc.
Then ill come to connections, sockets, database (Ill use ini).
etc.
I might run in problems there, then ill let u know what i need help for
Thank you very much, I appriciate that
lol,i would like to see you create a socket in php.
PHP Code:
<?php // Set time limit to indefinite execution set_time_limit (0);
// Set the ip and port we will listen on $address = '192.168.0.100'; $port = 9000;
// Create a TCP Stream socket $sock = socket_create(AF_INET, SOCK_STREAM, 0); // Bind the socket to an address/port socket_bind($sock, $address, $port) or die('Could not bind to address'); // Start listening for connections socket_listen($sock);
/* Accept incoming requests and handle them as child processes */ $client = socket_accept($sock);
// Read the input from the client – 1024 bytes $input = socket_read($client, 1024);
// Strip all white spaces from input $output = ereg_replace("[ \t\n\r]","",$input).chr(0);
// Display output back to client socket_write($client, $output);
// Close the client (child) socket socket_close($client);
// Close the master sockets socket_close($sock); ?>
<?php
// Set time limit to indefinite execution
set_time_limit (0);
// Set the ip and port we will listen on
$address = '192.168.0.100';
$port = 9000;
// Create a TCP Stream socket
$sock = socket_create(AF_INET, SOCK_STREAM, 0);
// Bind the socket to an address/port
socket_bind($sock, $address, $port) or die('Could not bind to address');
// Start listening for connections
socket_listen($sock);
/* Accept incoming requests and handle them as child processes */
$client = socket_accept($sock);
// Read the input from the client – 1024 bytes
$input = socket_read($client, 1024);
// Strip all white spaces from input
$output = ereg_replace("[ \t\n\r]","",$input).chr(0);
// Display output back to client
socket_write($client, $output);
// Close the client (child) socket
socket_close($client);
// Close the master sockets
socket_close($sock);
?>
[VisualBasic] Installationsdatei 07/13/2010 - Tutorials - 7 Replies Hallo com ,
Ich wollte euch nun meinen Video hier reinsetzten und euch meinen Installationsdatei Tutorial zur verfügung stellen. - Hoffe es gefällt euch!
Was hat des fürn Zweck? :
- Damit kann man das Selbstprogrammierte *Programme von VisualBasic als Installationsdatei Umwandeln! - Wenn das dann Installiert, kommt dann euer Programm Installiert raus! =)
Hier ist mein Tutorial ~
[VisualBasic]Frage 12/02/2009 - General Coding - 6 Replies Hi,
Ich hab ne Frage zu Vb08.
Also da gibts doch diesen Befehl:
Ich wollte fragen ob man diesen Befehl so machen kann das es an textbox1 sendet
geht das?
VB (VisualBasic) 07/19/2008 - Metin2 - 5 Replies Wer von euch kennt sich damit aus?
Er solte sich gut damit auskennen und die Programmiersprache C#
können. Bsp: c++
Einfach mal hier melden, habe ne super Idee die nicht Pub gemacht werden soll erstmal.
LG BLodas