Page 1 of 1

Quest: Amrak

Posted: 24 Dec 2012, 11:32
by 0x0BAL
Here my first try.
amrak.txt
(1.8 KiB) Downloaded 200 times
amrak v2.txt
(1.8 KiB) Downloaded 187 times

Re: Quest: Amrak

Posted: 24 Dec 2012, 12:33
by 0x0BAL
v2 released

Re: Quest: Amrak

Posted: 24 Dec 2012, 18:48
by Ablu
Hi,

I would suggest you to fork the github repository (https://github.com/themanaworld/tmwa-server-data) and push your script to your fork.

This is a lot easier for everybody i think.

If you need help with git best come to the #tmw-dev IRC channel (http://wiki.themanaworld.org/index.php/ ... channel.3F)

Regards and a Merry Christmas
Ablu

Re: Quest: Amrak

Posted: 24 Dec 2012, 19:07
by o11c
  • Don't use a new variable QUEST_Amrak_state, instead use bitmasking off an existing variable
  • the toomany logic is more restricted than it needs to be, but that's fine.
  • use variables for the quantities
  • clear those variables (and also @menu) in L_close
  • use canonical case for FourLeafClover, etc.
  • 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.

Re: Quest: Amrak

Posted: 24 Dec 2012, 20:35
by 0x0BAL
o11c wrote:
  • Don't use a new variable QUEST_Amrak_state, instead use bitmasking off an existing variable
  • the toomany logic is more restricted than it needs to be, but that's fine.
  • use variables for the quantities
  • clear those variables (and also @menu) in L_close
  • use canonical case for FourLeafClover, etc.
  • 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.
oO didnt understand about nothing.

Re: Quest: Amrak

Posted: 25 Dec 2012, 01:06
by Crush
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?

Re: Quest: Amrak

Posted: 03 Jan 2013, 16:27
by Psychodelic
if(countitem("FourLeafClover") < 1) goto L_notenough;
if(countitem("Pearl") < 15) goto L_notenough;
if(countitem("IronPowder") < 3) goto L_notenough;
getinventorylist;
if(inventorylist_count>= 100) goto L_notspace;
delitem "FourLeafClover", 1;
delitem "Pearl", 15;
delitem "IronPowder", 3;

Ok Check Here :) Good Luck Everyone l'm Depredador lvl 98 :D

hello friends I suppose so