Mirage Source

Free ORPG making software.
It is currently Fri Mar 29, 2024 11:10 am

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  [ 1659 posts ]  Go to page 1, 2, 3, 4, 5 ... 67  Next
Author Message
PostPosted: Wed Sep 24, 2008 10:52 pm 
Offline
Persistant Poster
User avatar

Joined: Thu Jul 24, 2008 6:42 am
Posts: 703
Google Talk: infectiousbyte@gmail.com
Okay, so this is just a rip of MOTD, because I was bored, and wanted to see what I could do with my spare time. Member Of The Month is this creation.

SPOILER: (click to show)
Server
Find:
Code:
CSetMotd


Above it add:
Code:
CSetMotm


Then find:
Code:
    ' set MOTD
    MOTD = GetVar(App.Path & "\data\motd.ini", "MOTD", "Msg")


Above it add:
Code:
    ' set MOTM
    MOTM = GetVar(App.Path & "\data\motm.ini", "MOTM", "Msg")


Then find:
Code:
' Used for MOTD
Public MOTD As String


Above it add:
Code:
' Used for MOTM
Public MOTM As String


Then find:
Code:
        Case CSetMotd
            HandleSetMotd Index, Parse


Above it add:
Code:
        Case CSetMotm
            HandleSetMotm Index, Parse


Then find:
Code:
    ' Send them MOTD
    If LenB(MOTD) > 0 Then
        Call PlayerMsg(Index, "MOTD: " & MOTD, BrightCyan)
    End If
 


Above it add:
Code:
        ' Send them MOTM
    If LenB(MOTM) > 0 Then
        Call PlayerMsg(Index, "MOTM: " & MOTM, BrightCyan)
    End If


Then find:
Code:
' :::::::::::::::::::::
' :: Set MOTD packet ::
' :::::::::::::::::::::
Sub HandleSetMotd(ByVal Index As Long, ByRef Parse() As String)
Dim MOTD As String

    ' Prevent hacking
    If GetPlayerAccess(Index) < ADMIN_MAPPER Then
        Call HackingAttempt(Index, "Admin Cloning")
        Exit Sub
    End If
   
    MOTM = Trim$(Parse(1))
    Call PutVar(App.Path & "\data\motd.ini", "MOTD", "Msg", MOTD)
    Call GlobalMsg("MOTD changed to: " & MOTD, BrightCyan)
    Call AddLog(GetPlayerName(Index) & " changed MOTD to: " & MOTD, ADMIN_LOG)
End Sub


Above it add:
Code:
' :::::::::::::::::::::
' :: Set MOTM packet ::
' :::::::::::::::::::::
Sub HandleSetMotm(ByVal Index As Long, ByRef Parse() As String)
Dim MOTM As String

    ' Prevent hacking
    If GetPlayerAccess(Index) < ADMIN_MAPPER Then
        Call HackingAttempt(Index, "Admin Cloning")
        Exit Sub
    End If
   
    MOTD = Trim$(Parse(1))
    Call PutVar(App.Path & "\data\motm.ini", "MOTM", "Msg", MOTM)
    Call GlobalMsg("MOTM changed to: " & MOTM, BrightCyan)
    Call AddLog(GetPlayerName(Index) & " changed MOTM to: " & MOTM, ADMIN_LOG)
End Sub


Client

Find:
Code:
' MOTD change
                Case "/motd"
                    If GetPlayerAccess(MyIndex) >= ADMIN_MAPPER Then
                        If UBound(Command) >= 1 Then
                            'If Len(MyText) > 0 Then
                                SendMOTDChange Command(1)
                            'End If
                        End If
                    End If


Above it add:
Code:
               ' MOTM change
                Case "/motm"
                    If GetPlayerAccess(MyIndex) >= ADMIN_MAPPER Then
                        If UBound(Command) >= 1 Then
                            'If Len(MyText) > 0 Then
                                SendMOTMChange Command(1)
                            'End If
                        End If
                    End If


Now find:
Code:
Sub SendMOTDChange(ByVal MOTD As String)
Dim Packet As String

    Packet = CSetMotd & SEP_CHAR & MOTD & END_CHAR
    Call SendData(Packet)
End Sub


Above it add:
Code:
Sub SendMOTMChange(ByVal MOTM As String)
Dim Packet As String

    Packet = CSetMotm & SEP_CHAR & MOTM & END_CHAR
    Call SendData(Packet)
End Sub


Now find:
Code:
CSetMotd


Above it add:
Code:
CSetMotm

Thats it! I know this was a really shitty tutorial, but it gets the idea across, right? So now, just type /motm "Char name", without the quotation marks... Yup. Shitty code, shitty tut, but it works.

_________________
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


Last edited by Nean on Thu Sep 25, 2008 2:03 am, edited 3 times in total.

Top
 Profile  
 
PostPosted: Wed Sep 24, 2008 10:59 pm 
Offline
Persistant Poster
User avatar

Joined: Fri Aug 15, 2008 3:11 pm
Posts: 633
wouldnt it be better to have a vote
where they nominate someone
and then the have a deadline
once the deadline is met announce the MOTM

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


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


Top
 Profile  
 
PostPosted: Wed Sep 24, 2008 11:03 pm 
Offline
Persistant Poster
User avatar

Joined: Thu Jul 24, 2008 6:42 am
Posts: 703
Google Talk: infectiousbyte@gmail.com
doomteam1 wrote:
wouldnt it be better to have a vote
where they nominate someone
and then the have a deadline
once the deadline is met announce the MOTM


Well yeah, how thats done is up to you. This is just the basic script. In my project, it's gonna be decided by the staff. :)

_________________
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  
 
PostPosted: Wed Sep 24, 2008 11:09 pm 
Offline
Pro
User avatar

Joined: Tue Nov 13, 2007 2:42 pm
Posts: 509
This won't work in the newest version of MS4.


Top
 Profile  
 
PostPosted: Fri Feb 20, 2009 1:03 am 
Offline
Newbie
User avatar

Joined: Tue Feb 17, 2009 10:51 pm
Posts: 22
Location: Denmark
Google Talk: andydk90@gmail.com
Dugor wrote:
This won't work in the newest version of MS4.


That's the same as saying that the MOTD will not work. I checked what he had done with this code and wrote it without checking this one out. It's just a copy/paste of MOTD, but changing everything that is MOTD to MOTM :)

So: This code works, even with 3.75b (of course).

_________________
Image

My Current Work
SPOILER: (click to show)


Top
 Profile  
 
PostPosted: Fri Feb 20, 2009 1:24 am 
Offline
Pro
User avatar

Joined: Tue Nov 13, 2007 2:42 pm
Posts: 509
He may have updated it?

At the time it most likely didn't work.


Top
 Profile  
 
PostPosted: Fri Feb 20, 2009 3:27 am 
Offline
Persistant Poster
User avatar

Joined: Thu Jul 24, 2008 6:42 am
Posts: 703
Google Talk: infectiousbyte@gmail.com
Jesus christ this tut is an embarassment. I might rewrite it to make shit based off of being the MotM

_________________
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  
 
PostPosted: Fri Feb 20, 2009 12:38 pm 
Offline
Newbie
User avatar

Joined: Tue Feb 17, 2009 10:51 pm
Posts: 22
Location: Denmark
Google Talk: andydk90@gmail.com
Nean wrote:
Jesus christ this tut is an embarassment. I might rewrite it to make shit based off of being the MotM


How can it be an embarassment? It's just copy/pasting MOTD and changing the same variable over and over again :b. It's good to understand how the MOTD works anyway :D

_________________
Image

My Current Work
SPOILER: (click to show)


Top
 Profile  
 
PostPosted: Fri Feb 20, 2009 4:55 pm 
Read a text file, send the contents of said text file to the client when they login.

Super simple.


Top
  
 
PostPosted: Wed Dec 01, 2021 8:00 am 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456192
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.rumagnetotelluricfield.rumailinghouse.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.ruсайтsemifinishmachining.ruspicetrade.ruspysale.ru
stungun.rutacticaldiameter.rutailstockcenter.rutamecurve.rutapecorrection.rutappingchuck.rutaskreasoningtechnicalgrade.rutelangiectaticlipoma.rutelescopicdamper.ruhttp://temperateclimate.rutemperedmeasure.rutenementbuilding.rutuchkasultramaficrock.ruultraviolettesting.ru


Top
 Profile  
 
PostPosted: Wed Dec 29, 2021 4:57 pm 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456192
Econ


Top
 Profile  
 
PostPosted: Wed Dec 29, 2021 4:58 pm 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456192
58.39


Top
 Profile  
 
PostPosted: Wed Dec 29, 2021 5:00 pm 
Offline
Mirage Source Lover

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


Top
 Profile  
 
PostPosted: Wed Dec 29, 2021 5:01 pm 
Offline
Mirage Source Lover

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


Top
 Profile  
 
PostPosted: Wed Dec 29, 2021 5:02 pm 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456192
Pass


Top
 Profile  
 
PostPosted: Wed Dec 29, 2021 5:03 pm 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456192
Dash


Top
 Profile  
 
PostPosted: Wed Dec 29, 2021 5:04 pm 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456192
XVII


Top
 Profile  
 
PostPosted: Wed Dec 29, 2021 5:05 pm 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456192
Edit


Top
 Profile  
 
PostPosted: Wed Dec 29, 2021 5:06 pm 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456192
Sand


Top
 Profile  
 
PostPosted: Wed Dec 29, 2021 5:07 pm 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456192
MPEG


Top
 Profile  
 
PostPosted: Wed Dec 29, 2021 5:08 pm 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456192
SOCO


Top
 Profile  
 
PostPosted: Wed Dec 29, 2021 5:10 pm 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456192
Prem


Top
 Profile  
 
PostPosted: Wed Dec 29, 2021 5:11 pm 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456192
Clas


Top
 Profile  
 
PostPosted: Wed Dec 29, 2021 5:12 pm 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456192
Wind


Top
 Profile  
 
PostPosted: Wed Dec 29, 2021 5:13 pm 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456192
Turb


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 10 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:  
cron
Powered by phpBB® Forum Software © phpBB Group