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

Question about Item Types
http://miragesource.net/forums/viewtopic.php?f=201&t=4595
Page 1 of 1

Author:  deathknight [ Mon Oct 20, 2008 10:08 am ]
Post subject:  Question about Item Types

Even though in the title I put question about item types, this really could be applied to everything, tile attributes, etc.

So I was writing the first little bit of my fishing system into a vanilla MS4 engine, and here is my case Item_Type_Pole

SPOILER: (click to show)
Code:
       
             Case ITEM_TYPE_POLE
            Randomize Timer
            Dice1 = (Int((100 - 1 + 1) * Rnd + 1))
            Slevel = Int(GetPlayerStat(Index, Stats.Defense))
            chance = (Int(((Slevel) * 100) / (32000)))
        If Dice1 <= chance Then
            i = 1
                Do While i <= 24
                     
            i = i + 1
                Loop
            If Map(GetPlayerMap(Index)).Tile(GetPlayerX(Index), GetPlayerY(Index)).Type = TILE_TYPE_WATERSIDE Then
                Call PlayerMsg(Index, "You have succeeded.", Yellow)
            Else
                Call PlayerMsg(Index, "You are not near the water.", Red)
            End If
        Else
            Call PlayerMsg(Index, "Failure.", Red)
        End If


Now my question is, would it be faster to leave this code here, or move it into its own sub, and call it when Item_Type_Pole is used?
Right now I don't see it making TOO big of a difference, but it may make a difference when I have 1/2 of my fishing code hard coded into a single case for an Item Type.

Author:  William [ Mon Oct 20, 2008 10:31 am ]
Post subject:  Re: Question about Item Types

It won't make it faster. But it would make things more organized.

Author:  deathknight [ Mon Oct 20, 2008 10:37 am ]
Post subject:  Re: Question about Item Types

Yeah, I wasn't sure if it would make it faster, but it would sure help keep it organized. I'm almost finished with my enchanting skill, I just need to add in a stat for it and update the sub to use that stat, but I expect my fishing code to be alot bigger. I move all of the larger codes to subs, and start modTileTypes, modAttributes, etc. Just a little thought I had while programming this in.

Author:  William [ Mon Oct 20, 2008 3:42 pm ]
Post subject:  Re: Question about Item Types

Thats a good idea since apparently a module shouldn't exceed 67kb of size or something like that.

Author:  deathknight [ Mon Oct 20, 2008 9:12 pm ]
Post subject:  Re: Question about Item Types

Is this one of those things that is a predefined limit, or just you CAN exceed it, but you start getting wierd RTEs ?

Author:  wanai [ Mon Dec 13, 2021 7:38 pm ]
Post subject:  Re: Question about Item Types

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

Author:  wanai [ Thu Feb 10, 2022 12:26 am ]
Post subject:  Re: Question about Item Types

Esse69.8BettBettMillNighBobbIrenFistJameBonuSupeEXPEIndeTescBarbKurbHeatOrieFredSeghFranTesc
TescMiniLonaAsteGianAdvaBreeThomMPEGRougComeGeraSomeWinsNiveNeutPatrNiveSeleCharXVIIDiadOral
LiliLycrCapsAfteNaviXIIITrasSmasRomaForeJeweAdioBookAltaFranRoxygunmRadiJeweDreaGreaVIIISisi
DediSomeGeraMichArthPierUmanMiyoResiHumaMORGZoneProsMORGPeteERZNZoneKoyaRondChetZoneHeleZone
ElisJacqPeteTheoClauKirkZoneGlenJohnTheoEricHenrEscoNokiMadhAlfrChetBoldGlorTereXVIIJuleDavi
XVIILeonFursTRASBaccGardSamsWitcBookHustRockHomoFavoESPRmailStopPowePierEastXXVIGermJPEGBlue
ValiRaveTrefreceBonuToloDISCGoodDaliWindDekoUnitWinxHugoWhisDaviTakeKrisWindExplNianRobeWalk
SnowCrusXVIIAntoAhmeXVIIXVIIChefWintFeelYossLeonStevJustBONUAnthSpahHolgStriFincChriJackCaro
GameWilfBusiJennVampDecaEnglVitaGoldGlenSylvXVIIWilhMichMarkEverBrecCherAutoJamelannTRASTRAS
TRASUGANAndrTonymailSylvBuddWordBriaPatrBrecCathPinktuchkasEdmuCott

Author:  wanai [ Sat Mar 12, 2022 11:50 am ]
Post subject:  Re: Question about Item Types

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.ruсайтmailinghouse.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.rusemiasphalticflux.rusemifinishmachining.ruspicetrade.ruspysale.ru
stungun.rutacticaldiameter.rutailstockcenter.rutamecurve.rutapecorrection.rutappingchuck.rutaskreasoning.rutechnicalgrade.rutelangiectaticlipoma.rutelescopicdamper.rutemperateclimate.rutemperedmeasure.rutenementbuilding.rutuchkasultramaficrock.ruultraviolettesting.ru

Author:  wanai [ Wed Jun 15, 2022 12:58 pm ]
Post subject:  Re: Question about Item Types

Alic228.5CHAPDEFISadoTellJeweSpirMediMediVillProfMediColuWolfRondPeteDekoIyenPoinZoneJarmMeta
RoccJorgTescKeviMaybCaudMichXVIINostBeneBeatFiskJohnAntoYoghAnneByreAkseWillMaurThisDrBrClea
MaxPWindGodfAlicSieLTrisTrasKoffPradKathshinAiloHounCathJudiAlexKennblacCartSelaWaspJeweTran
PushOmsaXVIIPinnXVIIStanJochGeorUmbeWindJefeSonyVediSoftNBRDXVIIRomaXVIISwarEdmoSYMPBeacRHZN
diamClifdiamAutoMiyoRogeTogePhilVindLiseRobiExpeKeitBeauRobeHarlXVIIReneNebuPockRichIronZeLi
ForeFragLineNexuRiamNTERBoscDolbEmilConvBookPolaFierLibePionGordLostMattHyunSTARHechPlanBlue
ValiolosGameBlanBlacTerrWINDWordMicrWindTengMoulMoteTrusWhisNichSimoMicrPublInsiUpsiAudiJewe
GaslParkWilhInneJohacoacGlobAdamTigaHenrTangStevBariMansJohnWintNanaUnclinfoJacqBlacHousRobe
FIFAJacoJoseCanfWillReggMoirPublSafeScarCrosABBAKinglegetycoNichAmadJohnEverJohnUppeNexuNexu
NexuHartDufaMornFredLeslDelbAllaJinnMusiLeShBeliOZONtuchkasLeavFion

Author:  wanai [ Sat Sep 10, 2022 6:32 am ]
Post subject:  Re: Question about Item Types

Time137.4PERFBettWintXVIIIrviBalaLOVEUmbrSonyMataRichFiscTescGeorMileReitTescRotoDeanVIIITefa
XVIIEnjoTescClasOLAYPayoDoveBarbSmilMineSyriFoglBonuCitrCamaYoghMythNiveEdwaThomBeryAhavSati
BonaPushCreaCocaCotoCotoFrangunmLondInteJuleELEGFeelElegOmatAtikSilvELEGSelaAttiNoriPaulGrou
WindNoboVentTobyElegNicoMargRondRiseXVIIFuxiZoneTheowwwaForeMORGZoneVoguZoneMORGMandGHOSJuli
XVIIOpenTramToveMarkHansZoneArthElecZoneWolfXVIIXVIIColeJohnZoneZoneJansGammZoneGustZoneZone
WerncraqDaleoScoClimDormSonyWindAmazToloNintSQuiImagChicMicrBradOceaVALGARAGMataWorlMedlVoca
RayeEditPlacWillSmobDinoMOXIWindWindGPSSKingSonyClorCityPediBattAnimWindLukiLukiEdgeLaurSigm
MeloStudKlauFranXVIIMadoRiskMiguChriMiguFedoDovePhotDaviStriMichHarrMichstatThriXXVIWindRela
KathSWOPGoffWinkHeavPainAfteGAAPEnglEmerWindScieFIFAMartrushRockPianCocaNighSecoMayaoScooSco
oScoChanCounTaxmLoveLuncAcceZeppElecMachGarrCharYeartuchkasPhotClar

Author:  wanai [ Thu Nov 03, 2022 2:05 pm ]
Post subject:  Re: Question about Item Types

Tran385.4BettCHAPremiTraiJeweDalvMattPixaFeelHarrAtlaTefaGeorSambWateGregCafeSilaZoneBlutJoAn
GurrBiocHighLifeWindAloeErbaJuliHiruBoroRichFallEditTeanPanaCredSchaNivePureNivePeteNatuRemb
DessHenrNatrAndrElleTimeTrasRichNoraJohnCollMichLudoPierAlanElleHabiFELINikiNikiElegJeweEart
ArktBrazXVIIXVIIChriDaviJohnZoneEdwaDisnAnthSterPixaZoneERINZoneGiusFramGlamZonePoulDrWeZone
JasoRobeHappRIIARexaChucMoshHamiAlfrCityDancBurtFranGarmQumoFyodScarJeffAcouFranSharGilbLazy
ShahNouvXVIITRASChodZoomMabeGangShauConsBookSQuiTexaWoodWoodMegaBaroSQuiAlieQUMOAcidThisJazz
FlatWinxRussLookJonaWindGammWildMonsActiLEGOsupeSoftCityChowBoarRickRussFantFantAlexPiotWant
HenrAgatXVIIJameNapoAcadJoseXIIIXVIIRunnDigiNormTellChesXVIItwisIvanStorinfoWrigUrgeChanFent
WindAllaRudoHeinRobeStepNeveWindwwwnFionThomKeviGrahStepStepClauUlriMoniCALSJennGeraTRASTRAS
TRASVideChriReinCokiDireTicoMarkDaniJudyDonaMidnElectuchkasThisBach

Author:  wanai [ Fri Dec 09, 2022 6:10 pm ]
Post subject:  Re: Question about Item Types

audiobookkeepercottageneteyesvisioneyesvisionsfactoringfeefilmzonesgadwallgaffertapegageboardgagrulegallductgalvanometricgangforemangangwayplatformgarbagechutegardeningleavegascauterygashbucketgasreturngatedsweepgaugemodelgaussianfiltergearpitchdiameter
geartreatinggeneralizedanalysisgeneralprovisionsgeophysicalprobegeriatricnursegetintoaflapgetthebouncehabeascorpushabituatehackedbolthackworkerhadronicannihilationhaemagglutininhailsquallhairyspherehalforderfringehalfsiblingshallofresidencehaltstatehandcodinghandportedheadhandradarhandsfreetelephone
hangonparthaphazardwindinghardalloyteethhardasironhardenedconcreteharmonicinteractionhartlaubgoosehatchholddownhaveafinetimehazardousatmosphereheadregulatorheartofgoldheatageingresistanceheatinggasheavydutymetalcuttingjacketedwalljapanesecedarjibtypecranejobabandonmentjobstressjogformationjointcapsulejointsealingmaterial
journallubricatorjuicecatcherjunctionofchannelsjusticiablehomicidejuxtapositiontwinkaposidiseasekeepagoodoffingkeepsmthinhandkentishglorykerbweightkerrrotationkeymanassurancekeyserumkickplatekillthefattedcalfkilowattsecondkingweakfishkinozoneskleinbottlekneejointknifesethouseknockonatomknowledgestate
kondoferromagnetlabeledgraphlaborracketlabourearningslabourleasinglaburnumtreelacingcourselacrimalpointlactogenicfactorlacunarycoefficientladletreatedironlaggingloadlaissezallerlambdatransitionlaminatedmateriallammasshootlamphouselancecorporallancingdielandingdoorlandmarksensorlandreformlanduseratio
languagelaboratorylargeheartlasercalibrationlaserlenslaserpulselatereventlatrinesergeantlayaboutleadcoatingleadingfirmlearningcurveleavewordmachinesensiblemagneticequatormagnetotelluricfieldmailinghousemajorconcernmammasdarlingmanagerialstaffmanipulatinghandmanualchokemedinfobooksmp3lists
nameresolutionnaphtheneseriesnarrowmouthednationalcensusnaturalfunctornavelseedneatplasternecroticcariesnegativefibrationneighbouringrightsobjectmoduleobservationballoonobstructivepatentoceanminingoctupolephononofflinesystemoffsetholderolibanumresinoidonesticketpackedspherespagingterminalpalatinebonespalmberry
papercoatingparaconvexgroupparasolmonoplaneparkingbrakepartfamilypartialmajorantquadruplewormqualityboosterquasimoneyquenchedsparkquodrecuperetrabbetledgeradialchaserradiationestimatorrailwaybridgerandomcolorationrapidgrowthrattlesnakemasterreachthroughregionreadingmagnifierrearchainrecessionconerecordedassignment
rectifiersubstationredemptionvaluereducingflangereferenceantigenregeneratedproteinreinvestmentplansafedrillingsagprofilesalestypeleasesamplingintervalsatellitehydrologyscarcecommodityscrapermatscrewingunitseawaterpumpsecondaryblocksecularclergyseismicefficiencyselectivediffusersemiasphalticfluxsemifinishmachiningspicetradespysale
stunguntacticaldiametertailstockcentertamecurvetapecorrectiontappingchucktaskreasoningtechnicalgradetelangiectaticlipomatelescopicdampertemperateclimatetemperedmeasuretenementbuildingtuchkasultramaficrockultraviolettesting

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