Jump to content
Sign in to follow this  
Chewett

MD "Life Lessons" MDScript given to Steno by Chewett

Recommended Posts

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

Today at 16:50

Timer starts now, 16:50
 
16:50
What link are you talking about?
 

Today 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 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 																		 													 													 																		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						[16:52]					image																		 													 													 																		StenoToday at 16:53							please tell me how I'm being a noob																						 													 													[16:53]					That's too small, let me get you a better image											ChewettToday at 16:53							Thats fine						[16:53]					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> 

Today at 16:55

Is that the code in the left or right side?
 

Today at 16:55

f*** I'm an idiot

Today at 16:55

Could be :wink:
 
16:55
I can keep helping if you want
 

Today 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

Today at 16:56

HTML on left
16:56
PHP on right
16:56
Can you show me an image of your "editor" please

Today at 16:57

unknown.png?width=400&height=225

Today at 16:57

Ah
16:57
Remove the
 tags completely
		
	


16:57
move (locations) bit to the right hand side

Today at 16:57

open and closing?

Today at 16:57

Yes
16:57
Those are the forum breaking it

Today at 16:58

when I did both those edits I got thisL
16:58
unknown.png?width=400&height=225

Today at 16:58

reload the post
16:58
There is now two "boxes" of code
16:58
the top box needs to go left box
16:58
the bottom box needs to go in the right one
16:59
Make sure you add the (locations) stuff at the top of the right box

Today at 16:59

top box?

Today at 16:59

On the post
 
16:59
There should be two code sections
 
16:59
I have called them top and bottom to describe them here
 

Today at 17:00

yes, got it. Do I also removed the open and close [php]?

Today at 17:00

Yeah, they were because the forum broke it
 

Today at 17:01

sweet lord. The problem was that simple? Just delete the stupid php opena nd close?

Today at 17:01

Maybe
17:01
How is it looking now?

Today at 17:01

The way I wanted it to look
unknown.png?width=400&height=225

Today at 17:01

What happens when you run it? is it working as expected?

Today at 17:01

Is the output field always centered and justified

Today at 17:02

I think by default it is, but you can change that using HTML
17:02
If you wrap everything in a <div> in the right panel
17:02
<div style="text-align: left">ALL YOUR OTHER HTML HERE</div>
17:02
Should do what you want
17:02
Gimme a shout if it doesnt, you are paying me here!

Today at 17:03

shoot, I have more important things than the alignment
17:04
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?

Today at 17:04

If you want me to, I can go through reviewing and fixing posts now :slight_smile:
17:04
But yes the PHP stuff should NOT have any [php] tags in either sections

Today 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?

Today at 17:05

Kind of, A25 is for "scene" things that will affect all of MD
17:06
The problem is generally you end up "cluttering" the scene, I am already concerned some scenes are too busy in GWI
17:06
We might need to introduce a MDScript type thing for A25, where one clickable can have "multiple" things

Today at 17:06

That's what I figured you say. AFter about 4-6 objects per scene things get a little cluttered.

Today at 17:07

Yeah, its one of the concerns I have with A25

Today at 17:07

That sounds like something I think Aia would enjoy

Today at 17:07

A25 will need a recode before anyone can do that however, so it needs some work
 
17:07
At the moment A25 has a single coded set of actions per clickable

Today at 17:08

Got it. I didn't see this as a function in MDScript or maybe I was looking for wrong label
17:08
But is there a way I can have MDScript act like a resource combiner?
17:08
like check if player has 2X, 4, Y, 3 Z and then show them [A]

Today 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.
17:09
It cant create items however.

Today 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
17:09
I would love if you could tell me the title of the forum post

Today at 17:09

It cant take items either I dont believe
17:10
I dont believe I know the title but I can look for it for you?

Today at 17:10

true, that would be easily abusable

Today at 17:10

It can take heat I believe

Today at 17:10

just checking will work, I can put in legwork on my end as workaround

Today at 17:10

What do you want me to check, to confirm?

Today at 17:11

What code is to check inventory items

Today at 17:11

I will look now.
 
MagicDuel Forums
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...
forumbox.jpg.f7f60ad94658d17d89495ba8d00
17:12
Do you want me to check for counting items too?

Today at 17:12

what is the difference?

Today at 17:12

resources are anything tagged as a resource

Today at 17:12

oh, one counts, one gives total inventory

Today 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) }
 
17:13
That is the resource item. Shall I look to see if I can find something to find items?

Today at 17:13

yeah, something that could check inventory for an amount

Today at 17:13

I will look now.

Today at 17:13

wait, would the code need a specific number? Or would there need to be extra code if above and beyond

Today at 17:14

Which code?

Today 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

Today at 17:15

mds_has_item() is the one you want:
 
MagicDuel Forums
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...
forumbox.jpg.f7f60ad94658d17d89495ba8d00
17:15
@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";
}
17:15
It will return a number

Today at 17:17

so would I change the "@va>0" To my amount, such as 4 or 5?

Today at 17:17

Yes
17:17
So if you wanted to check if they had 5 for example I would write:
17:18
@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!";
}

Today at 17:18

that's great. I might have to use that
17:18
okay, two minutes left! ummm...

Today at 17:19

No rush, I have more time
17:19
You have an hour
17:19
So keep asking until 5:50

Today 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

Today at 17:19

You would want to do something like:
17:21
@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";
}
17:21
That if statement could actually be refactored into something smaller, but less easy to read for new coders
17:22
if(@va >= 5 && @vb && @vc) {
17:22
I can explain the reason if you wish, or any of the symbols I used

Today at 17:22

double ampersand dileneates new variables?

Today at 17:22

&& is logical AND
17:22
It reads in english:
17:22
If @va is greater than or equal to 5 AND @vb is greater than 0 AND @vc is greater than 0
17:23
THEN do the bit inside the if
17:23
The logic follows standard short circuit rules so I would probably write that if:

Today at 17:23

COOL. :eyes:

Today at 17:23

if(@vb && @vc && @va >= 5) {
17:23
Again, if there is anything you wanted to ask about what I said?

Today at 17:24

no. That actually made sense. Would I need the extra blank line for the code to run?

Today at 17:24

Where would the blank line need to be sorry?

Today at 17:25

between your variable definition and the statement about quantity your code has a blank line, is that artificial formatting or did you hit [Enter] twice after defining vC

Today at 17:25

Oh in PHP (which MDScript is based on) blank lines are ignored by the interpreter
17:26
Its a stylistic thing to seperate my variable declrations and the if statement, it makes things easier to read IMO
17:26
In this short example it isnt obvious, but whitespace is important for programming

Today at 17:26

throws hands up in air in hallelujah I thought I was doing that wrong for hours

Today at 17:26

I believe the fancy term is "whitespace agnostic"

Today at 17:26

so that each new topic, so to speak it a new paragraph of code?
17:28
running through list of desires I have MDScript might fulfill ie processing
17:29
Is there a script for checking a player's affiliation? Speficially to return false if player is dead?

Today at 17:29

Its sort of like a new paragraph
17:29
After time programming you kind of "learn" how to split up things, it makes sense as you look at it
17:29
I didnt even think about putting a line between the variables and the if statement, it just happened
17:29
Thats why I was unsure what you meant by "do you need the line". I didnt even realise I had entered it!
17:30
Affliation?
17:30
As in land you mean?

Today at 17:30

yeah, like what if I wanted only Caretakers to be able to see one message, CotE another, and SoE a third message?
17:30
or even what land, yes

Today at 17:31

Let me see.
17:33
mds_read_uvars() is the function you would want: http://magicduel.invisionzone.com/topic/5499-user-variables/
 
MagicDuel Forums
It Is recommended that you read [topic=5494]Variables[/topic], Before reading this. Copied From Murs initial Post (no code changed) [b]User Vars[/b] Properties of the user accessing the script are available to the script. Dont worry, private info is not available to the script...
forumbox.jpg.f7f60ad94658d17d89495ba8d00
17:33
You can use it to find the land and alliance ID's
17:33
The page is somewhat broken, I could spend some time fixing it up for you if you wish?

Today at 17:34

(I would be asking the same question in regards to player DNA, if it wasn't in binary because then I could say if player is in X grouping then A happens, if in Y grouping of DNA, then B happens)

Today at 17:34

I dont believe DNA is available from MDS

Today at 17:34

ah, it's not tied to profile variables?

Today at 17:34

It may be, I am not sure.

Today at 17:35

Sure, being able to write different rude messages that only Mallos and Ledah can read is quite appealing to me

Today at 17:35

You could just access their ID if you want specific people?

Today at 17:36

I mean, I'm not that juvenile. But I think it would be intriguing to have different quest routes for different land affiliations
17:36
like you start at GoE, but your line is in GG if from LotE, if from MB, it's in LotE, things like that

Today at 17:36

I think that sounds interesting yes
17:38
DNA is not currently accessable as far as I can see from that function.

Today at 17:39

yeah, I can't find dead as an option either, but technically, 'The Dead' is a land, which is why it replaces your land affiliation, correct?

Today at 17:40

Ah the dead is represented by war_status I believe but it is not exposed.
17:40
You can check for the land ID of that dead, most, if not all, people should gain that when dying

Today at 17:42

so basically, what would I write if i wanted my va to be land ID, and then make it return true statement "alas, only the dearly departed may partake of this endeavor, ask a caretaker about death if you wish to proceed"

Today at 17:42

You would do:
17:43
@va = uv("land");
17:43
That would get you the land ID of the current player
17:43
Then if(@va == IDOFTHEDEAD) { echo "YOU DED"; }
17:44
I can find the ID of the dead land if you wish

Today at 17:44

that would be helpful :slight_smile:

Today at 17:44

ID 12
17:44
@va = uv("land");
if(@va == 12) { echo "YOU DED"; }
17:45
PLEASE NOTE:
17:45
Above I missed a double =
17:45
I have corrected the code above
17:45
if you did: if(@va = 12) { } That would assign @va to 12, then run the code inside the if statement because if(@va) is now true

Today at 17:46

Ah

Today at 17:46

It is a common bug in code.
 

Today at 17:46

So @va == uv("land"); if(@va == 12) { echo "You have made mistakes, perhaps you've offended the wrong person, you've made mistakes, so have we all, how shall you learn?"; }

Today at 17:46

That would work
17:47
No sorry
17:47
@va = uv("land") assigns
17:47
@va == uv("land") performs an equality comparison
17:47
The first assigns the land to the value of @va
17:47
The second compares @va to uv("land")
17:47
and returns true/false

Today at 17:48

@vb == uv("alliance") if(@va == 6) {echo "you have the knowledge of death required to proceed";}

Today at 17:48

No that wouldnt do what you want

Today at 17:48

wait, so just ONE single equals?

Today at 17:48

= is the assignment operator. It assigns the value on the right, to the left.
17:49
== is the equality operator, if the left and the right are roughly equal it will return true. Otherwise it returns false

Today at 17:49

so my first line is "=", while my if statement is '=="?

Today at 17:49

Yes
17:49
You could shorten it to: if(uv("land") == 12) { }

Today at 17:50

and it's quotations, not apostrophes?

Today at 17:51

They are the same in PHP
17:51
' and " are treated the same
17:51
Other languages that is not true, but in PHP it is

Today at 17:51

Alright, thank you for the hour. If Mur somehow forgets about this whole token exchange thing, remind me, I'll pay you in-game rewards somehow

Today at 17:52

I have 5 minutes before I need to cook food, ask away :slight_smile:

Today at 17:53

That was all I really had to ask. Without the ability to give items (since there is no 'storage' for each clickie) I've asked more than I would have thought to previously.
17:53
Now I just have to test out the key-giving and figure that out, plus the whole form thing, and it should make my quests WAY neater-looking and palatable

Today at 17:54

That sounds good

Today at 17:54

(Is it possible to have rpcq items have MDscript in them but have different a25 functions when "activated"?)

Today at 17:54

Im not sure what you mean there Aia

Today at 17:55

(Some items are rpcq items and their function is to run the mdscript in them)
17:55
(I notice some other A25 users have been turning previously rpcq-clicky items into A25 ones and losing that function)

Today at 17:56

Ah thats terrible, that shouldnt be happening.

Today at 17:56

(Is it possible to, for example, have something run mdscript normally, but when you have a quest key or trigger it does an A25 function instead?)

Today at 17:56

You would probably have to code two clickables, one to show when you have the key, and one to show when you dont.
17:57
And overlap them

Today at 17:57

(Also, reading back on your Q&A lecture and it makes me want to try MDscripting!)

Today at 17:57

But thats messy and IMO I would think we need to just improve A25 to allow such things easier

Today at 17:57

applauds Chewett

Today at 17:57

Thank you Aia
17:57
Now I need to cook

Today at 17:57

also applauds Steno

Today at 17:57

I will read this later

Today at 17:58

Ah, mayst thou procure of many culinary delights.

Today at 17:58

Thank you Chew!
18:01
could someone pin the first post of this lecture?

Today at 18:02

I will put this on the forum and tag you @Steno

Today at 18:03

thanks. So everyone can see my blunders, including me. So I don't make them again (I'm actually pleased with you posting it, in case that isn't clear)

Share this post


Link to post
Share on other sites

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:

Share this post


Link to post
Share on other sites

#1: I loved this. I've been wanting to ask this stuff for awhile, but no one really seemed to have time -ingame. Mur's whole lecture coin changed that. I learned how to do some really simple stuff that I would have honestly given up on before clearing that hurdle

#2 I wish it was longer or that I had multiple clickies to practice in at once when I asked (I thought chew was offline so my query would give me time to prepare :P)

#3 The best part about this was that it in the future people who want to MDScript can look at a conversation about how to do MDScript and then  do it. One of the things the MDScript help files don't seem to do very well is the lack of pictures, maybe I'm dumb, but having a picture that shows it in the window, and what code corresponds to what stuff in the html window side would have solved my problems months ago when I first tried MDScript.

 

10/10 would listen again

As a heads-up to all people thinking about spending their lecture coins: prepare more than 3 questions in advance. Like try 10 or more.

image.jpeg.ff00da952ce8071a848fcaabba0a0660.jpeg

Edited by Steno

Share this post


Link to post
Share on other sites
13 minutes ago, Steno said:

#2 I wish it was longer or that I had multiple clickies to practice in at once when I asked (I thought chew was offline so my query would give me time to prepare :P)

I can do a second one if @Muratus del Mur is happy.

Share this post


Link to post
Share on other sites
16 hours ago, Chewett said:

I can do a second one if @Muratus del Mur is happy.

in this case i would prefer to finish the voting on the other private topic, then sponsor a coin (or more) for a25, i am sure Steno will understand what i mean soon.

Normally i would have wanted to have these initial coins distributed to as many different people as possible, but considering the lack of candidates, its ok to have multiple per one. Mdscript is a good start for programming in general, but a25 might be of more interest.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

  • Forum Statistics

    16,135
    Total Topics
    176,224
    Total Posts
  • Recently Browsing

    No registered users viewing this page.

  • Upcoming Events

    No upcoming events found
  • Recent Event Reviews

×
×
  • Create New...