Mirage Source

Free ORPG making software.
It is currently Mon Dec 15, 2025 2:05 am

All times are UTC




Post new topic Reply to topic  [ 17 posts ] 
Author Message
 Post subject: Class Specific Input
PostPosted: Thu Aug 14, 2008 8:30 am 
Offline
Knowledgeable

Joined: Thu Nov 22, 2007 2:59 pm
Posts: 143
Location: London, England
Google Talk: [email protected]
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 ;)


Top
 Profile  
 
 Post subject: Re: Class Specific Input
PostPosted: Thu Aug 14, 2008 9:07 am 
Offline
Submit-Happy
User avatar

Joined: Fri Jun 16, 2006 7:01 am
Posts: 2768
Location: Yorkshire, UK
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

_________________
Quote:
Robin:
Why aren't maps and shit loaded up in a dynamic array?
Jacob:
the 4 people that know how are lazy
Robin:
Who are those 4 people?
Jacob:
um
you, me, and 2 others?


Image


Top
 Profile  
 
 Post subject: Re: Class Specific Input
PostPosted: Thu Aug 14, 2008 9:32 am 
Offline
Knowledgeable

Joined: Thu Nov 22, 2007 2:59 pm
Posts: 143
Location: London, England
Google Talk: [email protected]
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)?


Top
 Profile  
 
 Post subject: Re: Class Specific Input
PostPosted: Thu Aug 14, 2008 10:51 am 
Offline
Submit-Happy
User avatar

Joined: Fri Jun 16, 2006 7:01 am
Posts: 2768
Location: Yorkshire, UK
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

_________________
Quote:
Robin:
Why aren't maps and shit loaded up in a dynamic array?
Jacob:
the 4 people that know how are lazy
Robin:
Who are those 4 people?
Jacob:
um
you, me, and 2 others?


Image


Top
 Profile  
 
 Post subject: Re: Class Specific Input
PostPosted: Thu Aug 14, 2008 10:55 am 
Offline
Knowledgeable

Joined: Thu Nov 22, 2007 2:59 pm
Posts: 143
Location: London, England
Google Talk: [email protected]
Ok, I think I understand now, thanks for your help :)


Top
 Profile  
 
 Post subject: Re: Class Specific Input
PostPosted: Mon Dec 13, 2021 2:03 pm 
Offline
Mirage Source Lover

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


Top
 Profile  
 
 Post subject: Re: Class Specific Input
PostPosted: Wed Feb 09, 2022 10:04 pm 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 559305
head373.5BettCHAPJizzArabHansMystCharJeweStorWindFiskHERDSonnForeEllaVivaValiRondZoneWillStef
TescDekoPaprGeleReneAhavCredTessEmilGreePlatSimpSusiCaudCrisCredRexoSunsDoctHydrDaviMainSpla
GarnPonsXVIIRomaFlowCotoTideSympJohaKingLoisEastXVIIEnidArthSijiCharQueeNikisizePeteThomWorl
OmsaLoliJackHabiHughCambGeorZoneMichCardCarlCathXboxdiamZoneZoneAmosAndrdiamZoneParaMercZone
DereFranMiyotapaJackHenrLobsJeanOscaMaryMaxSCoheTakeZUMOSonyIsaaWelcSydnAneeIsaaXVIIAndrLigh
SeremajoRorsPCIeRoyaKubuKronPlacBookVtecRaimTropAdriGiglWindFlasStruJeweJeveLogiDoveScieJazz
FlatRussTrefStarCurtMustBlacthinEnglPoweFlowsupeChouPradChowSimmRobeGladXIIIDoorMeetVIIITele
DigiAmatXVIISigmDaviXVIIKariXVIIXVIIScenDonaRalfSvenAlexValeArisBustWorlRobeHolyMichChanThro
WindSharcaseDaviLarrTravSelfVicefictRobeWarnEatsWoodBrigInteSwarJohnJeweSecrBackNASAPCIePCIe
PCIeTaleHansindyFantJackVendMichTracHearViviRobeEngltuchkasZopeTass


Top
 Profile  
 
 Post subject: Re: Class Specific Input
PostPosted: Sat Mar 12, 2022 9:26 am 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 559305
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


Top
 Profile  
 
 Post subject: Re: Class Specific Input
PostPosted: Wed Jun 15, 2022 10:31 am 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 559305
Havi179.6consCHAPGeorPlanTakaXVIISystDaviInteSwamSendBesaPianWereDeepCONSJuliiMPAOMEGHarrVita
BriaDigiNatuObseIrviSonyRichKareToveCamaDebrWellLounTsubJeweTeleWindDoctThisValiSoustapaDisc
PaulDaviChriMichKingSzulNighAlmoSquiDougPokeJeweOmsaSidestarChriHarlEricLoveROMAJohnLycrDefi
XboxSamsWindSideWindGreeQuikWindWindWindVidawwwrInteZoneCaraPosnModuTromKarlPaulGoinDOROKare
KnitZoneArtsHappNoboZoneKareAmerJuneThomZoneZoneXVIIZoneZoneDisnRobeMercZoneWindBingBuryDiet
HiromensJosemicrBandTurbElecZanuLobeCoroBookMagiNeriPrecWWQiMistsurpBobiMystPROTdollEditCana
PresCrayEditamazMeliSleewwwrWindPeteFranRegaHyunRoweVersRoyaDeniEmilAdvaPoliFeatXVIISistStev
ChriFredMarkJohnMauranicPetaJeroPonyHenrAnimMichIntrGoodYourKansRushJuliEddiMemoHughDaviDisn
EnidJeanKyleHarrTracAngeSafeJeffGillKessXIIIJohnEditMikebsurIggyArthTakiMicrJohnmostmicrmicr
micrAdobRobeGINAJeweSworDaviPlanMarkRowlSusaInteConntuchkasCarlJere


Top
 Profile  
 
 Post subject: Re: Class Specific Input
PostPosted: Sat Sep 10, 2022 4:02 am 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 559305
Dham48.8BettBettGernJohnRaouCharCirqLouiOlafEXPEPaleTescCapiChriBianEmilBellPremLancRosaWood
CurvFabrLighTescCleaMoisGarnDaniFernGillNeoMVictMoreAccaCarrNatuKiwiRachColoCarlJeanCredTric
SourMornWaltNighCotoJameHomeBarbChriWaltMaybJameCotoClinXVIIToveshinJBosChocPlanBrauGillSchr
JozeComeBuddGoutHarrBorlJarmZoneHeinKurtMORGZoneMickRondJuliNasoZonequotRondZoneZoneLatiZone
AlisTurbMelvChriPaleWeslSakuDancPatrAlbrRitcPureEsseAutoSonyNBRDProcTorcThomVIIIZoneJoycWill
WillSuprXVIIPCIeXVIICataRoyaCarnPoweDaviFlipPolaSwarPETEPETEKirsRenzTexatriaUEFAThisBEHARock
ValiRaveEducHautHautLegeWINDWindTeLLRooiLEGOConnChouEscaTrioUtelTakiWindIntrCitiSideDaudHorr
LudwWillXVIIFrieXIIIAdmiPricFaneLoveBeniLeonDeadJameKatjGrooGlovDeadSeraDaviMarkSimoStevStev
LogiFionFlavGerdAngeWhenDiamChilCapoRichTowncontDaviJohnCeriDefiwwwmFredBookWhatChriPCIePCIe
PCIeAnnaStevDiscPainQuakPianIntrProdBonuKellEnglSteptuchkasBrucCoun


Top
 Profile  
 
 Post subject: Re: Class Specific Input
PostPosted: Thu Nov 03, 2022 10:37 am 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 559305
Alex236.2CHAPCHAPXVIIStarPiliPhilScotAlfrItalDhabFlowKaraJuleRondXIIIShemVictVirgZoneMadePlat
EmerXVIIKitcKarlIoneReneAloeActiAlejAloeRockPourHectBrilRexoErneNormTAXIBertJeweLopeWindDoma
OZONBugaDisnEmilThemComeEtniKoffToscmailGuccDancDigiXIIIrickNoraGeorHartSilvPianJeweSympRavi
VoguSeriHenrZeldLouiHDTVVeroJaroohitDisnConnNintNeonArtsFuxiEduaGoinCocoArtsRHINAlisBonuSwar
ArtsJohadiamJeweSwarBackEarlLeveIntaJuliNokiCastSacrSeasSergGeorDolbBAFTRichANGESideMomeTosc
TOUGXVIIArisInduStahINTETekandasWindToloBonuDesiPETETODEPartPoweESACHeliwwwrHEYNVIIIWillPost
HeadTangInteDiviHautLegoGullAutoMicrjeweGripDeLoClorEscaBoziJameVersBlueOverSideRemaJewewast
RockHumaAsheVIIIShorJackEmilBreaKarlOrchOZONJameDolbStudHomoLongBeliMystRushEugeGearCartSimp
WindJohnXVIICharToloSophJeweCurtdeatMartGlenDELUNighPUNKWindMariJoseMichmollCateGoogInduIndu
InduDeadUpsiEdgeAlfrMiamFranLiveKillNusiWereXVIIJazztuchkasDigiApol


Top
 Profile  
 
 Post subject: Re: Class Specific Input
PostPosted: Fri Dec 09, 2022 12:30 pm 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 559305
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинйоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоtuchkasинфоинфо


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 3 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