![]() |
|
|
#1 |
|
Архивный участник
Join Date: Jun 2005
Posts: 285
|
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
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 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
...
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 байт |
|
|
|
|
#2 |
|
Архивный участник
Join Date: Feb 2006
Posts: 453
|
hope this helps
Вложения из исходного сообщения (сами файлы в копии отсутствуют): someref.zip — 4871 байт |
|
|
|
|
#3 |
|
Архивный участник
Join Date: Mar 2006
Posts: 685
|
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. |
|
|
|
|
#4 |
|
Архивный участник
Join Date: Jul 2006
Posts: 39
|
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...
|
|
|
|
|