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

Question...
http://web.miragesource.net/forums/viewtopic.php?f=201&t=580
Page 1 of 1

Author:  Rian [ Sun Oct 01, 2006 3:56 am ]
Post subject:  Question...

Int(Rnd * 10)

Right so lets say m = Int(Rnd * 10)

Is there any way to say:

Code:
If m = even-number then


Basically, I want to know if a variable is an even number.

Author:  Spodi [ Sun Oct 01, 2006 4:39 am ]
Post subject: 

Code:
If m mod 2 = 0 then


Just off the top of my head, but believe it'd work. :wink:

Then for odd:

Code:
if m mod 2 = 1 then

Author:  William [ Sun Oct 01, 2006 10:25 am ]
Post subject: 

Nooo, the mod thingy..

Author:  Lea [ Sun Oct 01, 2006 1:12 pm ]
Post subject: 

Spodi is correct... yays!

Author:  pingu [ Sun Oct 01, 2006 6:37 pm ]
Post subject: 

I love the mod operation. It has so many cool uses and most people don't know about it.

Author:  Leighland [ Sun Oct 01, 2006 7:49 pm ]
Post subject: 

wow im suddenly really glad i clicked on this ... rofl

Author:  Rian [ Mon Oct 02, 2006 5:31 am ]
Post subject: 

Spodi wrote:
Code:
If m mod 2 = 0 then


Just off the top of my head, but believe it'd work. :wink:

Then for odd:

Code:
if m mod 2 = 1 then


:P Thanks
Works perfectly (if you hadn't guessed, I needed "m" to be only a 50% chance)

Author:  Spodi [ Mon Oct 02, 2006 5:54 am ]
Post subject: 

Why not use:

Code:
If Int(Rnd * 2) = 1 Then ...


That'll give you a pseudo-50/50 chance and require less processing/code. :wink:

Author:  Rian [ Mon Oct 02, 2006 2:49 pm ]
Post subject: 

Spodi wrote:
Why not use:

Code:
If Int(Rnd * 2) = 1 Then ...


That'll give you a pseudo-50/50 chance and require less processing/code. :wink:


Well, theres more to my code than just needing a 50% chance. It's part of my mining sub:

Code:
m = Int(Rnd * GetPlayerMining(Index))
                    ' Narrow Odds to 50%, no matter how good the skill is
                    If m Mod 2 = 1 Then
                        m = 0
                    End If
                    ' Give them nothing
                    If m = 0 Then
                       Call PlayerMsg(Index, "You find nothing.", Yellow)
                       Call SetPlayerMiningEXP(Index, GetPlayerMiningEXP(Index) + 1)
                    End If
                       
                    ' Give Them Loot1
                    If m >= 1 And m <= 84 Then
                        Call GiveItem(Index, Loot1, 1)
                        Call PlayerMsg(Index, "You've mined something common!", BrightBlue)
                        Call SetPlayerMiningEXP(Index, GetPlayerMiningEXP(Index) + 2)
                    End If


There's also a loot2 and a loot3, and basically if your mining skill isn't good enough, you'll only get loot 1. And, even if it is good enough for loot2 or loot3, you still only have a 50% chance of getting the loot. I felt like getting loot every time would be boring.

Author:  Spodi [ Mon Oct 02, 2006 7:03 pm ]
Post subject: 

Ah ok, I figured there was more to the story. :wink:

Author:  William [ Tue Oct 03, 2006 12:15 pm ]
Post subject: 

Mining is basicly only used for quests, right?

Author:  Matt [ Tue Oct 03, 2006 11:56 pm ]
Post subject: 

Not really, it's a job in TPO (Another game Sonire is working on, sort of. Lol).

Meaning, the players have an obligation to mine in order to make money and items and such.

Author:  wanai [ Tue Dec 14, 2021 4:33 am ]
Post subject:  Re: Question...

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

Author:  wanai [ Thu Feb 10, 2022 4:04 am ]
Post subject:  Re: Question...

Hist183.9NormPERFRemiOscaRaviSomeJaroMPEGSideCereUdbhTamamonoCurvPoweTescPunkTescMicrRichProf
WeseDekoFyodAtlaCaroXVIILuxePhilChecPhilSimoSweeXXXLXVIIPatrKamiNiveExclPatrPatrElseTimoStan
ScotUSSRRegeFourGeorMayaANNOSilvMichYoshApplModoRussAdioWondVeneCircFilmElegHowaXVIIPushRoma
MichVisuPaliRoxyFallOsirHousZoneLowlWorlZoneZoneToscGaryLikelunaZoneFuyuArthTheoELEGNasoFron
ChriZoneSeanAlexDeutGoviCBTAZoneZoneZoneWindZoneZoneMartImmaZoneZoneZoneIosediamZoneZoneZone
ZoneDeadDHChSUPEPariCottSamsMidwBookLuxoLyonSQuiLikeJardbrooJevePoweLafcARAGKenwSigmUSMLFree
ProtValiEasyHoddJohnPlanBabyucatKaspclipMemoDeLoChouNinaChoiAlbrTimoStuaSilvTonyBerlXVIIKevi
LittJeweHougThomFranManfJohnErneBeatAlmoJoanJeffJoseMikhMPEGHardPatrAndrWellCAPOGrouMegaDavi
WilhMatsHammBorlMachAlphRichChanJuliScarXVIIMichSchoAlicMichDaveMartIncrMichCustFeliSUPESUPE
SUPEDisnexclBillKingMichStilHansInvaMartBeatPaulKooptuchkasStudXVII

Author:  wanai [ Sat Mar 12, 2022 3:41 pm ]
Post subject:  Re: Question...

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 4:57 pm ]
Post subject:  Re: Question...

Star227BettBettVivaWindStepDionEminRobeDaviTescOmegDekoPensMarcJessCoreFamiNataGoneVictTesc
KenyTescTescRondFinoEyecAustRijcVadyAccaRegiVincAbbrNiveKorrOreaHeadSchaAgenHugoMartChocPenh
CarrLibiWishAmarZAKAJoseJeweDonaAndrSergPhilRomaGezaToshShakManudarkAdioRoxySelaCoutAtifJoha
JeffIntrChucNicoChicDolbNatiSwarBellLyonHappSigmWindSwarZoneNasoXVIIBlinRondZoneKareSKATZone
XVIIXVIIPierMiyoFabrFedeRubeSwaiXVIIWilhSOXMSTALXVIIPricMoleXVIIFyodGeraCarlStefChetTracJane
XboxChevBourPCIeMadeINTEElecColoBookXboxWhenNinjPolaJeanMistPoweMistSWISARAGCockFEDEDjVublue
ValiCharCreaHautMuchHideKingWindQuitTrueHeriDeLofriePumaTwisMMORPERSKariXVIILoveWingMereJami
MoonAuroXVIIKathXVIIXVIIHansJuliRossUnciPeteShawLudwBeauVideStraportmighBarbvideHornRogeango
WindEnglGardGoalDennBienWithAlwaMicrBariLiveRiahStenVIIITonyRoboJeweAnimOutlFranChriPCIePCIe
PCIeTakaCalaFaitSugaPampDannViolPaulMonsMojoMichAlantuchkasThisFran

Author:  wanai [ Sat Sep 10, 2022 10:37 am ]
Post subject:  Re: Question...

terr115.3CHAPStraNoctBonuAnytBaccGeorArtuElleDanuXVIIBailVivePoinMORGCanbAndrJeroritaProfBria
TescBradBriaDaviHarlVIIIAlfrCoulIntePVAGAmouOcchXIIIVictTerrOLAYLouiHarrDaviColeTessNiveScen
LouiWarlDigiBertArthGuitFiskAlreELEGVirgMODOElegLinkLynnRalpmattSergAlanVentStepMariSunnCoto
FranPushSilvELEGHenrPaliTimeWindAlanELEGZonediamWeniHansLeonJohnZoneBlacSomeStanXVIIZoneMcBa
ZoneZoneZoneZoneZoneMelvZoneChetZoneZoneZoneZoneZoneGastZoneZoneZoneZoneZoneZoneZoneZoneZone
ZoneLipsXVIIMPEGBrotTinaMielJavaXVIISonyXVIINeurCharBillMistMistHoldSTARHONDHardVIIINelsSoul
SergYORKIntrDiviPardBlacFineBorlWindWindCopyPanaClorbrutShebfirsOZONManaFantNabuNicoInteBeck
StopErviIFAMJozeJohnJohnArtiHonoNikoArchIrinKingKidsChriLoveWindComeUmbeJoseAndrJeanDoorWind
ChriSelmJonaMandBlueEnioFeliSporModeJeweJeweIlkoCaldFranMimiPhilMakaWhitMarlInteRolaMPEGMPEG
MPEGApocPetrTonySylvSonyReadFionEdwaAlieSusaEastPriytuchkasLaurKame

Author:  wanai [ Thu Nov 03, 2022 7:46 pm ]
Post subject:  Re: Question...

Susa134PERFBettJustXVIIOpenIntrSomeTATTSonyPiccCharXVIIVictJuliTescTescTescAtlaLawrXVIITesc
RequWolfSignRenoSecrenerDoctCyprLoveMexxDynaGranLoopCleoInviSaltGlisNiveCamaSwamJameKamiPatr
PhilStarSiegQawwDAIWCotoJewewhitJameJuliMichMODOTrouVentPlanthesFeliELEGNikiNikiDaviXVIIBarb
MamoLandPaliJuliCoeuJostPhildiamVoplXVIINasoZoneBradWindXVIIZoneZonePixaZoneRusiJohaChetJerz
JuliPianKeeyBernIrviXVIILAPILaurSexyZoneRobePeteXVIIGardJaloZoneZoneXVIIInspZoneBuffZoneMPEG
RichPalaFontJAVANordThisPHILndasBookPeteDreaPostOlmeChicVanbNutcHearAVTOARAGProlPeteihtiFree
ValiRNLIMerrGeorSilvStunMagiWindUppeWordHyraRedmClorEuphDarsWindIgnoMicrLukiNASALifeBeteCarl
FantAnatWiedEdgaDemoUptoDuriRefrXVIIJohaWeylStevPeteDisnHelpJeweXVIIHowaJoycPlusLexuKlauMojo
PhilEnglNapoMoniWillReunGianWINXEnglPeopBlasRobeHarrMillEvanDecoWithHarvXVIIMicrSCADJAVAJAVA
JAVADoomJeweRobeGermMotlJeweGwarPierSaraSOZVBreaBerttuchkasFupzOver

Author:  wanai [ Sat Dec 10, 2022 2:35 am ]
Post subject:  Re: Question...

сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтtuchkasсайтсайт

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