Post Pacific

Post Pacific (https://postpacific.mmorpg-game.online/index.php)
-   Lineage 2 Stickies (https://postpacific.mmorpg-game.online/forumdisplay.php?f=44)
-   -   [TUTORIAL] Writing a quest in NASC (https://postpacific.mmorpg-game.online/showthread.php?t=4355)

Cardon 09.05.2006 05:27

[TUTORIAL] Writing a quest in NASC
 
[glow=red:39f92fb459]Warning: Use this tutorial at your own risk. There MAY or MAY NOT be spelling errors, terminology errors, or other errors within it. I will try my best to keep it updated. Thanks.[/glow:39f92fb459]

I was asked by someone (who won't be named) *cough*Enishi*cough* to write a tutorial on how to write a quest in NASC.

First off, a little disclaimer:

This tutorial is designed for beginners with NASC. It is NOT designed for people with a knowledge of stack or anything similar, so posts declaring "OMG U R NUB, Y R U POSTEENG DIS?" will be ignored. I will provide help within the topic (and so should others). If you are having issues, please post the entire problem in the topic. For the most part, this tutorial will be written with the idea in mind that the reader has absolutely no coding background whatsoever.

Now, the complex quests (more of the 70-80 level stuff) are too complex (duh) and too long to be done in the span of an hour or so. We'll start off with something easy, in this case, the quest "Yoke of the Past", which is used for giving "Blank Scrolls" to players for use with Mammon's trader.

Let's get started!

In NASC, you need what's called a "class" definition. A class definition gives the AI you're about to write a name for the server to recognize it by. A class definition generally looks like this:

Code:

class ziggurat_gatekeeper
However, in some cases you'll want to use a "superclass". A superclass is hard to describe. Consider your class to be a "child", or smaller part of a superclass. Your class can define certain things, and if there is anything else needed, the superclass can take over. A bad description, I know.

A superclass is defined by using a colon, seen below:

Code:

class ziggurat_gatekeeper : default_npc
For this instance, we will be using the "default_npc" class, and adding a teleport structure to it later. Why? Because the Ziggurat NPC we're adding also manages teleportation into/out of the catacombs and necropoli. That's the beauty of AI: One class can handle multiple actions.

Anyways, we've now learned the classing/superclassing idea, sort of.

Now, if you have any experience with MultiSell (and if you're reading this, by God you better have), you'll know that brackets are needed to start/stop where a line begins and ends, correct? Same applies to AI.

So, let's add some beginning and ending brackets to our class.

Code:

class ziggurat_gatekeeper : default_npc
{
}

Easy enough right? Right.

There are two (in this case we'll use two), mm, "sets" we'll use to determine each part of the AI. I use the term "sets" as not to confuse people. They really are nothing but certain parts of AI split up into different sections depending on their content.

Anyways, first off is the "parameter" set. It defines things such as HTML's the NPC will use, certain number statistics (all constant, meaning you cannot change them later within the AI), and other various jargon. For now, we'll need three HTML's:

1) The "Hello" HTML, or the HTML that is shown to the user when the target is first talked to. It has the teleport and quest links.
2) The "Quest Description" HTML, which describes the blank scroll quest to the user, and provides the quest accept button.
3) The "Quest Accepted" HTML, which tells the user the quest was accepted.
4) A page that tells the player that they already have the quest.
5) An HTML if the player tries to trade 0 scrolls
6) An HTML if the player successfully traders scrolls.

Seeing as HTML's are "strings", which is a nerd/coder term for "text" (in a nutshell), we will have to define each parameters as strings. So our code looks like this:

Code:

class ziggurat_gatekeeper : default_npc
{
parameter:
        string fnHi = "ziggurat_hi.htm";
        string fnQD = "ziggurat_quest.htm";
        string fnQA = "ziggurat_quest2.htm";
        string fnQAl = "ziggurat_already.htm";
        string fnQNo = "ziggurat_none.htm";
        string fnQThx = "ziggurat_thanks.htm";
}

You're probably wondering why I called the string "fnHi", etc. I have no idea why you must use the term "fn" before strings, but I was taught to use it, so I just do. You should also.

Let's do a quick break down of each line I just added:

Code:

parameter:
This tells the NASC compiler, "Hey! I'm gonna start defining my parameters now!". Pretty obvious.

Code:

string
This tells NASC that I'm defining a string on this line.

Code:

fnHi
This is the name of the parameter I'm defining.

Code:

= "ziggurat_hi.htm";
This tells the compiler that the "fnHi" parameter means use "ziggurat_hi.htm"; when called.

Alright, enough of that. Now we need to add another 3 parameters, the teleport params. These will tell the NPC which X,Y, and Z coordinate to port the player to. It's quite simple, and I'm not going to break this one down for you. The term "int" is short for integer, or for you idiots, a NON-decimal number.

Code:

class ziggurat_gatekeeper : default_npc
{
parameter:
        string fnHi = "ziggurat_hi.htm";
        string fnQD = "ziggurat_quest.htm";
        string fnQA = "ziggurat_quest2.htm";
        string fnQAl = "ziggurat_already.htm";
        string fnQNo = "ziggurat_none.htm";
        string fnQThx = "ziggurat_thanks.htm";
        int port_x = 12345;
        int port_y = 12345;
        int port_z = 12345;
}

Wow. How extremely hard. But now we're going to get into the juicy stuff, the handlers. Handlers tells the NPC how to "handle" a situation. Get it? If you don't, stop reading this.

So, we have to define the "set", just as we did with parameter. It's the same case, just add the word "handler:" to your AI.

Done? Good. Now the fun stuff begins.

In this case, we are going to be using THREE handlers. The "MENU_SELECTED", "QUEST_ACCEPTED", and "TALKED" handlers. They will tell the NPC what to do when a certain event occurs. Ok! Let's go!

So, a handler generally looks like this:

Code:

EventHandler TALKED() {
}

You see the word "EventHandler", which tells the compiler that you're going to define a handler, the "TALKED", which tells the compiler what handler you're going to work with, and finally the "()", which we'll use later to tell the compiler what variables AND parameters we're going to be using inside the handler. And, of course, the typical main brackets.

In this case, the "TALKED" handler will tell the NPC what to do once the person, or "talker" (remember this word), talks to it.

Remember the "talker" word? That's a variable we're going to be using. Why? Because I said so, and because the NPC will have to talk to multiple people, so a variable fits perfectly.

So, remember where variables go? That's right, in the parentheses. So, add it.

Code:

EventHandler TALKED(talker) {
}

Now, what if we want two or more variables to be used in a handler? No problem, just use a comma to seperate them. We don't need anything but the talker variable in this handler, so we'll leave it be.

So, we've got an empty handler. What's that? What do we do in it? Well, I'd thought you'd never ask. We need to add the actual code that tells the NPC what to do! Let's get started.

We're going to want to show the player the "Hello" page. Remember how we defined the hello page back up in the parameter section? Well, this is why.

To show a player an HTML page, you need to use the "ShowPage();" function. The ShowPage function will tell the NPC to show the player the page that you want them to see.

The ShowPage(); has two "parameters" to itself. One being who the page is directed two, and the other being which page to show. In this case, our person is "talker", or the person talking to the NPC, and our page is "fnHi", which we defined in the parameter set.

So, we have "ShowPage(talker, fnHi);". What to do with it? Well, dork, add it into the handler!

Code:

EventHandler TALKED(talker) {
        ShowPage(talker, fnHi);
}

Right now, if you were to compile the code and upload it onto a server, if you were to talk to the NPC, it would try and show you the page "ziggurat_hi.htm".

Oh, what's that you say? The semicolon, what's that doing there? In a lot of languages, the semicolon, or ";", tells the parser (or in this case compiler) that I'm done with this function or definition, please move onto the next.

Ok, one handler down, two to go! We have the handlers to finish, the compiling to do, and finally the mob AI to work with (which will be your homework). Don't worry, I'll give you some help at the end.

The next handler we'll be using is the QUEST_ACCEPTED handler. It will tell the NPC what to do when the user accepts the "Yoke of the Past" quest.

So, write the new handler out.

Code:

EventHandler QUEST_ACCEPTED() {
}

We'll need to have a check for which quest ID the talker has accepted (which is defined in the HTML, we'll get to that later), and so for that we'll need a "quest_id" variable added in. We'll also have to use the "talker" variable, so we can define who the heck we're doing all this nasty stuff to. Add those two in. No, I'm not going to show you how to do it this time, it's no different then the TALKED handler (hint: parentheses).

Now, with quests, in order to keep track of which player is at what point in the quest, L2NPC has a nice little set of functions all relating to "memo's". Think of them as little notes your mother or father pinned onto you as you were going to school, to tell your teacher's something important. They stick on you and help the NPC's to remember who the hell you are, and why you should bother talking to them.

Here's a quick rundown of the memo functions:

Code:

SetMemo(character, memoname);
SetMemoState(character, memoname, number);
GetMemoState(character, memoname);
HaveMemo(character, memoname);

SetMemo, obviously sets the memo onto the character (in this case, talker).
SetMemoState, sets the memo's "state", or "message" if you will, on the character (in this case talker).
GetMemoState, gets the memo's state, on the character (in this case talker).
And finally, HaveMemo, which proves true (or 1) if the character even has a memo for the quest.

The "memoname" is the name of the quest. We'll use "@yoke_of_the_past" for this. Yes, there is an "@" sign in front. Don't question it.

So, after the player clicks the link that says "Yes, I'll do the quest", we'll need to set a memo on him so the NPC's can see that, hey, he's got the quest active, and they can do stuff to him. No, not that kind of stuff. Perverts.

First, we need to check if he already has the quest. We can do this by using the "HaveMemo(talker, @yoke_of_the_past);" function, and checking to see if it equals one.

We'll need to setup the if clause.

Inside the parentheses, we'll need the operand and the variables.

Code:

if (HaveMemo(talker, @yoke_of_the_past) == 1) {
        ShowPage(talker, fnQAl);
}

Notice I did not use a semicolon this time. In "if-then-else" statements, in NASC you do not need to finish functions with a semicolon.

Anyways, he clicked the link, and he doens't have the quest. We'll now need to set a memo on his ass. Second, we need to check the quest_id against the one he clicked on in the HTML. We'll do this by using an "if-then-else" statement, and seeing if it checks out.

For this, we'll need to first declare the else if statement. The else is added to tell the NPC that, if the original "if" clause (the one that's up above checking to see if he already has the quest), to go ahead and run another check, and not to do both if one comes up true.

Code:

else if () {
}

Note: In this particular case, the quest in the clientside is number 385. So we'll check to see if it's 385.

Code:

else if (quest_id == 385) {
}

Second, we need to make the memo exist at all. We'll do this by adding "SetMemo(talker, @yoke_of_the_past);". Then, we'll set the state to 1, so that the NPC's can tell that he has the quest, by doing a check for the memostate. For this, we'll use "SetMemoState(talker, @yoke_of_the_past, 1);". Afterwards, we'll need to show the player a page that says "Congratulations, you accepted the quest. For that, use a "ShowPage();" function just like you did in the TALKED handler.

If you did it right, you're handler SHOULD look something like this:

Code:

EventHandler QUEST_ACCEPTED(quest_id, talker) {
        if (HaveMemo(talker, @yoke_of_the_past) == 1) {
                ShowPage(talker, fnQAl);
        }
        else if (quest_id == 385) {
                        SetMemo(talker, @yoke_of_the_past);
                        SetMemoState(talker, @yoke_of_the_past, 1);
                        ShowPage(talker, fnQA);
        }
}

Noticed I closed every bracket that I opened, and ended every function with a semicolon, except for the ones in the if clause. This is crucial.

Woohoo! Two down, one to go.

The next handler is called "MENU_SELECTED". It has two variables of it's own, "ask" and "reply". These are defined in the NPC HTML's, which we'll get to later. Set the handler up. No, I'm not going to explain how to do it again, you should know by now.

Great, handler all setup. This one is a bit more tricky, as we have to do multiple if-then-else statements. We'll need one to manage teleportation, and another to manage the quest description page. As such, we'll use this structure:

Ask = 1
Replies:
- 1 = "I want info on the quest".
- 2 = "I want teleported into the catacomb".
- 3 = "I want to trade my scrolls for blanks".

So, make four if-statements. They should look like this:

Code:

if (ask == 1) {
        if (reply == 1) {
        }
        if (reply == 2) {
        }
        if (reply == 3) {
        }
}

Inside the first, we'll need to show the player the quest information. This is done by using a ShowPage function, and the "fnQD" variable. You should know how to do this by now.

As for the second, we have to teleport the player into the catacomb. This is where we use the "InstantTeleport();" function. It teleports a player to a specific X,Y,Z coordinate. Remember why we declared the port_x, y, and z variables at the beginning? So this class can be copied, renamed, and used multiple times, so you don't have to write a new class for each teleporter. More on that later.

The "InstantTeleport();" function has four "parameters", or things that go inside of it (perverts). They are:

InstantTeleport(character, x, y, z);

X,Y, and Z must be integers (remember, non-decimal numbers), and the character, well, a character (or "actor", as it's called in the Unreal Engine).

For character, we'll use talker, and for x, y, z, we'll use port_x, port_y, and port_z, respectively.

As for the third, in order to trade the "Scroll of Ancient Magic" items for "Blank Scrolls", we'll first need to count them and trade the items. This can be done with two functions, "DeleteItem1" and "GiveItem1". They have the same parameters, only one deletes items and the other one gives. The parameters are below:

GiveItem1(character, @item, number);
DeleteItem1(character, @item, number);

Where @item corresponds to the name of the item in your itemdata, and matching PCH.

We will also make use of one more function, "OwnItemCount". It will count the number of items a player has on them and return them to another variable, called "i0", which stands for "integer" variable number "0".

This is a little differnt from what we've done, so I'll walk you through.

OwnItemCount has two parameters within it. They are:

OwnItemCount(character, @item);

Where @item corresponds to the name of the item in your itemdata, and matching PCH.

First, we'll need to get the item count. We'll do this by "setting" i0 to whatever OwnItemCount comes up to. We'll then take that item count, delete the items off of the character, and give the same amount of scrolls to the person.

To do this, i0 will have to be used in THREE, yes, THREE functions. It's ok, it can handle that.

If you're smart, your code will look something like this:

Code:

if (ask == 1) {
        if (reply == 1) {
                ShowPage(talker, fnQD);
        }
        if (reply == 2) {
                InstantTeleport(talker, port_x, port_y, port_z);
        }
        if (reply == 3) {
                i0 = OwnItemCount(talker, @q_scroll_of_ancient_magic);
                        if (i0 > 0) {
                                        DeleteItem1(talker, @q_scroll_of_ancient_magic, i0);
                                        GiveItem1(talker, @blank_scroll, i0);
                                        ShowPage(talker, fnQThx);
                        }
                        else if (i0 == 0) {
                                        ShowPage(talker, fnQNo);
                        }
        }
}

So, if you've done it correctly, it should look like this:

Code:

EventHandler MENU_SELECTED(talker, ask, reply) {
if (ask == 1) {
        if (reply == 1) {
                ShowPage(talker, fnQD);
        }
        if (reply == 2) {
                InstantTeleport(talker, port_x, port_y, port_z);
        }
        if (reply == 3) {
                i0 = OwnItemCount(talker, @q_scroll_of_ancient_magic);
                        if (i0 > 0) {
                                        DeleteItem1(talker, @q_scroll_of_ancient_magic, i0);
                                        GiveItem1(talker, @blank_scroll, i0);
                                        ShowPage(talker, fnQThx);
                        }
                        else if (i0 == 0) {
                                        ShowPage(talker, fnQNo);
                        }
        }
}
}

Wait just a minute there though, we're not done yet! We used three variables that we didn't define in the parentheses, so we better get them in there. Add "port_x", "port_y", "port_z" and "i0" to the list of variables.

Congratulations. You just wrote yourself your first piece of AI. If everything went as planned, if should look like this:

Code:

class ziggurat_gatekeeper : default_npc
{
parameter:
        string fnHi = "ziggurat_hi.htm";
        string fnQD = "ziggurat_quest.htm";
        string fnQA = "ziggurat_quest2.htm";
        string fnQAl = "ziggurat_already.htm";
        string fnQNo = "ziggurat_none.htm";
        string fnQThx = "ziggurat_thanks.htm";
        int port_x = 12345;
        int port_y = 12345;
        int port_z = 12345;
       
handler:
EventHandler TALKED(talker) {
        ShowPage(talker, fnHi);
}

EventHandler QUEST_ACCEPTED(quest_id, talker) {
        if (HaveMemo(talker, @yoke_of_the_past) == 1) {
                ShowPage(talker, fnQAl);
        }
        else if (quest_id == 385) {
                        SetMemo(talker, @yoke_of_the_past);
                        SetMemoState(talker, @yoke_of_the_past, 1);
                        ShowPage(talker, fnQA);
        }
}

EventHandler MENU_SELECTED(talker, ask, reply, i0) {
if (ask == 1) {
        if (reply == 1) {
                ShowPage(talker, fnQD);
        }
        if (reply == 2) {
                InstantTeleport(talker, port_x, port_y, port_z);
        }
        if (reply == 3) {
                i0 = OwnItemCount(talker, @q_scroll_of_ancient_magic);
                        if (i0 > 0) {
                                        DeleteItem1(talker, @q_scroll_of_ancient_magic, i0);
                                        GiveItem1(talker, @blank_scroll, i0);
                                        ShowPage(talker, fnQThx);
                        }
                        else if (i0 == 0) {
                                        ShowPage(talker, fnQNo);
                        }
        }
}
}
}

Now for the compiling.

There are these annoying files in your "Scripts" dir called PCH's, which link the quests and such to the AI parser. In the questpch, you'll need to add:

Code:

[yoke_of_the_past] = 385
And in questpch2:

Code:

385 1 5902
As for itemdata, you should have the items "blank_scroll" and "q_scroll_of_ancient_magic". If not, here is the itemdata.

Code:

item_begin        questitem        5902        [q_scroll_of_ancient_magic]        item_type=questitem        slot_bit_type={none}        armor_type=none        etcitem_type=none        blessed=0        weight=0        default_action=action_none        consume_type=consume_type_normal        initial_count=1        maximum_count=1        soulshot_count=0        spiritshot_count=0        immediate_effect=1        price=0        default_price=0        item_skill=[none]        critical_attack_skill=[none]        material_type=paper        crystal_type=none        crystal_count=0        is_trade=0        is_drop=0        is_destruct=1        physical_damage=0        random_damage=0        weapon_type=none        can_penetrate=0        critical=0        hit_modify=0        avoid_modify=0        dual_fhit_rate=0        shield_defense=0        shield_defense_rate=0        attack_range=0        effective_range=0        damage_range={}        attack_speed=0        reuse_delay=0        mp_consume=0        magical_damage=0        durability=100        damaged=0        physical_defense=0        magical_defense=0        mp_bonus=0        category={}        enchanted=0        html=[item_default.htm]        equip_pet={0}        magic_weapon=0        item_end
item_begin        etcitem        5965        [blank_scroll]        item_type=etcitem        slot_bit_type={none}        armor_type=none        etcitem_type=none        blessed=0        weight=100        default_action=action_none        consume_type=consume_type_normal        initial_count=1        maximum_count=1        soulshot_count=0        spiritshot_count=0        immediate_effect=1        price=0        default_price=1000        item_skill=[none]        critical_attack_skill=[none]        material_type=wood        crystal_type=none        crystal_count=0        is_trade=1        is_drop=1        is_destruct=1        physical_damage=0        random_damage=0        weapon_type=none        can_penetrate=0        critical=0        hit_modify=0        avoid_modify=0        dual_fhit_rate=0        shield_defense=0        shield_defense_rate=0        attack_range=0        effective_range=0        damage_range={}        attack_speed=0        reuse_delay=0        mp_consume=0        magical_damage=0        durability=90        damaged=0        physical_defense=0        magical_defense=0        mp_bonus=0        category={}        enchanted=0        html=[item_default.htm]        equip_pet={0}        magic_weapon=0        item_end

And the itempch's:

Code:

[q_scroll_of_ancient_magic] = 5902
[blank_scroll] = 5965

Alright! If that's all settled, you'll now need the NASC compiler AND you will need to add your newly coded AI to the text file that I am providing to you below. Credits go to kvoxi for the fixing of the compiler.

Why do you need to add your AI to the BOTTOM of the text file I provided? Well, remember how we used a default_npc superclass? The compiler won't compile unless it sees the superclass there. Also, be SURE to make a backup of your current AI, because NASC will overwrite it!!!

Also, be sure to save in UNICODE. The compiler won't compile if you save in ANSI!

To compile, put NASC, the text file with the AI, and all your other scripts into ONE folder. Then, pull up the "command" prompt (by going to Start>Run>"cmd"). Navigate to the folder with your AI and NASC, and type the following:

"nasc.exe myai.txt"

If all went according to plan, you should have a text file coming up and saying "Success!!!". You can now view your neatly compiled AI in your AI.obj. If it has a bunch of "push_const", "fetch_i", and similar funky looking things, you were successful! Append the AI to your AI.obj on your server, change an NPCDATA to use the AI (npc_ai={[ziggurat_gatekeeper]}).

If you got errors while compiling, POST your code and the error that it's giving.

We now need to write the HTML's.

We have six HTML's to write.

"ziggurat_hi.htm"
"ziggurat_quest.htm"
"ziggurat_quest2.htm"
"ziggurat_already.htm"
"ziggurat_none.htm"
"ziggurat_thanks.htm"

For each, let's start off with the basic HTML (if you don't know HTML, buzz off.).

Note: These WILL NOT BE SIMILAR TO RETAIL. If you want retail HTML's, go make them yourself.

Each should contain at least:

Code:

<html><head><body>
Ziggurat GateKeeper:

</body></html>

For the "Hi" page, we'll need a couple of links.

Code:

<html><head><body>
Ziggurat GateKeeper:

Welcome to the <insert necropolis here>.  Would you like to teleport, or help me with my quest?




<a action="bypass -h menu_select?ask=1&reply=1">Whats the quest about?</a>


<a action="bypass -h menu_select?ask=1&reply=3">I need to trade my scrolls.</a>


<a action="bypass -h menu_select?ask=1&reply=2">I'd like to port please.</a>
</body></html>

For the "Quest Description" page, we should detail the description and have the quest accept link.

Code:

<html><head><body>
Ziggurat GateKeeper:

I need to be human.  Blah blah blah.  Would you like to help me in my quest by collecting ancient scrolls of magic?  Thx!




<a action="bypass -h quest_accept?quest_id=385">Accept the quest</a>
</body></html>

For the Quest Accepted page, just say thanks.

Code:

<html><head><body>
Ziggurat GateKeeper:

Thx.  Go hunt for the scrolls!
</body></html>

For fnQAl, say they already have the quest.

Code:

<html><head><body>
Ziggurat GateKeeper:

Noob, you already have the quest.
</body></html>

For fnQNo, say they have no scrolls to trade.

Code:

<html><head><body>
Ziggurat GateKeeper:

I need scrolls.  What are you trying to do, scam me?
</body></html>

For fnQThx, say thanks.

Code:

<html><head><body>
Ziggurat GateKeeper:

Thanks, here, take these blank scrolls.  I have no usage for them.
</body></html>

-------------------------------------------------------------------------

CONCLUSION:

You have just had a small taste at using NASC to make AI. However, I DO NOT suggest you use this AI on your server, as there are still problems with it as well. There is no level check, quest amount check, and various other tidbits. I hope this will inspire you to learn more about AI and NASC, and to eventually help the community grow. If you found this tutorial useful, send 10 or so "Cash" (PP Cash) to me, so I know you like it.

If you use this tutorial to jumpstart you into coding AI, please let me know, and please help the community grow by sharing knowledge and experience as I have just done. A community who works together is a community who grows together. If you refuse to share, you are only helping to demolish the private community's spirit.

Credits go to:
- Enishi, for making me stay up 2 hours and type this.
- Eanae, for not staying up 2 hours and typing this.
- kvoxi, without whom we wouldn't have a patched NASC
- hami, who inspired me to start on AI in the first place
- The wonderful makers of Dr. Pepper, who kept me awake during this.


If you have trouble understanding the syntax or are completely new to it altogether, I sincerely suggest going to http://www.php.net and learning PHP. Not only can it help with L2 and understanding similar language syntax, but it has wonderful opportunities if you learn it and a great community supporting it! I also suggest downloading kvoxi's patched NASC, located here and reading through the list of functions.

Other references:
- RipperX's NASC documentation, which includes parameters for all the functions, located here
- Aikeleer's ziggurat AI, which I suggest you look at and learn from as well. It's located here

-------------------------------------------------


Included files:
Please note, the NASC INFO file is NOT MY WORK! ALL credit goes to RipperX!!!!!!

Вложения из исходного сообщения (сами файлы в копии отсутствуют):
nasc_info_289_173.rar — 3083 байт
thestuff_182_195.rar — 311914 байт

Aikeleer 09.05.2006 05:53

I didnt'read all, since I don't have much time, but I must say you did a great job.

To add:
Quote:

The "memoname" is the name of the quest. We'll use "@yoke_of_the_past" for this. Yes, there is an "@" sign in front. Don't question it.
@ in front of a name means that NASC looks up the ID for you. In example; @exploration_of_giants_cave_part2 will be replaced by nasc to 377, if it's in the quest_pch file. So, basically, you can use both @exploration_of_giants_cave_part2 and 377. :)

Enishi 09.05.2006 05:54

Nice tutorial man.
Thanks alot

TheOrder 09.05.2006 06:22

Great job bro realy helpfull !!! Should be added into Sticky Section

Mark20 09.05.2006 07:30

Good tutorial! thanks.

Darkraven 09.05.2006 08:25

nice....

Met45 09.05.2006 09:00

really good tutorial!
thx mate !

Digital 09.05.2006 11:18

*thumbs up*
great effort!

Zeran 09.05.2006 11:32

good job man, realy good!!!10x for it...

toolpunk 09.05.2006 11:45

yeah, it's damn good! :)
learned some new things. thanks again, Cardon!

Eanae 09.05.2006 13:05

Now someone needs to write a guide on how to convert l2j to asm or some more advanced hexing guides... this is very helpful. Why don't we see some other good stuff like this -_-

Aikeleer 09.05.2006 15:07

Quote:

Originally Posted by Eanae
Now someone needs to write a guide on how to convert l2j to asm or some more advanced hexing guides... this is very helpful. Why don't we see some other good stuff like this -_-

Yep. I'm interested in some kind of guide about adding new features aswell. Livid's guide was great, this one is great, but there isn't anything about making the L2Server send a certain package on a certain request i.e.

citruz 15.05.2006 22:24

Nice.
But i really need some tutorial on how to use nasc. :(
I don't know :(

Cardon 15.05.2006 23:13

This...is a tutorial on using NASC....

It can't get much more basic.

citruz 16.05.2006 03:07

Cardon, yes.
I want to thank you, you are a very nice guy, and helped me so much today on IRC.

Thank you :)
And your TUTORIAL is so fuc'ka rulez ;)

tpuNIsher 16.05.2006 08:17

I thank you for you are one of those who stands out from the rest by taking the initiative to teach rather than bitch about leechers only.

Thank you Cardon, respect.

-NeosinneR

Drego 17.05.2006 15:09

Great tutorial, helped me much in understanding ai.obj's language...

Thnx Cardon.

Btw, does anyone have a full listing of script functions (with parameters) and handler parameters (ask, reply, talker, i0 and so on)? Sry for noobish question, but i haven't found any of those here on PP)

tpuNIsher 17.05.2006 15:39

check thisvery own sticjy section sticky?
hint: it's by digital..

Drego 18.05.2006 18:04

Thnx tpuNIsher, but that's not exactly what I was looking for. I hoped there is some list of all functions w/ definitions and parameters, that could be very-very useful to all ppl working with ai)

JoNaHLoMu 15.06.2006 06:55

hi... i'm a little confused :P

what's the difference between this and the code into questdata.txt files ... i saw several differences

im trying to learn how to make a quest.....in fact..i'm writing one..i have made great advances...but based on some questdata.txt files, wich i have downloaded from here (packs and stuff) ..now reading this..i dont really know if all my code its ok..or i have to change it a little.

another question about that..how can i set some flag on talker to check with... SetMemoState? [ like SetMemoState(talker,@quest_name, 5) ] ?? it's that ok?

ty in advance...

hel 16.06.2006 17:21

Cardon, your tutorial is better!
I have started studying nasc, only by your tutorial.
But I need more commands description to understand nasc. :(

Cashed 50.

toolpunk 17.06.2006 10:30

i can help you with that!
just take a look at the ai_mmerged.txt included in l2tools :)
if you still have questions after that feel free to add me to msn, icq or any other crappy messenger XD

hel 17.06.2006 21:28

toolpunk:
Thanks for a tip!
When I will ready, I'll check it. ;)

Koner 17.06.2006 23:00

Guys....Who can share normal nasc?

hel 17.06.2006 23:05

Look in the L2 Russian section.
https://postpacific.mmorpg-game.onli...er=asc&start=0

mcrabben7 18.06.2006 04:46

Nice tutorial.

LoVeRSaMa 18.06.2006 13:07

Very nice, you haver helped me alot, if i learn this i can achive so much in what i wish to do :)


All times are GMT. The time now is 23:00.