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

NPC's stop responding.
http://web.miragesource.net/forums/viewtopic.php?f=201&t=1867
Page 1 of 2

Author:  Nemesis [ Fri May 25, 2007 6:41 am ]
Post subject:  NPC's stop responding.

I've got this bug, as does/did everyone who has worked/is working with MS Source that causes NPC's to stop responding or "freeze" when two players are on a map and one logs off. If anyone knows of a fix please post or I will eat your head like a fat guy eats pie. Thanks

Author:  Tony [ Fri May 25, 2007 8:14 am ]
Post subject:  Re: NPC's stop responding.

Nemesis wrote:
I've got this bug, as does/did everyone who has worked/is working with MS Source that causes NPC's to stop responding or "freeze" when two players are on a map and one logs off. If anyone knows of a fix please post or I will eat your head like a fat guy eats pie. Thanks


Eat our head like a fat guy eats pie? No.
If you want help post what you added to your source
cause I've been using MS for a while and I never got
that kind of an error.

Author:  Robin [ Fri May 25, 2007 10:11 am ]
Post subject: 

Mhhh. I do agree with Kuja, but I seem to remember from a while ago that there was a problem with NPC movement where a 1 had been used instead of a 0.

I only have a tiny recollection of such a thing, and it could just be me thinking of something completely different...

Author:  Lea [ Fri May 25, 2007 1:42 pm ]
Post subject: 

If it's happening every time, you've changed something.

I always thought it was more an issue of processor speed than anything else. It usually doesn't happen when running it on a good computer when you're not busy.

Author:  Anthony [ Fri May 25, 2007 3:52 pm ]
Post subject: 

Actually, I am pretty sure it has been a problem with Mirage since Consty released it. I think Shannara did fix it at one time but it's not a fix in the current 3.0.3 or MSE releases. I did just test it and I am running 2gb of ram and a dual core intel 6400, pretty sure it's not my system being slow. What happens is when two players or more are on a map and one logs out and nobody else enters/leaves the map all the npcs on the map freeze. They don't move or attack back, I am not sure why this happens but it is a bug that MS has. So then people can kill the npcs without getting hurt at all. Pretty useful bug for players I used to use it a lot in Mirage haha. But the map stays frozen until somebody enters it making it or it respawns.

Author:  Da Undead [ Fri May 25, 2007 4:03 pm ]
Post subject: 

Dave wrote:
If it's happening every time, you've changed something.

I always thought it was more an issue of processor speed than anything else. It usually doesn't happen when running it on a good computer when you're not busy.


Nemesis computer specs are amazing. I highly doubt its lag because I've been on his server with 15+ people and it was so smooth.

Author:  Rian [ Fri May 25, 2007 7:47 pm ]
Post subject: 

I know how to fix the problem, but I can't remember exactly what line of code causes it. I could post it when I get home, or if you don't feel like waiting, I have yahoo messenger at work. If you have MSN or Yahoo add mailto:mvrckoffspring88@yahoo.com and I can help you out.

Author:  Da Undead [ Fri May 25, 2007 11:33 pm ]
Post subject: 

He has MSN but hes not on alot :p

Author:  Verrigan [ Fri May 25, 2007 11:37 pm ]
Post subject: 

I think the player is removed from the map before the check is done, but the check to see how many players are on the map also does -1, so the result is 0.. Which tells the server there is nobody on the map..

Look at the logoff code.. I'm not guaranteeing that's the problem, but it is a very simple fix. That, I guarantee.

Author:  Rian [ Fri May 25, 2007 11:48 pm ]
Post subject: 

Verrigan has it right for the most part. I'm not sure that it's in the leave game sub though. But I do know that it stops npc processing when someone logs off if there is only one other person on the map. So basically, there is a 1 that needs to be changed to a 0.

Author:  Robin [ Fri May 25, 2007 11:53 pm ]
Post subject: 

Ah, so I wasn't making it up when I recalled something like that.

Thanks for proving I'm not becoming schizophrenic.

:)

Author:  Da Undead [ Sat May 26, 2007 4:34 am ]
Post subject: 

Is that because it counts as 0 then 1?

Like ADMIN_MONITOR is 1 and member is 0

Author:  Verrigan [ Sat May 26, 2007 4:48 am ]
Post subject: 

Change this:
Code:
Sub LeftGame(ByVal Index As Long)
Dim n As Long

    If Player(Index).InGame = True Then
        Player(Index).InGame = False
       
        ' Check if player was the only player on the map and stop npc processing if so
        If GetTotalMapPlayers(GetPlayerMap(Index)) = 1 Then
            PlayersOnMap(GetPlayerMap(Index)) = NO
        End If
       
        ' Check for boot map
        If Map(GetPlayerMap(Index)).BootMap > 0 Then
            Call SetPlayerX(Index, Map(GetPlayerMap(Index)).BootX)
            Call SetPlayerY(Index, Map(GetPlayerMap(Index)).BootY)
            Call SetPlayerMap(Index, Map(GetPlayerMap(Index)).BootMap)
        End If
       
        ' Check if the player was in a party, and if so cancel it out so the other player doesn't continue to get half exp
        If Player(Index).InParty = YES Then
            n = Player(Index).PartyPlayer
           
            Call PlayerMsg(n, GetPlayerName(Index) & " has left " & GAME_NAME & ", disbanning party.", Pink)
            Player(n).InParty = NO
            Player(n).PartyPlayer = 0
        End If
           
        Call SavePlayer(Index)
   
        ' Send a global message that he/she left
        If GetPlayerAccess(Index) <= ADMIN_MONITER Then
            Call GlobalMsg(GetPlayerName(Index) & " has left " & GAME_NAME & "!", JoinLeftColor)
        Else
            Call GlobalMsg(GetPlayerName(Index) & " has left " & GAME_NAME & "!", White)
        End If
        Call TextAdd(frmServer.txtText, GetPlayerName(Index) & " has disconnected from " & GAME_NAME & ".", True)
        Call SendLeftGame(Index)
    End If
   
    Call ClearPlayer(Index)
End Sub

to this:
Code:
Sub LeftGame(ByVal Index As Long)
Dim n As Long

    If Player(Index).InGame = True Then
        ' Check if player was the only player on the map and stop npc processing if so
        If GetTotalMapPlayers(GetPlayerMap(Index)) = 1 Then
            PlayersOnMap(GetPlayerMap(Index)) = NO
        End If
       
        Player(Index).InGame = False
       
        ' Check for boot map
        If Map(GetPlayerMap(Index)).BootMap > 0 Then
            Call SetPlayerX(Index, Map(GetPlayerMap(Index)).BootX)
            Call SetPlayerY(Index, Map(GetPlayerMap(Index)).BootY)
            Call SetPlayerMap(Index, Map(GetPlayerMap(Index)).BootMap)
        End If
       
        ' Check if the player was in a party, and if so cancel it out so the other player doesn't continue to get half exp
        If Player(Index).InParty = YES Then
            n = Player(Index).PartyPlayer
           
            Call PlayerMsg(n, GetPlayerName(Index) & " has left " & GAME_NAME & ", disbanning party.", Pink)
            Player(n).InParty = NO
            Player(n).PartyPlayer = 0
        End If
           
        Call SavePlayer(Index)
   
        ' Send a global message that he/she left
        If GetPlayerAccess(Index) <= ADMIN_MONITER Then
            Call GlobalMsg(GetPlayerName(Index) & " has left " & GAME_NAME & "!", JoinLeftColor)
        Else
            Call GlobalMsg(GetPlayerName(Index) & " has left " & GAME_NAME & "!", White)
        End If
        Call TextAdd(frmServer.txtText, GetPlayerName(Index) & " has disconnected from " & GAME_NAME & ".", True)
        Call SendLeftGame(Index)
    End If
   
    Call ClearPlayer(Index)
End Sub


[edit]
Please notice all I did was move one line.

Author:  Da Undead [ Sat May 26, 2007 4:55 am ]
Post subject: 

nice fix :D

Author:  Verrigan [ Sat May 26, 2007 5:04 am ]
Post subject: 

I didn't test it.. (I only have myself to test, and didn't feel like setting it up on another comp..)

BTW, this was edited in vanilla MSE, and I know the issue was there in MagiKnights for a while (Dunno if it was ever fixed or not..) So as it was said.. This bug has been around since MS has.

Author:  Verrigan [ Sat May 26, 2007 7:22 pm ]
Post subject: 

Did this fix the problem? Has anyone tried it?

Author:  Rian [ Sat May 26, 2007 8:21 pm ]
Post subject: 

I haven't tested your method. But that is the code I was talking about.

Just for good measure, here's how I did it. This is actually copied and pasted from what you posted Verrigan.

Code:
If GetTotalMapPlayers(GetPlayerMap(Index)) = 1 Then


Needs to be

Code:
If GetTotalMapPlayers(GetPlayerMap(Index)) = 0 Then

Author:  Verrigan [ Sat May 26, 2007 11:17 pm ]
Post subject: 

You could do it that way if you don't move that first line as I did.. Either way should work. :)

Author:  Nemesis [ Mon May 28, 2007 7:23 am ]
Post subject: 

Sorry I haven't been around to read this post in the past few days. I'm quitting my current job so to compensate for time time which I'll be unemployed/on vacation has been dedicated to 12+ hour shifts for the past week and a half (60 hours a week lately). I really appreciate everyone's help with all of this and yeah, I knew it couldn't be my PC. I have a custom built PC with, as Undead said, insane specs with a dual core CPU clocked stable at 3.8GHz. My 3dmark06 score is 13690 just to give you an idea of what my system is capable of. So yeah but anyways, I really appreciate all the help. Thanks guys.

Author:  Verrigan [ Mon May 28, 2007 2:57 pm ]
Post subject: 

Nemesis, I dunno if you read back through the thread, but your answer is there. Just didn't want you to walk away, thinking this bug wasn't fixable.. Would like to know if it worked for you.. (It worked on another system)

Author:  Nemesis [ Tue May 29, 2007 4:52 am ]
Post subject: 

It was the
Code:
If GetTotalMapPlayers(GetPlayerMap(index)) = 1 Then

that needed to be changed. It seems to work fine for me now.

Author:  wanai [ Wed Dec 01, 2021 5:18 pm ]
Post subject:  Re: NPC's stop responding.

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

Author:  wanai [ Tue Feb 01, 2022 10:57 pm ]
Post subject:  Re: NPC's stop responding.

Netw438.5BettMONTTellJeweAmerNeceCrysJeweAcidYoshLinwThisTescMetaBranFranClasChriSupeorigJewe
InteJamaArneNormKlauSkinColoStraOutkMarkJameJeweMichWillCaroFlemXVIIHarrJuraTescPensDownArth
JoliMusiTrasBouqNathJoliJouiWilhELEGFallMODOELEGXIIICathHellRoxyELEGMiraBonuLargJaneRomaSnow
FranSieLSelaCircJuliPaliMoneZoneMariELEGZonediamTraiSusaPaulArthGiniVoozGileCrysLudwZoneAugu
ZoneZoneZoneZoneZoneZoneZonediamZoneZoneZoneZoneZoneZoneZoneZoneZoneZoneZoneZoneqZenZoneZone
ZoneSonnIntrPionKronDigiNardMabeMercMaryLittLighFierDaliProfYPenPETECaseSTARARAGGoldultiFree
PersBrigEasyBlueMoxiToloBonuwordMathWindDanaBoscSmilhappYarrRobeKariMicrAfteHearLausFeelLaFe
EricdiskErnsXVIIMaurXXXIHenrLOGIBeatMinuAlekAsiaCAPASlinLeonModePuccTobySamuTenoThisKennUnre
JoseKellPoweHappSongBarbSimoHollGoldLoneXIIISuthRienJeffLibeSpidHomoIKEANeroDarrWillPionPion
PionConvWillDaviProlPascXVIIIndeBriaSoakPostMarkRodetuchkasJohaArri

Author:  wanai [ Wed Mar 02, 2022 4:15 am ]
Post subject:  Re: NPC's stop responding.

инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинйоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоmagnetotelluricfield.ruинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоtuchkasинфоинфо

Author:  wanai [ Sun May 29, 2022 3:07 pm ]
Post subject:  Re: NPC's stop responding.

kbps218.4CHAPFocaBellChadVictHenrFranLeigVillOranTefaNickSophStefPensPrinMASTRayeXVIIMECHWood
LoveArniTescTescTeanFuneCaudBryaXXXLMatiUPLIIrenMPEGProsCamaExpePaleTOILMoodDaniTescWellVenu
BennJoliBlacAndrBeatVIIIEdgedarkClemCarlJoacHideWhenElegModoSelaSilvMccrNikiNikiRobaFyodFulc
HoneWhatPeteXVIIXVIIXVIIJeanMiyoToveFedeASASZoneJameColiJaquMORGZoneSendRondRITZModoFuxiZone
XVIIZoneAntoSaraWiseJimmZoneNichZoneDaniDaviBernZoneMantRichSeymdiamKarlCaroHowaZoneZoneZone
ZonePinoWritTaniMadeKronMabeViskAdamCoolBratColoSwarFiesEISGWALLProfOLEDIPRALibuMicrHELLAvan
YorkTangCreaPaulSoorCombTrudWindWindWindIwakRoweRoweThouChoiHenrMoleAutuMasaBlacElaeIntrpowe
OZONAnatFerdTorsAcadWilhIDEOLangWailAcadMarkValeJohnCureBeatChicArchVerdBlueIntrPeteMandPara
ElizEnjoCallNancMagiBrucMichtherMicrKerrGlenBretCrafJeanRolfGianButlChicVIIIForeAlexTaniTani
TaniCottShelMassBlueWastVendHistFanfDolpSaulLymaThistuchkasRighmame

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