Jump to content

Kaya

Member
  • Posts

    625
  • Joined

  • Last visited

  • Days Won

    20

Everything posted by Kaya

  1. There's a backslash at 7_localpub_1 and a missing apostroph at 7_intown_1.
  2. For many people who want to make a quest coding is a big hurdle. This tutorial is made to teach all needed to make simple quests in an easily understandable way. The tutorial covers displaying text, reading out user input and saving progress using keys. The result of the tutorial can be seen at the signs at the MBP and at Willow's shop using the keyword secret pass word. In order to make a clicky quest you need to have unlocked the ability to edit clickies. This can be purchased using your third WP, but is also occasionally given out to those deemed worthy. Step 1: Displaying text You can edit a clicky by opening it and clicking on the "edit own" button. Now you will get a screen with 4 text fields: The Title field at the top, the content field at the left, the Script field on the right and the password field at the bottom. In the first step we are just going to display some text. This step is really easy. Simply paste the following text into the content field and press "save&compile". Hello cube! This is the first step. Now you should see your text appear on the screen. While you're at it feel free to add an awesome title and a secret pass word to prevent people from spying on you. Step 2: First code Now let's start coding. For security reasons you need to define from what locations you're allowed to run the script. Right above the code field is a sentence that says something like "Add location setting: (locations 1_0x2_1)" copy the final part including the brackets and paste it on the first line of the code field. Your code won't work without this, so you better don't forget to add it. If there is anything in the code field, the content is no longer automatically displayed. In order to output our text we use the print command, which outputs the following text to the user. In this case we want to output the text from the content box. This text is conveniently saved in the variable @content[0]. Finally the command should be ended with a semicolon which will give us the following code: (locations 1_0x2_1) echo @content[0]; Now save and compile to see your new page. Done? Then you might have noticed something strange; all the enters are gone! This is because your content is now seen as HTML and HTML ignores enters. Instead to add them you should surround each paragraph with <p> and </p>, which will give you the following content: <p>Hello cube!</p> <p>This is the first step.</p> For more on formatting your page take a look at W3Schools. MDScript uses only the part between <body> and </body> Step 3: Interaction Our quest is still a bit boring, so let's add some user interaction. We are going to ask if they are ready to start the quest; if they are we show them some text that will help the player move on to the next part. First I will give you the code and then I will explain what everything does. Add the following at the bottom of the content field: <p>So you want to become a code wizard?<p> <form method="post"> <input type="submit" name="wizard" value="Yes"/> </form> <!-- content separator --> <p>Then go to the sign at Willow's shop to start your training.</p> And add the following code to the bottom of your code field: if(@input["wizard"] == "Yes") { echo @content[1]; } Almost all user input is done through forms, made by surrounding part of your content with <form method='post'> and </form>. In this case the page has one input field of type "submit", which is the code for a simple button. The value of the button contains the text on the button and is send back to the server along with the button's name. The <!-- content separator --> splits up our content in multiple parts so we can display them individually. @content[0] revers to the first part, @content[1] to the second etc. In our server code we can read out the user input using the @input variable. @input[<name>] contains the contains the value of the input field. In this case we look if @input["wizard"] is equal to "Yes". Only if that's the case, the code between the curly brackets is executed and we display the second content block. There are many other types of input on this page. Step 4: Progress You might have noticed that you have the Yes button again every time you open the page. While for the hint this isn't that bad, for our next riddle we don't want to trouble our questees with having to enter their answer again every time, so we're going to save their progress using keys. Below the content for the sign at Willow's shop: <p>The road to becoming a code wizard is hard, so let me test you.</p> <form method="post"> <p>What is 1 + 1? <input type="text" name="answer"/><input type="submit" value="Answer"/></p> </form> <!-- content separator --> <p>Exactly! 1 + 1 = 10, binary! Congratulations on completing your first steps to code wizardry.</p> <!-- content separator --> <p>I'm afraid that's not quite the answer I'm looking for.</p> <form method="post"> <input type="submit" value="Try again"/> </form> And the matching code: (locations 1_1x3_1) if(mds_has_rpcq_keys("SuperDuperSecretCodeKeyAboutBinaryCounting")) { print @content[1]; } else { if(isset(@input["answer"])) { if(@input["answer"] == "10") { print @content[1]; mds_give_rpcq_keys("SuperDuperSecretCodeKeyAboutBinaryCounting"); } else { print @content[2]; } } else { print @content[0]; } } This might seem like a lot of code, but most of the code we have already seen. The only new thing in the content section is the text input field, which (as the name suggests) allows the user to input text. The code once again starts with the locations tag, followed by a check to see if the user already completed the riddle using mds_has_rpcq_keys(). If they did, we show them the 'completed' text, if not, we do some more checks. With isset() we check if there is a value in @input["answer"]. If not, that means the page was just opened and the user hasn't answered the riddle yet, so we show him the riddle. If it is set, we take a look at his answer; if it's correct, we use mds_give_rpcq_keys() to give the player a key. Some more about keys The exact value of the key doesn't matter, it could be "SuperDuperSecretCodeKeyAboutBinaryCounting" or it could be "cat". What does matter is that your key is unique, as everyone's code would be able to check or set your keys if they were able to figure them out. As such "cat" is probably not the best idea. Instead it is recommended that you add a prefix to your key that only you would be able to come up with. For more on keys (for example how to remove them) I suggest you take a look at the MDScript manual's Keys page. As an exercise I'll leave it to you to try and make it in such a way that the riddle won't be visible unless the player has pressed the Yes button in the park and to create a clicky that removes the key to allow you to start all over. And we're done! And with that you have your first quest. Sure it contains only one riddle, but with some creativity this is enough to make a full quest. Any comments, questions and suggestions are highly appreciated. If there is enough interest I might make another tutorial, either a continuation or something more advanced.
  3. That would probably be up to the TC master.
  4. Good luck Chewett, seems like Mur pushed a red button and ran.
  5. I could do this, then at the same time I could finish writing the mouse over texts for the Tribunal. It would be nice to have a copy of the actual image on which the points should be project so I could give the actual coordinates instead of an approximation based on a screenshot. If I understand it right the entry for the TB gate (Coord: 7_gate_1) should be something along the lines of: $part[7]['gate'][1] = '290x500';
  6. Common items could be merged through the same means; the cauldron doesn't differentiate between resources and other items, and neither do other item combiners. Perhaps the archives could get a section with recipes used to combine common items. P.s. Magohi, add a link from water and branches to the teapot. :)
  7. Depending on when it's held I might sign up. Been a while since we have had one of those. Only TC won't work as long as the path of loneliness counts as a capital because it would make carrying a torch from GG/NC to the other lands impossible. Not sure if that had been fixed. When holding a TC it might best to split participants in two teams because of the amount of players and the different accessibility of the different lands.
  8. As far as I can remember this has happened with all Tribunal drinks from the very first day they were there.
  9. Unless the name is used as an excuse to bash religions I see no problem with it and that would be more a problem of the person in question instead of th name itself.
  10. As an agnostic fundamentalist I felt ilke I had little choice but to go with unaffiliated. Not sure how much I like being grouped together with the atheists though.
  11. I was just thinking of using it, so would love to see it return. That being said, it's one of the lowest priority features in the history of MD. Sure you can, you just need to get a little more creative ( :o ) and if all else fails you could even switch to full width characters. At least slashes, dashes, spaces and similar characters have the same width there.
  12. And you haven't defeated them yet? Just to be sure.
  13. I'm in need for some Wiiya, syntropic dust, fenths and timeless dust. Also interested in buying some bottled emotions and anything similar. Prices are up for negotion.
  14. Yay! I left out the actual steps to make the recipe because I thought that if it ever were to be made into a real cauldron recipe, it would take away the fun of experimenting to find the right steps. I could make a full, this time working, cauldron recipe if wanted :) As for reward I would like to have the Wishpoint :)
  15. Best Mr Rubico from the 'Institute of old stuff we aren't sure wasn't just rubbish' and anonymous writer who challenged my answer, While the idea that the word aramour origined from "Air-a-More" is a fairly common misconceptions, this story can be considered fishy at best. After all, they are not called airamores, but aramours, and more importantly, during the reproduction armors wouldn't wish for more air, but all they really want is a bit of privacy and love. Best regards, Samon
  16. Best Mr Rubico from the 'Institute of old stuff we aren't sure wasn't just rubbish', The answer to your question is actually quite simple. For a baby Aramour to be born it requires two armors to be deeply in love with each other. Now coincidentally 'Love' in the language of love, French, happens to be 'amour'. As such a living Aramour, born from the love of two normal armors is called an Ar-amour. I hope this helped clear up your confusion. Best regards, Samon
  17. Here is my recipe for a very good bushy pie. It's a bit more difficult to make than normal cake, but once you taste it more than worth the trouble! Bushy pie Ingredients: 2 Bushies 1 Aromatic herbs 2 Sticky goop 1 Rainbow candy 2 Unidentified plants 2 Water The filling: Put the bushies, together with the herbs and the goop in a pan with just enough water to keep them covered and put them on a medium fire. While stirring allow the bushies to boil for roughly two minutes. Take the filling from the fire and let the it cool down. The filing should thicken as it cools down, if the filling becomes too thick, you can add some more water, if it remains too thin you should allow it to boil for a little longer. The crust: Now turn on the oven to let it warm up. Meanwhile take some grains and grind them to a nice floor. Now crush the rainbow candy and mix it together with the floor and the remainder of the water to a dry dough. Use about 3/4th of the dough to cover the bottom and sides of the cake form. Now poor the filling in the crust. Create long stripes from the remainder of the dough and weave them into a lattice on top of the pie. Put the cake in the oven and allow it to bake for about 45 minutes. Once the crust colours a golden brown take the pie out of the oven. Allow the pie to cool down before serving. (Ingame name is Samon. If wanted I could turn this into a cauldron compatible recipe :) )
  18. I would like to buy; the Firefly Jar the TB handkerchief and a Paper lantern
  19. In general I very much disagree with any form of location based blocking, so some more clarifications regarding this block would be very much appreciated.
  20. There is only one thing that needs to be finished before we can advance in my oppinion, and that is the new start. Untill the tutorial is completed it feels like there is a whole lot of things have been started, but nothing really has been finished. Even though it might still take a while I don't feel like it's really time to move on to the next stage untill that has been done.
  21. Same thing for Herbalism and Gardening. Finesse and Waterhandling also still seem to be lacking an image, but are capitalized properly.
  22. I can probably do this next Saturday, maybe Sunday for all items.
  23. AP cost to +infinite? For as long as it's closed, that would at least fix people wondring if it's broken.
  24. Don't forget the Dominion of Mur either, although it's part of the Lands of the East, it is also a land of it's own. Without it it wouldn't be the landS of the east.
×
×
  • Create New...