Quest: Amrak

Content and general development discussion, including quest scripts and server code. TMW Classic is a project comprising the Legacy tmwAthena server & the designated improved engine server based on evolHercules.


Forum rules

This forum houses many years of development, tracing back to some of the earliest posts that exist on the board.

Its current use is for the continued development of the server and game it has always served: TMW Classic.

Post Reply
User avatar
0x0BAL
Peon
Peon
Posts: 40
Joined: 19 Dec 2012, 10:36

Quest: Amrak

Post by 0x0BAL »

Here my first try.
amrak.txt
(1.8 KiB) Downloaded 155 times
amrak v2.txt
(1.8 KiB) Downloaded 146 times
User avatar
0x0BAL
Peon
Peon
Posts: 40
Joined: 19 Dec 2012, 10:36

Re: Quest: Amrak

Post by 0x0BAL »

v2 released
Ablu
Manasource
Manasource
Posts: 288
Joined: 23 Jul 2011, 08:31
Location: Germany

Re: Quest: Amrak

Post 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
User avatar
o11c
Grand Knight
Grand Knight
Posts: 2262
Joined: 20 Feb 2011, 21:09
Location: ^ ^

Re: Quest: Amrak

Post 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.
Former programmer for the TMWA server.
User avatar
0x0BAL
Peon
Peon
Posts: 40
Joined: 19 Dec 2012, 10:36

Re: Quest: Amrak

Post 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.
User avatar
Crush
TMW Adviser
TMW Adviser
Posts: 8046
Joined: 25 Aug 2005, 16:08
Location: Germany

Re: Quest: Amrak

Post 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?
  • former Manasource Programmer
  • former TMW Pixel artist
  • NOT a game master

Please do not send me any inquiries regarding player accounts on TMW.


You might have heard a certain rumor about me. This rumor is completely false. You might also have heard the other rumor about me. This rumor is 100% accurate.
User avatar
Psychodelic
Novice
Novice
Posts: 83
Joined: 20 Apr 2012, 23:58
Location: The Mana World

Re: Quest: Amrak

Post 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
Post Reply