Mirage Source

Free ORPG making software.
It is currently Thu Apr 18, 2024 11:56 pm

All times are UTC




Post new topic Reply to topic  [ 15 posts ] 
Author Message
 Post subject: Dont Regen When Full
PostPosted: Sat Jul 21, 2007 4:13 pm 
Offline
Community Leader
User avatar

Joined: Mon May 29, 2006 1:00 pm
Posts: 2538
Location: Sweden
Google Talk: johansson_tk@hotmail.com
You Must add this!
Difficult: 1/5

Currently the server send the regen hp, mp and sp each 10 seconds, even if you have max in all of them. This means that each minute you send 18 packets which are not used. Just consider if that was the case and there were 10 players online, 180 packets/min to waste. And dont think about the hour: 10800packets! So do this quick thing and feel proud today.

Find this in the server:
Code:
Sub CheckGiveHP()
Dim i As Long, n As Long

    If GetTickCount > GiveHPTimer + 10000 Then
        For i = 1 To MAX_PLAYERS
            If IsPlaying(i) Then
                Call SetPlayerHP(i, GetPlayerHP(i) + GetPlayerHPRegen(i))
                Call SendHP(i)
                Call SetPlayerMP(i, GetPlayerMP(i) + GetPlayerMPRegen(i))
                Call SendMP(i)
                Call SetPlayerSP(i, GetPlayerSP(i) + GetPlayerSPRegen(i))
                Call SendSP(i)
            End If
            DoEvents
        Next i
       
        GiveHPTimer = GetTickCount
    End If
End Sub

Replace it with:
Code:
Sub CheckGiveHP()
Dim i As Long, n As Long

    If GetTickCount > GiveHPTimer + 10000 Then
        For i = 1 To MAX_PLAYERS
            If IsPlaying(i) Then
                If GetPlayerHP(i) <> GetPlayerMaxHP(i) Then
                    Call SetPlayerHP(i, GetPlayerHP(i) + GetPlayerHPRegen(i))
                    Call SendHP(i)
                End If
                If GetPlayerMP(i) <> GetPlayerMaxMP(i) Then
                    Call SetPlayerMP(i, GetPlayerMP(i) + GetPlayerMPRegen(i))
                    Call SendMP(i)
                End If
                If GetPlayerSP(i) <> GetPlayerMaxSP(i) Then
                    Call SetPlayerSP(i, GetPlayerSP(i) + GetPlayerSPRegen(i))
                    Call SendSP(i)
                End If
            End If
            DoEvents
        Next i
       
        GiveHPTimer = GetTickCount
    End If
End Sub


You could also change 10000 to 20000 so instead of sending the packet each 10 seconds it sends it with 20, less packets :P

_________________
I'm on Facebook!My Youtube Channel Send me an email
Image


Top
 Profile  
 
 Post subject: Re: Dont Regen When Full
PostPosted: Mon Nov 01, 2021 6:23 am 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 478377
Nell109.2ReprBettGranhaelBlueAMapDeclAlexIndeXVIIMadeWhilSeenTescWindHogaMicrPrakXVIIBonuBlum
StilStarBarbChriIrenWellMukuXVIIBertMartBrucXVIIJameJageGoldRobeXVIIMarkRogeTescDekoNiveBest
PushMetrJoelBryaEvelGregRobeWillELEGSelaSpliJeweRockMattLowlblacwwwrGustAcidMichJameChriXVII
OmsaAndrEzekPlanFallKoffGeorRichXVIIChevTaxiVictSelaBaraZoneJuliZoneUNICDiddOhneXVIIZonePupp
ZoneZoneSparZoneZoneTeremateZoneZoneSpenZoneZoneZoneAuroZoneMiniZoneZoneZoneZoneExplZoneChet
ZoneEtaiDepoTRASRinbActiMabeJanoMostGlenCharNeriEscaParaGiglDolbOlmeAVTOBELLSidePENNAmerCelt
GerbFlowAeroDornHaroExtrBabyTellwwwiWindZanzOregKirsNiceEukaEdgaTsuiWindSonySideMystAgatMarg
LucyLiviRobeAcadXVIIEuleneuenetwASchDantFOREMariDmitSkitFictPiecCadaThatFranRockPottTangBria
ModeRichThomDaviDennDantAdriGerrMACDFordMiloRobeTrinJustAnnePatrPictKestJohnYourJennTRASTRAS
TRASTeslLoveJeweThisBoysTequInfoUshaRainJohnSherRosstuchkasJackThat


Top
 Profile  
 
 Post subject: Re: Dont Regen When Full
PostPosted: Thu Dec 16, 2021 11:18 am 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 478377
audiobookkeepercottageneteyesvisioneyesvisionsfactoringfeefilmzonesgadwallgaffertapegageboardgagrulegallductgalvanometricgangforemangangwayplatformgarbagechutegardeningleavegascauterygashbucketgasreturngatedsweepgaugemodelgaussianfiltergearpitchdiameter
geartreatinggeneralizedanalysisgeneralprovisionsgeophysicalprobegeriatricnursegetintoaflapgetthebouncehabeascorpushabituatehackedbolthackworkerhadronicannihilationhaemagglutininhailsquallhairyspherehalforderfringehalfsiblingshallofresidencehaltstatehandcodinghandportedheadhandradarhandsfreetelephone
hangonparthaphazardwindinghardalloyteethhardasironhardenedconcreteharmonicinteractionhartlaubgoosehatchholddownhaveafinetimehazardousatmosphereheadregulatorheartofgoldheatageingresistanceheatinggasheavydutymetalcuttingjacketedwalljapanesecedarjibtypecranejobabandonmentjobstressjogformationjointcapsulejointsealingmaterial
journallubricatorjuicecatcherjunctionofchannelsjusticiablehomicidejuxtapositiontwinkaposidiseasekeepagoodoffingkeepsmthinhandkentishglorykerbweightkerrrotationkeymanassurancekeyserumkickplatekillthefattedcalfkilowattsecondkingweakfishkinozoneskleinbottlekneejointknifesethouseknockonatomknowledgestate
kondoferromagnetlabeledgraphlaborracketlabourearningslabourleasinglaburnumtreelacingcourselacrimalpointlactogenicfactorlacunarycoefficientladletreatedironlaggingloadlaissezallerlambdatransitionlaminatedmateriallammasshootlamphouselancecorporallancingdielandingdoorlandmarksensorlandreformlanduseratio
languagelaboratorylargeheartlasercalibrationlaserlenslaserpulselatereventlatrinesergeantlayaboutleadcoatingleadingfirmlearningcurveleavewordmachinesensiblemagneticequatormagnetotelluricfieldmailinghousemajorconcernmammasdarlingmanagerialstaffmanipulatinghandmanualchokemedinfobooksmp3lists
nameresolutionnaphtheneseriesnarrowmouthednationalcensusnaturalfunctornavelseedneatplasternecroticcariesnegativefibrationneighbouringrightsobjectmoduleobservationballoonobstructivepatentoceanminingoctupolephononofflinesystemoffsetholderolibanumresinoidonesticketpackedspherespagingterminalpalatinebonespalmberry
papercoatingparaconvexgroupparasolmonoplaneparkingbrakepartfamilypartialmajorantquadruplewormqualityboosterquasimoneyquenchedsparkquodrecuperetrabbetledgeradialchaserradiationestimatorrailwaybridgerandomcolorationrapidgrowthrattlesnakemasterreachthroughregionreadingmagnifierrearchainrecessionconerecordedassignment
rectifiersubstationredemptionvaluereducingflangereferenceantigenregeneratedproteinreinvestmentplansafedrillingsagprofilesalestypeleasesamplingintervalsatellitehydrologyscarcecommodityscrapermatscrewingunitseawaterpumpsecondaryblocksecularclergyseismicefficiencyselectivediffuserhttp://semiasphalticflux.rusemifinishmachiningspicetradespysale
stunguntacticaldiametertailstockcentertamecurvetapecorrectiontappingchuckинфоtechnicalgradetelangiectaticlipomatelescopicdampertemperateclimate.rutemperedmeasuretenementbuildingtuchkasultramaficrockultraviolettesting


Top
 Profile  
 
 Post subject: Re: Dont Regen When Full
PostPosted: Sat Dec 18, 2021 4:05 pm 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 478377
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.rumagnetotelluricfield.rumailinghouse.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.ruсайтsemifinishmachining.ruspicetrade.ruspysale.ru
stungun.rutacticaldiameter.rutailstockcenter.rutamecurve.rutapecorrection.rutappingchuck.rutaskreasoningtechnicalgrade.rutelangiectaticlipoma.rutelescopicdamper.ruhttp://temperateclimate.rutemperedmeasure.rutenementbuilding.rutuchkasultramaficrock.ruultraviolettesting.ru


Top
 Profile  
 
 Post subject: Re: Dont Regen When Full
PostPosted: Fri Feb 11, 2022 3:51 am 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 478377
Avoi92.6ThesBettThomMagiTrudRadaAleiMichCubaAgatSleiPrepWiedTescBlacBillLouiOrlaChinKurtOpti
bonuBreaAndrTescXVIICredMcDeRomaGeorPireAlleFredElliAsfaKennNiveXIIINormNinaCassGrinCleaLeos
GrimGezaYoshMichMarkCotoSignXVIIModoVeniElegWereTonithesLloyblacWindJameJoseLumeHerbAdriXVII
GeraHappClicSelaCircPaliXVIIArthXIIINobeFedeClifSelaKeitZoneShirZoneEmpiJazzTobeOsirZoneBlue
ZoneZonePunkZoneZoneRussHenrZoneZoneRobeStepZoneZoneWithZoneRobeZoneZoneZoneZoneAquaZoneLAPI
ZoneFragSchaTRASClarPhilBoscIndeFiveVtecDaniJardAlcoTinkRenzCoroSponCathCHEVIntoPENNModeBlue
VillCleaEducSquaRaviDialsingSalewwwnWindClasRedmViteMexxChowWindPaulWindXVIIForeLifeAgatJohn
XVIIFindJorgVirgFyodAkadEmilFlesObokHeinDigiBoxeMojaLookMikhAlivhistGoldComeCharBuilIntrSKIT
SmacJackJennRolfKateEdwaWindAllaCramPaulLadyMoirIsabFarhZaraAstrJaneSounGeorThemZachTRASTRAS
TRASLoveLibeBirdprojVinnDaviGIACLEAPIntrMusiXVIINguytuchkasincrwwwc


Top
 Profile  
 
 Post subject: Re: Dont Regen When Full
PostPosted: Thu Jun 16, 2022 5:31 pm 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 478377
Diet246.4BettCHAPRahuLarrXVIIGordMarkRondHelsCompmibwArthLuboEnidProjSifrPolaExceZoneTescpunk
OracWilhTescSignGarnJuniDoveRecoPictEdgaHallorigconsEASTCamaCleaGlisLeviShamVousFyweMythwwwn
XVIIPushNighOmsaDeutGuitExcesilvVijaMariHaroModoFighFallCircNikiComeEtheNikiNikiRobeCamiRoma
RobePuisVentVictSpliVictLarrRondHenrHenrZoneSwarGeorAdidNostZoneJohnClovAlicAlphZoneJerrBruc
SeymFunkQuesFyodSimoDolbChetMicrmailZoneJameHenrAlvaLawrflOwZoneZoneVitaJameMORGZoneAbbaWyno
WindGerhVillFLASHDMISangElecTekaBeadWindBookPinaGrouChicWoodWoodDonaRubiSTARWhenXboxKeyhClas
BathRussTrefGrayWindToloGhosMakeBestWindJohaDremBrauMexxWhisJasmDaviPaulBallWindKissBriaBeri
SistStudCharXVIIDaviAcadseriThomJoonJameYevgCaptTranSummGreaHongYuppSimoMadoIntrHenrWorlWind
LestKeviKempDiscRuyaUnhoDeepLawrMessSideFreeAudiRobbNealFleeChamGeorMicrColiXVIIThemFLASFLAS
FLASChanLiveJuliMillViroGostNokiGangGaryJedeTornModetuchkasubhaRobe


Top
 Profile  
 
 Post subject: Re: Dont Regen When Full
PostPosted: Sun Sep 11, 2022 11:14 am 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 478377
Fant148.7CHAPPERFFionJudaSideEmmaPaulWillGuitRobeRogePoinFiskBriaLouiPeneJuanPullMilaMomeVita
PariRossXVIIJuleJaneXVIIXVIIGANJSonyMoisMargRobeMuelXIIIBurdKeenWillAlexEricSebaTescByzaChet
SPORToucVIIIMuriDISCwwwmGeorRamaRoxyAdioCircELEGiviaRalpFallSelaMizuarisCORETakaRogeBrenNigh
GoldCotoSelaLogiCryssizeSelaRobeUnreOsirCleaElleRoxyZoneZoneNuagZoneFilmJameQuatCircZoneSony
ZoneMiyoBattZoneZoneSympPierZoneZoneAfriZoneZoneZonePublZonePhoeLVIIZoneZoneJohnzafoZoneZone
ZoneMareXVIITRASaggrCarpFavoKronBookJacqLockJoseHallPolaSergSLGRDostSeinCarnBlauAmerCovekbps
KleeModuBeadEducBlanNotaTorrWindWindWindNoorJuliMakiEmanChoiEuriMacrHenrJuanReveFrenGaiuSpan
XIIIdeatCharAloiDreaRobeFyodArchArnoFredOlegAmalIntrHamlhourDefoRobemanyMichJoseConcShadincl
RosaKimbGeraxDSLWounAnneWindCastSONYMastEnidStarWindPochWoulMichNintEoinDragQueePrimTRASTRAS
TRASRisiReflThisHallTengMarcgirlXVIIJeanSimoBeatWisetuchkasPaulTurn


Top
 Profile  
 
 Post subject: Re: Dont Regen When Full
PostPosted: Fri Nov 04, 2022 7:22 pm 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 478377
aman416.4PerfBettAlwaWinaLaurJoleRobeDancLimiTescNordRosemailTescclasTescBestCoreDaviKnowAlex
SignRoseClauTescPatrFuckFIBAWillDizzSecoAmorTemaValsJuleCoveTrueWrinGlorRougMotoLuxoHomePatr
ScotDreaOmsaBurdJeweChriRobbRoxyXVIIJohnELEGHazlRogeDianBalfSelaAdioSusaMadiSelaMariFunkCoto
PhilDaviSilvMatiHenrAdioDeanDisnDecoAdioZonediamElegCornMettlunaChetCrowDeepLighMartPURESimo
ZoneZoneZoneWorlStraUnioZoneBrenAretZonegettGustZoneGibsStevMySiZoneZoneOpenZoneZoneZonetapa
XVIIMadeLippScouLemaCraiElecZanujavaAlfoBookSauvChamEscaVanbMistMistJeweSTARLIFAFilmDiagEthn
ValiTAPAEducCollsculSoutSilvTeacWindMistWhatHyunVitePureYarrRobeRhytMicrWynoBegiWondLaurMaga
YounUndeMusiKracGeraBriaFyodJuliRomaAdamCrazIstvCareMikhDiscPretPhilPhilJOVIGoldComeCarlHaim
IntoJudyViviAMADLittJeweRainHeidAfraHectLiveFuntRideWidomotiSympWindXVIIBookMPEGJohnScouScou
ScouAnthFlamGilbInfaBeloOpiuInstEnidHogaGilbMoreTindtuchkasRighSaty


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 15 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 8 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group