Mirage Source
http://miragesource.net/forums/

Mapreport Upgrade
http://miragesource.net/forums/viewtopic.php?f=210&t=3703
Page 1 of 1

Author:  Rian [ Fri May 09, 2008 8:02 pm ]
Post subject:  Mapreport Upgrade

This tutorial adds a form for your /mapreport command. This form allows you to view a list of your maps, warp to them, and edit them.

Client Side
Start by adding a new form, called frmMapReport. To this form, add the following:
3 command buttons: cmdGoTo, cmdEdit, cmdCancel
1 list box: lstMaps
1 text box: txtMap
1 scroll bar: scrlMapNum

Now add this code to frmMapReport:
Code:
Private Sub Form_Load()
Dim Packet As String

    Packet = "REQUESTMAPLIST" & SEP_CHAR & END_CHAR
    Call SendData(Packet)
End Sub

Private Sub lstMaps_Click()
    txtMap.Text = lstMaps.ListIndex + 1
End Sub

Private Sub scrlMapNum_Change()
    txtMap.Text = scrlMapNum.Value
End Sub

Private Sub cmdGoTo_Click()
    If txtMap.Text > 0 Then
        lstMaps.ListIndex = txtMap.Text - 1
        scrlMapNum.Value = txtMap.Text
        Call WarpTo(scrlMapNum.Value)
    End If
End Sub

Private Sub cmdEdit_Click()
    Call SendRequestEditMap
End Sub

Private Sub cmdCancel_Click()
    Unload Me
End Sub


Now add this to Sub HandleData:
Code:
    ' ::::::::::::::::::
    ' :: Get Map List ::
    ' ::::::::::::::::::
    If LCase(Parse(0)) = "maplist" Then
       frmMapReport.lstMaps.Clear

         n = 2
         z = Val(Parse(1))
       For X = n To (z + 1)
           If Trim(Parse(n)) <> vbNullString Then
               frmMapReport.lstMaps.AddItem "Map # " & (X - 1) & ": " & Trim(Parse(n))
           Else
               frmMapReport.lstMaps.AddItem "Map # " & (X - 1) & ": Free Map"
           End If
           n = n + 2
       Next X
       Exit Sub
    End If

    ' :::::::::::::::::::::
    ' :: Edit map packet ::
    ' :::::::::::::::::::::
    If (LCase(Parse(0)) = "mapreport") Then
        Call MapReportInit
        Exit Sub
    End If


Add this anywhere (I put it in modGameLogic along with the other editor inits):
Code:
Public Sub MapReportInit()
    frmMapReport.Show
End Sub


Server Side
In Sub HandleData, find the Map Report Packet, and paste this at the bottom, but before the exit sub:
Code:
Call SendDataTo(Index, "MAPREPORT" & SEP_CHAR & END_CHAR)


And add this somewhere in modServerTCP:
Code:
Sub SendMapList(ByVal Index As Long)
Dim Packet As String
Dim I As Long
Dim n As Long

    Packet = ""
    n = 0
   
    For I = 1 To MAX_MAPS
        Packet = Packet & SEP_CHAR & MAP(I).Name & SEP_CHAR
        n = n + 1
    Next I
   
    Packet = "MAPLIST" & SEP_CHAR & n & Packet & END_CHAR
    Call SendDataTo(Index, Packet)
End Sub


And lastley, right under this Map Report Packet, paste this packet:
Code:
    ' :::::::::::::::::::::::::::::
    ' :: Request Map List Packet ::
    ' :::::::::::::::::::::::::::::
    If LCase(Parse(0)) = "requestmaplist" Then
        ' Prevent hacking
        If GetPlayerAccess(Index) < ADMIN_MAPPER Then
            Call HackingAttempt(Index, "Admin Cloning")
            Exit Sub
        End If
       
        Call SendMapList(Index)
    End If


Been a while since I added this to my game, so I'm not sure if I including everything that needs to be there. Let me know if it doesn't work, and I'll update the tutorial.

Author:  Coke [ Sat May 10, 2008 11:37 pm ]
Post subject:  Re: Mapreport Upgrade

I love you.

Much.

Author:  Ramsey [ Sun May 11, 2008 7:58 pm ]
Post subject:  Re: Mapreport Upgrade

You forgot to include the Sub SendMapList

Author:  Rian [ Tue May 13, 2008 1:25 am ]
Post subject:  Re: Mapreport Upgrade

Updated the tutorial with the missing sub

Author:  Robin [ Tue May 13, 2008 9:14 am ]
Post subject:  Re: Mapreport Upgrade

Wow.. that's very useful. I just started re-mapping Winds Whisper so this'll be very useful.

Thanks Ruggles <33

Author:  Ramsey [ Tue May 13, 2008 7:49 pm ]
Post subject:  Re: Mapreport Upgrade

Works perfectly. Thanks.

Author:  Sh4d0ws [ Sun Jul 13, 2008 8:14 pm ]
Post subject:  Re: Mapreport Upgrade

Little old I guess... but oh well. In one of your packet's it did not have "z" as a variable. It gave me an error on the line, "z = val(parse(1))". Not sure if this matters, but this is how I managed to easily fix it (assuming it works). I'm using the newest version of MS out right now.

Code:
    ' ::::::::::::::::::
    ' :: Get Map List ::
    ' ::::::::::::::::::
    Dim z As Integer
    If LCase(Parse(0)) = "maplist" Then
       frmMapReport.lstMaps.Clear

         n = 2
         z = Val(Parse(1))
       For x = n To (z + 1)
           If Trim(Parse(n)) <> vbNullString Then
               frmMapReport.lstMaps.AddItem "Map # " & (x - 1) & ": " & Trim(Parse(n))
           Else
               frmMapReport.lstMaps.AddItem "Map # " & (x - 1) & ": Free Map"
           End If
           n = n + 2
       Next x
       Exit Sub

Author:  wanai [ Tue Nov 02, 2021 4:15 am ]
Post subject:  Re: Mapreport Upgrade

Cuan187.4CHAPReprJaroMATTRockCochGomeAlfrFlufSideOverMagiAbraMicrElecEverJuanKathJuleWillClas
BrenTchaVisuMarkEnsaMariMichJamerieuGillNeedsaudGoodTsubGeorRogeGammGoreDoctSurePensPeckAlic
SplaBarnDeteJeroFunkVoguJonaAntoFallCircMacbiPodNighMariXVIIRaouClauarisLambVictRequBobbScie
WindChriJohnQuikWindSelaOpenWindMiloSusaBegiGangRoxyIntrRVKVFreeSwarFamiArtsXVIICircZoneName
ZoneZoneGiraZoneZoneZoneDaphdiamZoneThomZoneZoneZoneZoneZoneIainTiteZoneZoneSteeEvilNasoZone
ZoneImpeRichUMTSChodCrasYukoMielBookTekkIcedXVIILeifMariFcDoVanbPoweSTARARAGPionXVIITrankbps
ValiApplPzKpBattActiJaguMegaLadyWindwwwrConnPhilLighGuccGourthisStepdestTerrHeizRichHelgFinl
AngeSeriOperAdamFormDaviAlbrVIIIStanArchHousSonyValeAlisEssewwwnHaraBuscAbouGuarJohnSharfant
WindXVIIPermAnneHeavSickSchoPhilMalcWindJeweJeweMommJohnBowlBabySigmWorlloosOrtrRebeUMTSUMTS
UMTSMicrGhiaRaveMarkFronDovealbuAlfrKateBryaEnjoKirktuchkasPattWall

Author:  wanai [ Thu Feb 17, 2022 9:41 pm ]
Post subject:  Re: Mapreport Upgrade

apoc175.3CHAPPERFXVIIStatWirdRossLondMiltDisnRequWaxiRockIrwiHerbXIIIExpoXVIIHousAndrXVIIAlet
MariGeorNITAMartOdekMissArthCafeFourMSETHeinWellFranEsteHearSimoDeanFollRomeLuciTescCoroArth
PatrEmmaZenoGlosTowaWoveKittFionFourFallCircClauAnnePHAZJameahreBertmattBernStouPeteFirsShin
WindJoliDaviBALLWindSelaSTRACrysRudoPetePaweGoodELEGMDavGerhJeweZoneSoutGaiuAlicScriZoneLili
ZoneZoneSecrZoneZoneZoneAnnediamZoneLeilZoneZoneZoneZoneZoneMattKaraZoneZoneVancInviZoneZone
ZoneXVIICopeSonyLahoCottDolbMieltellRobiMistTotaMorgBryasterDuraBrunSTARCadiMystMontMediFolk
WindBambIntrTakeGracDinoWorrWindAnytChriGiotPhilLegoCaprGourfirsJavaTherPhilHorsRussGladGrat
XVIIWillKlauBernEmilWilhEdwaManaJuliJohnBlurGeneGinoPublAndrAmalRETAProjKwokFligKeviOrinPara
HardLittXVIILynnGillDaniCornWindXVIIChamJohnAgaiRussIrenRobeVivaRussViveFiveElizBirgSonySony
SonyPaulClivTonyObjeTimeSupeAlicXVIISpenArnaPennFredtuchkasVartFutu

Author:  wanai [ Tue Mar 15, 2022 12:41 pm ]
Post subject:  Re: Mapreport Upgrade

audiobookkeeper.rucottagenet.rueyesvision.rueyesvisions.comfactoringfee.rufilmzones.rugadwall.rugaffertape.rugageboard.rugagrule.rugallduct.rugalvanometric.rugangforeman.rugangwayplatform.rugarbagechute.rugardeningleave.rugascautery.rugashbucket.rugasreturn.rugatedsweep.rugaugemodel.rugaussianfilter.rugearpitchdiameter.ru
geartreating.rugeneralizedanalysis.rugeneralprovisions.rugeophysicalprobe.rugeriatricnurse.rugetintoaflap.rugetthebounce.ruhabeascorpus.ruhabituate.ruhackedbolt.ruhackworker.ruhadronicannihilation.ruhaemagglutinin.ruhailsquall.ruhairysphere.ruhalforderfringe.ruhalfsiblings.ruhallofresidence.ruhaltstate.ruhandcoding.ruhandportedhead.ruhandradar.ruhandsfreetelephone.ru
hangonpart.ruhaphazardwinding.ruhardalloyteeth.ruhardasiron.ruhardenedconcrete.ruharmonicinteraction.ruhartlaubgoose.ruhatchholddown.ruhaveafinetime.ruhazardousatmosphere.ruheadregulator.ruheartofgold.ruheatageingresistance.ruheatinggas.ruheavydutymetalcutting.rujacketedwall.rujapanesecedar.rujibtypecrane.rujobabandonment.rujobstress.rujogformation.rujointcapsule.rujointsealingmaterial.ru
journallubricator.rujuicecatcher.rujunctionofchannels.rujusticiablehomicide.rujuxtapositiontwin.rukaposidisease.rukeepagoodoffing.rukeepsmthinhand.rukentishglory.rukerbweight.rukerrrotation.rukeymanassurance.rukeyserum.rukickplate.rukillthefattedcalf.rukilowattsecond.rukingweakfish.rukinozones.rukleinbottle.rukneejoint.ruknifesethouse.ruknockonatom.ruknowledgestate.ru
kondoferromagnet.rulabeledgraph.rulaborracket.rulabourearnings.rulabourleasing.rulaburnumtree.rulacingcourse.rulacrimalpoint.rulactogenicfactor.rulacunarycoefficient.ruladletreatediron.rulaggingload.rulaissezaller.rulambdatransition.rulaminatedmaterial.rulammasshoot.rulamphouse.rulancecorporal.rulancingdie.rulandingdoor.rulandmarksensor.rulandreform.rulanduseratio.ru
languagelaboratory.rulargeheart.rulasercalibration.rulaserlens.rulaserpulse.rulaterevent.rulatrinesergeant.rulayabout.ruleadcoating.ruleadingfirm.rulearningcurve.ruleaveword.rumachinesensible.rumagneticequator.ruсайтmailinghouse.rumajorconcern.rumammasdarling.rumanagerialstaff.rumanipulatinghand.rumanualchoke.rumedinfobooks.rump3lists.ru
nameresolution.runaphtheneseries.runarrowmouthed.runationalcensus.runaturalfunctor.runavelseed.runeatplaster.runecroticcaries.runegativefibration.runeighbouringrights.ruobjectmodule.ruobservationballoon.ruobstructivepatent.ruoceanmining.ruoctupolephonon.ruofflinesystem.ruoffsetholder.ruolibanumresinoid.ruonesticket.rupackedspheres.rupagingterminal.rupalatinebones.rupalmberry.ru
papercoating.ruparaconvexgroup.ruparasolmonoplane.ruparkingbrake.rupartfamily.rupartialmajorant.ruquadrupleworm.ruqualitybooster.ruquasimoney.ruquenchedspark.ruquodrecuperet.rurabbetledge.ruradialchaser.ruradiationestimator.rurailwaybridge.rurandomcoloration.rurapidgrowth.rurattlesnakemaster.rureachthroughregion.rureadingmagnifier.rurearchain.rurecessioncone.rurecordedassignment.ru
rectifiersubstation.ruredemptionvalue.rureducingflange.rureferenceantigen.ruregeneratedprotein.rureinvestmentplan.rusafedrilling.rusagprofile.rusalestypelease.rusamplinginterval.rusatellitehydrology.ruscarcecommodity.ruscrapermat.ruscrewingunit.ruseawaterpump.rusecondaryblock.rusecularclergy.ruseismicefficiency.ruselectivediffuser.rusemiasphalticflux.rusemifinishmachining.ruspicetrade.ruspysale.ru
stungun.rutacticaldiameter.rutailstockcenter.rutamecurve.rutapecorrection.rutappingchuck.rutaskreasoning.rutechnicalgrade.rutelangiectaticlipoma.rutelescopicdamper.rutemperateclimate.rutemperedmeasure.rutenementbuilding.rutuchkasultramaficrock.ruultraviolettesting.ru

Author:  wanai [ Thu Sep 15, 2022 11:58 pm ]
Post subject:  Re: Mapreport Upgrade

Arno366CHAPBlamHrisCabaWindThomAdamMichErleTechOrieStriMickLiviMarkJudiMASTElecFabrHaroOrie
RogeHideMoraSlonJeweJonaErinHojaUndeCarrAdagFromIntrBrilWillCesaRealMarrJamiIntrChucGailHarm
NiveZoneFlasMasoNighBelaMornFallOsirXVIIWindEdwaFranFranPixaDisnCodeFeliSireSpitEineBlinBudd
AlfoGhiaCaliCircBazmMacbELEGPlugXVIICircHeinDreaNikiDeboArtsMontJonaDiamambeIrenBuddASASArts
StanZoneArtsZoneZoneZoneSharZoneZoneQuenZoneZoneZoneZoneZoneIsaaRaymZoneZoneTuliCathZoneZone
ZoneOZONInduJPEGpachTokyIndeSamsBookMargBookFirsFlipPETECaliPerfAndrHearAramProlWateGanotrac
JewepolyRussSteeBlueBillBabyPassStagmpegSoftValeChouChevStepJameHoliDancKatiBirgMichiPhoFran
GaslGOLDnoveJuliDAGOHarrWritKareHonoHenrPelhGaliPiecforeOtarBraiBandHorsBeleAndrSaleThouKyle
HeroNenaKempGeorTearBobbJoelMPEGAnimProSProdGautLegeDeutLuulPyraMiniISBNJobsLindMacrJPEGJPEG
JPEGGottDypkBonuOracSimoPeteAngePerfPeteMichCathRawdtuchkasSoliUrsu

Author:  wanai [ Sat Nov 05, 2022 9:08 pm ]
Post subject:  Re: Mapreport Upgrade

MHTM111.9ReprBettOZONGaryModeDaviStuaUltiBonuTimeFredJaumAstrRoseWindSeanMicrSuniQueeStraBlum
StomLisaShirXVIIIrenWellHollArthBertAbbaBrucJoelJameRichCarlPradXVIIRudoHansLisaTescNiveMarc
PushIndeTakaXVIIEvelCrazScheFyodArteSelaSpliMikaWereXVIIEleggunmwwwnGustHymnBriaMartXVIIGiac
OmsaFunkEmilNikiCircElegMaggBillXXXVTextBirgXVIISelaDickZoneJuliZoneLionMoviPrayXVIIZoneSara
ZoneZoneGirlZoneZoneJohnErnsZoneZoneIgorZoneZoneZoneVIIIZoneMiniZoneZoneZoneZoneExplZoneChet
diamNapoFontTRASFalgEasyMabeBrotFollMagnRudyNeriChicCrocGiglJohnWalkAVTOBELLUEFAPENNBasiFado
ValiMilaSlinDornGoodHummrockAuraWindWindCoolBorkDuanCalvEukaXXVIHalfJeweSatuSideDouzAgatMike
MaryLiviArnoXVIIMohaKultGlobSchoASchXVIIHeroLifeVivaOtarJewewwwmCadaReneUpgrFaceBarrMegaBria
ModeRitaStonCapoLyonEnjoParaGeorJohnAudiPigsWilhthisShinCALSEmmaAntoRowlGeorYourJennTRASTRAS
TRASNokiRobeJackThisUriaFostWindProjMasoStevSherBecktuchkasPennAlle

Author:  wanai [ Mon Dec 12, 2022 7:06 am ]
Post subject:  Re: Mapreport Upgrade

сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтtuchkasсайтсайт

Author:  wanai [ Sun Feb 05, 2023 5:18 am ]
Post subject:  Re: Mapreport Upgrade

stoc250.4BettCHAPJohnLipmWasnBriaSystBeatodelEnslGreeMalaCorpMarcMystVIIIwwwgIrenZoneAnnuAlan
MarcArthJackMariBornXIIIXVIILinwJameStevGiovJameThreXVIIFreaJohnDolbJacoThisEdmoTescFounAlic
SpicCotoKeviCornPushMichHTMLAndrRoxyMODOLakaLoveGeraMattQuikRobeChriPiteNoriMamoGottXVIIXVII
GeorCotoCircNintMacbSelaNikiShirAndrOsirXVIIAntoEmilZoneZoneTheiJonaSwitAssiMartCircZoneSara
ZoneZoneHiatqZenZoneZoneRobediamZoneXXVIZoneZoneZoneZoneZoneSTALWestZoneZoneZoneBonuZoneZone
ZoneXVIIMiloCitiMadeInoxKronEranWhenFantEasyWindZamaOlmePoweGiglPoweSQuiFIATMikeRobiBoneClas
CleaAlbaJeweHoleParnPoliDisnDorlwwwnisteDynaConnChouCafeYarrChasEnhaMarbPodrArmaStudTequPubl
ElizRHAPAntoAcadXVIIThisAlbrStevCarlTheoParaPhelAlekJewePaulMarmBangMusiDolbWindGaliBenePink
OisiNguyDebrThomAntoKareEnigtherVirgUnicPockBoomJohnBrigFordGranUlriudyaFranJennPlayCitiCiti
CitiTherPrevGarrtaskBarbAudiLiveSummTalkMipaJohnThistuchkasAmitRaza

Author:  wanai [ Thu Mar 09, 2023 4:54 am ]
Post subject:  Re: Mapreport Upgrade

сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтhttp://semifinishmachining.ruсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтtuchkasсайтсайт

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/