Mirage Source

Free ORPG making software.
It is currently Sat Apr 27, 2024 1:24 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  [ 1382 posts ]  Go to page 1, 2, 3, 4, 5 ... 56  Next
Author Message
PostPosted: Sat Sep 20, 2008 10:01 am 
Offline
Community Leader
User avatar

Joined: Mon May 29, 2006 1:00 pm
Posts: 2538
Location: Sweden
Google Talk: johansson_tk@hotmail.com
Originaly Created by Obsidian
Edited and refined by William

Difficulty: 1/5
Functionality: Works for all versions of MS.

Introduction
A standared simple client side swear filter that's added in 2-5minutes easily.

Client Side
Add this at the bottom of modGameLogic:
Code:
Public Function CheckMessage(byval Msg As String) As String
Dim kArray() As String
Dim Swears As String
Dim i As Integer
Dim SwearChar As String
   
    Swears = "ass,fuck,shit,bitch,damn,cunt,whore,piss,jesus,god"
    kArray = Split(Swears, ",")
   
    SwearChar = "*"
   
    For i = 0 To UBound(kArray)
        If InStr(LCase(Msg$), LCase(kArray(i))) Then
              Msg$ = Replace$(LCase(Msg$), LCase(kArray(i)), LCase(String(Len(kArray(i)), SwearChar)))
        End If
    Next i
   
    CheckMessage = Msg
End Function


Now search for all the different messages: adminmsg, saymsg, broadcastmsg, globalmsg, playermsg, mapmsg.

And do this on all of them:
Code:
Call GlobalMsg(ChatText)

Replace it with:
Code:
Call GlobalMsg(CheckMessage(ChatText))

And of course you shouldn't replace the saymsg call with a globalmsg call...

Good Luck And have Fun

_________________
I'm on Facebook!My Youtube Channel Send me an email
Image


Top
 Profile  
 
PostPosted: Sat Sep 20, 2008 4:10 pm 
Offline
Community Leader
User avatar

Joined: Mon May 29, 2006 1:00 pm
Posts: 2538
Location: Sweden
Google Talk: johansson_tk@hotmail.com
Yey, great! 25 points for me suckers :lol:

_________________
I'm on Facebook!My Youtube Channel Send me an email
Image


Top
 Profile  
 
PostPosted: Sun Sep 21, 2008 1:50 pm 
Offline
Knowledgeable
User avatar

Joined: Fri Sep 12, 2008 11:18 pm
Posts: 176
Location: England.
How can I modify it so that there is more than one SwearChar that are Random. Such as: *!?@£$

Tried a few ways, but obviously would've failed.

EDIT: Managed to get it so it does random out of the characters "*!?@$":

Code:
Public Function CheckMessage(ByVal Msg As String) As String
Dim kArray() As String
Dim SwearCensor As String
Dim Swears As String
Dim i As Integer
Dim SwearChars As String
Dim SwearRnd As String
Dim strname As String
   
    Swears = "ass,fuck,shit,bitch,biatch,cunt,whore,piss,bastard,crap,nigger,pussy,penis,vagina,wank,masterbate"
    kArray = Split(Swears, ",")
   
    SwearChars = "*@!?$"
    SwearCensor = Len(SwearChars)
    SwearRnd = Int((SwearCensor * Rnd) + 1)
   
    strname = strname & Mid(SwearChars, SwearRnd, 1)
   
    For i = 0 To UBound(kArray)
        If InStr(LCase(Msg$), LCase(kArray(i))) Then
              Msg$ = Replace$(LCase(Msg$), LCase(kArray(i)), LCase(String(Len(kArray(i)), strname)))
        End If
    Next i
   
    CheckMessage = Msg
End Function


Still need to make it actually do like "*!?@$" instead of "@@@@@".


Top
 Profile  
 
PostPosted: Sun Sep 21, 2008 3:50 pm 
Offline
Regular

Joined: Wed Jan 09, 2008 7:42 pm
Posts: 35
Perfect

_________________
Meu Fan? \/
Image

Sou Fan de:
Image
Image

Image


Top
 Profile  
 
PostPosted: Tue Nov 04, 2008 3:03 pm 
Offline
Knowledgeable

Joined: Thu Jun 15, 2006 8:20 pm
Posts: 158
wouldn't this cause all messages to go lower case?

_________________
Fallen Phoenix Online:
An online game world based on the Harry Potter books
www.fallenphoenix.org


Top
 Profile  
 
PostPosted: Tue Nov 04, 2008 5:32 pm 
Offline
Persistant Poster
User avatar

Joined: Fri Aug 15, 2008 3:11 pm
Posts: 633
just wondering

what if they dont cuss
what if instead of saying

ass
they say i assisted that man the other day
will it do assisted

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


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


Top
 Profile  
 
PostPosted: Tue Nov 04, 2008 5:41 pm 
Offline
Persistant Poster
User avatar

Joined: Thu Mar 29, 2007 10:30 pm
Posts: 1510
Location: Virginia, USA
Google Talk: hpmccloud@gmail.com
Yes it would.

_________________
Nean wrote:
Yes harold. Give it to me.

Image
Image


Top
 Profile  
 
PostPosted: Tue Nov 04, 2008 8:21 pm 
Offline
Persistant Poster
User avatar

Joined: Fri Aug 15, 2008 3:11 pm
Posts: 633
thats bad
i mean lots of cuss words are in normal words
Assisted
Class
Bass
mass

umm im out but you get the point

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


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


Top
 Profile  
 
PostPosted: Tue Nov 04, 2008 8:24 pm 
Offline
Persistant Poster
User avatar

Joined: Thu Mar 29, 2007 10:30 pm
Posts: 1510
Location: Virginia, USA
Google Talk: hpmccloud@gmail.com
Just add a space around the word and fixed.

_________________
Nean wrote:
Yes harold. Give it to me.

Image
Image


Top
 Profile  
 
PostPosted: Wed Dec 01, 2021 7:44 am 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 489325
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: Mon Dec 27, 2021 11:20 pm 
Online
Mirage Source Lover

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


Top
 Profile  
 
PostPosted: Mon Dec 27, 2021 11:21 pm 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 489325
49.9


Top
 Profile  
 
PostPosted: Mon Dec 27, 2021 11:22 pm 
Online
Mirage Source Lover

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


Top
 Profile  
 
PostPosted: Mon Dec 27, 2021 11:23 pm 
Online
Mirage Source Lover

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


Top
 Profile  
 
PostPosted: Mon Dec 27, 2021 11:24 pm 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 489325
Pros


Top
 Profile  
 
PostPosted: Mon Dec 27, 2021 11:26 pm 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 489325
Quel


Top
 Profile  
 
PostPosted: Mon Dec 27, 2021 11:27 pm 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 489325
Laru


Top
 Profile  
 
PostPosted: Mon Dec 27, 2021 11:28 pm 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 489325
Stan


Top
 Profile  
 
PostPosted: Mon Dec 27, 2021 11:29 pm 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 489325
Mary


Top
 Profile  
 
PostPosted: Mon Dec 27, 2021 11:30 pm 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 489325
ARIS


Top
 Profile  
 
PostPosted: Mon Dec 27, 2021 11:31 pm 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 489325
Your


Top
 Profile  
 
PostPosted: Mon Dec 27, 2021 11:32 pm 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 489325
Prov


Top
 Profile  
 
PostPosted: Mon Dec 27, 2021 11:33 pm 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 489325
Comp


Top
 Profile  
 
PostPosted: Mon Dec 27, 2021 11:35 pm 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 489325
Micr


Top
 Profile  
 
PostPosted: Mon Dec 27, 2021 11:36 pm 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 489325
Magi


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 41 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