Jump to content


Popular Content

Showing content with the highest reputation since 07/06/2020 in Posts

  1. 2 points
    Class given to Steno by Chewett. He mainly asked about MDScript and PHP. The full log is available on discord but I will transcribe it below too.
  2. 2 points

    Of resources and their management.

    there you go without and with ideas needs some rework to include all combiners but i couldnt be bothered yet to do that
  3. 2 points
    1. Security services. Many years of experience. Can advice on pretty much anything here. 2. Expert in Duklja/Zeta/Montenegro history, folklore and legends. Teacher and guide with 3 years of experience in these things with Montenegrin literature included. 3. Fantasy/Sci-Fi/Poetry/Horror stories writer with 3 published books, along with 3 others ready for publishing. 4. Master woodcutter with over 15 years of experiences. 6. Philosopher with many short stories on the meaning of life, soul, spirit and all delicate universes between.
  4. 1 point
    Details also posted on the forum: http://magicduel.invisionzone.com/topic/19010-md-life-lessons-mdscript-given-to-steno-by-chewett/
  5. 1 point
    StenoToday at 16:50 Okay... I really just don't understand how to make forms. I tried your code, and the code samon provided for basic button clicks but providing options for player to make choices and different outputs escapes me ChewettToday at 16:50 Timer starts now, 16:50 What link are you talking about? StenoToday at 16:51 http://magicduel.invisionzone.com/topic/5548-forms/ This is your post from ancient times about how to do this, it throws up errors saying... let me pull it up MagicDuel Forums Forms! Forms comprise of two parts. The actual form, and the processing Code Here is my form form method="post" action="" Please type something in here: input type=text name="box" size="25" maxlength="50" br / Do you use GGG? input type="radio... ChewettToday at 16:52 Whats the error :slight_smile: StenoToday at 16:52 Well even when I do have the location, it always says my location isn't there ChewettToday at 16:52 Can you show me the error please image StenoToday at 16:53 please tell me how I'm being a noob That's too small, let me get you a better image ChewettToday at 16:53 Thats fine Can you share your mdscript please StenoToday at 16:54 I just wanted to run the basic one you had posted to see what it output: (locations 1_-1x3_1) [php] <form method="post" action=""> Please type something in here: <input type=text name="box" size="25" maxlength="50"> <br /> Do you use GGG? <input type="radio" name="radio" value="use"> yes <input type="radio" name="radio" value="dont use"> no <br /> Pick some of these, you choose! <input type="checkbox" name="checkbox_1" value="1"> one <input type="checkbox" name="checkbox_2" value="2"> two <input type="checkbox" name="checkbox_3" value="3"> three <br /> Are you a... <select name="listbox"> <option value="Fighter">Fighter</option> <option value="Roleplayer">Roleplayer</option> <option value="Fighter and roleplayer">Fighter and roleplayer</option> </select> <input type="submit" value="Submit!"/> </form> ChewettToday at 16:55 Is that the code in the left or right side? StenoToday at 16:55 f*** I'm an idiot ChewettToday at 16:55 Could be 😉 I can keep helping if you want StenoToday at 16:56 goodness, that's the issue? I didn't realize it was going to run the script on the left. Should have guessed, since it's using html from storenow ChewettToday at 16:56 HTML on left PHP on right Can you show me an image of your "editor" please StenoToday at 16:57 ChewettToday at 16:57 Ah Remove the tags completely move (locations) bit to the right hand side StenoToday at 16:57 open and closing? ChewettToday at 16:57 Yes Those are the forum breaking it StenoToday at 16:58 when I did both those edits I got thisL ChewettToday at 16:58 reload the post There is now two "boxes" of code the top box needs to go left box the bottom box needs to go in the right one Make sure you add the (locations) stuff at the top of the right box StenoToday at 16:59 top box? ChewettToday at 16:59 On the post There should be two code sections I have called them top and bottom to describe them here StenoToday at 17:00 yes, got it. Do I also removed the open and close [php]? ChewettToday at 17:00 Yeah, they were because the forum broke it StenoToday at 17:01 sweet lord. The problem was that simple? Just delete the stupid php opena nd close? ChewettToday at 17:01 Maybe How is it looking now? StenoToday at 17:01 The way I wanted it to look ChewettToday at 17:01 What happens when you run it? is it working as expected? StenoToday at 17:01 Is the output field always centered and justified ChewettToday at 17:02 I think by default it is, but you can change that using HTML If you wrap everything in a <div> in the right panel <div style="text-align: left">ALL YOUR OTHER HTML HERE</div> Should do what you want Gimme a shout if it doesnt, you are paying me here! StenoToday at 17:03 shoot, I have more important things than the alignment If had the same error messages copying your key code from your key control post, was it probably from the open and close [php] as well? ChewettToday at 17:04 If you want me to, I can go through reviewing and fixing posts now :slight_smile: But yes the PHP stuff should NOT have any [php] tags in either sections StenoToday at 17:05 I think there are about 1000 more important things you could do. Also doesn't A25 make most of the MDScript kind of... archaic? ChewettToday at 17:05 Kind of, A25 is for "scene" things that will affect all of MD The problem is generally you end up "cluttering" the scene, I am already concerned some scenes are too busy in GWI We might need to introduce a MDScript type thing for A25, where one clickable can have "multiple" things StenoToday at 17:06 That's what I figured you say. AFter about 4-6 objects per scene things get a little cluttered. ChewettToday at 17:07 Yeah, its one of the concerns I have with A25 StenoToday at 17:07 That sounds like something I think Aia would enjoy ChewettToday at 17:07 A25 will need a recode before anyone can do that however, so it needs some work At the moment A25 has a single coded set of actions per clickable StenoToday at 17:08 Got it. I didn't see this as a function in MDScript or maybe I was looking for wrong label But is there a way I can have MDScript act like a resource combiner? like check if player has 2X, 4, Y, 3 Z and then show them [A] ChewettToday at 17:08 It should be able to check resources/items held I believe. I can look up the docs for you if you wish. It cant create items however. StenoToday at 17:09 Ah, so it can't give things back? That will be fine. I can provide a password that filling the combiner gives, and then when receive the password they tell me to get reward I would love if you could tell me the title of the forum post ChewettToday at 17:09 It cant take items either I dont believe I dont believe I know the title but I can look for it for you? StenoToday at 17:10 true, that would be easily abusable ChewettToday at 17:10 It can take heat I believe StenoToday at 17:10 just checking will work, I can put in legwork on my end as workaround ChewettToday at 17:10 What do you want me to check, to confirm? StenoToday at 17:11 What code is to check inventory items ChewettToday at 17:11 I will look now. mds_get_resource_count() http://magicduel.invisionzone.com/topic/17859-function-mds_get_resource_count/ MagicDuel Forums Function: mds_get_resource_count() array mds_get_resource_count() Returns an associative array with the resources a user has in their inventory and the count. The returned format is: array(42) { Aromatic herbs = int(98) Basic Iron Ingot = int(4) Bones = int(2) Branches = int(109) Bushies = int(50) Clay = int(18... Do you want me to check for counting items too? StenoToday at 17:12 what is the difference? ChewettToday at 17:12 resources are anything tagged as a resource StenoToday at 17:12 oh, one counts, one gives total inventory ChewettToday at 17:13 The returned format is: array(42) { 'Aromatic herbs' => int(98) 'Basic Iron Ingot' => int(4) 'Bones' => int(2) 'Branches' => int(109) 'Bushies' => int(50) 'Clay' => int(18) } That is the resource item. Shall I look to see if I can find something to find items? StenoToday at 17:13 yeah, something that could check inventory for an amount ChewettToday at 17:13 I will look now. StenoToday at 17:13 wait, would the code need a specific number? Or would there need to be extra code if above and beyond ChewettToday at 17:14 Which code? StenoToday at 17:15 havne't found it yet, I just realized if you found one that counted, I don't know how to make it look beyond a specified number to include a range of "Yes" and "No" answers ChewettToday at 17:15 mds_has_item() is the one you want: http://magicduel.invisionzone.com/topic/7342-function-mds_has_item/ MagicDuel Forums Function: Mds_Has_Item Copied from Mur's announcement You can now check if user has a specific item or not. The function mds_has_item("item name") returns the number of items the player has (zero if none). Because coins are technically also items, you can also check how much silver or gold someone h... @va = mds_has_item("Silver coin"); echo "You have ".@va." Silver coins"; @va = mds_has_item("Mammon's Book"); if(@va>0){ echo "You have the book"; }else{ echo "Go search for Mammon's Book"; } It will return a number StenoToday at 17:17 so would I change the "@va>0" To my amount, such as 4 or 5? ChewettToday at 17:17 Yes So if you wanted to check if they had 5 for example I would write: @va = mds_has_item("Silver coin"); if(@va >= 5){ echo "You have 5 silver coins or more, enough to pay your protection money to Chewett"; }else{ echo "Sounds like you need to get money fast or you will get beaten!"; } StenoToday at 17:18 that's great. I might have to use that okay, two minutes left! ummm... ChewettToday at 17:19 No rush, I have more time You have an hour So keep asking until 5:50 StenoToday at 17:19 How would I tell it to check multiple types of items? to return a separate "You've got em all, Ash!" kind of message ChewettToday at 17:19 You would want to do something like: @va = mds_has_item("Silver coin"); @vb = mds_has_item("Gold coin"); @vc = mds_has_item("5 Gold note"); if(@va >= 5 && @vb > 0 && @vc > 0) { echo "YAY YOU HAVE ENOUGH MUNNIES"; } That if statement could actually be refactored into something smaller, but less easy to read for new coders if(@va >= 5 && @vb && @vc) { I can explain the reason if you wish, or any of the symbols I used StenoToday at 17:22 double ampersand dileneates new variables? ChewettToday at 17:22 && is logical AND It reads in english:
  6. 1 point
    this is valid for everyone, send me by email at mur@magicduel.com who the parties involved in the lecture are, and the subject/summary. If this comes from the person offering the lecture, i will need to double check with the one receiving it, to confirm they are happy about it. If it comes from the person receiving the lecture, i will award the coin to the one giving directly. I will try to keep a score synced with your "menu" too, thats why i want a very short summary, so i know where in your menu it fits. Here is the list of the current documented coins. I remind you that after the first 100, these will be recycled and each coin will keep its own history. I will probably do a more automated system, but for now manual management will suffice. https://docs.google.com/document/d/1ZwvQyRzHrbEhM4WSr9D-oX6CsIXvdlATzhYugQGkftE/edit?usp=sharing
  7. 1 point
    I am not sure if this is where to post when they have occurred or not (not totally clear on the procedure of this initiative since I haven't seen Ailith for a bit. But I didn't understand coding at all, let alone MDScript. Chewett spend over an hour answering questions, walking me (the blundering fool) through the hurdles of basic MDScripting to do some basic things that are incredibly handy in quest-writing. If you want to check it out(or need the proof), go to the discord, and go to language learning channel. Search for "Timer starts now, 16:50" to find the beginning of the lecture"
  8. 1 point

    MD Word puzzle

    I apologize for the delay! This one is not very good, I must admit, I should have done more research beforehand, but I didn't want to push back it's release anymore! (The website also lost my first 2 versions of it, so... yeah. From now on, the First to finish (put picture of completed puzzle in a spoiler) and the person who posts the fastest time within a week of posting will get 1 silver--doesn't work for this one. P.S. Some of the facts presented are just from my opinion/understanding. If you feel I got something wrong, please let me know, I implore you to use this as an opportunity to teach me and the rest of the community about historical aspects of MD (looking at you, Mur/Chew/other fossils). P.P.S. If you want your land/alliance/topic to be featured in next month's puzzle, just send me a message with some words/clues! P.P.P.S. Thank you Aia for your help in this month's puzzle!
  • Create New...