Wortel Angels Posted July 20, 2012 Author Share Posted July 20, 2012 Hi i cant find an Tutorial to make Shortcuts :D so ill make oneAll 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.SetFocusEnd SubPublic 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.SetFocusEnd 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 picInventoryexample 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 :DHope it helps :-) Link to comment Share on other sites More sharing options...
DepTa Posted July 20, 2012 Share Posted July 20, 2012 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 :Djust put the script was able to work on it?and for what his next? Link to comment Share on other sites More sharing options...
onzinho Posted July 21, 2012 Share Posted July 21, 2012 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 More sharing options...
Phill Posted July 24, 2012 Share Posted July 24, 2012 My modGlobals file didn't have any of those lines of code. Did I do something wrong? Link to comment Share on other sites More sharing options...
Wortel Angels Posted July 24, 2012 Author Share Posted July 24, 2012 Just press CTRL + F and then Search Project then you will find it its Client Side Link to comment Share on other sites More sharing options...
Wortel Angels Posted August 1, 2012 Author Share Posted August 1, 2012 Get Items with SpacebarSearch```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 :DAdded to OP Link to comment Share on other sites More sharing options...
Shasokais Posted August 2, 2012 Share Posted August 2, 2012 emmm i click Enter but nothing to happen_________________________________ohhh newermind :D Link to comment Share on other sites More sharing options...
Wortel Angels Posted August 3, 2012 Author Share Posted August 3, 2012 lol ;-) If you use the default GUI you cant see it good ;-) Link to comment Share on other sites More sharing options...
Kasparas Posted September 15, 2012 Share Posted September 15, 2012 > Now goto frmMain and make txtMyChat invisiblemaybe i missed something… how do i make it invisible? Link to comment Share on other sites More sharing options...
Stein Posted September 15, 2012 Share Posted September 15, 2012 Now try ripping Dawn's keybinding system ;] Link to comment Share on other sites More sharing options...
Kasparas Posted September 16, 2012 Share Posted September 16, 2012 what do you mean ? does it get that txtMyChat invisible? Link to comment Share on other sites More sharing options...
tslusny Posted September 16, 2012 Share Posted September 16, 2012 > Now try ripping Dawn's keybinding system ;]Easy ![:P](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/tongue.png) Link to comment Share on other sites More sharing options...
Kasparas Posted September 20, 2012 Share Posted September 20, 2012 so how to make that line invisible he said to make ? Link to comment Share on other sites More sharing options...
Justn Posted September 20, 2012 Share Posted September 20, 2012 Go to frmmain right click on the chatbox click "properties" then scroll down to "visible" and set to false Link to comment Share on other sites More sharing options...
killzoz Posted October 7, 2012 Share Posted October 7, 2012 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 orderPublic PaperdollOrder() As Long' music & sound list cachePublic musicCache() As StringPublic soundCache() As StringPublic hasPopulated As Boolean' global dialogue indexPublic dialogueIndex As LongPublic dialogueData1 As Long' ButtonsPublic LastButtonSound_Menu As LongPublic LastButtonSound_Main As Long' HotbarPublic Hotbar(1 To MAX_HOTBAR) As HotbarRec' Amount of blood decalsPublic BloodCount As Long' main menu unloadingPublic EnteringGame As Boolean' GUIPublic HPBar_Width As LongPublic SPRBar_Width As LongPublic EXPBar_Width As Long' Party GUIPublic Party_HPWidth As LongPublic Party_SPRWidth As Long' targettingPublic myTarget As LongPublic myTargetType As Long' for directional blockingPublic DirArrowX(1 To 4) As BytePublic DirArrowY(1 To 4) As Byte' tradingPublic TradeTimer As LongPublic InTrade As LongPublic TradeYourOffer(1 To MAX_INV) As PlayerInvRecPublic TradeTheirOffer(1 To MAX_INV) As PlayerInvRecPublic TradeX As LongPublic TradeY As Long' Cache the Resources in an arrayPublic MapResource() As MapResourceRecPublic Resource_Index As LongPublic Resources_Init As Boolean' inv drag + dropPublic DragInvSlotNum As LongPublic InvX As LongPublic InvY As Long' bank drag + dropPublic DragBankSlotNum As LongPublic BankX As LongPublic BankY As Long' spell drag + dropPublic DragSpell As Long' guiPublic EqX As LongPublic EqY As LongPublic SpellX As LongPublic SpellY As LongPublic InvItemFrame(1 To MAX_INV) As Byte ' Used for animated itemsPublic LastItemDesc As Long ' Stores the last item we showed in descPublic LastSpellDesc As Long ' Stores the last spell we showed in descPublic LastBankDesc As Long ' Stores the last bank item we showed in descPublic tmpCurrencyItem As LongPublic InShop As Long ' is the player in a shop?Public ShopAction As Byte ' stores the current shop actionPublic InBank As LongPublic CurrencyMenu As BytePublic InEvent As Boolean' Player variablesPublic MyIndex As Long ' Index of actual playerPublic PlayerInv(1 To MAX_INV) As PlayerInvRec ' InventoryPublic PlayerSpells(1 To MAX_PLAYER_SPELLS) As LongPublic InventoryItemSelected As LongPublic SpellBuffer As LongPublic SpellBufferTimer As LongPublic SpellCD(1 To MAX_PLAYER_SPELLS) As LongPublic StunDuration As Long' Stops movement when updating a mapPublic CanMoveNow As Boolean' Debug modePublic DEBUG_MODE As Boolean' Game text bufferPublic MyText As String' TCP variablesPublic PlayerBuffer As String' Controls main gameloopPublic InGame As BooleanPublic isLogging As Boolean' Text variablesPublic TexthDC As LongPublic GameFont As Long' Draw map name locationPublic DrawMapNameX As SinglePublic DrawMapNameY As SinglePublic DrawMapNameColor As Long' Game direction varsPublic DirUp As BooleanPublic DirDown As BooleanPublic DirLeft As BooleanPublic DirRight As BooleanPublic ShiftDown As BooleanPublic ControlDown As Boolean' Used for dragging Picture BoxesPublic SOffsetX As LongPublic SOffsetY As Long' Map animation #, used to keep track of what map animation is currently onPublic MapAnim As BytePublic MapAnimTimer As Long' Used to freeze controls when getting a new mapPublic GettingMap As Boolean' Used to check if FPS needs to be drawnPublic BFPS As BooleanPublic BLoc As Boolean' FPS and Time-based movement varsPublic ElapsedTime As LongPublic GameFPS As Long' Text varsPublic vbQuote As String' Mouse cursor tile locationPublic CurX As LongPublic CurY As Long' Game editorsPublic Editor As BytePublic EditorIndex As LongPublic AnimEditorFrame(0 To 1) As LongPublic AnimEditorTimer(0 To 1) As Long' Used to check if in editor or not and variables for use in editorPublic InMapEditor As BooleanPublic EditorTileX As LongPublic EditorTileY As LongPublic EditorTileWidth As LongPublic EditorTileHeight As LongPublic EditorWarpMap As LongPublic EditorWarpX As LongPublic EditorWarpY As LongPublic SpawnNpcNum As LongPublic SpawnNpcDir As BytePublic EditorShop As Long' Used for map item editorPublic ItemEditorNum As LongPublic ItemEditorValue As Long' Used for map key editorPublic KeyEditorNum As LongPublic KeyEditorTake As Long' Used for map key open editorPublic KeyOpenEditorX As LongPublic KeyOpenEditorY As Long' Map ResourcesPublic ResourceEditorNum As Long' Used for map editor heal & trap & slide tilesPublic MapEditorHealType As LongPublic MapEditorHealAmount As LongPublic MapEditorSlideDir As Long' Maximum classesPublic Max_Classes As LongPublic Camera As RECTPublic TileView As RECT' PingingPublic PingStart As LongPublic PingEnd As LongPublic Ping As Long' indexingPublic ActionMsgIndex As BytePublic BloodIndex As BytePublic AnimationIndex As Byte' fps lockPublic FPS_Lock As Boolean' Editor edited items arrayPublic Item_Changed(1 To MAX_ITEMS) As BooleanPublic NPC_Changed(1 To MAX_NPCS) As BooleanPublic Resource_Changed(1 To MAX_RESOURCES) As BooleanPublic Animation_Changed(1 To MAX_ANIMATIONS) As BooleanPublic Spell_Changed(1 To MAX_SPELLS) As BooleanPublic Shop_Changed(1 To MAX_SHOPS) As Boolean' New charPublic newCharSprite As LongPublic newCharClass As Long' looping savesPublic Player_HighIndex As LongPublic Npc_HighIndex As LongPublic Action_HighIndex As Long' automation problemsPublic ReInitSurfaces As Boolean' Temp event storagePublic tmpEvent As EventRecPublic isEdit As BooleanPublic curPageNum As LongPublic curCommand As LongPublic GraphicSelX As LongPublic GraphicSelY As LongPublic GraphicSelX2 As LongPublic GraphicSelY2 As LongPublic EventTileX As LongPublic EventTileY As LongPublic EditorEvent As LongPublic GraphicSelType As Long 'Are we selecting a graphic for a move route? A page sprite? What???Public TempMoveRouteCount As LongPublic TempMoveRoute() As MoveRouteRecPublic IsMoveRouteCommand As BooleanPublic ListOfEvents() As LongPublic EventReplyID As LongPublic EventReplyPage As LongPublic RenameType As LongPublic RenameIndex As LongPublic EventChatTimer As LongPublic 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 More sharing options...
Ertzel Posted October 7, 2012 Share Posted October 7, 2012 All of the edits made in this tutorial are client side. Not sure what you mean by "once i open it in TEXT" as you need to open/compile it in vb6 for any changes to be made. Link to comment Share on other sites More sharing options...
Shippous Posted October 7, 2012 Share Posted October 7, 2012 You need to edit it with VB6 and compile the game again. Link to comment Share on other sites More sharing options...
killzoz Posted October 7, 2012 Share Posted October 7, 2012 > All of the edits made in this tutorial are client side. Not sure what you mean by "once i open it in TEXT" as you need to open/compile it in vb6 for any changes to be made.Notepad, can you see the code that i posted? Link to comment Share on other sites More sharing options...
Shippous Posted October 7, 2012 Share Posted October 7, 2012 > Notepad, can you see the code that i posted?AGAIN, this only works if you edit the game with VB6 and compile the game again. Link to comment Share on other sites More sharing options...
killzoz Posted October 7, 2012 Share Posted October 7, 2012 > AGAIN, this only works if you edit the game with VB6 and compile the game again.Alright thanks, kinda confused…getting that now Link to comment Share on other sites More sharing options...
Wortel Angels Posted October 8, 2012 Author Share Posted October 8, 2012 You need VB6 and then search the stuff which i wrote there and add the new stuff… at the Source code - Client SideBut first read the basic tutorials... Link to comment Share on other sites More sharing options...
Alerd Posted October 26, 2012 Share Posted October 26, 2012 I did as he writes but crashes strange errorRun-time "5"Invalid procedure call of argument```frmMain.picScreen.SetFocus``` Link to comment Share on other sites More sharing options...
afonsobr Posted January 11, 2013 Share Posted January 11, 2013 Ok, very good. But when i try to send a PM to anyone, the other player dont receive the message and i cant chat anymore. Link to comment Share on other sites More sharing options...
Wortel Angels Posted January 11, 2013 Author Share Posted January 11, 2013 PM -> For that you need the PM Fix thats bugged ;-)To write without the fix press 2 times Return(Enter) ;-) Link to comment Share on other sites More sharing options...
Alerd Posted October 5, 2013 Share Posted October 5, 2013 Run-time "5" EO 3.0Invalid procedure call of argumentfrmMain.picScreen.SetFocus 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