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

[EO 2.0 / EO 3.0] Shortcuts & Enter to Chat *Edit*


Wortel Angels
 Share

Recommended Posts

Hi i cant find an Tutorial to make Shortcuts :D so ill make one

All Client-Side
**modGlobals**
At bottom add
```
Public chaton as boolean
```Search
```
Public Sub SetFocusOnChat()
```Replace the whole sub with these two subs
```
Public Sub SetFocusOnChat()

    If chaton = False Then
        SetFocusOnGame
        Exit Sub
    End If

    On Error Resume Next 'prevent RTE5, no way to handle error
    frmMain.txtMyChat.Visible = True
    frmMain.txtMyChat.SetFocus
End Sub
Public Sub SetFocusOnGame()

    If chaton = True Then
        SetFocusOnChat
        Exit Sub
    End If

    On Error Resume Next 'prevent RTE5, no way to handle error
    frmMain.txtMyChat.Visible = False
    frmMain.picScreen.SetFocus
End Sub
```Now find
```
If LenB(ChatText) = 0 Then Exit Sub
```And replace with this
```
If LenB(ChatText) = 0 Then
        If KeyAscii = vbKeyReturn Then
            Chaton = Not Chaton
            SetFocusOnGame
        End If
        Exit Sub
    End If
    If Chaton = False Then Exit Sub
```Now find
```
' Handle when the player presses the return key
    If KeyAscii = vbKeyReturn Then
```and directly under them add
```
Chaton = False
        SetFocusOnGame
```Now goto frmMain and make txtMyChat invisible
**Now you can chat with Enter :D**

now search
```
Private Sub Form_KeyUp
```now add under
```
    Select Case KeyCode
        Case vbKeyInsert
            If Player(MyIndex).Access > 0 Then
                picAdmin.Visible = Not picAdmin.Visible
            End If
        End Select
```this
```
    If chaton = True Then
    Else
    Select Case KeyCode
        Case vbKeyI
            If picInventory.Visible = False Then
                picInventory.Visible = True
            Else
                picInventory.Visible = False
            End If
                '<---- add new things
        End Select
    End If
```Now you can add all your pics like the picInventory
example with picCharacter
```
Case vbKeyC
            If picCharacter.Visible = False Then
                ' send packet
                SendRequestPlayerData
                ' show the window
                picCharacter.Visible = True

                ' Render
                BltEquipment
                BltFace
            Else
                picCharacter.Visible = False
            End If
```to '<–--- new things

*EDIT*
At last Search
```
If GetKeyState(vbKeyReturn) < 0 Then
        CheckMapGetItem
    End If
```
and replace it with

```
If GetKeyState(vbKeySpace) < 0 And chaton = False Then
        CheckMapGetItem
    End If
```
So :D Why… because if you pick up an item you start everytime the chat and thats bad now you can get items with Spacebar and this only if you are not at the chat :D
Hope it helps :-)
Link to comment
Share on other sites

lol work for me

> All Client-Side
> modGlobals
> At bottom add
> Code: [Select]
> Public chaton as boolean
> Search
> Code: [Select]
> Public Sub SetFocusOnChat()
> Replace the whole sub with these two subs
> Code: [Select]
> Public Sub SetFocusOnChat()
>
>     If chaton = False Then
>         SetFocusOnGame
>         Exit Sub
>     End If
>
>     On Error Resume Next 'prevent RTE5, no way to handle error
>     frmMain.txtMyChat.Visible = True
>     frmMain.txtMyChat.SetFocus
> End Sub
> Public Sub SetFocusOnGame()
>
>     If chaton = True Then
>         SetFocusOnChat
>         Exit Sub
>     End If
>
>     On Error Resume Next 'prevent RTE5, no way to handle error
>     frmMain.txtMyChat.Visible = False
>     frmMain.picScreen.SetFocus
> End Sub
> Now find
> Code: [Select]
> If LenB(ChatText) = 0 Then Exit Sub
> And replace with this
> Code: [Select]
> If LenB(ChatText) = 0 Then
>         If KeyAscii = vbKeyReturn Then
>             Chaton = Not Chaton
>             SetFocusOnGame
>         End If
>         Exit Sub
>     End If
>     If Chaton = False Then Exit Sub
> Now find
> Code: [Select]
> ' Handle when the player presses the return key
>     If KeyAscii = vbKeyReturn Then
> and directly under them add
> Code: [Select]
> Chaton = False
>         SetFocusOnGame
> Now goto frmMain and make txtMyChat invisible
> Now you can chat with Enter :D

just put the script was able to work on it?

and for what his next?
Link to comment
Share on other sites

Mortal Angels, very good.

however I believe it should stay that way.
```
Case vbKeyC
            If picCharacter.Visible = False Then
                ' send packet
                SendRequestPlayerData
                ' show the window
                picCharacter.Visible = True

                ' Render
                BltEquipment
                BltFace
            Else
                picCharacter.Visible = False
            End If
```
otherwise the player will not see updates in picCharacter as points …..
Link to comment
Share on other sites

Get Items with Spacebar

Search
```
If GetKeyState(vbKeyReturn) < 0 Then
        CheckMapGetItem
    End If
```
and replace it with

```
If GetKeyState(vbKeySpace) < 0 And chaton = False Then
        CheckMapGetItem
    End If
```
So :D Why… because if you pick up an item you start everytime the chat and thats bad now you can get items with Spacebar and this only if you are not at the chat :D

Added to OP
Link to comment
Share on other sites

  • 1 month later...
  • 3 weeks later...
Alright this is what i get once i followed you and once i open it in TEXT

```

Attribute VB_Name = "modGlobals"

Option Explicit

' Paperdoll rendering order

Public PaperdollOrder() As Long

' music & sound list cache

Public musicCache() As String

Public soundCache() As String

Public hasPopulated As Boolean

' global dialogue index

Public dialogueIndex As Long

Public dialogueData1 As Long

' Buttons

Public LastButtonSound_Menu As Long

Public LastButtonSound_Main As Long

' Hotbar

Public Hotbar(1 To MAX_HOTBAR) As HotbarRec

' Amount of blood decals

Public BloodCount As Long

' main menu unloading

Public EnteringGame As Boolean

' GUI

Public HPBar_Width As Long

Public SPRBar_Width As Long

Public EXPBar_Width As Long

' Party GUI

Public Party_HPWidth As Long

Public Party_SPRWidth As Long

' targetting

Public myTarget As Long

Public myTargetType As Long

' for directional blocking

Public DirArrowX(1 To 4) As Byte

Public DirArrowY(1 To 4) As Byte

' trading

Public TradeTimer As Long

Public InTrade As Long

Public TradeYourOffer(1 To MAX_INV) As PlayerInvRec

Public TradeTheirOffer(1 To MAX_INV) As PlayerInvRec

Public TradeX As Long

Public TradeY As Long

' Cache the Resources in an array

Public MapResource() As MapResourceRec

Public Resource_Index As Long

Public Resources_Init As Boolean

' inv drag + drop

Public DragInvSlotNum As Long

Public InvX As Long

Public InvY As Long

' bank drag + drop

Public DragBankSlotNum As Long

Public BankX As Long

Public BankY As Long

' spell drag + drop

Public DragSpell As Long

' gui

Public EqX As Long

Public EqY As Long

Public SpellX As Long

Public SpellY As Long

Public InvItemFrame(1 To MAX_INV) As Byte ' Used for animated items

Public LastItemDesc As Long ' Stores the last item we showed in desc

Public LastSpellDesc As Long ' Stores the last spell we showed in desc

Public LastBankDesc As Long ' Stores the last bank item we showed in desc

Public tmpCurrencyItem As Long

Public InShop As Long ' is the player in a shop?

Public ShopAction As Byte ' stores the current shop action

Public InBank As Long

Public CurrencyMenu As Byte

Public InEvent As Boolean

' Player variables

Public MyIndex As Long ' Index of actual player

Public PlayerInv(1 To MAX_INV) As PlayerInvRec ' Inventory

Public PlayerSpells(1 To MAX_PLAYER_SPELLS) As Long

Public InventoryItemSelected As Long

Public SpellBuffer As Long

Public SpellBufferTimer As Long

Public SpellCD(1 To MAX_PLAYER_SPELLS) As Long

Public StunDuration As Long

' Stops movement when updating a map

Public CanMoveNow As Boolean

' Debug mode

Public DEBUG_MODE As Boolean

' Game text buffer

Public MyText As String

' TCP variables

Public PlayerBuffer As String

' Controls main gameloop

Public InGame As Boolean

Public isLogging As Boolean

' Text variables

Public TexthDC As Long

Public GameFont As Long

' Draw map name location

Public DrawMapNameX As Single

Public DrawMapNameY As Single

Public DrawMapNameColor As Long

' Game direction vars

Public DirUp As Boolean

Public DirDown As Boolean

Public DirLeft As Boolean

Public DirRight As Boolean

Public ShiftDown As Boolean

Public ControlDown As Boolean

' Used for dragging Picture Boxes

Public SOffsetX As Long

Public SOffsetY As Long

' Map animation #, used to keep track of what map animation is currently on

Public MapAnim As Byte

Public MapAnimTimer As Long

' Used to freeze controls when getting a new map

Public GettingMap As Boolean

' Used to check if FPS needs to be drawn

Public BFPS As Boolean

Public BLoc As Boolean

' FPS and Time-based movement vars

Public ElapsedTime As Long

Public GameFPS As Long

' Text vars

Public vbQuote As String

' Mouse cursor tile location

Public CurX As Long

Public CurY As Long

' Game editors

Public Editor As Byte

Public EditorIndex As Long

Public AnimEditorFrame(0 To 1) As Long

Public AnimEditorTimer(0 To 1) As Long

' Used to check if in editor or not and variables for use in editor

Public InMapEditor As Boolean

Public EditorTileX As Long

Public EditorTileY As Long

Public EditorTileWidth As Long

Public EditorTileHeight As Long

Public EditorWarpMap As Long

Public EditorWarpX As Long

Public EditorWarpY As Long

Public SpawnNpcNum As Long

Public SpawnNpcDir As Byte

Public EditorShop As Long

' Used for map item editor

Public ItemEditorNum As Long

Public ItemEditorValue As Long

' Used for map key editor

Public KeyEditorNum As Long

Public KeyEditorTake As Long

' Used for map key open editor

Public KeyOpenEditorX As Long

Public KeyOpenEditorY As Long

' Map Resources

Public ResourceEditorNum As Long

' Used for map editor heal & trap & slide tiles

Public MapEditorHealType As Long

Public MapEditorHealAmount As Long

Public MapEditorSlideDir As Long

' Maximum classes

Public Max_Classes As Long

Public Camera As RECT

Public TileView As RECT

' Pinging

Public PingStart As Long

Public PingEnd As Long

Public Ping As Long

' indexing

Public ActionMsgIndex As Byte

Public BloodIndex As Byte

Public AnimationIndex As Byte

' fps lock

Public FPS_Lock As Boolean

' Editor edited items array

Public Item_Changed(1 To MAX_ITEMS) As Boolean

Public NPC_Changed(1 To MAX_NPCS) As Boolean

Public Resource_Changed(1 To MAX_RESOURCES) As Boolean

Public Animation_Changed(1 To MAX_ANIMATIONS) As Boolean

Public Spell_Changed(1 To MAX_SPELLS) As Boolean

Public Shop_Changed(1 To MAX_SHOPS) As Boolean

' New char

Public newCharSprite As Long

Public newCharClass As Long

' looping saves

Public Player_HighIndex As Long

Public Npc_HighIndex As Long

Public Action_HighIndex As Long

' automation problems

Public ReInitSurfaces As Boolean

' Temp event storage

Public tmpEvent As EventRec

Public isEdit As Boolean

Public curPageNum As Long

Public curCommand As Long

Public GraphicSelX As Long

Public GraphicSelY As Long

Public GraphicSelX2 As Long

Public GraphicSelY2 As Long

Public EventTileX As Long

Public EventTileY As Long

Public EditorEvent As Long

Public GraphicSelType As Long 'Are we selecting a graphic for a move route? A page sprite? What???

Public TempMoveRouteCount As Long

Public TempMoveRoute() As MoveRouteRec

Public IsMoveRouteCommand As Boolean

Public ListOfEvents() As Long

Public EventReplyID As Long

Public EventReplyPage As Long

Public RenameType As Long

Public RenameIndex As Long

Public EventChatTimer As Long

Public AnotherChat As Long 'Determines if another showtext/showchoices is comming up, if so, dont close the event chatbox...

```

Is it under Server or the client still kinda confused.
Link to comment
Share on other sites

  • 3 weeks later...
  • 2 months later...
  • 8 months later...

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...