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

[EO]How to send player class data to client?


Killa_
 Share

Recommended Posts

I need to get it into client source.This code works only server-side.
http://www.touchofdeathforums.com/smf/index.php/topic,59592.msg630746.html
Ive already searched here and found only this,but this didnt helped..
Link to comment
Share on other sites

```
Public Sub loadGUI(Optional ByVal loadingScreen As Boolean = False)
Dim i As Long
Dim Class As Long

    ' if we can't find the interface
    On Error GoTo errorhandler

    ' loading screen
    If loadingScreen Then
        frmLoad.Picture = LoadPicture(App.Path & "\data files\graphics\gui\menu\loading.jpg")
        Exit Sub
    End If

    ' menu
    frmMenu.Picture = LoadPicture(App.Path & "\data files\graphics\gui\menu\background.jpg")
    frmMenu.picMain.Picture = LoadPicture(App.Path & "\data files\graphics\gui\menu\main.jpg")
    frmMenu.picLogin.Picture = LoadPicture(App.Path & "\data files\graphics\gui\menu\login.jpg")
    frmMenu.picRegister.Picture = LoadPicture(App.Path & "\data files\graphics\gui\menu\register.jpg")
    frmMenu.picCredits.Picture = LoadPicture(App.Path & "\data files\graphics\gui\menu\credits.jpg")
    frmMenu.picCharacter.Picture = LoadPicture(App.Path & "\data files\graphics\gui\menu\character.jpg")
    ' main
    frmMain.Picture = LoadPicture(App.Path & "\data files\graphics\gui\main\main.jpg")
    frmMain.picInventory.Picture = LoadPicture(App.Path & "\data files\graphics\gui\main\inventory.jpg")
    Call GetPlayerClass(MyIndex)
    Class = GetPlayerClass(MyIndex)
    Select Case Class
    Case 1
    frmMain.picCharacter.Picture = LoadPicture(App.Path & "\data files\graphics\gui\main\character.jpg")
    Case Else
    frmMain.picCharacter.Picture = LoadPicture(App.Path & "\data files\graphics\gui\main\character2.jpg")
    End Select
    frmMain.picSpells.Picture = LoadPicture(App.Path & "\data files\graphics\gui\main\skills.jpg")
    frmMain.picOptions.Picture = LoadPicture(App.Path & "\data files\graphics\gui\main\options.jpg")
    frmMain.picParty.Picture = LoadPicture(App.Path & "\data files\graphics\gui\main\party.jpg")
    frmMain.picItemDesc.Picture = LoadPicture(App.Path & "\data files\graphics\gui\main\description_item.jpg")
    frmMain.picSpellDesc.Picture = LoadPicture(App.Path & "\data files\graphics\gui\main\description_spell.jpg")
    frmMain.picTempInv.Picture = LoadPicture(App.Path & "\data files\graphics\gui\main\dragbox.jpg")
    frmMain.picTempBank.Picture = LoadPicture(App.Path & "\data files\graphics\gui\main\dragbox.jpg")
    frmMain.picTempSpell.Picture = LoadPicture(App.Path & "\data files\graphics\gui\main\dragbox.jpg")
    frmMain.picShop.Picture = LoadPicture(App.Path & "\data files\graphics\gui\main\shop.jpg")
    frmMain.picBank.Picture = LoadPicture(App.Path & "\data files\graphics\gui\main\bank.jpg")
    frmMain.picTrade.Picture = LoadPicture(App.Path & "\data files\graphics\gui\main\trade.jpg")
    frmMain.picHotbar.Picture = LoadPicture(App.Path & "\data files\graphics\gui\main\hotbar.jpg")
    ' main - bars
    frmMain.imgHPBar.Picture = LoadPicture(App.Path & "\data files\graphics\gui\main\bars\health.jpg")
    frmMain.imgMPBar.Picture = LoadPicture(App.Path & "\data files\graphics\gui\main\bars\spirit.jpg")
    frmMain.imgEXPBar.Picture = LoadPicture(App.Path & "\data files\graphics\gui\main\bars\experience.jpg")
    ' main - party bars
    For i = 1 To MAX_PARTY_MEMBERS
        frmMain.imgPartyHealth(i).Picture = LoadPicture(App.Path & "\data files\graphics\gui\main\bars\party_health.jpg")
        frmMain.imgPartySpirit(i).Picture = LoadPicture(App.Path & "\data files\graphics\gui\main\bars\party_spirit.jpg")
    Next

    ' store the bar widths for calculations
    HPBar_Width = frmMain.imgHPBar.width
    SPRBar_Width = frmMain.imgMPBar.width
    EXPBar_Width = frmMain.imgEXPBar.width
    ' party
    Party_HPWidth = frmMain.imgPartyHealth(1).width
    Party_SPRWidth = frmMain.imgPartySpirit(1).width

' let them know we can't load the GUI
errorhandler:
    MsgBox "Cannot find one or more interface images." & vbNewLine & "If they exist then you have not extracted the project properly." & vbNewLine & "Please follow the installation instructions fully.", vbCritical
    DestroyGame
End Sub

```What do i do wrong?It says that i have no gui
Link to comment
Share on other sites

```
    Call GetPlayerClass(MyIndex)
    Class = GetPlayerClass(MyIndex)
    Select Case Class
    Case 1
    frmMain.picCharacter.Picture = LoadPicture(App.Path & "\data files\graphics\gui\main\character.jpg")
    Case Else
    frmMain.picCharacter.Picture = LoadPicture(App.Path & "\data files\graphics\gui\main\character2.jpg")
    End Select

```Look here again -_-
Link to comment
Share on other sites

I want to load one GUI if class case 1,second if class is 2 etc.I want to make few pictures for one char equip slot.For rogue-second hand would be a second dagger/arrow slot,for mage-2handed staff,war-shield etc.I know I can make just hand picture.I think its almost impossible to do.
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...