I found two bugs:
1.
you forgot to check and remove those diamonds which you mentioned in the text.
2.
Code: Select all
if ((countitem("fourleafclover") < 1)&&(countitem("pearl") < 15)&&(countitem("ironpowder") < 3))
goto L_notenough;
This condition won't trigger when the player has enough of at least one of the item types, even when he hasn't got enough of the others. To fix this, use the OR-Operator (||) instead of the AND-operator (&&).
0x0BAL wrote:oO didnt understand about nothing.
Don't use a new variable QUEST_Amrak_state, instead use bitmasking off an existing variable
The number of persistent character variables is very limited. For that reason the TMW developers make sure they use every bit of them. Each variable can carry up to 32 bit of information. Bitmasking is a technique which is used to use only part of a variable. How to do that is described here:
http://wiki.themanaworld.org/index.php/ ... s_you_need
use variables for the quantities
When you use numbers in your script, like in this case the numbers of pearls and iron powders to collect, you should store these numbers in a local variable you define at the beginning of the script and use this variable instead throughout the script. That makes scripts much easier to modify. When you (or another developer) want to change the amount later, they just need to change that number once. Otherwise they would have to examine the whole script and need to be sure that you changed every single instance of that number, and when you forget one, you get some unexpected bugs.
clear those variables (and also @menu) in L_close
All local variables need to be reset at the end of the dialog.
use canonical case for FourLeafClover, etc.
When you use names of items, write them in CamelCase (capital letter at the beginning of each word). That's easier to read and that's the style all other scripts are using. The style of all scripts should be consistent.
There's not much plot or explanation at all. This would make a lot more sense if you had to get something from the inaccessible area or something.
Quests should be more than just a simple item trade. There should be a story behind them. What's Amraks motivation to give away talismans? And why does he want four leaf clovers, pearls, diamonds and iron powder in exchange for them? What do these talismans even do? And what's so special about them that the player character would want them? Are they in some way connected to the waterfall he is studying? Or to the monsters which scare him? Why does he want to get past those monsters in the first place? Maybe there is something up there which he needs to create those talismans?