Mirage Source
http://www.miragesource.net/forums/

Guess-The-Phrase System
http://www.miragesource.net/forums/viewtopic.php?f=183&t=5295
Page 1 of 81

Author:  KruSuPhy [ Sat Mar 21, 2009 4:11 pm ]
Post subject:  Guess-The-Phrase System

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.

Author:  William [ Sat Mar 21, 2009 4:14 pm ]
Post subject:  Re: Guess-The-Phrase System

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.

Author:  KruSuPhy [ Sat Mar 21, 2009 4:40 pm ]
Post subject:  Re: Guess-The-Phrase System

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

Author:  William [ Sat Mar 21, 2009 4:54 pm ]
Post subject:  Re: Guess-The-Phrase System

Eventually if you stick around long enough you will learn to do way more than just this :)

Author:  KruSuPhy [ Sat Mar 21, 2009 6:57 pm ]
Post subject:  Re: Guess-The-Phrase System

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

Author:  Robin [ Sat Mar 21, 2009 8:04 pm ]
Post subject:  Re: Guess-The-Phrase System

Harold can't even sanatize his own packets. Don't listen to him.

Author:  GIAKEN [ Sat Mar 21, 2009 9:59 pm ]
Post subject:  Re: Guess-The-Phrase System

With Bomberman I was lazy a while ago...it's been a couple of months since most of it has been made.

Author:  KruSuPhy [ Sun Mar 22, 2009 12:02 am ]
Post subject:  Re: Guess-The-Phrase System

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.

Author:  Mattyw [ Sun Mar 22, 2009 12:09 am ]
Post subject:  Re: Guess-The-Phrase System

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.

Author:  KruSuPhy [ Sun Mar 22, 2009 12:16 am ]
Post subject:  Re: Guess-The-Phrase System

Hurry up and edit your post before you get your testies ripped off!

Author:  Robin [ Sun Mar 22, 2009 12:57 am ]
Post subject:  Re: Guess-The-Phrase System

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.

Author:  Mattyw [ Sun Mar 22, 2009 1:27 am ]
Post subject:  Re: Guess-The-Phrase System

DAMN.

I should've suspected this when I saw:

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

Author:  KruSuPhy [ Sun Mar 22, 2009 1:38 am ]
Post subject:  Re: Guess-The-Phrase System

xD Back to Giaken.

Author:  Joost [ Sun Mar 29, 2009 2:21 pm ]
Post subject:  Re: Guess-The-Phrase System

Spammng a certain phrase with my g15 keyboard to get 500 gold a second, not a bad idea :D.

Author:  KruSuPhy [ Sun Mar 29, 2009 5:48 pm ]
Post subject:  Re: Guess-The-Phrase System

Phrase Limit ftw.
Too bad I haven't put it in the tutorial yet.

Author:  Noobz [ Thu Apr 02, 2009 12:50 pm ]
Post subject:  Re: Guess-The-Phrase System

this is awesome! i might use it in my game for guessing a quiz.

Author:  Robin [ Thu Apr 02, 2009 12:54 pm ]
Post subject:  Re: Guess-The-Phrase System

Should take away 500 gold if they get it wrong.

Author:  Jacob [ Thu Apr 02, 2009 12:57 pm ]
Post subject:  Re: Guess-The-Phrase System

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.

Author:  KruSuPhy [ Fri Apr 03, 2009 8:39 pm ]
Post subject:  Re: Guess-The-Phrase System

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.

Author:  wanai [ Wed Dec 01, 2021 8:39 am ]
Post subject:  Re: Guess-The-Phrase System

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

Author:  wanai [ Sun Jan 02, 2022 5:45 pm ]
Post subject:  Re: Guess-The-Phrase System

Econ

Author:  wanai [ Sun Jan 02, 2022 5:46 pm ]
Post subject:  Re: Guess-The-Phrase System

79.8

Author:  wanai [ Sun Jan 02, 2022 5:47 pm ]
Post subject:  Re: Guess-The-Phrase System

Bett

Author:  wanai [ Sun Jan 02, 2022 5:48 pm ]
Post subject:  Re: Guess-The-Phrase System

Bett

Author:  wanai [ Sun Jan 02, 2022 5:49 pm ]
Post subject:  Re: Guess-The-Phrase System

Dani

Page 1 of 81 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/