anasky Posted April 19, 2009 Author Share Posted April 19, 2009 Hello all,I'm going to show you a pretty simple code that I used to teach someone that asked me the basics.Client: form1.frm```Private Sub cmdFlee_Click() Call SendData("flee" & END_CHAR)End Sub```Server: modHandleData.bas```Case "flee" Dim X As Integer X = Rand(1, 100) If X => 80 Then Call SendDataTo(Index, "flee" & END_CHAR) Call PlayerMsg(Index, "You succeeded to flee.", GREEN) End IfExit Sub```Client: modHandleData.bas```If parse(0) = "flee" Then Unload form1Exit SubEnd If```I hope you guys liked it. Link to comment Share on other sites More sharing options...
Alpha Posted April 23, 2009 Share Posted April 23, 2009 Great for Pokemon games and other turn-based games!Thanks Anasky.. a must-have for a pokemon game.-Alpha Link to comment Share on other sites More sharing options...
anasky Posted April 24, 2009 Author Share Posted April 24, 2009 You're welcome.It was the most easiest script I could release. Link to comment Share on other sites More sharing options...
mrmiguu Posted April 24, 2009 Share Posted April 24, 2009 @Anasky:> Hello all,> I'm going to show you a pretty simple code that I used to teach someone that asked me the basics.> > Client: form1.frm> ```> Private Sub cmdFlee_Click()> Call SendData("flee" & END_CHAR)> End Sub> > ```> Server: modHandleData.bas> ```> Case "flee"> Dim X As Integer> X = Rand(1, 100)> If X => 80 Then> Call SendDataTo(Index, "flee" & END_CHAR)> Call PlayerMsg(Index, "You succeeded to flee.", GREEN)> End If> Exit Sub> > ```> Client: modHandleData.bas> ```> If parse(0) = "flee" Then> Unload form1> Exit Sub> End If> > ```> > I hope you guys liked it.You should have also included that this only works if you make a command button in vb6 named "cmdFlee" and that when you click it, it sends a packet to the server that chooses a random number and when it's 81~100 then the server sends another packet back to the client to tell it to close the form named "form1" Link to comment Share on other sites More sharing options...
anasky Posted April 25, 2009 Author Share Posted April 25, 2009 Yeah, but I hoped they atleast knew something :P Link to comment Share on other sites More sharing options...
riseofwar Posted April 28, 2009 Share Posted April 28, 2009 What does this do? Link to comment Share on other sites More sharing options...
unnown Posted April 28, 2009 Share Posted April 28, 2009 its a really basic message/unload form thingy Link to comment Share on other sites More sharing options...
anasky Posted April 29, 2009 Author Share Posted April 29, 2009 @unnown:> its a really basic message/unload form thingyTrue, but if you only know how to make a form etc, it's quite good to get Eclipse a bit :PThe previous guy I showed it (in RL) was busy for an hour to figure out what it did xD Link to comment Share on other sites More sharing options...
mrmiguu Posted April 29, 2009 Share Posted April 29, 2009 @Anasky:> True, but if you only know how to make a form etc, it's quite good to get Eclipse a bit :P> The previous guy I showed it (in RL) was busy for an hour to figure out what it did xDI'm guessing he doesn't know VB6… Link to comment Share on other sites More sharing options...
anasky Posted April 29, 2009 Author Share Posted April 29, 2009 @MrMiguuâ„¢:> I'm guessing he doesn't know VB6…lol, I didn't made this for nothing xDIt sends a packet to the server (SendData),Creates an integer (Dim X As Integer)Server makes a random (in server to avoid CheatEngine) (X = Rand(1, 100)),If it's higher then or equal to 80 (If X => 80 Then),Sends a packet to the Client (SendDataTo),Client unloads form1 (Basically, it gets the form1 (in my case, the battle view) away from view). Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now