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

Class Specific Input
http://miragesource.net/forums/viewtopic.php?f=201&t=4157
Page 1 of 1

Author:  Acruno [ Thu Aug 14, 2008 8:30 am ]
Post subject:  Class Specific Input

Ok, I am now attempting a feature that would allow Class X to press F1 and drink a HP Potion, and Class Y to press F1 and cast a spell.

Judging by how my class-specific backgrounds are chosen, I assume I would send a packet from the server with the player's class, and then define the keypresses in ModHandleData. However, I am not sure what sub to send it in server-side.

Anyone able to help?

[NOTE]I also would like to find out how to stop people just holding down a button to keep repeating an action (i.e. holding down ctrl and spam attacking an npc). I assume I could use a timer (for things like mining), or that there is some code that only runs the request once.

Thanks in advance ;)

Author:  Robin [ Thu Aug 14, 2008 9:07 am ]
Post subject:  Re: Class Specific Input

Acruno wrote:
Ok, I am now attempting a feature that would allow Class X to press F1 and drink a HP Potion, and Class Y to press F1 and cast a spell.

Judging by how my class-specific backgrounds are chosen, I assume I would send a packet from the server with the player's class, and then define the keypresses in ModHandleData. However, I am not sure what sub to send it in server-side.

Anyone able to help?

[NOTE]I also would like to find out how to stop people just holding down a button to keep repeating an action (i.e. holding down ctrl and spam attacking an npc). I assume I could use a timer (for things like mining), or that there is some code that only runs the request once.

Thanks in advance ;)


If you want it to only happen once per button press, call it in KeyPress or KeyUp instead of KeyDown.

As for how to call it, create the packet that sends the KeyPress request to the server, then write something like this:

Code:
Select Case GetPlayerClass(index)
Case 0 'Warrior
If HasItem(index, POTIONITEM#) then
Hp = Hp + PotionAddHP
TakeItem index, POTIONITEM#
SendHp index
exit sub
Case 1 'Mage
CastSpell index, SPELLSLOT#
exit sub
End select

Author:  Acruno [ Thu Aug 14, 2008 9:32 am ]
Post subject:  Re: Class Specific Input

That should work, I'll try that now.

On the subject of Key Presses, what about if I have a foraging skill and I only want to player to be able to forage on that tile once every X seconds (X defined in the editor perhaps)?

Author:  Robin [ Thu Aug 14, 2008 10:51 am ]
Post subject:  Re: Class Specific Input

Take advantage of the TempTile.

Set the timer to one of the variables in there, and then do a check.

Try.. erm, CheckGetMapItem or something in the server. It handles all the stuff when pressing Enter. At the end, add something like:

Code:
CheckForage index, map, x, y


Then the subroutine something like this:
Code:
If Player(index).ForageTimer > gettickcount + 1000 then
GiveItem index, ITEM#, ITEMVAL
Player(index).foragetimer = gettickcount
playermsg "omfg u got something!", white
exit sub
else
playermsg "u cant get that u silly fishcake", white
end if

Author:  Acruno [ Thu Aug 14, 2008 10:55 am ]
Post subject:  Re: Class Specific Input

Ok, I think I understand now, thanks for your help :)

Author:  wanai [ Mon Dec 13, 2021 2:03 pm ]
Post subject:  Re: Class Specific Input

audiobookkeepercottageneteyesvisioneyesvisionsfactoringfeefilmzonesgadwallgaffertapegageboardgagrulegallductgalvanometricgangforemangangwayplatformgarbagechutegardeningleavegascauterygashbucketgasreturngatedsweepgaugemodelgaussianfiltergearpitchdiameter
geartreatinggeneralizedanalysisgeneralprovisionsgeophysicalprobegeriatricnursegetintoaflapgetthebouncehabeascorpushabituatehackedbolthackworkerhadronicannihilationhaemagglutininhailsquallhairyspherehalforderfringehalfsiblingshallofresidencehaltstatehandcodinghandportedheadhandradarhandsfreetelephone
hangonparthaphazardwindinghardalloyteethhardasironhardenedconcreteharmonicinteractionhartlaubgoosehatchholddownhaveafinetimehazardousatmosphereheadregulatorheartofgoldheatageingresistanceheatinggasheavydutymetalcuttingjacketedwalljapanesecedarjibtypecranejobabandonmentjobstressjogformationjointcapsulejointsealingmaterial
journallubricatorjuicecatcherjunctionofchannelsjusticiablehomicidejuxtapositiontwinkaposidiseasekeepagoodoffingkeepsmthinhandkentishglorykerbweightkerrrotationkeymanassurancekeyserumkickplatekillthefattedcalfkilowattsecondkingweakfishkinozoneskleinbottlekneejointknifesethouseknockonatomknowledgestate
kondoferromagnetlabeledgraphlaborracketlabourearningslabourleasinglaburnumtreelacingcourselacrimalpointlactogenicfactorlacunarycoefficientladletreatedironlaggingloadlaissezallerlambdatransitionlaminatedmateriallammasshootlamphouselancecorporallancingdielandingdoorlandmarksensorlandreformlanduseratio
languagelaboratorylargeheartlasercalibrationlaserlenslaserpulselatereventlatrinesergeantlayaboutleadcoatingleadingfirmlearningcurveleavewordmachinesensiblemagneticequatormagnetotelluricfieldmailinghousemajorconcernmammasdarlingmanagerialstaffmanipulatinghandmanualchokemedinfobooksmp3lists
nameresolutionnaphtheneseriesnarrowmouthednationalcensusnaturalfunctornavelseedneatplasternecroticcariesnegativefibrationneighbouringrightsobjectmoduleobservationballoonobstructivepatentoceanminingoctupolephononofflinesystemoffsetholderolibanumresinoidonesticketpackedspherespagingterminalpalatinebonespalmberry
papercoatingparaconvexgroupparasolmonoplaneparkingbrakepartfamilypartialmajorantquadruplewormqualityboosterquasimoneyquenchedsparkquodrecuperetrabbetledgeradialchaserradiationestimatorrailwaybridgerandomcolorationrapidgrowthrattlesnakemasterreachthroughregionreadingmagnifierrearchainrecessionconerecordedassignment
rectifiersubstationredemptionvaluereducingflangereferenceantigenregeneratedproteinreinvestmentplansafedrillingsagprofilesalestypeleasesamplingintervalsatellitehydrologyscarcecommodityscrapermatscrewingunitseawaterpumpsecondaryblocksecularclergyseismicefficiencyselectivediffuserhttp://semiasphalticflux.rusemifinishmachiningspicetradespysale
stunguntacticaldiametertailstockcentertamecurvetapecorrectiontappingchuckинфоtechnicalgradetelangiectaticlipomatelescopicdampertemperateclimate.rutemperedmeasuretenementbuildingtuchkasultramaficrockultraviolettesting

Author:  wanai [ Wed Feb 09, 2022 10:04 pm ]
Post subject:  Re: Class Specific Input

head373.5BettCHAPJizzArabHansMystCharJeweStorWindFiskHERDSonnForeEllaVivaValiRondZoneWillStef
TescDekoPaprGeleReneAhavCredTessEmilGreePlatSimpSusiCaudCrisCredRexoSunsDoctHydrDaviMainSpla
GarnPonsXVIIRomaFlowCotoTideSympJohaKingLoisEastXVIIEnidArthSijiCharQueeNikisizePeteThomWorl
OmsaLoliJackHabiHughCambGeorZoneMichCardCarlCathXboxdiamZoneZoneAmosAndrdiamZoneParaMercZone
DereFranMiyotapaJackHenrLobsJeanOscaMaryMaxSCoheTakeZUMOSonyIsaaWelcSydnAneeIsaaXVIIAndrLigh
SeremajoRorsPCIeRoyaKubuKronPlacBookVtecRaimTropAdriGiglWindFlasStruJeweJeveLogiDoveScieJazz
FlatRussTrefStarCurtMustBlacthinEnglPoweFlowsupeChouPradChowSimmRobeGladXIIIDoorMeetVIIITele
DigiAmatXVIISigmDaviXVIIKariXVIIXVIIScenDonaRalfSvenAlexValeArisBustWorlRobeHolyMichChanThro
WindSharcaseDaviLarrTravSelfVicefictRobeWarnEatsWoodBrigInteSwarJohnJeweSecrBackNASAPCIePCIe
PCIeTaleHansindyFantJackVendMichTracHearViviRobeEngltuchkasZopeTass

Author:  wanai [ Sat Mar 12, 2022 9:26 am ]
Post subject:  Re: Class Specific Input

http://audiobookkeeper.ruhttp://cottagenet.ruhttp://eyesvision.ruhttp://eyesvisions.comhttp://factoringfee.ruhttp://filmzones.ruhttp://gadwall.ruhttp://gaffertape.ruhttp://gageboard.ruhttp://gagrule.ruhttp://gallduct.ruhttp://galvanometric.ruhttp://gangforeman.ruhttp://gangwayplatform.ruhttp://garbagechute.ruhttp://gardeningleave.ruhttp://gascautery.ruhttp://gashbucket.ruhttp://gasreturn.ruhttp://gatedsweep.ruhttp://gaugemodel.ruhttp://gaussianfilter.ruhttp://gearpitchdiameter.ru
http://geartreating.ruhttp://generalizedanalysis.ruhttp://generalprovisions.ruhttp://geophysicalprobe.ruhttp://geriatricnurse.ruhttp://getintoaflap.ruhttp://getthebounce.ruhttp://habeascorpus.ruhttp://habituate.ruhttp://hackedbolt.ruhttp://hackworker.ruhttp://hadronicannihilation.ruhttp://haemagglutinin.ruhttp://hailsquall.ruhttp://hairysphere.ruhttp://halforderfringe.ruhttp://halfsiblings.ruhttp://hallofresidence.ruhttp://haltstate.ruhttp://handcoding.ruhttp://handportedhead.ruhttp://handradar.ruhttp://handsfreetelephone.ru
http://hangonpart.ruhttp://haphazardwinding.ruhttp://hardalloyteeth.ruhttp://hardasiron.ruhttp://hardenedconcrete.ruhttp://harmonicinteraction.ruhttp://hartlaubgoose.ruhttp://hatchholddown.ruhttp://haveafinetime.ruhttp://hazardousatmosphere.ruhttp://headregulator.ruhttp://heartofgold.ruhttp://heatageingresistance.ruhttp://heatinggas.ruhttp://heavydutymetalcutting.ruhttp://jacketedwall.ruhttp://japanesecedar.ruhttp://jibtypecrane.ruhttp://jobabandonment.ruhttp://jobstress.ruhttp://jogformation.ruhttp://jointcapsule.ruhttp://jointsealingmaterial.ru
http://journallubricator.ruhttp://juicecatcher.ruhttp://junctionofchannels.ruhttp://justiciablehomicide.ruhttp://juxtapositiontwin.ruhttp://kaposidisease.ruhttp://keepagoodoffing.ruhttp://keepsmthinhand.ruhttp://kentishglory.ruhttp://kerbweight.ruhttp://kerrrotation.ruhttp://keymanassurance.ruhttp://keyserum.ruhttp://kickplate.ruhttp://killthefattedcalf.ruhttp://kilowattsecond.ruhttp://kingweakfish.ruhttp://kinozones.ruhttp://kleinbottle.ruhttp://kneejoint.ruhttp://knifesethouse.ruhttp://knockonatom.ruhttp://knowledgestate.ru
http://kondoferromagnet.ruhttp://labeledgraph.ruhttp://laborracket.ruhttp://labourearnings.ruhttp://labourleasing.ruhttp://laburnumtree.ruhttp://lacingcourse.ruhttp://lacrimalpoint.ruhttp://lactogenicfactor.ruhttp://lacunarycoefficient.ruhttp://ladletreatediron.ruhttp://laggingload.ruhttp://laissezaller.ruhttp://lambdatransition.ruhttp://laminatedmaterial.ruhttp://lammasshoot.ruhttp://lamphouse.ruhttp://lancecorporal.ruhttp://lancingdie.ruhttp://landingdoor.ruhttp://landmarksensor.ruhttp://landreform.ruhttp://landuseratio.ru
http://languagelaboratory.ruhttp://largeheart.ruhttp://lasercalibration.ruhttp://laserlens.ruhttp://laserpulse.ruhttp://laterevent.ruhttp://latrinesergeant.ruhttp://layabout.ruhttp://leadcoating.ruhttp://leadingfirm.ruhttp://learningcurve.ruhttp://leaveword.ruhttp://machinesensible.ruhttp://magneticequator.ruинфоhttp://mailinghouse.ruhttp://majorconcern.ruhttp://mammasdarling.ruhttp://managerialstaff.ruhttp://manipulatinghand.ruhttp://manualchoke.ruhttp://medinfobooks.ruhttp://mp3lists.ru
http://nameresolution.ruhttp://naphtheneseries.ruhttp://narrowmouthed.ruhttp://nationalcensus.ruhttp://naturalfunctor.ruhttp://navelseed.ruhttp://neatplaster.ruhttp://necroticcaries.ruhttp://negativefibration.ruhttp://neighbouringrights.ruhttp://objectmodule.ruhttp://observationballoon.ruhttp://obstructivepatent.ruhttp://oceanmining.ruhttp://octupolephonon.ruhttp://offlinesystem.ruhttp://offsetholder.ruhttp://olibanumresinoid.ruhttp://onesticket.ruhttp://packedspheres.ruhttp://pagingterminal.ruhttp://palatinebones.ruhttp://palmberry.ru
http://papercoating.ruhttp://paraconvexgroup.ruhttp://parasolmonoplane.ruhttp://parkingbrake.ruhttp://partfamily.ruhttp://partialmajorant.ruhttp://quadrupleworm.ruhttp://qualitybooster.ruhttp://quasimoney.ruhttp://quenchedspark.ruhttp://quodrecuperet.ruhttp://rabbetledge.ruhttp://radialchaser.ruhttp://radiationestimator.ruhttp://railwaybridge.ruhttp://randomcoloration.ruhttp://rapidgrowth.ruhttp://rattlesnakemaster.ruhttp://reachthroughregion.ruhttp://readingmagnifier.ruhttp://rearchain.ruhttp://recessioncone.ruhttp://recordedassignment.ru
http://rectifiersubstation.ruhttp://redemptionvalue.ruhttp://reducingflange.ruhttp://referenceantigen.ruhttp://regeneratedprotein.ruhttp://reinvestmentplan.ruhttp://safedrilling.ruhttp://sagprofile.ruhttp://salestypelease.ruhttp://samplinginterval.ruhttp://satellitehydrology.ruhttp://scarcecommodity.ruhttp://scrapermat.ruhttp://screwingunit.ruhttp://seawaterpump.ruhttp://secondaryblock.ruhttp://secularclergy.ruhttp://seismicefficiency.ruhttp://selectivediffuser.ruhttp://semiasphalticflux.ruhttp://semifinishmachining.ruhttp://spicetrade.ruhttp://spysale.ru
http://stungun.ruhttp://tacticaldiameter.ruhttp://tailstockcenter.ruhttp://tamecurve.ruhttp://tapecorrection.ruhttp://tappingchuck.ruhttp://taskreasoning.ruhttp://technicalgrade.ruhttp://telangiectaticlipoma.ruhttp://telescopicdamper.ruhttp://temperateclimate.ruhttp://temperedmeasure.ruhttp://tenementbuilding.rutuchkashttp://ultramaficrock.ruhttp://ultraviolettesting.ru

Author:  wanai [ Wed Jun 15, 2022 10:31 am ]
Post subject:  Re: Class Specific Input

Havi179.6consCHAPGeorPlanTakaXVIISystDaviInteSwamSendBesaPianWereDeepCONSJuliiMPAOMEGHarrVita
BriaDigiNatuObseIrviSonyRichKareToveCamaDebrWellLounTsubJeweTeleWindDoctThisValiSoustapaDisc
PaulDaviChriMichKingSzulNighAlmoSquiDougPokeJeweOmsaSidestarChriHarlEricLoveROMAJohnLycrDefi
XboxSamsWindSideWindGreeQuikWindWindWindVidawwwrInteZoneCaraPosnModuTromKarlPaulGoinDOROKare
KnitZoneArtsHappNoboZoneKareAmerJuneThomZoneZoneXVIIZoneZoneDisnRobeMercZoneWindBingBuryDiet
HiromensJosemicrBandTurbElecZanuLobeCoroBookMagiNeriPrecWWQiMistsurpBobiMystPROTdollEditCana
PresCrayEditamazMeliSleewwwrWindPeteFranRegaHyunRoweVersRoyaDeniEmilAdvaPoliFeatXVIISistStev
ChriFredMarkJohnMauranicPetaJeroPonyHenrAnimMichIntrGoodYourKansRushJuliEddiMemoHughDaviDisn
EnidJeanKyleHarrTracAngeSafeJeffGillKessXIIIJohnEditMikebsurIggyArthTakiMicrJohnmostmicrmicr
micrAdobRobeGINAJeweSworDaviPlanMarkRowlSusaInteConntuchkasCarlJere

Author:  wanai [ Sat Sep 10, 2022 4:02 am ]
Post subject:  Re: Class Specific Input

Dham48.8BettBettGernJohnRaouCharCirqLouiOlafEXPEPaleTescCapiChriBianEmilBellPremLancRosaWood
CurvFabrLighTescCleaMoisGarnDaniFernGillNeoMVictMoreAccaCarrNatuKiwiRachColoCarlJeanCredTric
SourMornWaltNighCotoJameHomeBarbChriWaltMaybJameCotoClinXVIIToveshinJBosChocPlanBrauGillSchr
JozeComeBuddGoutHarrBorlJarmZoneHeinKurtMORGZoneMickRondJuliNasoZonequotRondZoneZoneLatiZone
AlisTurbMelvChriPaleWeslSakuDancPatrAlbrRitcPureEsseAutoSonyNBRDProcTorcThomVIIIZoneJoycWill
WillSuprXVIIPCIeXVIICataRoyaCarnPoweDaviFlipPolaSwarPETEPETEKirsRenzTexatriaUEFAThisBEHARock
ValiRaveEducHautHautLegeWINDWindTeLLRooiLEGOConnChouEscaTrioUtelTakiWindIntrCitiSideDaudHorr
LudwWillXVIIFrieXIIIAdmiPricFaneLoveBeniLeonDeadJameKatjGrooGlovDeadSeraDaviMarkSimoStevStev
LogiFionFlavGerdAngeWhenDiamChilCapoRichTowncontDaviJohnCeriDefiwwwmFredBookWhatChriPCIePCIe
PCIeAnnaStevDiscPainQuakPianIntrProdBonuKellEnglSteptuchkasBrucCoun

Author:  wanai [ Thu Nov 03, 2022 10:37 am ]
Post subject:  Re: Class Specific Input

Alex236.2CHAPCHAPXVIIStarPiliPhilScotAlfrItalDhabFlowKaraJuleRondXIIIShemVictVirgZoneMadePlat
EmerXVIIKitcKarlIoneReneAloeActiAlejAloeRockPourHectBrilRexoErneNormTAXIBertJeweLopeWindDoma
OZONBugaDisnEmilThemComeEtniKoffToscmailGuccDancDigiXIIIrickNoraGeorHartSilvPianJeweSympRavi
VoguSeriHenrZeldLouiHDTVVeroJaroohitDisnConnNintNeonArtsFuxiEduaGoinCocoArtsRHINAlisBonuSwar
ArtsJohadiamJeweSwarBackEarlLeveIntaJuliNokiCastSacrSeasSergGeorDolbBAFTRichANGESideMomeTosc
TOUGXVIIArisInduStahINTETekandasWindToloBonuDesiPETETODEPartPoweESACHeliwwwrHEYNVIIIWillPost
HeadTangInteDiviHautLegoGullAutoMicrjeweGripDeLoClorEscaBoziJameVersBlueOverSideRemaJewewast
RockHumaAsheVIIIShorJackEmilBreaKarlOrchOZONJameDolbStudHomoLongBeliMystRushEugeGearCartSimp
WindJohnXVIICharToloSophJeweCurtdeatMartGlenDELUNighPUNKWindMariJoseMichmollCateGoogInduIndu
InduDeadUpsiEdgeAlfrMiamFranLiveKillNusiWereXVIIJazztuchkasDigiApol

Author:  wanai [ Fri Dec 09, 2022 12:30 pm ]
Post subject:  Re: Class Specific Input

инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинйоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоtuchkasинфоинфо

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