Growlith1223 Posted September 29, 2012 Author Share Posted September 29, 2012 > ok so i know i haven't been making tutorials lately but here's one i JUST made xD> > Please note that it only tells how much you dealed to the enemy plus if it faints(dies)> > ok so in both Client and Server goto ModEnumerations and add> > ```> > SBattleMsg> > ```> > **Client Side**> > Go into frmMain and add a RichTextBox anywhere and name it txtBattleLog, make sure to set the Enabled value to false.> > Add this to that handleData sub thingy> > ```> > HandleDataSub(SBattleMsg) = GetAddress(AddressOf HandleBattleMsg)> > ```> and add this sub at the bottom of ModHandleData> > ```> > Private Sub HandleBattleMsg(ByVal Index As Long, ByRef Data() As Byte, ByVal StartAddr As Long, ByVal ExtraVar As Long)> > Dim Buffer As clsBuffer> > Dim Name As String> > Dim message As String> > Dim saycolour As Long> > ' If debug mode, handle error then exit out> > If Options.Debug = 1 Then On Error GoTo errorhandler> > Set Buffer = New clsBuffer> > Buffer.WriteBytes Data()> > Name = Buffer.ReadString> > message = Buffer.ReadString> > saycolour = Buffer.ReadLong> > frmMain.txtBattleLog.SelStart = Len(frmMain.txtBattleLog.text)> > frmMain.txtBattleLog.SelColor = QBColor(saycolour)> > frmMain.txtBattleLog.SelText = vbNewLine & message> > frmMain.txtBattleLog.SelStart = Len(frmMain.txtBattleLog.text) - 1> > Set Buffer = Nothing> > ' Error handler> > Exit Sub> > errorhandler:> > HandleError "HandleSayMsg", "modHandleData", Err.Number, Err.Description, Err.Source, Err.HelpContext> > Err.Clear> > Exit Sub> > End Sub> > ```> > **Server Side**> > Go into modServerTCP and add this at the bottom> > ```> > Sub SayMsg_Battle(ByVal mapNum As Long, ByVal index As Long, ByVal message As String, ByVal saycolour As Long)> > Dim Buffer As clsBuffer> > Set Buffer = New clsBuffer> > Buffer.WriteLong SBattleMsg> > Buffer.WriteString GetPlayerName(index)> > Buffer.WriteString message> > Buffer.WriteLong saycolour> > SendDataToMap mapNum, Buffer.ToArray()> > Set Buffer = Nothing> > End Sub> > ```> > now goto Sub PlayerAttackNPC(so far) and add> > ```> > SayMsg_Battle mapNum, attacker, Trim$(Player(attacker).Name) & " has dealt " & Damage & " Damage To " & Trim$(Name), BrightRed> > ```> Under> > ```> > Name = Trim$(Npc(npcNum).Name)> > ```> > and add> > ```> > SayMsg_Battle mapNum, attacker, Name & " has fainted!", White> > ```> Under> > ```> > MapNpc(mapNum).Npc(mapNpcNum).Vital(Vitals.HP) = 0> > ```> > once all that's done, you should get a message in that new box saying that you have dealt damage to the npc> > Let me know if any errors come upThis is how it should come up.(this is a customized version of this tutorial.)![](http://www.freemmorpgmaker.com/files/imagehost/pics/2f46f4778ce1253ccd73554751face2d.PNG) Link to comment Share on other sites More sharing options...
Guest Posted September 30, 2012 Share Posted September 30, 2012 now i get what you got going on there, but to me, it seems like alot. im not saying its bad or wrong or anything but isnt using this the same thing? anyway i like this tut mainly for the sending packets. it clearly shows how to do it.in thePublic Sub TryNpcAttackPlayer(ByVal mapNpcNum As Long, ByVal Index As Long)```Call PlayerMsg(Index, Trim$(NPC(MapNpc(mapnum).NPC(mapNpcNum).Num).Name) & " Hits you for " & Damage, BrightRed)```ok i guess you do have it going to a NEW location as well. Link to comment Share on other sites More sharing options...
Growlith1223 Posted September 30, 2012 Author Share Posted September 30, 2012 it is true that you can do that but once in a while,….the chatbox will get cluddered like hell by those messages xDThis makes it more cleaner so that way you have chat in one area and a battle log in another. Link to comment Share on other sites More sharing options...
iSnow Posted September 30, 2012 Share Posted September 30, 2012 Wouldn't this be the equivalent of just redirecting everything Eclipse handles as battle chat to another location instead? It seems like this diverts things that don't need a lot of changing to other places with methods you might not need. Link to comment Share on other sites More sharing options...
Link Posted September 30, 2012 Share Posted September 30, 2012 It's probably like pmu where it appears on screen and fades out eventually, maybe it isn't, but if you post some examples of it being used that would be cool. Link to comment Share on other sites More sharing options...
iSnow Posted September 30, 2012 Share Posted September 30, 2012 From how this system is working it's just moving what it already sends to another window by calling a function to the other window instead of the chatbox. Personally this would be better if it was drawn along the side of the screen like Joyce's Loot sidebar was. Link to comment Share on other sites More sharing options...
hisherwin Posted September 30, 2012 Share Posted September 30, 2012 Well looking at the code . It won't fade out ![:P](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/tongue.png) Link to comment Share on other sites More sharing options...
Growlith1223 Posted September 30, 2012 Author Share Posted September 30, 2012 this is a simple system, please bare in mind with that Link to comment Share on other sites More sharing options...
iSnow Posted September 30, 2012 Share Posted September 30, 2012 Of course, I just thinking about how one might go about making this simpler by instead of catching the packet mid-flight to the chatbox directly to the battle log and just specifying where certain messages would draw. Link to comment Share on other sites More sharing options...
Growlith1223 Posted September 30, 2012 Author Share Posted September 30, 2012 Updated original post, with a picture Link to comment Share on other sites More sharing options...
narut0no Posted October 23, 2012 Share Posted October 23, 2012 Urrrm is this work for Eclipse Event System to….?If yes, Thank you !If no Please try to help me Make work for the Eclipse Event system. Link to comment Share on other sites More sharing options...
abhi2011 Posted October 23, 2012 Share Posted October 23, 2012 I don't see why it shouldn't. Link to comment Share on other sites More sharing options...
Santini Posted October 23, 2012 Share Posted October 23, 2012 Just from having a quick look at the tutorial I would imagine it would. However you could always try the tutorial and find out though. ![;)](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/wink.png) Link to comment Share on other sites More sharing options...
Zzbrandon Posted October 23, 2012 Share Posted October 23, 2012 Guys this is a nice system stop raving about it really…. If you dont want to use it dont use I find it though kind of good because now you can see what people type while attacking and your words dont get sended flying up due to the mass spam of Miss! or hit. 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