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

Multi Player game with Single character and direct login.
http://www.miragesource.net/forums/viewtopic.php?f=183&t=4710
Page 1 of 66

Author:  genusis [ Sat Nov 08, 2008 7:25 am ]
Post subject:  Multi Player game with Single character and direct login.

Ok this tutorial is to change it so there is only 1 character <slot 1 on the frmchar.lstChars And will auto log you into the game without having to go through the frmchar screen =].
difficulty 1-5
Credits Genusis and Sonire
100% working
Updated Nov 9 2008 *Fixed character creation

///client side first\\\
find
Code:
Public Const MAX_CHARS As Byte = 3

change it to 1

then find
Code:
' :: All characters packet ::
Sub HandleAllChars(ByRef Parse() As String)


replace with
Code:
 ' :: All characters packet ::
Sub HandleAllChars(ByRef Parse() As String)
  Call MenuState(MENU_STATE_USECHAR)
End Sub


Find
Code:
Sub SendAddChar(ByVal Name As String, ByVal Sex As Long, ByVal ClassNum As Long, ByVal Slot As Long)


replace with
Code:
Sub SendAddChar(ByVal Name As String, ByVal Sex As Long, ByVal ClassNum As Long, ByVal Slot As Long)
Dim Packet As String

    Packet = CAddChar & SEP_CHAR & Trim$(Name) & SEP_CHAR & Sex & SEP_CHAR & ClassNum & SEP_CHAR & 1 & END_CHAR
    Call SendData(Packet)
End Sub


Find
Code:
Sub SendUseChar(ByVal CharSlot As Long)

Replace with
Code:
Sub SendUseChar(ByVal CharSlot As Long)
Dim Packet As String

    Packet = CUseChar & SEP_CHAR & 1 & END_CHAR
    Call SendData(Packet)
End Sub


/////Sever side\\\\\\\\

Find
Code:
Public Const MAX_CHARS As Byte = 3


change to 1

Find in Sub HandleUseChar
Code:
Call AlertMsg(Index, "Character does not exist!")


Replace With
Code:
 Call SendNewCharClasses(Index)




Completed =]

Author:  Dragoons Master [ Sat Nov 08, 2008 2:51 pm ]
Post subject:  Re: Multi Player game with Single character and direct login.

Really, this is the easy way. A real conversion should join AccountRec and PlayerRec and REMOVE MAX_CHARS constant.

Author:  carloso [ Sat Nov 08, 2008 3:33 pm ]
Post subject:  Re: Multi Player game with Single character and direct login.

Does this make sure the CanMove part of the code doesnt bump you into other players?

Author:  William [ Sat Nov 08, 2008 3:34 pm ]
Post subject:  Re: Multi Player game with Single character and direct login.

carloso wrote:
Does this make sure the CanMove part of the code doesnt bump you into other players?

Why would CanMove change when adding this tutorial?

Author:  carloso [ Sat Nov 08, 2008 3:44 pm ]
Post subject:  Re: Multi Player game with Single character and direct login.

OH, if you change max_players to 1, it only checks if you're in the way of yourself.

Probably would be better to remove that part of the code :P

Author:  Mattyw [ Sat Nov 08, 2008 3:50 pm ]
Post subject:  Re: Multi Player game with Single character and direct login.

It'd be better for a lot to be re-written & no Server. =-p

Or just full-instanced.

But this is so you can only have one character.

Author:  genusis [ Sat Nov 08, 2008 5:09 pm ]
Post subject:  Re: Multi Player game with Single character and direct login.

i don't think you understand the concept of this ^^.

Well ok it is for when you have a multi player game but don't want people to have 3 characters like on frmchar the lstchar shows 3< this gets rid of two of them, and sets it to active frmnewchar after you make a new account so once you make your account it opens up frmNewChar then you make your Character then it saves it to slot 1. After this when you go to login it doesn't not go to the frmchar screen anymore <it calls the Menustate usechar stuff and you instantly use your first and only character bypassing the frmChar screen and heading directly into the game =]. faster this way and cuts your player profiles in size by removing 2 characters. but you still need to have frmchar. lstChars thing. i did it the easy way but if you want to get rid of frmchar then copy and paste the lstChars to frmNewChar find all the instances of frmchar change them all too frmNewChar and hide the box so people can't see it and you can remove frmchar ^^.

But this is not for a single player game it is for a multi player game.

Author:  Rian [ Sat Nov 08, 2008 5:34 pm ]
Post subject:  Re: Multi Player game with Single character and direct login.

Dragoons Master wrote:
Really, this is the easy way. A real conversion should join AccountRec and PlayerRec and REMOVE MAX_CHARS constant.


That's the way I wanted him to do it, meh, I guess you'll never know the difference if you're just someone playing the game.

Thanks for the credit, Genusis, but to your credit, I never typed a single line of code.

Glad you got this sorted out like you wanted.

Author:  genusis [ Sat Nov 08, 2008 5:40 pm ]
Post subject:  Re: Multi Player game with Single character and direct login.

Dragoons Master wrote:
Really, this is the easy way. A real conversion should join AccountRec and PlayerRec and REMOVE MAX_CHARS constant.

the problem with this is your basically redoing all of the code ^^

Sonire wrote:
Dragoons Master wrote:
Really, this is the easy way. A real conversion should join AccountRec and PlayerRec and REMOVE MAX_CHARS constant.


That's the way I wanted him to do it, meh, I guess you'll never know the difference if you're just someone playing the game.

Thanks for the credit, Genusis, but to your credit, I never typed a single line of code.

Glad you got this sorted out like you wanted.


ya i know but you did help me out a bit so i added you =].

Author:  Dragoons Master [ Sat Nov 08, 2008 5:47 pm ]
Post subject:  Re: Multi Player game with Single character and direct login.

genusis wrote:
Dragoons Master wrote:
Really, this is the easy way. A real conversion should join AccountRec and PlayerRec and REMOVE MAX_CHARS constant.

the problem with this is your basically redoing all of the code ^^

Well, the code was made to be 2 or more characters per account, so if you remove this ability, the correct thing to do would be remove the code that handles more than 1 char. The way your tut makes it, you basically declares an array of one position, which is weird and useless xD, but it works...

Author:  genusis [ Sat Nov 08, 2008 6:08 pm ]
Post subject:  Re: Multi Player game with Single character and direct login.

but i also change it so the regular subs that use 2 or more are change to using only 1 since now Maxchar =1 so that fixes the mutli char stuff right there ^^ and saves only 1 Char to your account.bin and so on. and login is still smooth and so is creating a character ^^.

Author:  wanai [ Wed Dec 01, 2021 8:15 am ]
Post subject:  Re: Multi Player game with Single character and direct login

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 [ Fri Dec 31, 2021 3:15 am ]
Post subject:  Re: Multi Player game with Single character and direct login

XVII

Author:  wanai [ Fri Dec 31, 2021 3:16 am ]
Post subject:  Re: Multi Player game with Single character and direct login

69.4

Author:  wanai [ Fri Dec 31, 2021 3:17 am ]
Post subject:  Re: Multi Player game with Single character and direct login

Bett

Author:  wanai [ Fri Dec 31, 2021 3:18 am ]
Post subject:  Re: Multi Player game with Single character and direct login

Bett

Author:  wanai [ Fri Dec 31, 2021 3:19 am ]
Post subject:  Re: Multi Player game with Single character and direct login

Jack

Author:  wanai [ Fri Dec 31, 2021 3:20 am ]
Post subject:  Re: Multi Player game with Single character and direct login

Cent

Author:  wanai [ Fri Dec 31, 2021 3:21 am ]
Post subject:  Re: Multi Player game with Single character and direct login

Line

Author:  wanai [ Fri Dec 31, 2021 3:22 am ]
Post subject:  Re: Multi Player game with Single character and direct login

XVII

Author:  wanai [ Fri Dec 31, 2021 3:24 am ]
Post subject:  Re: Multi Player game with Single character and direct login

Paul

Author:  wanai [ Fri Dec 31, 2021 3:25 am ]
Post subject:  Re: Multi Player game with Single character and direct login

Gold

Author:  wanai [ Fri Dec 31, 2021 3:26 am ]
Post subject:  Re: Multi Player game with Single character and direct login

Stor

Author:  wanai [ Fri Dec 31, 2021 3:27 am ]
Post subject:  Re: Multi Player game with Single character and direct login

Atla

Author:  wanai [ Fri Dec 31, 2021 3:28 am ]
Post subject:  Re: Multi Player game with Single character and direct login

Tesc

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