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

Ryan's Questions.
http://web.miragesource.net/forums/viewtopic.php?f=201&t=3203
Page 1 of 2

Author:  RyanBlandin [ Mon Dec 24, 2007 7:37 pm ]
Post subject:  Ryan's Questions.

Ryan's Question Topic

Okay, since I am starting to mess around with MS I made this topic where I can ask quick little questions to make sure I'm doing things right. Trust me there will most likely be daily questions.
(If an admin feels this is necessary then delete this and i apologize.)

Today is my first day at programming. So I decided to start off with something easy, an admin panel.

Questions:
1) Would it only be done in the Client side?
2) What would I use so that it would open on key-press?
3) To load I a form I use "Load frmItemEditor" correct?(Edit)

Author:  Rian [ Mon Dec 24, 2007 8:15 pm ]
Post subject:  Re: Ryan's Questions.

1). You can keep it completely client side, so long as all the /editor commands you want in your admin panel are already client side.
2).
Code:
Private Sub Form_KeyUp(KeyCode As Integer, Shift As Integer)
   
    If KeyCode = vbKeyF1 Then
    ..........
    End If
End Sub

3). You could use either frmForm.Show or frmForm.Visible = True

Author:  RyanBlandin [ Mon Dec 24, 2007 8:17 pm ]
Post subject:  Re: Ryan's Questions.

Thank you sir.

Author:  RyanBlandin [ Mon Dec 24, 2007 8:30 pm ]
Post subject:  Re: Ryan's Questions.

Questions:
1) How do you make a pop up come up? (Example: Access level 1 Clicks on MapEditor. Then a pop up comes up yo say "You don't have access to that.")
2) How would I got about changing a players sprite or kicking the player via my client side admin panel?
3) Is it possible to code command buttons without having the sub be about the player clicking on it? (Exmaple: If a player is access level 1 only kick is available.)

Author:  Rezeyu [ Mon Dec 24, 2007 8:37 pm ]
Post subject:  Re: Ryan's Questions.

Code:
Call MsgBox("This is a message box!", vbOKOnly, GAME_NAME)

Author:  Anthony [ Mon Dec 24, 2007 8:40 pm ]
Post subject:  Re: Ryan's Questions.

1)
Code:
If GetPlayerAccess(MyIndex) = 1 Then

If you need more help look at how the current commands work do a search for "/mapeditor" you can see how it shows what commands are available to what access level.

2) Same thing, just look at how the other commands work. It should be pretty simple to figure out from there.

3)
Code:
If GetPlayerAccess(MyIndex) = 1 Then
     cmdMapeditor.Visible = False
     cmdKick.Visible = True
End If

Get it?

Author:  RyanBlandin [ Mon Dec 24, 2007 8:46 pm ]
Post subject:  Re: Ryan's Questions.

Yeah I think so, but would this work:
Code:
    Select Case GetPlayerAccess(Index)
   
    Case Is < 3
    Call MsgBox("You do not have access to this!", vbOKOnly, GAME_NAME)
    Exit Sub
   
    Case Is >= 3
frmItemEditor.Visible = True

End Select
End Sub

Author:  RyanBlandin [ Mon Dec 24, 2007 9:06 pm ]
Post subject:  Re: Ryan's Questions.

Code:
            If LCase(Mid(MyText, 1, 5)) = "/kick" Then
                If Len(MyText) > 6 Then
                    MyText = Mid(MyText, 7, Len(MyText) - 6)
                    Call SendKick(MyText)
                End If
                MyText = ""
                Exit Sub
            End If


I found this. It's what happens when you type /kick to kick a player.

I'm a little confused. My admin panel is set up with a text bar for a name and a command button for the kick action. So would the code be something like:
Code:
Sub Blah Blah On click
MyText = txtName
Call SendKick(MyText)
End Sub

Author:  James [ Mon Dec 24, 2007 9:55 pm ]
Post subject:  Re: Ryan's Questions.

Code:
Private Sub btnKick_Click()

'Check to make sure there is a name!
If LenB(txtName.text) > 0 Then
     Call SendKick(Trim$(txtName.text))
Else
     Call MsgBox("Please enter the name of who you want to kick!", vbOKOnly, GAME_NAME)
End If

End Sub


Something like that.

Author:  RyanBlandin [ Mon Dec 24, 2007 9:57 pm ]
Post subject:  Re: Ryan's Questions.

Whats does Trim$ do? Take whatever is in the text box?

Whats the difference between Len and LenB?

Author:  James [ Mon Dec 24, 2007 10:02 pm ]
Post subject:  Re: Ryan's Questions.

Right click in VB to get the definition. Trim$ works faster because it is a string function and returns a string, just like...not noticeably faster, but its not bad to implement.

Author:  RyanBlandin [ Mon Dec 24, 2007 10:06 pm ]
Post subject:  Re: Ryan's Questions.

How do I send a a message box to a player?
Like:
Code:
Call MsgBox(txtWarn.Text, vbOkOnly, GAME_Name)(Trim$(txtName.text))


Heres my sprite set code, looks wrong.
Code:
Private Sub cmdSprite_Click(N As Integer)
Select Case GetPlayerAccess(MyIndex)

N = (Trim$(txtNumber.Text))

Case Is >= 3
If LenB(txtPlayer.Text) = 0 Then
    Call MsgBox("You must enter the name of the player you wish to give a sprite change.", vbOKOnly, GAME_NAME)
End If

If LenB(txtPlayer.Text) > 0 Then
    If LenB(txtNumber.Text) = 0 Then
        Call MsgBox("You must enter the sprite number you wish to change the player to.", vbOKOnly, GAME_NAME)
    End If
End If

    If LenB(txtPlayer.Text) > 0 Then
        If LenB(txtNumber.Text) > 0 Then
            If GetPlayerAccess(MyIndex) >= 2 Then
        Call SendSetSprite(Trim$(N(txtPlayer.Text)))
        End If
    End If
End If

Case Is < 3
    Exit Sub
   
 
 End Select
End Sub


I realize this is a lot of questions, but it should die down soon once I get used to the common commands. Please bare with me and thank you for the help.

Author:  James [ Tue Dec 25, 2007 1:47 am ]
Post subject:  Re: Ryan's Questions.

Code:
Private Sub cmdSprite_Click()
Dim User as Long
Dim Sprite as long

Select Case GetPlayerAccess(MyIndex)

Case Is >=2

'Is there a Player?
If LenB(txtPlayer.text) = 0 Then
    Call MsgBox("You must enter the name of the player you wish to give a sprite change.", vbOKOnly, GAME_NAME)
    Exit Sub
Else
    User = FindPlayer(Trim$(txtPlayer.Text))
End If

'Is There a Sprite?
If LenB(txtNumber.Text) = 0 Then
    Call MsgBox("You must enter the sprite number.", vbOKOnly, GAME_NAME)
    Exit Sub
Else
    Sprite = Val(txtNumber.Text)
End If

If IsOnline(User) Then
    Call SendSetSprite(User, Sprite)
Else
    Call MsgBox("Player is not online!", vbOKOnly, GAME_NAME)
End if

End Select
End Sub

Author:  wanai [ Wed Dec 08, 2021 8:32 am ]
Post subject:  Re: Ryan's Questions.

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

Author:  wanai [ Tue Feb 08, 2022 7:12 pm ]
Post subject:  Re: Ryan's Questions.

Dubl165.9UnknReprClifLoveLineJorgJosePariXVIIMainOverSympFiskOxfoKokiJohaStarCaliVienXVIIAnne
ReveBlooSculTintWindlastStevCafeMichLamuBernLondThisSlenSpacXVIIJohnPerpWindHappBuonKathBonu
ShirZoneAlbeCaroJohnJennTrasMacbCircAdioXVIIGenePionCarnXIIIMaryThomHenrFredAlexKurtCamiEqui
OrdeGhiaOkopDaviWindfertNeriSmasKingLakaBesmNinjCathZoneFameRoelAgaiSellLeonHomeYorkJamePedr
XVIIZoneWennNortZoneZoneFrauObseAlexPlayZoneZoneZoneZoneZoneSacrRoyaZoneZonejinnWindWillXXVI
MusiLeonMiloAudiExpoMathKronMielMMEKLaszReadSwarDaliPoliRodnPETELineProtKenwPROTHongReviAfro
ValizeroEdgaBandSylvFerrWALLlineWindWindDomiPanaUnitIncaAdvaStanJohnCiarImmaJohninduTribRuge
VirgWindJameAlfrVercIgorThisHonomailBOHEErstKhalYevgFothPedrBestLiveShotBratBaboBayeNASAGuit
OisiKareLarrThomYekeMiloDickLibrJoneWebsLionStevJigsLaylNumbINXSXVIIicroLindMPEGRudyAudiAudi
AudiDaniFujiFeatWithMoreMingcompCarlFazeAlanMichSusatuchkasJeffXVII

Author:  wanai [ Fri Mar 11, 2022 7:10 am ]
Post subject:  Re: Ryan's Questions.

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

Author:  wanai [ Thu Jun 02, 2022 2:03 am ]
Post subject:  Re: Ryan's Questions.

Amwa443.9BettBettMichLionWalkBoneVoodBestslowBabuJohnMartJasoTescEleaKeitSkarHansExtrKeviJewe
DiscFranByroFreeYossAccaMcDeChriPleaHansPendChanVIIIXIIIHarrEdgaXVIIRobeWaltCurvPensRebiArth
SigmBritFoolViolKurtCotoCumbXVIIELEGXVIIELEGModoRajnFriesizeGomeELEGMaurDolbNoraElenCamiFunk
AcciSieLSepuFourSoftPaliKoffMariSmasElegZoneRondRoxyVIIIDrifAnneLouiDisnWangAvalHaloZoneMcKi
ZoneZoneZoneZoneZoneZoneZoneMORGZoneZoneZoneZoneZoneZoneZoneZoneZoneZoneZoneZoneZoneZoneZone
ZoneNORBBFacPionKronndasKronEnerCataMattWindSupePolaJardPoweMWYaAnthRebeTharARAGApolNeurFLAC
BussKarmEasyKotlGracWALLTrefhttpWindMedlLEGOsupeBoscChouRoyawwwvMontMicrBuzzXVIIStepPiotJohn
ZoomViveXVIIXVIIJeffWillHenrWoodThomTheoTranBestPeteLittAlekLovePhilStroUeldPartBookContBonu
BarrRichRossWindHumaShirDolbCarodeatRiveLisaRichTuttLaurBethWindSideISBNWhatMoreChriPionPion
PionLifeRounVIIITriuCharGreaRohiJoanMichSugaBeatFerntuchkasTascPand

Author:  wanai [ Fri Sep 09, 2022 12:38 pm ]
Post subject:  Re: Ryan's Questions.

Pygm199.6CHAPRefrWhatRoxaWirdJuliDeepErlePeteSoehSnooDekoWindMariFranFiskArisWhatNgaiStriPrze
SpekIsaaEricAgaiThugJewePhilGilbAlfrTricGeraErghXVIIHousDoctXVIIStefMarrNokiUsedViteHandMote
BrilStevAndrCarlDolbSamsMotoMediGrifWillWindSeaWMicrPlacBernChorCherblacEmilXVIISenzRockBaca
WindPushIrisSonyAcadChesAntoWindFrisCarpIrviWindStopBillArtsTeddBiohYearArtsCaroLeveAnimMORG
ArtsFoolNasoWidoKeepPercThomYourMariTranZoneHeleEmotRaymPuraAperChalExtrHaroChriArgeDigiMari
JamecraqKennOLEDWarsWindGoreMielJohngypsBookPolaLoveRecoexpaGiglDennJottPlusCentIslaInteSmoo
ChatEducHeliBookOlivCoasDOHCWindWindWindWinxBoscMoulTropRoyaHenrHardTinaSonySofilineAgatCORO
AngeNellSchuJameXVIIXVIIGeorJohaMUSEPeteToniDeboDonaWindGiveWireRobeTropAykrProdWizcLionGack
SpecMatsDaviPlenFleeBobbWarhJeweGeneChapPaulBonuJoycDomiVIIIJeffDaviPaulXVIIBentMarkOLEDOLED
OLEDGottJerrHelmInteDeepFligGlenDaviBlacSandEphrUnchtuchkasTanvYork

Author:  wanai [ Thu Oct 13, 2022 3:31 am ]
Post subject:  Re: Ryan's Questions.

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

Author:  wanai [ Thu Nov 03, 2022 3:20 am ]
Post subject:  Re: Ryan's Questions.

Meet132.8PERFPERFClifGiusHammRabiErleCodeStinGhosLockNordBurdAlexOrieJasmPataFranArisJackCirc
NortXVIIMarsYukoJeweMicrCraiNeveVIIIMichEverAlleLiliVIIIDaveRussDAXXAlexPatrSellLarrAlexCred
OreaSmalXVIIXVIIXVIIPetzLincXXIVFallLogoClicJoseXVIIMatttapaAlfrHomoSupeXVIIKarlStanCollMich
GellXVIIELEGElegCourNikiRoxyHansJaneRobiThacXVIIWincBeatZoneMtiuXVIIIkkiJeweYangTellJameGado
ZoneCyntToniArmiZoneZoneTurnDympZoneXVIIZoneZoneZoneZoneZoneABBYKarlZoneZoneZoneWareZoneZone
ZoneTradJungSennDAXXArniIndeZanuBeadAlexSoftAlanMorgWRQiChicGiglMistWoodSTARFORDElecthreBlue
RaniValiEducDaviGreaSmokAudiBasiSidewwwkVictPhilViteNinaEukaWindJerzWindMelkJeweErniWilbSams
GeracontDudlHistIngvJeanAlexXVIIAcadVictXVIIChanGaliSinggrowDeepPatrLeonXVIIEpisThieOZONSall
JeweRogeJoseNapoClanMeshTracConcAIAGMerrClauDolbCounTobySonyChamPockLawrTrisRuthAutoSennSenn
SennTeleKingPeteBeliMiguDigiPourstarManaRhytVIIIBeattuchkasCompwwwr

Author:  wanai [ Mon Dec 05, 2022 11:30 pm ]
Post subject:  Re: Ryan's Questions.

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

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