Post Pacific

Post Pacific (https://postpacific.mmorpg-game.online/index.php)
-   Темы без сохранившегося раздела (https://postpacific.mmorpg-game.online/forumdisplay.php?f=10001)
-   -   Write an original nasc-code (https://postpacific.mmorpg-game.online/showthread.php?t=6823)

hr 12.02.2007 11:34

Write an original nasc-code
 
So, ladies and gentlemen, this is yet-another-attempt-to-ressurect-community. All of you know that at present time AI-developer faces a problem of writing large AI class.The opportunity to solve this problem is offered to your attention: you post nasc-source of your ai class in this topic then we post it here in compiled form.

Rules:
1. One class per one person per one post.
2. The source code should be post in this topic.
3. Post your source code in the following way:
3.1. TXT file (1 file - 1 class). Use folowing file-sharing systems: dump.ru, slil.ru. Then leave your link to a file here.
3.2. Something like pastebin.com (Set "How long should your post be retained?" option to "a month" or "forever"). Then leave your link here.
4. *DO NOT* post source code plain text here!
5. References/source code in PM will be ignored.

Sorce-code appearance:
1. AI class should be nasc-like. For a basis it is necessary to take original C1/Prelude syntax (with amendments on С4).
In a general view the source code looks so:
Code:

#include "ai.h"
class 1 default_npc: (null)

handler:
        EventHandler NO_DESIRE ()
        {
        }

class_end

2. You can use preprocessor's instructions: #include #define #ifdef #endif
3. It is strongly recommended for any definition to use CAPITAL symbols. Examples:
Code:

#define X FloatToInt (x)
#define SHOWPAGE (arg1, arg2) myself. ShowPage (arg1, arg2)
#define OWNITEMCOUNT (arg1, arg2) myself. OwnItemCount (arg1, arg2)
#define DELUXE_FOOD_FOR_STRIDER 5169

4. Lists of parameters, buyselllist, teleports and similar things which stand BEFORE handlers' description MUST be the same as in original ai.obj.
Use of instructions in these parts of class is supposed, for example :
Code:

...
#include "item_pch.h"
...
        buyselllist_begin SellList0
                {SCROLL_OF_ESCAPE_TO_AGIT; 10; 1.000000; 5}
                {DELUXE_FOOD_FOR_STRIDER; 10; 1.000000; 5}
        buyselllist_end
...

5. There is no necessity to specify parameters (used variables) in handlers' definition, any handlers' definition should look as HANDLERNAME (), all used variables at push_event and amount of significant lines of code will be automatically substituted.
6. You can use a point (.) or a minus with "greater than" sign (->) as pointer, the result will be the same.
7. ATTENTION! Any "unknown" (not function, not a variable event) parameters are transferred in a stack through push_parameter, meaning their definition in parental classes.
8. ATTENTION! There is NO type check in mathematical operations and assignment statements.

FAQ:
Q1: Is it possible to share compiler?
А: We *ARE NOT* sharing compiler.

Q2: Is it possible to buy compiler?
А: We *ARE NOT* selling compiler.

Q3: Is it possible to get compiler?
А: We *ARE NOT* destributing compiler.

Useful links:
Mini-SDK with some demo-scripts and some include files in attach.
Some references - tnx HD!

And please - don'f flood.

Вложения из исходного сообщения (сами файлы в копии отсутствуют):
mini-sdk.rar — 223237 байт
someref.zip — 4871 байт

humordwarf 12.02.2007 12:43

hope this helps

Вложения из исходного сообщения (сами файлы в копии отсутствуют):
someref.zip — 4871 байт

tpuNIsher 04.05.2007 17:25

Why has noone come forward to this? This seems to be a huge step forward in my eyes..
proper support for c-like stuff, pretty amazing.

Freeman 05.05.2007 14:24

I see no reason why should I create something special, which will be useless tommorow for me. If I create something and use "preprocessor's instructions" - it may be compiled tommorow, but the day after tomorrow this [post / thread / forum / the planet earth] can dissapear and my work will became useless for me. It's easer for me to write already compiled AI that can be used any day and any time...


All times are GMT. The time now is 21:58.