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

Adding an Action Bar to Your Game!


zade_o
 Share

Recommended Posts

  • Replies 154
  • Created
  • Last Reply

Top Posters In This Topic

Check again, and if you still don't i'd download another copy of the source…

Keyup is the function that the hotkey's use. (i think the default ones are like pageup and stuff)

If those work, you have a keyup and I'd be willing to bet you do have the keyup and you just didn't look close enough.
Link to comment
Share on other sites

do i have to put the destination or just ad the image and what kinda of image should it be? and

If (Image7.Picture = Image16.Picture) Then
            Image7.Picture = LoadPicture(App.Path & "\GUI\SpellIcons\" & r & ".gif")
            Call SendData("setspell1" & SEP_CHAR & r & END_CHAR)

Image 16.picture is the problem, says Variable not specified
Link to comment
Share on other sites

Hey,

Im having some major problems which i couldn't find anyone talking about in this thread.

Heres the issues

1st,

The Action bar doesn't display, it like flickers once or twice and i can see it then it disappears yet i have it set to visible

2nd,

After i click out of the spell book to something else, for example Online, i cant get back into my spell Book

3rd,

When i log on, the action bar has nothing on it, its like clean ill hit my 123 buttons yet nothing happens

4th,

The spell doesn't work, i make a spell real fast yet it says "Cannot Cast Spell"

5th,

The screen flickers ever once and awhile, i don't know why it does this, i did Bring To Front the picScreen picture box

Conclusion,

its working yes, but needs repaired or something, ive look at the tutorial many of times and still nothing

ps i had to change the one dim s to dim ss because dim s was already taken for some reason
Link to comment
Share on other sites

@negley:

> Hey,
>
> Im having some major problems which i couldn't find anyone talking about in this thread.
>
> Heres the issues
>
> 1st,
>
> The Action bar doesn't display, it like flickers once or twice and i can see it then it disappears yet i have it set to visible
>
> 2nd,
>
> After i click out of the spell book to something else, for example Online, i cant get back into my spell Book
>
> 3rd,
>
> When i log on, the action bar has nothing on it, its like clean ill hit my 123 buttons yet nothing happens
>
> 4th,
>
> The spell doesn't work, i make a spell real fast yet it says "Cannot Cast Spell"
>
> 5th,
>
> The screen flickers ever once and awhile, i don't know why it does this, i did Bring To Front the picScreen picture box
>
> Conclusion,
>
> its working yes, but needs repaired or something, ive look at the tutorial many of times and still nothing
>
> ps i had to change the one dim s to dim ss because dim s was already taken for some reason

hey man im not a good scripter at all but, i did toy with this for a few hours

number 1, u have to have the image box above the label

number 2, need to make sure that your lbl spell, spell label, looks somthing like this
```
Private Sub lblSpells_Click()
    Call SendRequestSpells

    picInventory.Visible = False
    picGuildAdmin.Visible = False
    picEquipment.Visible = False
    picGuildMember.Visible = False
    picWhosOnline.Visible = False
    picCharStatus.Visible = False
    picPlayerSpells.Visible = True
End Sub
```
dunno about the screen flickering but if u check these things they may be able to help

good luck =)

Also im still having trouble adding a different animation.. doest the same one for every spell, also the sound effect's dont play, hope someone finds somthing out =)

Thanks
Link to comment
Share on other sites

ok, tryed what u said yet still nothing

i added the

Private Sub lblSpells_Click()
    Call SendRequestSpells

    picInventory.Visible = False
    picGuildAdmin.Visible = False
    picEquipment.Visible = False
    picGuildMember.Visible = False
    picWhosOnline.Visible = False
    picCharStatus.Visible = False
    picPlayerSpells.Visible = True
End Sub

cause i couldnt find the sub anywhere so i just made a new one

no results
Link to comment
Share on other sites

Negley, i have gotten this to work perfectly for my game by following the tutorial, so there is nothing wrong with it, just follow the directions and have some common sense.

by adding that sub to your frmMirage, that will allow you to see your spells, if not, i recommend dling a new source.
Link to comment
Share on other sites

The thing doesn't need repair. You just didn't add it right.

First of all, if you put ANYTHING overtop of the picScreen (other than a picture box) it's not gonna show up because picScreen gets refreshed too much. If the action bar isn't in a picture box then you need to take it off from overtop of the picScreen.

The flickering, that's just from EE. Not my action bar.

For the rest of the things, you've implemented it wrong. I've gotten it to work perfectly in my source and a vanilla copy of source, and others have gotten it to work as well.
Link to comment
Share on other sites

ok gots a update

Yep im stupid but when i did the picture box, it works fine so yay but what are the labels for?? they all just say label1 haha

everything else works perfect :)

wait 1 problem

my action bar doesn't save when i relog? would there be any simple reason behind that?
Link to comment
Share on other sites

I think my issue is
```
' Action Bar
        Case "setspell1"
            Call WriteINI("SK1", "sid", Parse(1), App.Path & "\Scripts\db\" & GetPlayerName(Index) & ".ini")
            Exit Sub

        Case "loadspell1"
            FileData = ReadINI("SK1", "sid", App.Path & "\Scripts\db\" & GetPlayerName(Index) & ".ini", vbNullString)
            Call SendDataTo(Index, "getspell1" & SEP_CHAR & FileData & END_CHAR)
            Exit Sub

        Case "setspell2"
            Call WriteINI("SK2", "sid", Parse(1), App.Path & "\Scripts\db\" & GetPlayerName(Index) & ".ini")
            Exit Sub

        Case "loadspell2"
            FileData = ReadINI("SK2", "sid", App.Path & "\Scripts\db\" & GetPlayerName(Index) & ".ini", vbNullString)
            Call SendDataTo(Index, "getspell2" & SEP_CHAR & FileData & END_CHAR)
            Exit Sub

        Case "setspell3"
            Call WriteINI("SK3", "sid", Parse(1), App.Path & "\Scripts\db\" & GetPlayerName(Index) & ".ini")
            Exit Sub

        Case "loadspell3"
            FileData = ReadINI("SK3", "sid", App.Path & "\Scripts\db\" & GetPlayerName(Index) & ".ini", vbNullString)
            Call SendDataTo(Index, "getspell3" & SEP_CHAR & FileData & END_CHAR)
            Exit Sub
        Case "setspell4"
            Call WriteINI("SK4", "sid", Parse(1), App.Path & "\Scripts\db\" & GetPlayerName(Index) & ".ini")
            Exit Sub

        Case "loadspell4"
            FileData = ReadINI("SK4", "sid", App.Path & "\Scripts\db\" & GetPlayerName(Index) & ".ini", vbNullString)
            Call SendDataTo(Index, "getspell4" & SEP_CHAR & FileData & END_CHAR)
            Exit Sub
        Case "setspell5"
            Call WriteINI("SK5", "sid", Parse(1), App.Path & "\Scripts\db\" & GetPlayerName(Index) & ".ini")
            Exit Sub

        Case "loadspell5"
            FileData = ReadINI("SK5", "sid", App.Path & "\Scripts\db\" & GetPlayerName(Index) & ".ini", vbNullString)
            Call SendDataTo(Index, "getspell5" & SEP_CHAR & FileData & END_CHAR)
            Exit Sub
        Case "setspell6"
            Call WriteINI("SK6", "sid", Parse(1), App.Path & "\Scripts\db\" & GetPlayerName(Index) & ".ini")
            Exit Sub

        Case "loadspell6"
            FileData = ReadINI("SK6", "sid", App.Path & "\Scripts\db\" & GetPlayerName(Index) & ".ini", vbNullString)
            Call SendDataTo(Index, "getspell6" & SEP_CHAR & FileData & END_CHAR)
            Exit Sub
        Case "setspell7"
            Call WriteINI("SK7", "sid", Parse(1), App.Path & "\Scripts\db\" & GetPlayerName(Index) & ".ini")
            Exit Sub

        Case "loadspell7"
            FileData = ReadINI("SK7", "sid", App.Path & "\Scripts\db\" & GetPlayerName(Index) & ".ini", vbNullString)
            Call SendDataTo(Index, "getspell7" & SEP_CHAR & FileData & END_CHAR)
            Exit Sub
        Case "setspell8"
            Call WriteINI("SK8", "sid", Parse(1), App.Path & "\Scripts\db\" & GetPlayerName(Index) & ".ini")
            Exit Sub

        Case "loadspell8"
            FileData = ReadINI("SK8", "sid", App.Path & "\Scripts\db\" & GetPlayerName(Index) & ".ini", vbNullString)
            Call SendDataTo(Index, "getspell8" & SEP_CHAR & FileData & END_CHAR)
            Exit Sub
        Case "setspell9"
            Call WriteINI("SK9", "sid", Parse(1), App.Path & "\Scripts\db\" & GetPlayerName(Index) & ".ini")
            Exit Sub

        Case "loadspell5"
            FileData = ReadINI("SK5", "sid", App.Path & "\Scripts\db\" & GetPlayerName(Index) & ".ini", vbNullString)
            Call SendDataTo(Index, "getspell9" & SEP_CHAR & FileData & END_CHAR)
            Exit Sub
        Case "setspell10"
            Call WriteINI("SK10", "sid", Parse(1), App.Path & "\Scripts\db\" & GetPlayerName(Index) & ".ini")
            Exit Sub

        Case "loadspell10"
            FileData = ReadINI("SK10", "sid", App.Path & "\Scripts\db\" & GetPlayerName(Index) & ".ini", vbNullString)
            Call SendDataTo(Index, "getspell10" & SEP_CHAR & FileData & END_CHAR)
            Exit Sub

```
where am i supposed to insert this at, when i put it below the sub it says its not in a select case yet when i put it in the select case there it doesn't save the action bar
Link to comment
Share on other sites

  • 4 weeks later...
make sure that that is below all of the other cases, i think

```
    If (casestring = "returncustomboxmsg") Then
        customsize = parse(1)

        packet = "returningcustomboxmsg" & SEP_CHAR & frmCustom1.txtCustom(customsize).Text & END_CHAR
        Call SendData(packet)

        Exit Sub
    End If

```
is the last case before it ends, put it right after that, and it should work
Link to comment
Share on other sites

Amazing script… but i'm having some troubles :p
I've solved the first one, but now i'm stucked:

I run the server and everythings ok, but when i try to run the client it shows:

> Compilation Error
> Duplicate declaration in current scope

(google translate, my VB is in spanish).

And it shows me:

> If casestring = "sendchat" Then
>         Dim **s As String**

(ModHandleData Client)
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...