Mirage Source

Free ORPG making software.
It is currently Sat Apr 27, 2024 9:05 pm

All times are UTC


Forum rules


Make sure your tutorials are kept up to date with the latest MS4 releases.



Post new topic Reply to topic  [ 1705 posts ]  Go to page 1, 2, 3, 4, 5 ... 69  Next
Author Message
 Post subject: [Feature]Admin Panel
PostPosted: Tue Sep 16, 2008 1:32 am 
Offline
Persistant Poster
User avatar

Joined: Fri Aug 15, 2008 3:11 pm
Posts: 633
Some of this i scripted by my self others was from help. And some i looked at other sources and got ideas and some i just ripped.
Hope you enjoy

Components
Microsoft Tagged Dialog Control
Check it then

Create A Form Called frmAdmin
Create A SSTab with these properties
Tabs - 4, Tabs Per Row - 4

Then Name Them. I named mine Admin, Map, Sprite, Develop

Admin First

Create A Label Called btnBan
This is a ban button
Put this inside

Code:
    If GetPlayerAccess(MyIndex) >= ADMIN_CREATOR Then
        Call SendBan(Trim$(txtPlayer.Text))
    Else: Auth = "You are not authorized to carry out that action"
         Call AddText(Auth, BrightRed)
    End If


Create a button called btnWarpMeTo
This is Warp To Me
Put This Inside

Code:
If GetPlayerAccess(MyIndex) >= ADMIN_MAPPER Then
        Call WarpMeTo(Trim$(txtPlayer.Text))
    Else: Auth = "You are not authorized to carry out that action"
        Call AddText(Auth, BrightRed)
    End If


Create a button called btnKick
This is Kick
Put This Inside

Code:
    If GetPlayerAccess(MyIndex) >= ADMIN_MONITER Then
        Call SendKick(frmAdmin.txtPlayer.Text)
        Else: Auth = "You are not authorized to carry out that action"
        Call AddText(Auth, BrightRed)
    End If


Create a Button called btnSetAccess
This is Set Access
Put This inside

Code:
  If GetPlayerAccess(MyIndex) >= ADMIN_CREATOR Then
      Call SendSetAccess(Trim$(txtPlayerAdmin.Text), Trim$(txtAccess.Text))
   Else: Auth = "You are not authorized to carry out that action"
         Call AddText(Auth, BrightRed)
   End If


Create a label called Access Level
Then create a txtbox called txtAccess

Create a label called Player Name
Then Create a txtbox called txtPlayerAdmin


Now on to Map Tab
Create a button called btnLOC
This is Location
put this inside

Code:
    If GetPlayerAccess(MyIndex) >= ADMIN_MAPPER Then
        Call SendRequestLocation
    Else: Auth = "You are not authorized to carry out that action"
        Call AddText(Auth, BrightRed)
    End If


Create a button called btnRespawn
This is Respawn
put this inside

Code:
    If GetPlayerAccess(MyIndex) >= ADMIN_MAPPER Then
        Call SendMapRespawn
    Else: Auth = "You are not authorized to carry out that action"
        Call AddText(Auth, BrightRed)
    End If


Create a button called btnWarpto
This is Warp To
put this inside

Code:
    If GetPlayerAccess(MyIndex) >= ADMIN_MAPPER Then
        Call WarpTo(Val(txtMap.Text))
    Else: Auth = "You are not authorized to carry out that action"
        Call AddText(Auth, BrightRed)
    End If


Create a label called Map Number
then create a txtbox called txtMap

Now onto sprite tab
create a button called btnSprite
This is Set Sprite
then put this inside it

Code:
    If GetPlayerAccess(MyIndex) >= ADMIN_MAPPER Then
        Call SendSetSprite(Val(txtSprite.Text))
    Else: Auth = "You are not authorized to carry out that action"
        Call AddText(Auth, BrightRed)
    End If


create a button called btnPlayerSprite
This is Set Player Sprite
then put this inside it

Code:
    If GetPlayerAccess(MyIndex) >= ADMIN_MAPPER Then
        If Trim$(txtPlayer.Text) <> vbNullString Then
            If Trim$(txtSprite.Text) <> vbNullString Then
                Call SendSetPlayerSprite(Trim$(txtPlayer.Text), Trim$(txtSprite.Text))
            End If
        End If
    Else: Auth = "You are not authorized to carry out that action"
    Call AddText(Auth, BrightRed)
    End If


create a label called player name
then create a txtbox called txtPlayer

create a label called Sprite number
then create a txtbox called txtSprite

now on to the develop tab
create a button called btnMapeditor
This is Map Editor
then put this inside

Code:
    If GetPlayerAccess(MyIndex) >= ADMIN_MAPPER Then
        Call SendRequestEditMap
         frmMirage.Width = 14175
    Else: Auth = "You are not authorized to carry out that action"
             Call AddText(Auth, BrightRed)
    End If


create a button called btneditspell
This is Spell Editor
then put this inside

Code:
    If GetPlayerAccess(MyIndex) >= ADMIN_DEVELOPER Then
        Call SendRequestEditSpell
    Else: Auth = "You are not authorized to carry out that action"
        Call AddText(Auth, BrightRed)
    End If


create a button called btnedititem
This is Item Editor
then put this inside

Code:
    If GetPlayerAccess(MyIndex) >= ADMIN_DEVELOPER Then
        Call SendRequestEditItem
    Else: Auth = "You are not authorized to carry out that action"
         Call AddText(Auth, BrightRed)
    End If


create a button called btnEditShops
This is Shop Editor
then put this inside

Code:
    If GetPlayerAccess(MyIndex) >= ADMIN_DEVELOPER Then
        Call SendRequestEditShop
    Else: Auth = "You are not authorized to carry out that action"
         Call AddText(Auth, BrightRed)
    End If


Create a button called btnEditNPC
This is NPC Editor
then put this inside

Code:
    If GetPlayerAccess(MyIndex) >= ADMIN_DEVELOPER Then
        Call SendRequestEditNpc
    Else: Auth = "You are not authorized to carry out that action"
        Call AddText(Auth, BrightRed)
    End If



To put this as a hot key for f1 go to KeyDown in frmMirage
then put this inside

Code:
    If KeyCode = vbKeyF1 then
    frmAdminPanel.visible = true
    end if


Hope you guys like
Tell me what you think plz

Admin form
XD
http://www.mediafire.com/?mdim4mozmom

_________________
╔╗╔═╦═╦══╦═══╗
║║║║║║║╔╗║╔═╗║
║║║║║║║╚╝║║║║║
║╚╣║║║║╔╗║╚═╝║
╚═╩╩═╩╩╝╚╩═══╝


╔╦═╦╦════╦═══╗
║║║║╠═╗╔═╣╔══╝
║║║║║║║║╚═╗
║║║║║║║║╔═╝
╚═╩═╝╚╝╚╝ ?


Last edited by Doomy on Thu Apr 09, 2009 8:38 pm, edited 6 times in total.

Top
 Profile  
 
 Post subject: Re: Admin Panel
PostPosted: Tue Sep 16, 2008 1:37 am 
Offline
Regular
User avatar

Joined: Tue Jun 17, 2008 12:39 pm
Posts: 55
Nice job. I'm working on my own right now. Gonna use this as reference though. =D


Top
 Profile  
 
 Post subject: Re: Admin Panel
PostPosted: Tue Sep 16, 2008 1:40 am 
Offline
Persistant Poster
User avatar

Joined: Fri Aug 15, 2008 3:11 pm
Posts: 633
thanks
and i created cause skillzalot wanted too know how to do it
so i just made one so everyone dont go around asking

_________________
╔╗╔═╦═╦══╦═══╗
║║║║║║║╔╗║╔═╗║
║║║║║║║╚╝║║║║║
║╚╣║║║║╔╗║╚═╝║
╚═╩╩═╩╩╝╚╩═══╝


╔╦═╦╦════╦═══╗
║║║║╠═╗╔═╣╔══╝
║║║║║║║║╚═╗
║║║║║║║║╔═╝
╚═╩═╝╚╝╚╝ ?


Top
 Profile  
 
 Post subject: Re: Admin Panel
PostPosted: Tue Sep 16, 2008 1:44 am 
Offline
Persistant Poster
User avatar

Joined: Thu Jul 24, 2008 6:42 am
Posts: 703
Google Talk: infectiousbyte@gmail.com
I'm also working on one at the moment. So far, I have scripted:

WarpMeTo
WarpToMe
WarpTo
Kill
Ban
Kick

I'm working on others though. =D. Thanks for the tut, this will come useful as a reference.

_________________
Image
GIAKEN wrote:
Since I'm into men, not women

GIAKEN wrote:
I can't take these huge penises anymore! All that's left is shame! And blood


Top
 Profile  
 
 Post subject: Re: Admin Panel
PostPosted: Tue Sep 16, 2008 9:44 am 
Offline
Submit-Happy
User avatar

Joined: Fri Jun 16, 2006 7:01 am
Posts: 2768
Location: Yorkshire, UK
You haven't scripted anything :P

Scripting is what you do in Elysium's sadscript files.

This is programming. You're a real man now.

_________________
Quote:
Robin:
Why aren't maps and shit loaded up in a dynamic array?
Jacob:
the 4 people that know how are lazy
Robin:
Who are those 4 people?
Jacob:
um
you, me, and 2 others?


Image


Top
 Profile  
 
 Post subject: Re: Admin Panel
PostPosted: Tue Sep 16, 2008 10:50 am 
Offline
Regular

Joined: Sat Sep 13, 2008 1:41 am
Posts: 97
Following this tut I made it and im wondering what do i add to make it if I click f1 and im an admin it brings up this panel


Top
 Profile  
 
 Post subject: Re: Admin Panel
PostPosted: Tue Sep 16, 2008 10:58 am 
Offline
Submit-Happy
User avatar

Joined: Fri Jun 16, 2006 7:01 am
Posts: 2768
Location: Yorkshire, UK
Open the 'KeyDown' subroutine in frmMirage then add this:

Code:
If KeyCode = vbKeyF1 then
frmAdminPanel.visible = true
end if

_________________
Quote:
Robin:
Why aren't maps and shit loaded up in a dynamic array?
Jacob:
the 4 people that know how are lazy
Robin:
Who are those 4 people?
Jacob:
um
you, me, and 2 others?


Image


Top
 Profile  
 
 Post subject: Re: Admin Panel
PostPosted: Tue Sep 16, 2008 3:05 pm 
Offline
Persistant Poster
User avatar

Joined: Fri Aug 15, 2008 3:11 pm
Posts: 633
thanks robin i forgot to add that part ill put that in

_________________
╔╗╔═╦═╦══╦═══╗
║║║║║║║╔╗║╔═╗║
║║║║║║║╚╝║║║║║
║╚╣║║║║╔╗║╚═╝║
╚═╩╩═╩╩╝╚╩═══╝


╔╦═╦╦════╦═══╗
║║║║╠═╗╔═╣╔══╝
║║║║║║║║╚═╗
║║║║║║║║╔═╝
╚═╩═╝╚╝╚╝ ?


Top
 Profile  
 
 Post subject: Re: Admin Panel
PostPosted: Tue Sep 16, 2008 3:17 pm 
Offline
Knowledgeable
User avatar

Joined: Fri Sep 12, 2008 11:18 pm
Posts: 176
Location: England.
doomteam1 wrote:
thanks robin i forgot to add that part ill put that in


I'd make it require an access also. So people don't just find out about it randomly.(Even though the buttons require access)

EDIT:

Code:
    If KeyCode = vbKeyF1 then
       If GetPlayerAccess(MyIndex) >= ADMIN_MAPPER Then
            frmAdminPanel.visible = true
            If GetPlayerAccess(MyIndex) < ADMIN_CREATOR Then
              btnBan.Enabled = False
             btnSetAccess.Enabled = False
            End If
            If GetPlayerAccess(MyIndex) < ADMIN_DEVELOPER Then
              btnEditSpell.Enabled = False
             bntEditItem.Enabled = False
             btnEditShop.Enabled = False
             btnEditNPC.Enabled = False
            End If
            If GetPlayerAccess(MyIndex) < ADMIN_MONITOR Then
              btnKick.Enabled = False
            End If
            If GetPlayerAccess(MyIndex) < ADMIN_MAPPER Then
              btnWarpMeTo.Enabled = False
              btnLoc.Enabled = False
              btnRespawn.Enabled = False
              btnWarpTo.Enabled = False
              btnSetSprite.Enabled = False
              btnPlayerSprite.Enabled = False
              btnMapEditor.Enabled = False
            End If
      End If
    End If


Untested. SHOULD work?


Top
 Profile  
 
 Post subject: Re: Admin Panel
PostPosted: Thu Sep 18, 2008 4:50 am 
Offline
Persistant Poster
User avatar

Joined: Thu Jul 24, 2008 6:42 am
Posts: 703
Google Talk: infectiousbyte@gmail.com
It should work, but for MS4, you have to put the name of the form before the button. SO it would be like:

Code:
frmadminpanel.btnWarpMeTo.Enabled = False

_________________
Image
GIAKEN wrote:
Since I'm into men, not women

GIAKEN wrote:
I can't take these huge penises anymore! All that's left is shame! And blood


Top
 Profile  
 
 Post subject: Re: Admin Panel
PostPosted: Fri Sep 19, 2008 10:56 pm 
Offline
Persistant Poster
User avatar

Joined: Thu Jul 24, 2008 6:42 am
Posts: 703
Google Talk: infectiousbyte@gmail.com
Sorry for the double post, but I found a bug. For the map editor button, you have to add:

Code:
frmMirage.Width = 14175
Under: SendRequestEditMap. As, the Map Editor is actually built into Mirage, but the width doesn't display it, unless told to expand.

_________________
Image
GIAKEN wrote:
Since I'm into men, not women

GIAKEN wrote:
I can't take these huge penises anymore! All that's left is shame! And blood


Top
 Profile  
 
 Post subject: Re: Admin Panel
PostPosted: Fri Sep 19, 2008 11:43 pm 
Offline
Persistant Poster
User avatar

Joined: Fri Aug 15, 2008 3:11 pm
Posts: 633
i forgot about that
i removed all the width things cause i resized my window
and didnt want to put it in
so i just made my mapeditor a picbox and placed over screen

_________________
╔╗╔═╦═╦══╦═══╗
║║║║║║║╔╗║╔═╗║
║║║║║║║╚╝║║║║║
║╚╣║║║║╔╗║╚═╝║
╚═╩╩═╩╩╝╚╩═══╝


╔╦═╦╦════╦═══╗
║║║║╠═╗╔═╣╔══╝
║║║║║║║║╚═╗
║║║║║║║║╔═╝
╚═╩═╝╚╝╚╝ ?


Top
 Profile  
 
 Post subject: Re: Admin Panel
PostPosted: Fri Sep 19, 2008 11:55 pm 
Offline
Persistant Poster
User avatar

Joined: Thu Jul 24, 2008 6:42 am
Posts: 703
Google Talk: infectiousbyte@gmail.com
doomteam1 wrote:
i forgot about that
i removed all the width things cause i resized my window
and didnt want to put it in
so i just made my mapeditor a picbox and placed over screen


Nevertheless, others haven't. So I'd suggest adding that to the tut somewhere. Thanks.

_________________
Image
GIAKEN wrote:
Since I'm into men, not women

GIAKEN wrote:
I can't take these huge penises anymore! All that's left is shame! And blood


Top
 Profile  
 
 Post subject: Re: Admin Panel
PostPosted: Sat Sep 20, 2008 12:54 am 
Offline
Persistant Poster
User avatar

Joined: Fri Aug 15, 2008 3:11 pm
Posts: 633
where would i add it cause idk because i dont have it

_________________
╔╗╔═╦═╦══╦═══╗
║║║║║║║╔╗║╔═╗║
║║║║║║║╚╝║║║║║
║╚╣║║║║╔╗║╚═╝║
╚═╩╩═╩╩╝╚╩═══╝


╔╦═╦╦════╦═══╗
║║║║╠═╗╔═╣╔══╝
║║║║║║║║╚═╗
║║║║║║║║╔═╝
╚═╩═╝╚╝╚╝ ?


Top
 Profile  
 
 Post subject: Re: Admin Panel
PostPosted: Sat Sep 20, 2008 1:00 am 
Offline
Persistant Poster
User avatar

Joined: Thu Jul 24, 2008 6:42 am
Posts: 703
Google Talk: infectiousbyte@gmail.com
Add it under the MapEditor Button. Inside the button, I mean.

_________________
Image
GIAKEN wrote:
Since I'm into men, not women

GIAKEN wrote:
I can't take these huge penises anymore! All that's left is shame! And blood


Top
 Profile  
 
 Post subject: Re: Admin Panel
PostPosted: Sat Sep 20, 2008 1:08 am 
Offline
Persistant Poster
User avatar

Joined: Fri Aug 15, 2008 3:11 pm
Posts: 633
There i fixed it thx

_________________
╔╗╔═╦═╦══╦═══╗
║║║║║║║╔╗║╔═╗║
║║║║║║║╚╝║║║║║
║╚╣║║║║╔╗║╚═╝║
╚═╩╩═╩╩╝╚╩═══╝


╔╦═╦╦════╦═══╗
║║║║╠═╗╔═╣╔══╝
║║║║║║║║╚═╗
║║║║║║║║╔═╝
╚═╩═╝╚╝╚╝ ?


Top
 Profile  
 
 Post subject: Re: Admin Panel
PostPosted: Sat Sep 20, 2008 9:25 pm 
Offline
Persistant Poster
User avatar

Joined: Fri Aug 15, 2008 3:11 pm
Posts: 633
I added my
Admin.frm for those who want it

_________________
╔╗╔═╦═╦══╦═══╗
║║║║║║║╔╗║╔═╗║
║║║║║║║╚╝║║║║║
║╚╣║║║║╔╗║╚═╝║
╚═╩╩═╩╩╝╚╩═══╝


╔╦═╦╦════╦═══╗
║║║║╠═╗╔═╣╔══╝
║║║║║║║║╚═╗
║║║║║║║║╔═╝
╚═╩═╝╚╝╚╝ ?


Top
 Profile  
 
 Post subject: Re: Admin Panel
PostPosted: Sun Jan 18, 2009 7:03 pm 
Offline
Knowledgeable
User avatar

Joined: Sun Feb 10, 2008 7:40 pm
Posts: 200
ummm, i get an error with the BTNban, it highlights ".Text" and says "method or data member not found" but Ive looked it over and it should work fine.

_________________
I is back!


Top
 Profile  
 
 Post subject: Re: Admin Panel
PostPosted: Sun Jan 18, 2009 8:19 pm 
Offline
Persistant Poster
User avatar

Joined: Tue May 30, 2006 2:07 am
Posts: 836
Location: Nashville, Tennessee, USA
Google Talk: rs.ruggles@gmail.com
Probably because a button doesn't have a Text property. Well, it does, but it's called Caption

_________________
I'm on Facebook! Google Plus My Youtube Channel My Steam Profile

Image


Top
 Profile  
 
 Post subject: Re: [Feature]Admin Panel
PostPosted: Wed Dec 01, 2021 7:27 am 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 489728
audiobookkeepercottageneteyesvisioneyesvisionsfactoringfeefilmzonesgadwallgaffertapegageboardgagrulegallductgalvanometricgangforemangangwayplatformgarbagechutegardeningleavegascauterygashbucketgasreturngatedsweepgaugemodelgaussianfiltergearpitchdiameter
geartreatinggeneralizedanalysisgeneralprovisionsgeophysicalprobegeriatricnursegetintoaflapgetthebouncehabeascorpushabituatehackedbolthackworkerhadronicannihilationhaemagglutininhailsquallhairyspherehalforderfringehalfsiblingshallofresidencehaltstatehandcodinghandportedheadhandradarhandsfreetelephone
hangonparthaphazardwindinghardalloyteethhardasironhardenedconcreteharmonicinteractionhartlaubgoosehatchholddownhaveafinetimehazardousatmosphereheadregulatorheartofgoldheatageingresistanceheatinggasheavydutymetalcuttingjacketedwalljapanesecedarjibtypecranejobabandonmentjobstressjogformationjointcapsulejointsealingmaterial
journallubricatorjuicecatcherjunctionofchannelsjusticiablehomicidejuxtapositiontwinkaposidiseasekeepagoodoffingkeepsmthinhandkentishglorykerbweightkerrrotationkeymanassurancekeyserumkickplatekillthefattedcalfkilowattsecondkingweakfishkinozoneskleinbottlekneejointknifesethouseknockonatomknowledgestate
kondoferromagnetlabeledgraphlaborracketlabourearningslabourleasinglaburnumtreelacingcourselacrimalpointlactogenicfactorlacunarycoefficientladletreatedironlaggingloadlaissezallerlambdatransitionlaminatedmateriallammasshootlamphouselancecorporallancingdielandingdoorlandmarksensorlandreformlanduseratio
languagelaboratorylargeheartlasercalibrationlaserlenslaserpulselatereventlatrinesergeantlayaboutleadcoatingleadingfirmlearningcurveleavewordmachinesensiblemagneticequatormagnetotelluricfieldmailinghousemajorconcernmammasdarlingmanagerialstaffmanipulatinghandmanualchokemedinfobooksmp3lists
nameresolutionnaphtheneseriesnarrowmouthednationalcensusnaturalfunctornavelseedneatplasternecroticcariesnegativefibrationneighbouringrightsobjectmoduleobservationballoonobstructivepatentoceanminingoctupolephononofflinesystemoffsetholderolibanumresinoidonesticketpackedspherespagingterminalpalatinebonespalmberry
papercoatingparaconvexgroupparasolmonoplaneparkingbrakepartfamilypartialmajorantquadruplewormqualityboosterquasimoneyquenchedsparkquodrecuperetrabbetledgeradialchaserradiationestimatorrailwaybridgerandomcolorationrapidgrowthrattlesnakemasterreachthroughregionreadingmagnifierrearchainrecessionconerecordedassignment
rectifiersubstationredemptionvaluereducingflangereferenceantigenregeneratedproteinreinvestmentplansafedrillingsagprofilesalestypeleasesamplingintervalsatellitehydrologyscarcecommodityscrapermatscrewingunitseawaterpumpsecondaryblocksecularclergyseismicefficiencyselectivediffuserhttp://semiasphalticflux.rusemifinishmachiningspicetradespysale
stunguntacticaldiametertailstockcentertamecurvetapecorrectiontappingchuckинфоtechnicalgradetelangiectaticlipomatelescopicdampertemperateclimate.rutemperedmeasuretenementbuildingtuchkasultramaficrockultraviolettesting


Top
 Profile  
 
 Post subject: Re: [Feature]Admin Panel
PostPosted: Sun Dec 26, 2021 1:27 am 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 489728
XXII


Top
 Profile  
 
 Post subject: Re: [Feature]Admin Panel
PostPosted: Sun Dec 26, 2021 1:29 am 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 489728
25


Top
 Profile  
 
 Post subject: Re: [Feature]Admin Panel
PostPosted: Sun Dec 26, 2021 1:30 am 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 489728
Bett


Top
 Profile  
 
 Post subject: Re: [Feature]Admin Panel
PostPosted: Sun Dec 26, 2021 1:31 am 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 489728
Bett


Top
 Profile  
 
 Post subject: Re: [Feature]Admin Panel
PostPosted: Sun Dec 26, 2021 1:32 am 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 489728
Emma


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1705 posts ]  Go to page 1, 2, 3, 4, 5 ... 69  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 46 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group