Mirage Source

Free ORPG making software.
It is currently Thu Mar 28, 2024 9:21 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  [ 1821 posts ]  Go to page 1, 2, 3, 4, 5 ... 73  Next
Author Message
PostPosted: Thu Dec 18, 2008 6:59 am 
Offline
Persistant Poster
User avatar

Joined: Thu Jul 24, 2008 6:42 am
Posts: 703
Google Talk: infectiousbyte@gmail.com
Okay, so the other day, I got bored and tried to write one from scratch, needless to say it was a success. I'm pretty confident in it, as it seemed to work quite well, though I'd appreciate it if someone with a bit more knowledge than I, took a look at it to see if there was any potential bugs or problems. The good thing about this is, that it keeps track of the players warn level. So all you need to do is /warn the player. First warning sends a text warn. Second a kick, and the third a good ol' ban. Enjoy, and remember I need some constructive criticism.

Server Side

SPOILER: (click to show)
Find
Code:
CQuit


Under it add:

Code:
CSetWarn


Then Find:

Code:
Sub SetPlayerPK(ByVal Index As Long, ByVal PK As Long)
    Player(Index).Char(TempPlayer(Index).CharNum).PK = PK
End Sub


Under it add:
Code:
Function GetPlayerWarn(ByVal Index As Long) As Long
    GetPlayerWarn = Player(Index).Char(TempPlayer(Index).CharNum).Warn
End Function

Sub SetPlayerWarn(ByVal Index As Long, ByVal Warn As Long)
    Player(Index).Char(TempPlayer(Index).CharNum).Warn = Warn
End Sub


Then Find
Code:
         Case Else
            GoTo ErrorHandle ' packet not found


Above it add:

Code:
        Case CSetWarn
            HandleSetWarn Index, Parse


Then Find:
Code:
' :::::::::::::::::::::::
' :: Set sprite packet ::
' :::::::::::::::::::::::
Private Sub HandleSetSprite(ByVal Index As Long, ByRef Parse() As String)
Dim N As Long

    ' Prevent hacking
    If GetPlayerAccess(Index) < ADMIN_MAPPER Then
        Call HackingAttempt(Index, "Admin Cloning")
        Exit Sub
    End If
   
    ' The sprite
    N = CLng(Parse(1))
   
    Call SetPlayerSprite(Index, N)
    Call SendPlayerData(Index)
    Exit Sub
End Sub


And under that add:
Code:
' :::::::::::::::::::::::
' :: Set Warn packet ::
' :::::::::::::::::::::::
Sub HandleSetWarn(ByVal Index As Long, _
                  ByRef Parse() As String)
    Dim N As Long

    N = FindPlayer(Parse(1))
   
    If N > 0 Then
        If N <> Index Then

            Select Case GetPlayerWarn(N) + 1

                Case 1
                    Call SetPlayerWarn(N, 1)
                    'Call SetPlayerWarn(n, GetPlayerWarn(n) + 1)
                    Call PlayerMsg(Index, "You have received your first warning, for breaking the rules. Your second will result in a kick!", Blue)

                Case 2
                    Call SetPlayerWarn(N, GetPlayerWarn(N) + 1)
                    Call AlertMsg(Index, "You have received your second warning. Your third will result in a ban")

                Case 3
                    Call SetPlayerWarn(N, GetPlayerWarn(N) + 1)
                    Call BanIndex(N, Index)
            End Select

        Else
            Call PlayerMsg(Index, "You can't warn yourself!", BrightRed)
        End If

    Else
        Call PlayerMsg(Index, "Player Isn't Online!", BrightRed)
    End If

End Sub


Then in the player rec find:
Code:
PK As Byte


Under that add:
Code:
Warn As Byte


Client Side

SPOILER: (click to show)
Find:
Code:
Case "/setaccess"
                    If GetPlayerAccess(MyIndex) < ADMIN_CREATOR Then
                        AddText "You need to be a high enough staff member to do this!", AlertColor
                        GoTo Continue
                    End If
                   
                    If UBound(Command) < 2 Then
                        AddText "Usage: /setaccess (name) (access)", AlertColor
                        GoTo Continue
                    End If
                   
                    If IsNumeric(Command(1)) = True Or IsNumeric(Command(2)) = False Then
                        AddText "Usage: /setaccess (name) (access)", AlertColor
                        GoTo Continue
                    End If
                   
                    SendSetAccess Command(1), CLng(Command(2))


Under it add:
Code:
                    Case "/warn"
                    If GetPlayerAccess(MyIndex) < ADMIN_CREATOR Then
                        AddText "You need to be a high enough staff member to do this!", AlertColor
                        GoTo Continue
                    End If
                   
                    If UBound(Command) < 1 Then
                        AddText "Usage: /warn (name)", AlertColor
                        GoTo Continue
                    End If
                   
                    If IsNumeric(Command(1)) = True Then
                        AddText "Usage: /warn (name)", AlertColor
                        GoTo Continue
                    End If
                   
                    SendSetWarn Command(1)
     


Then find:
Code:
Sub SendSetAccess(ByVal Name As String, ByVal Access As Byte)
Dim Packet As String

    Packet = CSetAccess & SEP_CHAR & Name & SEP_CHAR & Access & END_CHAR
    Call SendData(Packet)
End Sub


Under it add:
Code:
Sub SendSetWarn(ByVal Name As String)
Dim Packet As String

    Packet = CSetWarn & SEP_CHAR & Name & END_CHAR
    Call SendData(Packet)
End Sub


Then find:
Code:
CQuit


Under it add:
Code:
CSetWarn

That should be it. Give it a whirl, and drop me some feed back.

_________________
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 Wed Apr 08, 2009 4:21 pm, edited 6 times in total.

Top
 Profile  
 
PostPosted: Sat Dec 20, 2008 10:26 am 
Offline
Persistant Poster
User avatar

Joined: Thu Jul 24, 2008 6:42 am
Posts: 703
Google Talk: infectiousbyte@gmail.com
No use to anyone?

_________________
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: Sat Dec 20, 2008 7:37 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
It's plenty useful, in fact I have a warn system that's nearly identical. ;) Here's a challenge for ya Nean, store a date on the player rec as well, and make the third warning a one day ban, and add a fourth warning that permanently bans them :D

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

Image


Top
 Profile  
 
PostPosted: Sun Dec 21, 2008 1:38 am 
Offline
Persistant Poster
User avatar

Joined: Thu Jul 24, 2008 6:42 am
Posts: 703
Google Talk: infectiousbyte@gmail.com
Rian wrote:
It's plenty useful, in fact I have a warn system that's nearly identical. ;) Here's a challenge for ya Nean, store a date on the player rec as well, and make the third warning a one day ban, and add a fourth warning that permanently bans them :D


Ooh. That might be tough... Even tougher it'll be to test it though, provided I can even remember. I'll try that challenge Rian, I'll try that. :D

_________________
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: Sun Dec 21, 2008 1:52 am 
Player.bandate = date
Player.bantime = time

Then all you gotta do is..

If bandate <> date and bantime < time then
unban
end if


Top
  
 
PostPosted: Sun Dec 21, 2008 4:49 pm 
Offline
Knowledgeable
User avatar

Joined: Fri Feb 02, 2007 4:50 am
Posts: 263
Location: usa michigan centriville
haha this is good ^^. another thing that would work with this would be a report system. To have players type the rule breaking players name in select a report option a picture be taken of the current situation and the text be save for that player. on serverside. and make it where a admin or moderator could look at the report and be able to press yes or no and if yes it warns the player mattering on the condition of the rule. ^^.

_________________
Fuck? I really joined in 2006.
Spirea, Chat Rooms, Discussions, Help. everything you need in one spot.
http://spirean.com
I love my computer, you never ask for more, you can be my princess or be my whore


Top
 Profile  
 
PostPosted: Sun Dec 21, 2008 7:23 pm 
Offline
Pro
User avatar

Joined: Sun Aug 05, 2007 2:26 pm
Posts: 547
How bout making it impossible to do the things in the first place to get you warned. Kind like (pardon the bad anology) locking the door, instead of calling the cops.

First make a list of everything that can get you warned/banned in your game.

Example

Spamming
Cursing (depends)
Hacking
Pissing you off


First lets look at spamming. A common type of spamming is sending the same text over and over again. This would be quite easy to check for, and is already in many games. Simply make a variable "lasttext" for the player and save their last message in it. When they send another message, if its the same, dont send it, and instead send them text saying 'you already said that'.
Also you can let people have an ignore command, so your players can simply ingore/block spammers, rendering them powerless to annoy.

Cursing, get a word filter, and make it clientside. Let people turn it on and off.

Hacking, get proper security.

Pissing you off: make an easy to access ban button client and serverside.

_________________
GIAKEN wrote:
I think what I see is this happening:

Labmonkey gets mod, everybody loves him, people find out his code sucks, he gets demoted, then banned, then he makes an engine called Chaos Engine.


Top
 Profile  
 
PostPosted: Sun Dec 21, 2008 9:42 pm 
Offline
Knowledgeable
User avatar

Joined: Fri Feb 02, 2007 4:50 am
Posts: 263
Location: usa michigan centriville
haha sometimes there are glitches and some people like to take advantage of them and not tell you about them. the purpose of it would be allowing players to help out with the stuff you can't 100% cover.

_________________
Fuck? I really joined in 2006.
Spirea, Chat Rooms, Discussions, Help. everything you need in one spot.
http://spirean.com
I love my computer, you never ask for more, you can be my princess or be my whore


Top
 Profile  
 
PostPosted: Sun Dec 21, 2008 9:56 pm 
Offline
Pro
User avatar

Joined: Sun Aug 05, 2007 2:26 pm
Posts: 547
The post was not directed at you genusis. It was merely something for Nean to code, seeing as he wants to program stuff.

Wait, just realized your post could have not been directed at me also, which would make me seem idiotic. So, sorry if that is the case.

But anyway, i believe ed3 has a report system, its sadscript, but you can rip it from there.

_________________
GIAKEN wrote:
I think what I see is this happening:

Labmonkey gets mod, everybody loves him, people find out his code sucks, he gets demoted, then banned, then he makes an engine called Chaos Engine.


Top
 Profile  
 
PostPosted: Mon Dec 22, 2008 12:21 am 
Offline
Knowledgeable
User avatar

Joined: Fri Feb 02, 2007 4:50 am
Posts: 263
Location: usa michigan centriville
sadscript. ................... LMAO Worthless. if i was someone i would want my game to work well and fast so i would use a hardcoded one. I say no to sadscripts.

_________________
Fuck? I really joined in 2006.
Spirea, Chat Rooms, Discussions, Help. everything you need in one spot.
http://spirean.com
I love my computer, you never ask for more, you can be my princess or be my whore


Top
 Profile  
 
PostPosted: Mon Dec 22, 2008 12:27 am 
genusis wrote:
sadscript. ................... LMAO Worthless. if i was someone i would want my game to work well and fast so i would use a hardcoded one. I say no to sadscripts.


You can convert sadscript codes to be hard coded.. Good god man, stop being retarded. You wanna see something worthless? Find a mirror and stare for awhile, shit.


Top
  
 
PostPosted: Mon Dec 22, 2008 1:41 am 
Offline
Pro
User avatar

Joined: Sun Aug 05, 2007 2:26 pm
Posts: 547
refrains from saying "What is wrong with the mirror."

Matt posted after me, and yet cursed someone else off! <feels special>

Yea, so anyway, enough being stupid. VBScript (or sadscript) can basically, with little or no tweaks, just be copy pasted into vb6. If you really want it, what it does is have a report.txt serverside. When the server gets a message (because elysium has serverside command checking, you may move it to clientside if you want) it checks if the message starts with /report. If it does, then it takes all text after that, along with the player's name, and puts it in the report.txt. You simply check the report.txt, and see what people reported.

_________________
GIAKEN wrote:
I think what I see is this happening:

Labmonkey gets mod, everybody loves him, people find out his code sucks, he gets demoted, then banned, then he makes an engine called Chaos Engine.


Top
 Profile  
 
PostPosted: Mon Dec 22, 2008 7:33 am 
Offline
Persistant Poster
User avatar

Joined: Thu Jul 24, 2008 6:42 am
Posts: 703
Google Talk: infectiousbyte@gmail.com
Yeah, ignore and word censors will definitely be coded for the hell of it, when I get them done I'll make some tuts. I'm also converting most of my code to work with Elysium 3.3.2 for the hell of it...

_________________
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 Apr 08, 2009 4:22 pm 
Offline
Persistant Poster
User avatar

Joined: Thu Jul 24, 2008 6:42 am
Posts: 703
Google Talk: infectiousbyte@gmail.com
I spiffed up some of the code (fixed a few bugs), and it seems to work fine on the newest version on MS.

_________________
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: Thu Apr 09, 2009 8:43 am 
Offline
Knowledgeable

Joined: Sat Jul 08, 2006 8:24 am
Posts: 339
genusis wrote:
sadscript. ................... LMAO Worthless. if i was someone i would want my game to work well and fast so i would use a hardcoded one. I say no to sadscripts.

Kid, you're a fucking moron. Any real game uses scripting for its events. Now sadscript may not be the best way to go, bt scripting is vital in any decent game. So don't go shouting stupid things in this section again, this section is for real men to discuss things.


Top
 Profile  
 
PostPosted: Thu Apr 09, 2009 1:30 pm 
Offline
Submit-Happy
User avatar

Joined: Fri Jun 16, 2006 7:01 am
Posts: 2768
Location: Yorkshire, UK
genusis wrote:
sadscript. ................... LMAO Worthless. if i was someone i would want my game to work well and fast so i would use a hardcoded one. I say no to sadscripts.


The way Elysium and all it's decendants use Sadscript is terrible, but using it properly it can be a very powerful tool.

Also, I laughed at 'Want my game to work well and fast'. Just look around at some of the code you've posted, son.

_________________
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  
 
PostPosted: Wed Dec 01, 2021 8:23 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: Sat Jan 01, 2022 12:03 am 
Offline
Mirage Source Lover

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


Top
 Profile  
 
PostPosted: Sat Jan 01, 2022 12:04 am 
Offline
Mirage Source Lover

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


Top
 Profile  
 
PostPosted: Sat Jan 01, 2022 12:05 am 
Offline
Mirage Source Lover

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


Top
 Profile  
 
PostPosted: Sat Jan 01, 2022 12:06 am 
Offline
Mirage Source Lover

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


Top
 Profile  
 
PostPosted: Sat Jan 01, 2022 12:07 am 
Offline
Mirage Source Lover

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


Top
 Profile  
 
PostPosted: Sat Jan 01, 2022 12:08 am 
Offline
Mirage Source Lover

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


Top
 Profile  
 
PostPosted: Sat Jan 01, 2022 12:09 am 
Offline
Mirage Source Lover

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


Top
 Profile  
 
PostPosted: Sat Jan 01, 2022 12:10 am 
Offline
Mirage Source Lover

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


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

All times are UTC


Who is online

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