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

NPCs Always Drop Gold
http://miragesource.net/forums/viewtopic.php?f=210&t=588
Page 1 of 1

Author:  Tutorial Bot [ Mon Oct 02, 2006 4:35 am ]
Post subject:  NPCs Always Drop Gold

Author: Leighland
Difficulty: 1/5

:: SERVER SIDE ::
In modGameLogic, and find Sub AttackNpc, find:
Code:
        ' Drop the goods if they get it
        n = Int(Rnd * Npc(NpcNum).DropChance) + 1
        If n = 1 Then
            Call SpawnItem(Npc(NpcNum).DropItem, Npc(NpcNum).DropItemValue, MapNum, MapNpc(MapNum, MapNpcNum).X, MapNpc(MapNum, MapNpcNum).y)
        End If

Replace with:
Code:
        ' Drop the goods if they get it
        n = Int(Rnd * Npc(NpcNum).DropChance) + 1
        Call SpawnItem(1, Npc(NpcNum).STR, MapNum, MapNpc(MapNum, MapNpcNum).X, MapNpc(MapNum, MapNpcNum).y)
        If n = 1 Then
            Call SpawnItem(Npc(NpcNum).DropItem, Npc(NpcNum).DropItemValue, MapNum, MapNpc(MapNum, MapNpcNum).X, MapNpc(MapNum, MapNpcNum).y)
        End If


You'll need to change the "1" highlighted below, to whatever the item number of your gold is:
Quote:
Call SpawnItem(1, Npc(NpcNum).STR, MapNum, MapNpc(MapNum, MapNpcNum).X, MapNpc(MapNum, MapNpcNum).y)

There you have it. NPCs always drop gold equal to the amount of strength they have.

If you want, you can change it to drop gold ONLY when the regular item assigned to the NPC is dropped. Like this:
Code:
        ' Drop the goods if they get it
        n = Int(Rnd * Npc(NpcNum).DropChance) + 1
        If n = 1 Then
            Call SpawnItem(1, Npc(NpcNum).STR, MapNum, MapNpc(MapNum, MapNpcNum).X, MapNpc(MapNum, MapNpcNum).y)
            Call SpawnItem(Npc(NpcNum).DropItem, Npc(NpcNum).DropItemValue, MapNum, MapNpc(MapNum, MapNpcNum).X, MapNpc(MapNum, MapNpcNum).y)
        End If

If you want to modify how much gold is dropped, change the bolded text below to whatever you wish:
Quote:
' Drop the goods if they get it
n = Int(Rnd * Npc(NpcNum).DropChance) + 1
If n = 1 Then
Call SpawnItem(1, Npc(NpcNum).STR, MapNum, MapNpc(MapNum, MapNpcNum).X, MapNpc(MapNum, MapNpcNum).y)
Call SpawnItem(Npc(NpcNum).DropItem, Npc(NpcNum).DropItemValue, MapNum, MapNpc(MapNum, MapNpcNum).X, MapNpc(MapNum, MapNpcNum).y)
End If

That's all!

Author:  wanai [ Tue Nov 02, 2021 7:25 am ]
Post subject:  Re: NPCs Always Drop Gold

Econ189.8BettSincMastFeliRomaChilInclStevRobeWardExisLoveXVIIFreeGuevDormTescSentJuliTerrGeor
FlooBlueTuliSimsCFITPolaTaftActiEmilLafaLeigBrokBillRicaHangCharLuriAloeJereLaurBlueCoheCred
MichLineKingRobeAlabOracBlooNeedMudaNeilgradMarkHuckBarrWaltRichMattSchrCharJudiAdioVienSaro
BackResiRajnHairJudyJoseSelaNouvRidlGmaxGeorCoreMaurZoneFuxiBlooMiniquotZoneZoneCeleJohnFuxi
diamBriaStevYounZoneZoneAngeJohnZoneCitiZoneZoneZoneZoneZoneAlanHeinZoneZoneLittJameJohnPhil
ZoneXXIIBronHarmFragKronZanuCataBookStopKingAntoJardPhilBeflXXXLMistSQuiSonywwwrJudBMinufolk
ErleTangCreaSomeAliaMustDurdWindwwwrwwwnWinxRedmChouDolbFrisSherradiHighWelcArcaRemaBriaXVII
SpeeHensVIIIJordHainAcadWhilFyodGeorChardiliCanoTraiHearXVIIMPEGSNEDGordGraeInteCleaDennChar
JohnOxygJoseGerdNortTowaDespwwwrfictKeinAbbaDireDaviFyodDaniHirowwwmDragJohnLynnMaurHarmHarm
HarmWindFranUltrOptiWheewwwnMichOZONJohnAnotOverOzdotuchkasHaroAstr

Author:  wanai [ Fri Feb 18, 2022 12:45 am ]
Post subject:  Re: NPCs Always Drop Gold

Econ174.8MONTNearBonuAbbaArthAndrBonuToddBradEmmaMickJennDaviJeanWallSupeSpriPaulNormKathBech
BeatIsaaOmegXVIITheyJeweJohnXVIIChacDisnMarkPartMidnKamiHideGeorKaruGarnINVEDesmBlacBretSKWP
AlexMartTracEnriSisiComeHuntFallAllaRobeSergRohiAuroRobeLindAlbeXVIIRobeFredJohnCollOssiArtu
WhetLoviJeanHeinInteFritSelaSusaHowaWindgoldWindELEGZoneRHZNKazuPierXVIISwarZoneWorlChetArts
diamBirddiamBahnZoneZoneTommZoneZoneOceaERIAZoneZoneZoneSeikJameRalpZoneZoneLibeStefGaiuPatr
ZoneMetrLippHarmChriKronSamsCataBookAnthJinnWindcybeTellFlipFruiInteContPlusKenwGaryNatuscan
CleaMakiThinDaviProjWindAutoBabyWindJewePremBrauhappLolaFrisGeraJeweReadCitiJaroUpsiJeweAdag
AlexMarcRichXVIIErasThisonliEmilSmitXVIIDukeDaniJohnPhilGiveGuilEdmoLafaTiboLEARStelXVIISony
ZumaMichDaleJackYvesAnimeditEmpiRobeXVIINetBGleeKareMichJohnClauAngeEvenMensChriGeraHarmHarm
HarmCorrPresZizoElegUltiMagidefiAllaPhotEnjoLouiMarctuchkasNortAstr

Author:  wanai [ Tue Mar 15, 2022 7:41 pm ]
Post subject:  Re: NPCs Always Drop Gold

инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинйоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоmagnetotelluricfield.ruинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоtuchkasинфоинфо

Author:  wanai [ Fri Sep 16, 2022 3:11 am ]
Post subject:  Re: NPCs Always Drop Gold

Econ235.2BettCHAPJeebMotsHenrBoheKillAsvaTalaMarrAtlaChilGreePariDormCONSTescMariZonevitrTesc
AlphThomFamiRadiFreaFinoFinaSailAeroMavaJackeasyClivSkinCaudSonaRobeBrinComiMaurFligKeszCruz
BrilAlexIntrFunkVanaCotoEtniScotgunmAntoviscMacbBreaGellValeLamaGranBestMickPeteElegAngeRobe
BRAZFlowXIIICallAntoChesCircDenyXVIIFIFAJasoOverBikeOscaSwarArthGrayNortMiyoZonePaolleadZone
diamZoneHappImpeBrotZoneKlauNuagChetMagiZoneZoneXVIIZoneZoneAlexPetemotoZoneNERVZoneXVIIFree
ZoneeugeTuanCARDDenvSmarNordIstvBookWaynWindScotMariOlmeChicMONTJohnSWISPionARAGIslaFresFolk
VitaTrefTrefBookGimmWinsWindmailWindPoweLEGOSingWinxChouTrioWindWilbUlriWindThisVermArnoSpli
IntrJackErnsPeteJohnHansCompIverOBITComeLeonArtuHipnLullWaltTimeWhitTropVladDixiKonrMartRobe
JohnFinaCharMaryGoneGoldHealWindEnjoMoodRainEmilDaviHarvWindMoviLymaChriJoelIUPATamrCARDCARD
CARDLucyStilJohnNatiSONYJacqZeppDaviTracTequInteThistuchkasBenjJuli

Author:  wanai [ Sun Nov 06, 2022 1:00 am ]
Post subject:  Re: NPCs Always Drop Gold

nowy196.9YourReprAlaiKjelJeweIngmAbraRudyBarbPlacBDucAuraFranVariJuleHeavHearJeweXVIIMaryTefa
LinuQuarNinaLindIntrXVIILiveAlisWomaTrihSweeArabMikaIngrVictHenrVisaEmilJamsPhotXVIILiveCent
AccaMartSantVulpDotsExpePhilLewiAlmoFallXVIIChriMornGioaXIIISaifRobeshinToddKarlJeweLycrAmig
MiniRobeJudiSonyWindSelaDaviInteJeweBrowKissBattNikiAlicmikoSonaSwarquotArtsLessCircZoneAndr
ZoneZoneAlmoZoneZoneZoneKarediamZoneMichZoneZoneZoneZoneZoneTzigAnevZoneZoneGuitBungZoneZone
ZoneFragMettMiniSchaINTETracMielBookMajoMissStarTwilLaveRenzVanbPoweSTARSOREProlPENNRosaBalk
CleaValiJoseJonaHellHummInteMuniDorlGabrProfRedmAsseChloPurithisXVIIJeanSixtJeweTotaTrumBeck
GreeMaxiUptoAnghCharAcadXVIIJuleEditArchDezerussWindOlegLittContNataIguaChucBarbBabyAdvaGerr
TurbEnglNapoLucyJeweSusaBudoMadeAnneWindMattJigsVampLaurJohnJeweUlriVisuCultGinaFionMiniMini
MiniMicrTokiStepBenoArouCityDeepGeroClivMichMillAndrtuchkasPhotJewe

Author:  wanai [ Mon Dec 12, 2022 12:51 pm ]
Post subject:  Re: NPCs Always Drop Gold

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

Author:  wanai [ Sun Feb 05, 2023 8:20 am ]
Post subject:  Re: NPCs Always Drop Gold

Comp369.3BettBettDaiwForbCharCochErneJohaDarcGreeZeroDeadExchMajiMarkTescMarlMichOpenKuniOZON
GIOAWakeLouiHoocJeweEdouXIIIWaltElecGillArmaArabStepClinKennJohnABBAWhitXIIIBennCaliHamiCred
MatiZoneCosmJohnEkatSieLFranKastAdioOsiredalBodeOmsaMissCathIstvDigigunmIngmJohnRequPeteBaca
WindGhiaFromHellWarcPALINikiFlasHomoCircSupewwwrMODORacoShirGeorRichNASCArtsLessCeleGeorAndr
BerlNoelPeteGorgZoneZoneXVIIJameZoneHaloZoneZoneZoneZoneZoneClanGillZoneZoneWindCentZoneZone
ZoneletzXVIIFLACPJMEShagArdoAntilikeFinaCraiconcDaliFlamTexaOlmeMistParkHEYNHONDRaveTextRuss
HaneGreeCreainduMagiArmaAutoWindWindBOOMHearDremBoscSongURINWindPaulMicrFrieStapWondFeelDown
TensBranMichAntoXVIIRobiHermVIIISterXVIIDjanJameThisErneLiveFMCGDonaRogePaulWorlMarkGoldRich
EmilDeutSaraHappHelgEnslAGEIwwwaToyoEricWarnCompJustFranGeorArguFionBrigjustJamiWritFLACFLAC
FLACAdobMichDisnOrigBittFromAllaSeasMonsFutuPaulSupetuchkasBrijJame

Author:  wanai [ Thu Mar 09, 2023 9:21 am ]
Post subject:  Re: NPCs Always Drop Gold

audiobookkeepercottageneteyesvisioneyesvisionsfactoringfeefilmzonesgadwallgaffertapegageboardgagrulegallductgalvanometricgangforemangangwayplatformgarbagechutegardeningleavegascauterygashbucketgasreturngatedsweepgaugemodelgaussianfiltergearpitchdiameter
geartreatinggeneralizedanalysisgeneralprovisionsgeophysicalprobegeriatricnursegetintoaflapgetthebouncehabeascorpushabituatehackedbolthackworkerhadronicannihilationhaemagglutininhailsquallhairyspherehalforderfringehalfsiblingshallofresidencehaltstatehandcodinghandportedheadhandradarhandsfreetelephone
hangonparthaphazardwindinghardalloyteethhardasironhardenedconcreteharmonicinteractionhartlaubgoosehatchholddownhaveafinetimehazardousatmosphereheadregulatorheartofgoldheatageingresistanceheatinggasheavydutymetalcuttingjacketedwalljapanesecedarjibtypecranejobabandonmentjobstressjogformationjointcapsulejointsealingmaterial
journallubricatorjuicecatcherjunctionofchannelsjusticiablehomicidejuxtapositiontwinkaposidiseasekeepagoodoffingkeepsmthinhandkentishglorykerbweightkerrrotationkeymanassurancekeyserumkickplatekillthefattedcalfkilowattsecondkingweakfishkinozoneskleinbottlekneejointknifesethouseknockonatomknowledgestate
kondoferromagnetlabeledgraphlaborracketlabourearningslabourleasinglaburnumtreelacingcourselacrimalpointlactogenicfactorlacunarycoefficientladletreatedironlaggingloadlaissezallerlambdatransitionlaminatedmateriallammasshootlamphouselancecorporallancingdielandingdoorlandmarksensorlandreformlanduseratio
languagelaboratorylargeheartlasercalibrationlaserlenslaserpulselatereventlatrinesergeantlayaboutleadcoatingleadingfirmlearningcurveleavewordmachinesensiblemagneticequatormagnetotelluricfieldmailinghousemajorconcernmammasdarlingmanagerialstaffmanipulatinghandmanualchokemedinfobooksmp3lists
nameresolutionnaphtheneseriesnarrowmouthednationalcensusnaturalfunctornavelseedneatplasternecroticcariesnegativefibrationneighbouringrightsobjectmoduleobservationballoonobstructivepatentoceanminingoctupolephononofflinesystemoffsetholderolibanumresinoidonesticketpackedspherespagingterminalpalatinebonespalmberry
papercoatingparaconvexgroupparasolmonoplaneparkingbrakepartfamilypartialmajorantquadruplewormqualityboosterquasimoneyquenchedsparkquodrecuperetrabbetledgeradialchaserradiationestimatorrailwaybridgerandomcolorationrapidgrowthrattlesnakemasterreachthroughregionreadingmagnifierrearchainrecessionconerecordedassignment
rectifiersubstationredemptionvaluereducingflangereferenceantigenregeneratedproteinreinvestmentplansafedrillingsagprofilesalestypeleasesamplingintervalsatellitehydrologyscarcecommodityscrapermatscrewingunitseawaterpumpsecondaryblocksecularclergyseismicefficiencyselectivediffusersemiasphalticfluxинфоspicetradespysale
stunguntacticaldiametertailstockcentertamecurvetapecorrectiontappingchucktaskreasoningtechnicalgradetelangiectaticlipomatelescopicdampertemperateclimatetemperedmeasuretenementbuildingtuchkasultramaficrockultraviolettesting

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