Mirage Source

Free ORPG making software.
It is currently Fri Mar 29, 2024 11:27 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  [ 1800 posts ]  Go to page 1, 2, 3, 4, 5 ... 72  Next
Author Message
 Post subject: Guess-The-Phrase System
PostPosted: Sat Mar 21, 2009 4:11 pm 
Offline
Knowledgeable

Joined: Sun Jan 13, 2008 5:59 pm
Posts: 107
Credits to Giaken for Helping me make the packet and most of the complicated stuff :P
Credit to Me for doing the easy stuff that I didn't need help with xD


Kay. First Tutorial. Sorry If I miss something ;D
BEFORE ANYTHING:
Go to \Data\ (Server Folder)and Add an INI File called phraselist.ini. This is how you're going to change the phrase easily without having to go into the server coding.
In the INI File, Put:
Code:
[PHRASE]
Phrase=thisisthephrase

---------------
Okay, Make a new form called frmGuessPhrase. This is going to be where the player puts and sends the Word/Phrase. Add a textbox(txtPhrase) and a Command button(cmdEnterPhrase)

Next, Go to modInput. Find;
Code:
' Whos Online
Case "/who"
     SendWhosOnline

(Or any of the other Player Commands, That is)
Add This Under it:
Code:
' Show Phrase Form
Case "/phrase"
     frmGuessPhrase.Show

This Is going to make the frmGuessPhrase appear when the user types '/phrase' into chat

Next, We're going to make the Packet in the Client.
In ModEnumerations, Find;
Code:
Public Enum ClientPackets


At the very bottom of that list, Add;
Code:
CPhrase


Now, To send the packet to the Server, Go back to frmGuessPhrase, Double click your Command button, And add;
Code:
Call SendData(CPhrase & SEP_CHAR & txtPhrase.Text & END_CHAR)
txtPhrase.Text = vbNullString

The Call SendData code will send the phrase to the server to be checked.

SERVER-SIDE

Go to ModEnumerations, Find:
Code:
Public Enum ClientPackets



Again, at the bottom, Add:
Code:
CPhrase


Go to ModHandleData, And find the list of Case (Whatever).
At the bottom of it, Right before the Case Else, Add;
Code:
Case CPhrase
Call HandlePhrase(Index, Parse)


At the very bottom of the module, Add:

Code:
Private Sub HandlePhrase(ByVal Index As Long, ByRef Parse() As String)
Dim phrase As String
    phrase = GetVar(App.Path & "\Data\phraselist.ini", "PHRASE", "Phrase")
   
    If Parse(1) = phrase Then
        Call PlayerMsg(Index, "You got it right!", Green)
        Call GiveItem(Index, 1, 500)
        Else: Call PlayerMsg(Index, "You got it wrong!", Red)
    End If
End Sub

What it does:
Dims phrase as a string. I put the path of the INI File in. You don't have to do this, You can just put If Parse(1) = GetVar(App.Path &....). I did it this way because it seems easier in my head. The If Parse(1) = Phrase Then Checks to see if the Phrase the player entered matches the phrase in your INI File. If they get it right, It will send them a Green PlayerMsg Saying they got it right, And Assuming gold is your Item 1, IT will send 500 Gold to them. The Else is If they put the wrong phrase in, IT will Send them a Red PlayerMsg Telling them they got it wrong.




-------------
I think thats it. If It goes wrong, PM me what happened and I'll fix the tutorial. Again, Credits to Giaken for helping me make the packet and get it to send back and forth between server and client.


Top
 Profile  
 
PostPosted: Sat Mar 21, 2009 4:14 pm 
Offline
Community Leader
User avatar

Joined: Mon May 29, 2006 1:00 pm
Posts: 2538
Location: Sweden
Google Talk: johansson_tk@hotmail.com
Ey, this is a awesome idea. Skip the item award. And create a new stat or skill or whatever and call it knowledge. Now you need to guess phrases right in order to gain knowledge points. This knowledge points allows you to go on with quests and getting in to secret areas and such.

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


Top
 Profile  
 
PostPosted: Sat Mar 21, 2009 4:40 pm 
Offline
Knowledgeable

Joined: Sun Jan 13, 2008 5:59 pm
Posts: 107
o; Shweet Idea. I might totally look into that xD
Not only would that be awesome, It'd be even awesomer If I did it. xD
Total Ego boost ;P


Top
 Profile  
 
PostPosted: Sat Mar 21, 2009 4:54 pm 
Offline
Community Leader
User avatar

Joined: Mon May 29, 2006 1:00 pm
Posts: 2538
Location: Sweden
Google Talk: johansson_tk@hotmail.com
Eventually if you stick around long enough you will learn to do way more than just this :)

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


Top
 Profile  
 
PostPosted: Sat Mar 21, 2009 6:57 pm 
Offline
Knowledgeable

Joined: Sun Jan 13, 2008 5:59 pm
Posts: 107
Yea That's the idea.
I've got my handy dandy MSN and Giaken Added, And I'm sure If i beg enough He'll help me when i need it xD


Top
 Profile  
 
PostPosted: Sat Mar 21, 2009 8:04 pm 
Offline
Submit-Happy
User avatar

Joined: Fri Jun 16, 2006 7:01 am
Posts: 2768
Location: Yorkshire, UK
Harold can't even sanatize his own packets. Don't listen to him.

_________________
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: Sat Mar 21, 2009 9:59 pm 
Offline
Persistant Poster
User avatar

Joined: Thu Mar 29, 2007 10:30 pm
Posts: 1510
Location: Virginia, USA
Google Talk: hpmccloud@gmail.com
With Bomberman I was lazy a while ago...it's been a couple of months since most of it has been made.

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

Image
Image


Top
 Profile  
 
PostPosted: Sun Mar 22, 2009 12:02 am 
Offline
Knowledgeable

Joined: Sun Jan 13, 2008 5:59 pm
Posts: 107
Robin wrote:
Harold can't even sanatize his own packets. Don't listen to him.

Well I don't see your MSN addy anywhere around here, So I guess I'll just deal with him.


Top
 Profile  
 
PostPosted: Sun Mar 22, 2009 12:09 am 
Offline
Knowledgeable
User avatar

Joined: Fri Sep 12, 2008 11:18 pm
Posts: 176
Location: England.
KruSuPhy wrote:
Robin wrote:
Harold can't even sanatize his own packets. Don't listen to him.

Well I don't see your MSN addy anywhere around here, So I guess I'll just deal with him.


Psst. robinperris@hotmail.com.


Top
 Profile  
 
PostPosted: Sun Mar 22, 2009 12:16 am 
Offline
Knowledgeable

Joined: Sun Jan 13, 2008 5:59 pm
Posts: 107
Hurry up and edit your post before you get your testies ripped off!


Top
 Profile  
 
PostPosted: Sun Mar 22, 2009 12:57 am 
Offline
Submit-Happy
User avatar

Joined: Fri Jun 16, 2006 7:01 am
Posts: 2768
Location: Yorkshire, UK
Mattyw wrote:
KruSuPhy wrote:
Robin wrote:
Harold can't even sanatize his own packets. Don't listen to him.

Well I don't see your MSN addy anywhere around here, So I guess I'll just deal with him.


Psst. robinperris@hotmail.com.


Ha-HA! Changed my MSN, bitch.

_________________
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: Sun Mar 22, 2009 1:27 am 
Offline
Knowledgeable
User avatar

Joined: Fri Sep 12, 2008 11:18 pm
Posts: 176
Location: England.
DAMN.

I should've suspected this when I saw:

Quote:
Robin is leaving.
Leave me a message for details.


Top
 Profile  
 
PostPosted: Sun Mar 22, 2009 1:38 am 
Offline
Knowledgeable

Joined: Sun Jan 13, 2008 5:59 pm
Posts: 107
xD Back to Giaken.


Top
 Profile  
 
PostPosted: Sun Mar 29, 2009 2:21 pm 
Offline
Knowledgeable

Joined: Sat Jul 08, 2006 8:24 am
Posts: 339
Spammng a certain phrase with my g15 keyboard to get 500 gold a second, not a bad idea :D.


Top
 Profile  
 
PostPosted: Sun Mar 29, 2009 5:48 pm 
Offline
Knowledgeable

Joined: Sun Jan 13, 2008 5:59 pm
Posts: 107
Phrase Limit ftw.
Too bad I haven't put it in the tutorial yet.


Top
 Profile  
 
PostPosted: Thu Apr 02, 2009 12:50 pm 
Offline
Newbie

Joined: Wed Apr 01, 2009 11:57 pm
Posts: 1
this is awesome! i might use it in my game for guessing a quiz.


Top
 Profile  
 
PostPosted: Thu Apr 02, 2009 12:54 pm 
Offline
Submit-Happy
User avatar

Joined: Fri Jun 16, 2006 7:01 am
Posts: 2768
Location: Yorkshire, UK
Should take away 500 gold if they get it wrong.

_________________
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: Thu Apr 02, 2009 12:57 pm 
Offline
Pro
User avatar

Joined: Tue Nov 13, 2007 2:42 pm
Posts: 509
You should also have a huge list of strings that it can randomly pick one from. When the current one gets guessed, it picks a new random one.


Top
 Profile  
 
PostPosted: Fri Apr 03, 2009 8:39 pm 
Offline
Knowledgeable

Joined: Sun Jan 13, 2008 5:59 pm
Posts: 107
Robin wrote:
Should take away 500 gold if they get it wrong.

I haven't added anything else to the tutorial(i.e wrong answers and limit)
But in my source I have it where they lose 1000. Max Limit is 1 for every week(Which is when it should be changed, Weekly.)

@Dugor:
I was going to have a Hint system.
Picking a random phrase out of the blue isn't exactly what I'd call fair at all. But hell, None of us are fair I don't suppose. I just have a Hint thing.


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

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456192
http://audiobookkeeper.ruhttp://cottagenet.ruhttp://eyesvision.ruhttp://eyesvisions.comhttp://factoringfee.ruhttp://filmzones.ruhttp://gadwall.ruhttp://gaffertape.ruhttp://gageboard.ruhttp://gagrule.ruhttp://gallduct.ruhttp://galvanometric.ruhttp://gangforeman.ruhttp://gangwayplatform.ruhttp://garbagechute.ruhttp://gardeningleave.ruhttp://gascautery.ruhttp://gashbucket.ruhttp://gasreturn.ruhttp://gatedsweep.ruhttp://gaugemodel.ruhttp://gaussianfilter.ruhttp://gearpitchdiameter.ru
http://geartreating.ruhttp://generalizedanalysis.ruhttp://generalprovisions.ruhttp://geophysicalprobe.ruhttp://geriatricnurse.ruhttp://getintoaflap.ruhttp://getthebounce.ruhttp://habeascorpus.ruhttp://habituate.ruhttp://hackedbolt.ruhttp://hackworker.ruhttp://hadronicannihilation.ruhttp://haemagglutinin.ruhttp://hailsquall.ruhttp://hairysphere.ruhttp://halforderfringe.ruhttp://halfsiblings.ruhttp://hallofresidence.ruhttp://haltstate.ruhttp://handcoding.ruhttp://handportedhead.ruhttp://handradar.ruhttp://handsfreetelephone.ru
http://hangonpart.ruhttp://haphazardwinding.ruhttp://hardalloyteeth.ruhttp://hardasiron.ruhttp://hardenedconcrete.ruhttp://harmonicinteraction.ruhttp://hartlaubgoose.ruhttp://hatchholddown.ruhttp://haveafinetime.ruhttp://hazardousatmosphere.ruhttp://headregulator.ruhttp://heartofgold.ruhttp://heatageingresistance.ruhttp://heatinggas.ruhttp://heavydutymetalcutting.ruhttp://jacketedwall.ruhttp://japanesecedar.ruhttp://jibtypecrane.ruhttp://jobabandonment.ruhttp://jobstress.ruhttp://jogformation.ruhttp://jointcapsule.ruhttp://jointsealingmaterial.ru
http://journallubricator.ruhttp://juicecatcher.ruhttp://junctionofchannels.ruhttp://justiciablehomicide.ruhttp://juxtapositiontwin.ruhttp://kaposidisease.ruhttp://keepagoodoffing.ruhttp://keepsmthinhand.ruhttp://kentishglory.ruhttp://kerbweight.ruhttp://kerrrotation.ruhttp://keymanassurance.ruhttp://keyserum.ruhttp://kickplate.ruhttp://killthefattedcalf.ruhttp://kilowattsecond.ruhttp://kingweakfish.ruhttp://kinozones.ruhttp://kleinbottle.ruhttp://kneejoint.ruhttp://knifesethouse.ruhttp://knockonatom.ruhttp://knowledgestate.ru
http://kondoferromagnet.ruhttp://labeledgraph.ruhttp://laborracket.ruhttp://labourearnings.ruhttp://labourleasing.ruhttp://laburnumtree.ruhttp://lacingcourse.ruhttp://lacrimalpoint.ruhttp://lactogenicfactor.ruhttp://lacunarycoefficient.ruhttp://ladletreatediron.ruhttp://laggingload.ruhttp://laissezaller.ruhttp://lambdatransition.ruhttp://laminatedmaterial.ruhttp://lammasshoot.ruhttp://lamphouse.ruhttp://lancecorporal.ruhttp://lancingdie.ruhttp://landingdoor.ruhttp://landmarksensor.ruhttp://landreform.ruhttp://landuseratio.ru
http://languagelaboratory.ruhttp://largeheart.ruhttp://lasercalibration.ruhttp://laserlens.ruhttp://laserpulse.ruhttp://laterevent.ruhttp://latrinesergeant.ruhttp://layabout.ruhttp://leadcoating.ruhttp://leadingfirm.ruhttp://learningcurve.ruhttp://leaveword.ruhttp://machinesensible.ruhttp://magneticequator.ruhttp://magnetotelluricfield.ruhttp://mailinghouse.ruhttp://majorconcern.ruhttp://mammasdarling.ruhttp://managerialstaff.ruhttp://manipulatinghand.ruhttp://manualchoke.ruhttp://medinfobooks.ruhttp://mp3lists.ru
http://nameresolution.ruhttp://naphtheneseries.ruhttp://narrowmouthed.ruhttp://nationalcensus.ruhttp://naturalfunctor.ruhttp://navelseed.ruhttp://neatplaster.ruhttp://necroticcaries.ruhttp://negativefibration.ruhttp://neighbouringrights.ruhttp://objectmodule.ruhttp://observationballoon.ruhttp://obstructivepatent.ruhttp://oceanmining.ruhttp://octupolephonon.ruhttp://offlinesystem.ruhttp://offsetholder.ruhttp://olibanumresinoid.ruhttp://onesticket.ruhttp://packedspheres.ruhttp://pagingterminal.ruhttp://palatinebones.ruhttp://palmberry.ru
http://papercoating.ruhttp://paraconvexgroup.ruhttp://parasolmonoplane.ruhttp://parkingbrake.ruhttp://partfamily.ruhttp://partialmajorant.ruhttp://quadrupleworm.ruhttp://qualitybooster.ruhttp://quasimoney.ruhttp://quenchedspark.ruhttp://quodrecuperet.ruhttp://rabbetledge.ruhttp://radialchaser.ruhttp://radiationestimator.ruhttp://railwaybridge.ruhttp://randomcoloration.ruhttp://rapidgrowth.ruhttp://rattlesnakemaster.ruhttp://reachthroughregion.ruhttp://readingmagnifier.ruhttp://rearchain.ruhttp://recessioncone.ruhttp://recordedassignment.ru
http://rectifiersubstation.ruhttp://redemptionvalue.ruhttp://reducingflange.ruhttp://referenceantigen.ruhttp://regeneratedprotein.ruhttp://reinvestmentplan.ruhttp://safedrilling.ruhttp://sagprofile.ruhttp://salestypelease.ruhttp://samplinginterval.ruhttp://satellitehydrology.ruhttp://scarcecommodity.ruhttp://scrapermat.ruhttp://screwingunit.ruhttp://seawaterpump.ruhttp://secondaryblock.ruhttp://secularclergy.ruhttp://seismicefficiency.ruhttp://selectivediffuser.ruинфоhttp://semifinishmachining.ruhttp://spicetrade.ruhttp://spysale.ru
http://stungun.ruhttp://tacticaldiameter.ruhttp://tailstockcenter.ruhttp://tamecurve.ruhttp://tapecorrection.ruhttp://tappingchuck.rutaskreasoning.ruhttp://technicalgrade.ruhttp://telangiectaticlipoma.ruhttp://telescopicdamper.ruсайтhttp://temperedmeasure.ruhttp://tenementbuilding.rutuchkashttp://ultramaficrock.ruhttp://ultraviolettesting.ru


Top
 Profile  
 
PostPosted: Sun Jan 02, 2022 5:45 pm 
Offline
Mirage Source Lover

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


Top
 Profile  
 
PostPosted: Sun Jan 02, 2022 5:46 pm 
Offline
Mirage Source Lover

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


Top
 Profile  
 
PostPosted: Sun Jan 02, 2022 5:47 pm 
Offline
Mirage Source Lover

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


Top
 Profile  
 
PostPosted: Sun Jan 02, 2022 5:48 pm 
Offline
Mirage Source Lover

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


Top
 Profile  
 
PostPosted: Sun Jan 02, 2022 5:49 pm 
Offline
Mirage Source Lover

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


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

All times are UTC


Who is online

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