I edited my previous post, my code is now hopefully functional, heh.
HK edit #2, removed the 'on ready' on good advice from Jay
----------
it'd take me too long to try to convert (translate~explain ~ do a step by step guide) it into how to do it with the GUI~Editor (I was hoping you could figure out how to do~find the scripts in the GUI~Editor), so be brave and follow this for doing it in code:
(first save your game with different file name, so you got a backup of your game, which you don't touch, so you still got it if you mess up the other~another game file name that you try to add my code into your game file)
in the GUI~Editor (or you can just open your game file with 'notepad', 'wordpad', or 'notepad++' ~ google it, to download it), and at the top of the screen, is a horizontal bar, between the 'play' and 'help-?' buttons, is a notepaper-like-looking button, this button is a toggle button to switch back and forth between GUI~Editor mode and Code View mode, click on it to go into the Code View mode. In Code View mode (or just already in code, via opening up your game file with a '___pad', aka text, software), simply copy and paste my code into the same spots as shown below:
(indenting the code lines correctly, aka 'nesting', is very important!)
(I put in the blank-line-spaces, to separate the code blocks and some specific code lines, just so you can hopefully understand the code better, but if it causes problems for you to get the correct indentation of all the lines, then delete~remove the blank-line-spaces)
<asl version="your_version: 550 or whatever ###">
<game name="your_name_of_your_game">
// etc code lines
</game>
<object name="global_data_object">
<inherit name="editor_object" />
<attr name="bowl_binary_flag_integer" type="int">0</attr>
</object>
<object name="whatever it is named, but, if your bowl is inside of another object which is inside this room object, then let me know, if you don't know where to thus add my code lines in that scenario">
<inherit name="editor_room" />
// all your other code lines
<object name="bowl">
<inherit name="editor_room" />
// all your other code lines
<attr name="name_of_your_verb" type="script">
if (global_data_object.bowl_binary_flag_integer = 0) {
if (name_of_your_ingredient_1.parent = bowl and name_of_your_ingredient_2.parent = bowl and name_of_your_ingredient_3.parent = bowl) {
global_data_object.bowl_objectlist = NewObjectList ()
list add (global_data_object.bowl_objectlist, name_of_your_ingredient_1)
list add (global_data_object.bowl_objectlist, name_of_your_ingredient_2)
list add (global_data_object.bowl_objectlist, name_of_your_ingredient_3)
foreach (item_x, global_data_object.bowl_objectlist) {
item_x.parent = global_data_object
}
global_data_object.bowl_binary_flag_integer = 1
msg ("Keep checking the bowl, as your special brew might be finished!")
}
} else if (game.bowl_binary_flag_integer = 1) {
if (ListCount (global_data_object.bowl_objectlist) > 0) {
msg ("You got some extra objects still in the bowl, the recipe must be exact, so, you must remove them from the bowl.")
} else if (ListCount (global_data_object.bowl_objectlist) = 0) {
name_of_your_mixture_object.parent = bowl
msg ("Your special brew is finished, you may now pour it into your flask and take it with you.")
global_data_object.bowl_binary_flag_integer = 2
}
}
</attr>
<attr name="displayverbs" type="listextend">Name_of_your_verb</attr>
<attr name="displayverbs" type="listextend">Name_of_your_verb</attr>
</object>
</object>
// all your other 'tag' (<______>) code lines
</asl>
actually, here's the code, without the blank-line spaces for you, so use whichever you want:
<asl version="your_version: 550 or whatever ###">
<game name="your_name_of_your_game">
// etc code lines
</game>
<object name="global_data_object">
<inherit name="editor_object" />
<attr name="bowl_binary_flag_integer" type="int">0</attr>
</object>
<object name="whatever it is named, but, if your bowl is inside of another object which is inside this room object, then let me know, if you don't know where to thus add my code lines in that scenario">
<inherit name="editor_room" />
// all your other code lines
<object name="bowl">
<inherit name="editor_room" />
// all your other code lines
<attr name="name_of_your_verb" type="script">
if (global_data_object.bowl_binary_flag_integer = 0) {
if (name_of_your_ingredient_1.parent = bowl and name_of_your_ingredient_2.parent = bowl and name_of_your_ingredient_3.parent = bowl) {
global_data_object.bowl_objectlist = NewObjectList ()
list add (global_data_object.bowl_objectlist, name_of_your_ingredient_1)
list add (global_data_object.bowl_objectlist, name_of_your_ingredient_2)
list add (global_data_object.bowl_objectlist, name_of_your_ingredient_3)
foreach (item_x, global_data_object.bowl_objectlist) {
item_x.parent = global_data_object
}
global_data_object.bowl_binary_flag_integer = 1
msg ("Keep checking the bowl, as your special brew might be finished!")
}
} else if (game.bowl_binary_flag_integer = 1) {
if (ListCount (global_data_object.bowl_objectlist) > 0) {
msg ("You got some extra objects still in the bowl, the recipe must be exact, so, you must remove them from the bowl.")
} else if (ListCount (global_data_object.bowl_objectlist) = 0) {
name_of_your_mixture_object.parent = bowl
msg ("Your special brew is finished, you may now pour it into your flask and take it with you.")
global_data_object.bowl_binary_flag_integer = 2
}
}
</attr>
<attr name="displayverbs" type="listextend">Name_of_your_verb</attr>
<attr name="displayverbs" type="listextend">Name_of_your_verb</attr>
</object>
</object>
// all your other 'tag' (<______>) code lines
</asl>
------
P.S.
or you can just copy your entire game file's code (or your entire game code from being in the Code View mode), and paste it to me in a post as a pm, or if you don't mind making it public, then you can just post it in this thread, and in either case, I'll add in the code to your game code, and paste post it back to you, either privately as a pm, or as a public post here in this thread.
P.S.S.
but paste your game code within these tags within your public post or private (pm) post, please:
[code.]your_pasted_game_code[/code.]
but don't have the dots~periods within the brackets
it should look like this in your post:
your_pasted_game_code