emblem Posted July 8, 2010 Author Share Posted July 8, 2010 One thing me and my friends loved about eclipse was it's Map Report functionality, you could simply open up the map report and it would give you a summary of your entire game _and_ allow you to warp to any of the maps.When I found out that map report didn't work on Origins, I decided to re-code it._Once you finish this tutorial, typing /mapreport will bring up a summary of all the maps. Double clicking on a map or pressing the "Warp to!" button will warp you to that map._Let's begin with the server, because it's easier.Server Side**Find this:** (modEnumerations » Enum ServerPackets)``` ' Make sure SMSG_COUNT is below everything else SMSG_COUNT```**Above it, add this:**``` SMapReport```**Find this:** (modHandleData » Sub HandleMapReport)```Sub HandleMapReport(ByVal Index As Long, ByRef Data() As Byte, ByVal StartAddr As Long, ByVal ExtraVar As Long)```**Replace the entire sub with this:**``` Dim i As Long Dim Buffer As clsBuffer ' Prevent hacking If GetPlayerAccess(Index) < ADMIN_MAPPER Then Exit Sub End If Set Buffer = New clsBuffer Buffer.WriteLong SMapReport For i = 1 To MAX_MAPS Buffer.WriteString Trim$(Map(i).Name) Next SendDataTo Index, Buffer.ToArray() Set Buffer = NothingEnd Sub```Now the client, almost there!Client Side**Find this:** (modEnumerations » Enum ServerPackets)``` ' Make sure SMSG_COUNT is below everything else SMSG_COUNT```**Above it, add this:**``` SMapReport```**Find this:** (modHandleData » Sub InitMessages)``` HandleDataSub(STradeStatus) = GetAddress(AddressOf HandleTradeStatus)```**Below it, add this:**``` HandleDataSub(SMapReport) = GetAddress(AddressOf HandleMapReport)```**At the end of modHandleData, add this:**```Private Sub HandleMapReport(ByVal Index As Long, ByRef Data() As Byte, ByVal StartAddr As Long, ByVal ExtraVar As Long) Dim Buffer As clsBuffer Dim MapNum As Integer Set Buffer = New clsBuffer Buffer.WriteBytes Data() frmMapReport.lstMaps.Clear For MapNum = 1 To MAX_MAPS frmMapReport.lstMaps.AddItem MapNum & ": " & Buffer.ReadString Next MapNum frmMapReport.Show Set Buffer = NothingEnd Sub```**Find this:** (modInput » Sub HandleKeyPresses)``` Case "/mapreport"```**Replace the entire case with:**``` Case "/mapreport" If GetPlayerAccess(MyIndex) < ADMIN_MAPPER Then AddText "You need to be a high enough staff member to do this!", AlertColor GoTo Continue End If SendMapReport```**Find this:** (frmMainGame » Sub cmdAMapReport_Click)```Private Sub cmdAMapReport_Click()```**Replace the entire sub with this:**```Private Sub cmdAMapReport_Click() If GetPlayerAccess(MyIndex) < ADMIN_MAPPER Then AddText "You need to be a high enough staff member to do this!", AlertColor Exit Sub End If SendMapReportEnd Sub```**At the end of modClientTCP, add this:**```Public Sub SendMapReport() Dim Buffer As clsBuffer Set Buffer = New clsBuffer Buffer.WriteLong CMapReport SendData Buffer.ToArray() Set Buffer = NothingEnd Sub```**Finally:** Download the attached form and place it in your source directory, then add it to the client project.![](http://img806.imageshack.us/img806/1365/previewj.png)Yes, I tried to steel ballies tutorial format. =D Link to comment Share on other sites More sharing options...
Robin Posted July 8, 2010 Share Posted July 8, 2010 Lol. Coulda sworn I had a /mapreport command in. Typed it out and was greeted with "Convert this to Byte Array, Robin!".It's nice to know that my past self leaves me helpful remarks. Link to comment Share on other sites More sharing options...
emblem Posted July 8, 2010 Author Share Posted July 8, 2010 You did, it reported all unused maps in a player message. :PI didn't like that one. :( Link to comment Share on other sites More sharing options...
adr990 Posted July 12, 2010 Share Posted July 12, 2010 Thank you!Was already wondering what was wrong and this message of Robin. hehThis makes life easier. Link to comment Share on other sites More sharing options...
Sir Cid Posted August 16, 2010 Share Posted August 16, 2010 Hello Tylian,Because it's an error related to your tutorial, I'll ask it here:After adding your code neatly into the server & client source, I got the Compilation Error inside the Origins 1.1.0 Client source:It says "Compile Error: Variable not defined" highlighting the "frmMapReport" bit, in:```frmMapReport.lstMaps.Clear```Oh, and I have put the frmMapReport.frm file into the client side source folder.Any idea..? Link to comment Share on other sites More sharing options...
goku1993 Posted August 16, 2010 Share Posted August 16, 2010 variable not defined usually means you didn't say what frmMapReport means in this case frmMapReport.frm you shoudn't be getting a problem if you added it properly(did you add it by going to Project then add module in vb6??) Link to comment Share on other sites More sharing options...
Sir Cid Posted August 16, 2010 Share Posted August 16, 2010 Well I just used a new clean EO 1.1.0 server & client source, opened up the server & client source with VB6, and added the codings exactly as it is it's instructed in the tutorial. Reason for using a clean source, is just that I wanted to see if this mapreport feature would work at all in 1.1.0. Link to comment Share on other sites More sharing options...
Robin Posted August 16, 2010 Share Posted August 16, 2010 You haven't add frmMapReport into the VB6 project. Link to comment Share on other sites More sharing options...
Sir Cid Posted August 16, 2010 Share Posted August 16, 2010 Ugh, can't believe I haven't thought of that… Thanks anyway. Link to comment Share on other sites More sharing options...
Helladen Posted August 16, 2010 Share Posted August 16, 2010 This looks like a very nice system. I think it comes 2nd in my list of tutorials next to the 10 slots for npc drops. Link to comment Share on other sites More sharing options...
Sir Cid Posted August 16, 2010 Share Posted August 16, 2010 It's a very necessity to have a map report. I just couldn't believe it wasn't included in this EO version…By the way the map editor works indeed, neatly. Link to comment Share on other sites More sharing options...
deathtaker26 Posted September 20, 2010 Share Posted September 20, 2010 umm i checked everything twice and it compiled right but when i type /mapreport nothing happens…. help please? Link to comment Share on other sites More sharing options...
Robin Posted September 20, 2010 Share Posted September 20, 2010 Go back to your backed up source and try again. Link to comment Share on other sites More sharing options...
Guest Posted October 11, 2010 Share Posted October 11, 2010 @Robin:> Lol. Coulda sworn I had a /mapreport command in. Typed it out and was greeted with "Convert this to Byte Array, Robin!".> > It's nice to know that my past self leaves me helpful remarks.Wuts the point in that anyways? Link to comment Share on other sites More sharing options...
Robin Posted October 12, 2010 Share Posted October 12, 2010 @Sekaru:> Wuts the point in that anyways?Go away. Link to comment Share on other sites More sharing options...
Guest Posted October 12, 2010 Share Posted October 12, 2010 @Robin:> @Sekaru:> > > Wuts the point in that anyways?> > Go away.Nuh. Link to comment Share on other sites More sharing options...
LGDR Posted July 18, 2012 Share Posted July 18, 2012 I have a bug with eclipse 3.0 .**Client:****Error '9': Subscript out of Range**```HandleDataSub(SMapReport) = GetAddress(AddressOf HandleMapReport)```How to fix please ? thanks you Link to comment Share on other sites More sharing options...
JohnPony Posted July 18, 2012 Share Posted July 18, 2012 You would most likely get more support in the Q&A board, this topic is pretty old.But… Just to be nice, make sure the Client & Server packets match up. Link to comment Share on other sites More sharing options...
hisherwin Posted January 4, 2013 Share Posted January 4, 2013 Anyone still has the attachment file of this tut? Link to comment Share on other sites More sharing options...
Wortel Angels Posted January 4, 2013 Share Posted January 4, 2013 Shouldn't be hard to remake ;-) Link to comment Share on other sites More sharing options...
hisherwin Posted January 4, 2013 Share Posted January 4, 2013 > Shouldn't be hard to remake ;-)Hard :DD Link to comment Share on other sites More sharing options...
tslusny Posted January 5, 2013 Share Posted January 5, 2013 Sherw rip it from ER Link to comment Share on other sites More sharing options...
hisherwin Posted January 6, 2013 Share Posted January 6, 2013 Ok thanks Death. 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