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

err pokemon battle system code.
http://miragesource.net/forums/viewtopic.php?f=201&t=2630
Page 1 of 1

Author:  arno321 [ Wed Sep 05, 2007 8:09 pm ]
Post subject:  err pokemon battle system code.

is this correct
o_definer
Code:
global.identity=0; //SPRITE INDEX OF ENEMY

//
global.battled=1
sound_loop(snd_battle)
room_goto(global);


o_battlecontrol
Code:
CURRENT_ENEMY=1;
CURRENT_SELF=1;
CURRENT_SPRITE=get_sprite(global.enemy[CURRENT_ENEMY]);
CURRENT_SELFSPR=get_sprite(global.our[CURRENT_SELF]);
if variable_global_exists("nointro")==false or variable_global_get("nointro")==false
{
global.killed=0;
global.dead=0;
global.intro=true;
INTROPOS=0;
}
//getting global.turn
global.turn=0;
global.attacking=0;
global.canattack=true;
evisible=true; // if the enemy pokemon is visible
pvisible=true; // if the player pokemon is visible
//^(both used for blinkign when attacking)
blinks=-1;
blinks2=-1;
dead="";
current_y=0;
enemy_y=0;
enemy_h=64;
act="";
//
if variable_global_exists("nointro")
{
 if global.nointro=true
 {
  global.intro=false;
  global.nointro=false;
  CURRENT_SELF=global.nointro[2];
  CURRENT_ENEMY=global.nointro[3];
  CURRENT_SPRITE=get_sprite(global.enemy[CURRENT_ENEMY]);
  CURRENT_SELFSPR=get_sprite(global.our[CURRENT_SELF]);

 }
}

  QRST=string(variable_global_array_get("nointro",4));
  if QRST!="0" and string_length(QRST)>=2
  {
   instance_create(0,0,o_attacker);
    with o_attacker
    {
    attack="Useanitem";
    visible=false;
    //import info about my attack
    my_type=real(get_attack_type(attack));
    my_speed=real(get_attack_speed(attack));
    my_strength=real(get_attack_strength(attack));
    my_accuracy=real(get_attack_accuracy(attack));
    my_attacktype=get_attack_attacktype(attack);
    event_perform(ev_other,ev_user1);
    event_perform(ev_other,ev_user2);
    ///ALL AI ACTIONS ABOVE THIS LINE
    //get who is quicker
    event_perform(ev_other,ev_user3);
    instance_destroy();
    }
   event_perform(ev_other,ev_user0)
  }


o_selector
Code:
width=0;
height=0;
global.imattacking=false;


o_attacker
Code:
pos=1;
current=o_battlecontrol.CURRENT_SELF;
now=4;
repeat 4
{
if global.myattack[current,now]==""
{
 number=now-1;
}
now-=1;
}

if variable_local_exists("number")==false
{
 number=4;
}
sleep(room_speed);
screen_redraw();
keyboard_clear(ord("Z"));



animation
Code:
instance_destroy();
with(o_battlecontrol)
{
 event_perform(ev_other,o_battlecontrol.event);
}
sound_play(snd_attack)


Pokemoncontrol
Code:
T=1;

repeat(global.our_total)
{
 spr[T]=get_sprite(global.our[T]);
 T+=1;
}

position=1;


Animator
Code:
if sprite_index=0 then visible=false;
if sprite_index!=0{
draw_sprite(sprite_index,image_index,x,y);
}


o_pkmnitemscontrol
Code:
T=1;

repeat(global.our_total)
{
 spr[T]=get_sprite(global.our[T]);
 T+=1;
}

position=1;


Winbattle
Code:
sound_stop(snd_battle);
sound_loop(snd_battlewin);
alarm[0]=ceil(room_speed+room_speed)
image_alpha=0


o_itemscontrol
Code:
global.nointro=true;
width=0;
height=0;
yplus=0;





dunno if this is correct its from a friend who gave it to me

Author:  Rezeyu [ Wed Sep 05, 2007 10:17 pm ]
Post subject:  Re: err pokemon battle system code.

Correct for.. what?

Is that C#?

Author:  arno321 [ Thu Sep 06, 2007 1:53 pm ]
Post subject:  Re: err pokemon battle system code.

my friend says its with C# or VB he doesnt know lol he just said he found it on website :roll:

Author:  JohnY [ Thu Sep 06, 2007 3:09 pm ]
Post subject:  Re: err pokemon battle system code.

It's not VB6.

Author:  Dragoons Master [ Fri Sep 07, 2007 2:22 am ]
Post subject:  Re: err pokemon battle system code.

It's not VB nor C/C++/C#...

Author:  Rezeyu [ Fri Sep 07, 2007 3:55 am ]
Post subject:  Re: err pokemon battle system code.

But it uses {}, I thought mostly C languages use those. Does Python use them?

Author:  Dragoons Master [ Fri Sep 07, 2007 4:26 am ]
Post subject:  Re: err pokemon battle system code.

It looks a lot like C/C++ but look at this:
Code:
if variable_global_exists("nointro")==false or variable_global_get("nointro")==false
{
C/C++ does not use or, it uses ||and the if need to be if().
It looks like someone tried to code C/C++ but wasn't that successful...

Author:  Rezeyu [ Fri Sep 07, 2007 4:55 am ]
Post subject:  Re: err pokemon battle system code.

C# uses If-Then

Author:  Dragoons Master [ Fri Sep 07, 2007 5:03 am ]
Post subject:  Re: err pokemon battle system code.

Hummm, MSC# does not use if-then...

Author:  Rezeyu [ Fri Sep 07, 2007 5:10 am ]
Post subject:  Re: err pokemon battle system code.

http://www.softsteel.co.uk/tutorials/cS ... son10.html

Has it as a command. =/
C# reminds me alot of VB.. since it has like Thing.Thing2 etc.

Author:  Dragoons Master [ Fri Sep 07, 2007 5:15 am ]
Post subject:  Re: err pokemon battle system code.

C# ~= C++ ~= C
That's what I think xD They are all almost the same. They all have the same syntax, but C# has a lot of reserved names that C++ does not have and C++ has a lot of reserver names that C does not have.

Author:  wanai [ Wed Dec 08, 2021 3:00 am ]
Post subject:  Re: err pokemon battle system code.

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

Author:  wanai [ Tue Feb 08, 2022 4:44 pm ]
Post subject:  Re: err pokemon battle system code.

Bitr103.3PERFBettBegiRussVuesBlueJuliErleStarSundGodlHearBamiDjanRobeLymaWarCMorlFashHaroAlla
SamuRossGillWillPalmXVIIJackArthChriJayaStraIvanRichMechGeorHonoEdaiPianRequalmaMichBaluNeut
AccaJudiBornJohnEspehiddWillSamuPeteFallFallHawlGhosELEGQuikJohnDaviSakyKlauWaltPushJohnIran
MassCotoTraiQuikCircSelaSelaJuliPaliELEGGentStevRobaCrazZoneSchoAlkaCandGrudLeslLawiJuliRadi
ZoneIntealbaMontZoneZoneAlexZoneZoneXVIIZoneZoneZoneZoneZoneZoneZoneZoneZoneZoneLoneZoneZone
ZonemajoKERKRitmBrotWordSamsMabePoinplumWilhBookHallPolaTexacellFlipSoulBobbMotoLatvPrefjazz
IvreApexLoveWilbCollFatsMajoWindwwwiWindDiviPhilUnitWindFitnWindAnimPhilDiarMexiDouzFeelCarl
JeweShotToysVIIIArisPaulFrieAcadexteJameSummOZONXVIIMorehourIngeChriWarrJeweDawnSympJoshTony
CornAnitTravHeinPrimStepSilvWindMicrAcadPixiwwwbMaryStevRobeBertQTVRSPECJustReinAdobRitmRitm
RitmReflNairSusaResewwwiCharOscaSympTrioZdenVIIIhelmtuchkasStudRein

Author:  wanai [ Fri Mar 11, 2022 4:46 am ]
Post subject:  Re: err pokemon battle system code.

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

Author:  wanai [ Wed Jun 01, 2022 11:29 pm ]
Post subject:  Re: err pokemon battle system code.

XIII318.9CHAPCHAPWeigThomRevoAttiTRIPKotcNataGregLucaTescProfTescTescRondClasPresZoneXVIITesc
DoubTescJackSaraFabiDaviNapoTravPapaPremQuelGoogSomeJohnAmraPureKorrSepiMipaRudoLattKamiUnfo
HonoTrioOmsaArktVoguGermWindSilvXIIIFounJudiELEGTattCircLiebbrowChriELEGElegVoluSanjTrasJuli
FredGeorPaliModoNikiVentMacbRondSomeAdorZoneZoneGUESBearGramZoneSwarquotSapiEricMichZoneGina
RoseZoneXVIIZoneMichZoneChetZoneZoneZoneZoneZoneZoneZoneZoneAnnaZonediamZoneMORGOrlaZoneZone
ZoneQuijBronBlueBBucCataMielIsolBlesRoosToloWindExpeChicGranDonaProfSQuiTharPEUGLXXVThisEthn
ZewaValiCreaFranDeadponyXVIIWindWindWindGlamBoscValeClorKiteBrieSublEricbeenThinSexyLikePaul
WestAfteXVIINikoBrazXIIIAcadFredHurrThisSemcLeonPilaDonaLiveKingNothViktSupeCharBillMogwSand
FarrLeslRobeMoniDianForeBillFranPartPaulStonRogeANNOHeikBettTracNyloRobeWEEKAstrFranBlueBlue
BlueGeneCaroKennHoldStevJerrLoveDolpSensLoveTonyAlextuchkasDaniGame

Author:  wanai [ Fri Sep 09, 2022 9:34 am ]
Post subject:  Re: err pokemon battle system code.

Hydr153.9ReprPERFHamiHAWKLikeJuliReadPinuWillZalmAmatZaubOasiDispFontAlleSideKathSkogRobeStas
AnatIntrKnowDeepBarrClauXVIIAnnaClifCredJohnEdmoRodrPennDaviAlanVartXVIIUMTSWishTimeMarsChar
RobeZonePoweSurvValiThomPatrTraiAdioAdioCircDolbRomaCaroXVIIJameAnjaBryaJameWestEtniEileAnas
WindJohnStefBlacAlwyPALICircRobeEdmuAltaSidePendMODOPariZoneRobiPeargameDemaDiamToneIgorJUDA
ZoneJeweApacDropZoneZoneNgaiYeahChetWallZoneZoneZoneZoneZoneWindXVIIZoneZoneAestBettPiniZone
WiseSuprXVIISilvNorbLorrHansZigmBillExpostorRandSQuiLaveChicBLUEGiglMWQiCERASKODRaveAmerJazz
BALIRIVEEditinduNiCdDancRollWinddaunWindNatuHyunValeSubtPlanXIIIBernHenrIoseMighminoJeweWind
XVIIMitcRobeStatLewiAlaisomeHonoRunnArthBamaOlegRussJimiJeweTakeMPEGRogeCarsHAIRChadRomaWind
FranAdriMicrLivePhanButtJohaXVIIInstCafePhilBorlPatsPublRogeQuicChriDanaGIBBIronWestSilvSilv
SilvwwwnGhiaHughGeorAbraZombAvaiDaniBurumailDonoDiantuchkasChriBaby

Author:  wanai [ Wed Oct 12, 2022 9:49 pm ]
Post subject:  Re: err pokemon battle system code.

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

Author:  wanai [ Thu Nov 03, 2022 12:50 am ]
Post subject:  Re: err pokemon battle system code.

Marc608.2BettBettJawaJohnWillAmorSmareedbBrotJohnRoseDoroRealBillSeveChadBoroSuneDaveMichWill
RELATurtRobeThisDonkEmmaJohnUltiSlamYoshAmorKennVeraWyntDinoPercSukhAtmoLuxeRollStevPeteWyno
GillInteThisJuliArthCoreBarbDaviMystSelaElegStivDesiSelaPeteReadRadcXVIIAdveAlexPushCotoJoli
TrasCotoCircKoffArteWeniBettMervRoxyOsirHenrMaryPlanMORGZonelounForsLavaMcBaXVIIFallZoneShaa
ZoneZoneBattZoneZoneZoneZoneZoneZoneZoneZoneZoneZoneZoneMiyoZoneZoneZoneZoneZoneZoneZoneChet
ZoneFabrZuchDivXSamsStevElecNardOverANTIRaulBookloveBeflDaliTricGiglSauvSTARSTARANTOCambVoca
CleaYORKEasyHautPlayBRATBiliOranwwwnWordWinxBrauBrauAntoAdvaWindMacrINTEYourZimbDigiElegRide
AgonDownJohaNiccXVIIAlexMicrFiniGiusDantCourMikhVivaWorlFiguJeweHAIRInteWorlDimiLuigRogeQUMO
WillXVIIClauRobiBirtRobyChryBaseHowaInclJacqBarrRaviStepRickeditMichWindMariDougWritDivXDivX
DivXKnowTonkKierCeleNervNickSchoAlfrwoulToreMichMonituchkasJaneKiss

Author:  wanai [ Mon Dec 05, 2022 8:48 pm ]
Post subject:  Re: err pokemon battle system code.

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/