Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

[EO 2.0]Blood On/Off Button Tutorial W/ video!


Craselin
 Share

Recommended Posts

Blood On/Off Button Tutorial by Craselin
Hey everyone,
before i start the tutorial I want say "MASSIVE" credit to Sweek who pretty much taught me how to do this and without him this tutorial would not exisit. Also please bear in mind this is my first tutorial.

**What does this tutorial do?**
This tutorial will guide you on create a checkbox in the options menu which allows players to turn blood on or off.
**Are there any known bugs?**
Yes, sadly there is a pretty big bug which causes blood not to appear on login until unchecking the box then re-checking it. There are no other known bugs.
**Is it hard?**
Not very hard it all, that is, if you follow the instructions.

>! **_ALL EDITS DONE IN CLIENT_**
**1\.** Open up client.vbp using visual basic professional or enterprise edition.
**2\.** In the project explorer click "Modules" then "modConstants"
![](http://www.freemmorpgmaker.com/files/imagehost/pics/5358ee6f37e3711433a65233dcab8208.bmp)
**3\.** At the end of modConstants add this:
```
'blood on or off
Public bloodvisi As Boolean
```then close modConstants
**4\.** Once again in the modules section but this time open "modDirectDraw7"
![](http://www.freemmorpgmaker.com/files/imagehost/pics/685dccd4bbe3723c90b1e4d5a2e3f38e.bmp)
**5\.** Find this code using Ctrl+F
```
Public Sub BltBlood(ByVal Index As Long)
Dim rec As DxVBLib.RECT
```Underneath it add this:
```
If bloodvisi = False Then Exit Sub
```then close modDirectDraw7
**6\.** Under the Forms section open frmMain
![](http://www.freemmorpgmaker.com/files/imagehost/pics/4e217d0472040d82e54edd011be78574.bmp)
**7\.** Now for the more graphical part, in the corner you will see a big picture box (refer to picture below) right click it and select send to back, do this again until you see the music and sound options
![](http://www.freemmorpgmaker.com/files/imagehost/pics/c52be8a282c1fa7941f21582827239e9.bmp)
**8\.** Now make a small label by clicking on the label button and place it below the other options, then click in the caption section at the side and name it "Blood" make the backstyle "0 - transparent" change the font to "georgia (bold)" and make the font colour "white (highlighted text)"
Then you need to make a checkbox next to the blood label, name it "bloodchk", make the backcolour "black (button text)" and change the value to "1 - Checked"
![](http://www.freemmorpgmaker.com/files/imagehost/pics/7e7c1574b8aacd25e045f08c438f3fc7.bmp)
**9\.** Double click on the checkbox and a window should pop up, you should see a code like this:
```
Private Sub bloodchk_Click()
>! End Sub
```In the middle of that code, in the blank space, type (or copy) this:
```
If Check1.Value = 0 Then
BloodSwitch = True
Else: BloodSwitch = False
End If
```**10\.** Close that window and select File > Make Eclipse Origins.exe. A window should pop up so click ok then yes, now wait until the compile bar at the top is done. Now close VB6 (it will ask if you want to save, click yes)
**DONE!**

>! Oh and, sorry for the werid flashing at the start, Camstudio is werid like that sometimes.http://www.youtube.com/watch?v=4RoK29wV_VU

**GOOD LUCK! And enjoy!**
kind regards,
Craselin
Link to comment
Share on other sites

Can't really explain it well, try Ctrl + F OptionsRec, add Blood as Byte at the bottom of that. Then look for SaveOptions and LoadOptions, copy a line and rename the things to Blood.

After that copy a set of radio buttons and rename them, then set it and save options when it is modified.

You should know the basics of programming enough to figure this out on your own with this help though, don't feel like going through this in extreme detail.

You should also add the exit out where its called, because it would stop from calling the sub in the first place. So if the blood count is greater than 1 it would have to exit out as many times as what the blood count equaled.
Link to comment
Share on other sites

DOnt you think it will slow your engine down a bit? Every time a player is supposed to "bleed" it checks whether "bleeding" is on or off. And it might be a little bit but it does affect the final speed of your client.
Link to comment
Share on other sites

An Option Button is simple.

Get rid of
```
If Check1.Value = 0 Then
BloodSwitch = True
Else: BloodSwitch = False
End If
```
And make two buttons, in one picture.

On the On button, simply put
```
Private Sub optBOn_Click()
        bloodvisi = True
End Sub
```
And on the Off, simply put
```
Private Sub optBOff_Click()
bloodvisi = False
End Sub
```
It's so simple even I got it, and I'm a programming wreck. It actually works.

EDIT: Although, this doesn't save it. Need to save it to the .ini.
Link to comment
Share on other sites

@QWERTYUIoP:

> An Option Button is simple.
>
> Get rid of
> ```
> If Check1.Value = 0 Then
> BloodSwitch = True
> Else: BloodSwitch = False
> End If
> ```
> And make two buttons, in one picture.
>
> On the On button, simply put
> ```
> Private Sub optBOn_Click()
>         bloodvisi = True
> End Sub
> ```
> And on the Off, simply put
> ```
> Private Sub optBOff_Click()
> bloodvisi = False
> End Sub
> ```
> It's so simple even I got it, and I'm a programming wreck. It actually works.
>
> EDIT: Although, this doesn't save it. Need to save it to the .ini.

Thank you, i will test it and see if i can add a saved option
Link to comment
Share on other sites

@Conra:

> i think if you add a few things that need checking it starts getting noticeable.

Not really, think of it like this. How many lines of code does it take to say, you an item in EO or fight an NPC? The answer: quite a few, yet it still loads pretty fast.
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...