Показать сообщение отдельно
Старый 17.08.2006, 17:46   #271
Pui-LeGuDaa

AGFC
Гость
 
Сообщений: n/a

По умолчанию Re: М: Уроки скриптологии

Вот значит весь скрипт. Осторожно, больше двухсот строк, точнее почти 300.
[spoiler]instance dia_vlk_432_moe (C_Info)
{
* * *npc = vlk_432_moe;
* * *nr = 1;
* * *condition = dia_vlk_432_moe_condition;
* * *information = dia_vlk_432_moe_info;
* * *permanent = false;
* * *important = true;
};

func int dia_vlk_432_moe_condition ()
{
* * *return TRUE;
};

func void dia_vlk_432_moe_info ()
{
* * *AI_Output (self, other, "dia_vlk_432_moe_01_01"); // Íå òîðîïèñ&#252 ; äðóæîê, ðàçãîâî&#240 ; åñòü.
* * *AI_Output (other, self, "dia_vlk_432_moe_02_01"); // ×òî òåáå íóæíî?
* * *AI_Output (self, other, "dia_vlk_432_moe_01_02"); // Òû ïðèøåë íà íàùó òåððèòîð&# 232;þ è çäåñü äåéñòâó&#254 ; äðóãèå çàêîíû, íåæåëè â îñòàëüíû&# 245; ÷àñòÿõ ãîðîäà.
* * *AI_Output (self, other, "dia_vlk_432_moe_01_03"); // Åñëè òû õî÷åøü ñïîêîéí&#238 ; æèòü è ãóëÿòü ãäå õî÷åøü, òî çà ýòî íóæíî íàì çàïëàòèò&# 252;.
* * *AI_Output (other, self, "dia_vlk_432_moe_02_02"); // À êòî âû òàêèå, ÷òîáû ÿ âàì ïëàòèë?
* * *AI_Output (self, other, "dia_vlk_432_moe_01_04"); // Ìû? Òû ðàçâå íå ñëûøàë î áàíäå "×åðíûå ßñòðåáû"?
* * *AI_Output (other, self, "dia_vlk_432_moe_01_03"); // Íåò, íå ñëûøàë.
* * *AI_Output (self, other, "dia_vlk_432_moe_01_05"); // Íó, òåïåðü çíà÷èò óñëûøàë.
* * *AI_Output (self, other, "dia_vlk_432_moe_01_06"); // Â îáùåì, òû äîëæåí áóäåøü ïëàòèòü íàì êàæäûé äåíü ïî 20 ìîíåò. ß äóìàþ, äëÿ òåáÿ ýòî íå ñîñòàâè&#242 ; òðóäà.
* * *Info_ClearChoices (dia_vlk_432_moe);
* * *Log_CreateTopic (TOPIC_BlackHawks, LOG_MISSION);
* *Log_SetTopicStatus (TOPIC_BlackHawks, LOG_RUNNING);
* *B_LogEntry (TOPIC_BlackHawks, " ïîðòó ÿ âñòðåòè&#235 ; Ìî, ÷ëåíà áàíäû ×åðíûõ ßñòðåáî&#226 ;. Îí âûìîãàå ó ìåíÿ äåíüãè.");
* * *Info_ClearChoices (dia_vlk_432_moe);
* * *Info_AddChoice (dia_vlk_432_moe, "À íå ïîøåë áû òû ê òàêîé-òî áàáóøêå?", dia_vlk_432_moe_1);
* *Info_AddChoice (dia_vlk_432_moe, "Õîðîøî, ÿ ñîãëàñåí." , dia_vlk_432_moe_2);
};

func void dia_vlk_432_moe_1 ()
{
* * *AI_Output (other, self, "dia_vlk_432_moe_1_02_01"); // À íå ïîøåë áû òû ê òàêîé-òî áàáóøêå?
* * *AI_Output (self, other, "dia_vlk_432_moe_1_01_01"); // Ïàðåíü, òû, íàâåðíî&#229 ;, ìåíÿ íå ïîíÿë. Íó, ýòî íå áåäà, ñåé÷àñ ÿ òåáå âñ¸ îáúÿñíþ.
* * *B_Attack(self,other,AR_NONE,1);
* * *AI_StopProcessInfos(self);
};

func void dia_vlk_432_moe_2 ()
{
* * *AI_Output(other,self,"dia_vlk_432_moe_2_02_01"); // Õîðîøî, ÿ ñîãëàñå&#237 ;.
* * *AI_Output(self,other,"dia_vlk_432_moe_2_01_01"); // Òû âñå ïðàâèëüí&# 238; ñäåëàë. Íå çàáóäü íàâåäûâà&# 242;üñÿ êî ìíå êàæäûé äåíü.
* * *B_GiveInvItems(other,self,ItMi_Gold, 20);
* * *B_LogEntry (TOPIC_BlackHawks, "Òåïåðü ÿ äîëæåí êàæäûé äåíü ïëàòèòü Ìî 20 çîëîòûõ.");
* * *AI_StopProcessInfos(self);
};

instance dia_vlk_432_moe_afterfight_loose (C_Info)
{
* * *npc = vlk_432_moe;
* * *nr = 2;
* * *condition = dia_vlk_432_moe_afterfight_loose_condition;
* * *information = dia_vlk_432_moe_afterfight_loose_info;
* * *permanent = false;
* * *important = true;
};

func int dia_vlk_432_moe_afterfight_loose_condition ()
{
* * *if((self.aivar[AIV_LastFightAgainstPlayer] == FIGHT_LOST) && Npc_IsInState(self,ZS_Talk))
* * *{
* * * * * *return TRUE;
* * *};
};

func void dia_vlk_432_moe_afterfight_loose_info ()
{
* * *AI_Output(self,other,"dia_vlk_432_moe_faterfight_ loose_02_01"); // À òû óïåðòûé ïàðåíü. È ÿ çàìàðàë ñâîé ñþðòóê, ïîýòîìó òû áóäåøü ïëàòèòü íå 20, à 40 çîëîòûõ.
* * *AI_Output(self,other,"dia_vlk_432_moe_faterfight_ loose_02_02"); // ß äóìàþ ýòî íàó÷èò òåáÿ óâàæàòü ñòàðøèõ. Òû ìåíÿ ïîíÿë?
* * *AI_Output(other,self,"dia_vlk_432_moe_faterfight_ loose_01_01"); // Äà, ÿ âñå ïîíÿë.
* * *B_LogEntry(TOPIC_BlackHawks, "Òåïåðü ÿ äîëæåí êàæäûé äåíü ïëàòèòü Ìî 40 çîëîòûõ.");
* * *AI_StopProcessInfos(self);
};

instance dia_vlk_432_moe_afterfight_win (C_Info)
{
* * *npc = vlk_432_moe;
* * *nr = 2;
* * *condition = dia_vlk_432_moe_afterfight_win_condition;
* * *information = dia_vlk_432_moe_afterfight_win_info;
* * *permanent = false;
* * *important = true;
};

func int dia_vlk_432_moe_afterfight_win_condition ()
{
* * *if((self.aivar[AIV_LastFightAgainstPlayer] != FIGHT_LOST) && Npc_IsInState(self,ZS_Talk))
* * *{
* * * * * *return TRUE;
* * *};
};

func void dia_vlk_432_moe_afterfight_win_info ()
{
* * *AI_Output(self,other,"dia_vlk_432_moe_faterfight_ win_02_01"); // Ïàðåíü, ó òåáÿ áîëüøèå íåïðèÿòí&# 238;ñòè! ß òàê ýòî äåëî íå îñòàâëþ.
* * *B_LogEntry(TOPIC_BlackHawks, "ß ïîáåäèë Ìî, îí îáåùàë ìíå óñòðîèò&#252 ; íåïðèÿòí&# 238;ñòè.");
* * *AI_StopProcessInfos(self);
};

* * *
instance dia_vlk_432_moe_pay (C_Info)
{
* * *npc = vlk_432_moe;
* * *nr = 3;
* * *condition = dia_vlk_432_moe_pay_condition;
* * *information = dia_vlk_432_moe_pay_info;
* * *permanent = true;
* * *important = true;
};

func int dia_vlk_432_moe_pay_condition ()
{
* * *If(Npc_KnowsInfo(other, dia_vlk_432_moe_2))
* * *{
* * *return TRUE;
* * *};
};

func void dia_vlk_432_moe_pay_info ()
{
* * *AI_Output ( self, other, "dia_vlk_432_moe_pay_01_01"); // Òû, íàâåðíî&#229 ;, ïðèí¸ñ äåíüãè?
* * *Info_Addchoice (dia_vlk_432_moe_pay, "Äà, âîò îíè.", dia_vlk_432_moe_pay_yes);
* * *Info_Addchoice (dia_vlk_432_moe_pay, "Òû íè÷åãî íå ïîëó÷èøü!" , dia_vlk_432_moe_pay_no);
};

func void dia_vlk_432_moe_pay_info_yes ()
{
* * *AI_Output ( other, self, "dia_vlk_432_moe_pay_yes_02_01"); // Äà, âîò îíè.
* * *if(B_GiveInvItems(other,self,ItMi_Gold,20))
* * *{
* * * * * *AI_Output(self,other,"DIA_vlk_432_moe_pay_yes_01_ 01"); * * *//Íó õîðîøî, ìîæåøü èäòè.
* * * * * *AI_StopProcessInfos(self);
* * *}
* * *else if(Npc_HasItems(hero,ItMi_Gold) <20)
* * *{
* * * * * *AI_Output(self,other,"DIA_vlk_432_moe_pay_yes_01_ 01"); * * *// &#199;&#228;&#229;&#241;&#252; &#237;&#229; &#226;&#241;&#184;! &#210;&#251; &#240;&#229;&#248;&#232;&#235; &#239;&#229;&#240;&#229;&#245;&#232;&#242;&#240;&# 232;&#242;&#252; &#236;&#229;&#237;&#255;!
* * * * * *B_Attack(self,other,AR_NONE,1);
* * *};
};
* * *
instance dia_vlk_432_moe_pay40 (C_Info)
{
* * *npc = vlk_432_moe;
* * *nr = 4;
* * *condition = dia_vlk_432_moe_pay40_condition;
* * *information = dia_vlk_432_moe_pay40_info;
* * *permanent = true;
* * *important = true;
};

func int dia_vlk_432_moe_pay40_condition ()
* * *{
* * *If (Npc_KnowsInfo(other, dia_vlk_432_moe_afterfight_loose))
* * *{
* * *return TRUE;
* * *};
};

func void dia_vlk_432_moe_pay40_info ()
{
* * *AI_Output ( self, other, "dia_vlk_432_moe_pay40_01_01"); // &#210;&#251;, &#237;&#224;&#226;&#229;&#240;&#237;&#238;&#229 ;, &#239;&#240;&#232;&#237;&#184;&#241; &#228;&#229;&#237;&#252;&#227;&#232;?
* * *Info_Addchoice (dia_vlk_432_moe_pay40, "&#196;&#224;, &#226;&#238;&#242; &#238;&#237;&#232;.", dia_vlk_432_moe_pay40_yes);
* * *Info_Addchoice (dia_vlk_432_moe_pay40, "&#210;&#251; &#237;&#232;&#247;&#229;&#227;&#238; &#237;&#229; &#239;&#238;&#235;&#243;&#247;&#232;&#248;&#252;!" , dia_vlk_432_moe_pay40_no);
};

func void dia_vlk_432_moe_pay40_info_yes ()
{
* * *AI_Output ( other, self, "dia_vlk_432_moe_pay40_yes_02_01"); // &#196;&#224;, &#226;&#238;&#242; &#238;&#237;&#232;.
* * *if(B_GiveInvItems(other,self,ItMi_Gold,40))
* * *{
* * * * * *AI_Output(self,other,"DIA_vlk_432_moe_pay40_yes_0 1_01"); * * *//&#205;&#243; &#245;&#238;&#240;&#238;&#248;&#238;, &#236;&#238;&#230;&#229;&#248;&#252; &#232;&#228;&#242;&#232;.
* * * * * *AI_StopProcessInfos(self);
* * * * * *
* * *}
* * *else if(Npc_HasItems(hero,ItMi_Gold) >40)
* * *{
* * * * * *AI_Output(self,other,"DIA_vlk_432_moe_pay40_yes_0 1_01"); * * *// &#199;&#228;&#229;&#241;&#252; &#237;&#229; &#226;&#241;&#184;! &#210;&#251; &#240;&#229;&#248;&#232;&#235; &#239;&#229;&#240;&#229;&#245;&#232;&#242;&#240;&# 232;&#242;&#252; &#236;&#229;&#237;&#255;!
* * * * * *B_Attack(self,other,AR_NONE,1);
* * * * * *AI_StopProcessInfos(self);
* * *};
};

instance dia_moe_ment (C_Info)
{
* * *npc = vlk_432_moe;
* * *nr = 5;
* * *condition = dia_moe_ment_condition;
* * *information = dia_moe_ment_info;
* * *permanent = true;
* * *important = true;
};

func int dia_moe_ment_condition ()
{
* * *If(other.guild == GIL_MIL)
* * *{
* * *return TRUE;
* * *};
};

func void dia_moe_ment_info ()
{
* * *AI_Output ( self, other, "dia_moe_ment_01_01"); // &#221;&#233;, &#239;&#224;&#240;&#237;&#232;! &#194;&#238;&#242; &#253;&#242;&#238;&#242; &#242;&#232;&#239;, &#239;&#240;&#238; &#234;&#238;&#242;&#238;&#240;&#238;&#227;&#238 ; &#255; &#226;&#224;&#236; &#227;&#238;&#226;&#238;&#240;&#232;&#235;!
* * *AI_Output ( other, self, "dia_moe_ment_02_01"); // &#210;&#229;&#225;&#229; &#239;&#238;&#234;&#224;&#231;&#224;&#235;&#238;&# 241;&#252; &#236;&#224;&#235;&#238; &#239;&#240;&#238;&#248;&#235;&#238;&#227;&#238 ; &#240;&#224;&#231;&#227;&#238;&#226;&#238;&#240;&# 224;?
* * *AI_Output ( self, other, "dia_moe_ment_01_02"); // &#209;&#229;&#233;&#247;&#224;&#241; &#255; &#242;&#229;&#225;&#229; &#231;&#224;&#228;&#224;&#236;, &#236;&#229;&#237;&#242;&#238;&#226;&#241;&#234;&# 224;&#255; &#241;&#234;&#238;&#242;&#232;&#237;&#224;!
* * *B_LogEntry(TOPIC_BlackHawks, "&#194;&#241;&#255; &#225;&#224;&#237;&#228;&#224; &#215;&#229;&#240;&#237;&#251;&#245; &#223;&#241;&#242;&#240;&#229;&#225;&#238;&#226 ; &#245;&#238;&#247;&#229;&#242; &#236;&#229;&#237;&#255; &#243;&#225;&#232;&#242;&#252;. &#223; &#228;&#238;&#235;&#230;&#229;&#237; &#239;&#238;&#227;&#238;&#226;&#238;&#240;&#232;&# 242;&#252; &#239;&#238; &#253;&#242;&#238;&#236;&#243; &#239;&#238;&#226;&#238;&#228;&#243; &#241; &#203;&#238;&#240;&#228;&#238;&#236; &#192;&#237;&#228;&#240;&#229;.");
* * *B_Attack(self,other,AR_NONE,1);
* * *AI_StopProcessInfos(self);
};

instance dia_moe_join (C_Info)
{
* * *npc = vlk_432_moe;
* * *nr = 6;
* * *condition = dia_moe_join_condition;
* * *information = dia_moe_join_info;
* * *permanent = false;
* * *important = true;
};

func int dia_moe_join_condition ()
{
* * *If(other.guild != GIL_MIL) && (other.guild != GIL_PAL)
* * *{
* * * * * *return TRUE;
* * *};
};

func void dia_moe_join_info ()
{
* * *AI_Output ( self, other, "dia_moe_join_01_01"); // &#221;&#233;, &#239;&#224;&#240;&#229;&#237;&#252;!
* * *AI_Output ( other, self, "dia_moe_join_02_01"); // &#215;&#242;&#238;? &#206;&#239;&#255;&#242;&#252; &#231;&#224; &#241;&#242;&#224;&#240;&#238;&#229;?
* * *AI_Output ( self, other, "dia_moe_join_01_02"); // &#205;&#229;&#242;. &#211; &#236;&#229;&#237;&#255; &#229;&#241;&#242;&#252; &#234; &#242;&#229;&#225;&#229; &#228;&#229;&#235;&#238;.
* * *AI_Output ( * * *other, self, "dia_moe_join_02_02"); // &#202;&#224;&#234;&#238;&#229; &#229;&#249;&#229; &#228;&#229;&#235;&#238;?
* * *AI_Output ( self, other, "dia_moe_join_01_03"); // &#210;&#238;&#225;&#238;&#233; &#231;&#224;&#232;&#237;&#242;&#229;&#240;&#229;&# 241;&#238;&#226;&#224;&#235;&#241;&#255; &#237;&#224;&#248; &#225;&#238;&#241;&#241;, &#206;&#241;&#234;&#224;&#240;. &#206;&#237; &#245;&#238;&#242;&#229;&#235; &#225;&#251; &#226;&#241;&#242;&#240;&#229;&#242;&#232;&#242;&# 252;&#241;&#255; &#241; &#242;&#238;&#225;&#238;&#233;.
* * *AI_Output ( other, self, "dia_moe_join_02_03"); // &#215;&#242;&#238;&#225;&#251; &#236;&#229;&#237;&#255; &#239;&#240;&#232;&#234;&#238;&#237;&#247;&#232;&# 242;&#252;?
* * *AI_Output ( self, other, "dia_moe_join_01_04"); // &#205;&#229;&#242;, &#247;&#242;&#238;&#225;&#251; &#239;&#238;&#227;&#238;&#226;&#238;&#240;&#232;&# 242;&#252;. &#207;&#240;&#232;&#245;&#238;&#228;&#232; &#226; &#239;&#238;&#235;&#237;&#238;&#247;&#252; &#226; &#242;&#224;&#226;&#229;&#240;&#237;&#243; &#202;&#224;&#240;&#228;&#232;&#244;&#224;, &#238;&#237; &#225;&#243;&#228;&#229;&#242; &#230;&#228;&#224;&#242;&#252; &#242;&#229;&#225;&#255;.
* * *B_LogEntry(TOPIC_BlackHawks, "&#204;&#229;&#237;&#255; &#245;&#238;&#247;&#229;&#242; &#226;&#232;&#228;&#229;&#242;&#252; &#227;&#235;&#224;&#226;&#224;&#240;&#252; &#225;&#224;&#237;&#228;&#251;. &#204;&#237;&#229; &#237;&#243;&#230;&#237;&#238; &#239;&#240;&#232;&#233;&#242;&#232;&#226; &#242;&#224;&#226;&#229;&#240;&#237;&#243; &#202;&#224;&#240;&#228;&#232;&#244;&#224; &#226; &#239;&#238;&#235;&#237;&#238;&#247;&#252;.");
* * *AI_StopProcessInfos(self);
};

instance dia_moe_enter (C_Info)
{
* * *npc = vlk_432_moe;
* * *nr = 7;
* * *condition = dia_moe_enter_condition;
* * *information = dia_moe_enter_info;
* * *permanent = true;
* * *important = true;
};

func int dia_moe_enter_condition ()
{
* * *if(Wld_IsTime(0,0,2,0))
* * *{
* * * * * *return TRUE;
* * *};
};

func void dia_moe_enter_info ()
{
* * *AI_Output ( self, other, "dia_moe_enter_01_01"); // &#215;&#242;&#238; &#242;&#229;&#225;&#229; &#231;&#228;&#229;&#241;&#252; &#237;&#243;&#230;&#237;&#238;?
* * *AI_Output ( other, self, "dia_moe_enter_02_01"); // &#213;&#238;&#247;&#243; &#239;&#238;&#241;&#232;&#228;&#229;&#242;&#252 ; &#226; &#242;&#224;&#226;&#229;&#240;&#237;&#229;.
* * *AI_Output ( other, self, "dia_moe_enter_01_02"); // &#207;&#240;&#232;&#245;&#238;&#228;&#232; &#239;&#238;&#231;&#230;&#229;, &#242;&#224;&#226;&#229;&#240;&#237;&#224; &#243;&#230;&#229; &#239;&#229;&#240;&#229;&#239;&#238;&#235;&#237;&# 229;&#237;&#224;.
* * *AI_StopProcessInfos(self);
};

instance dia_moe_enterjoin (C_Info)
{ * * *
* * *npc = vlk_432_moe;
* * *nr = 8;
* * *condition = dia_moe_enterjoin_condition;
* * *information = dia_moe_enterjoin_info;
* * *important = true;
* * *permanent = false;
};

func int dia_moe_enterjoin_condition ()
{
* * *If(Npc_KnowsInfo(other, dia_moe_join))
* * *{
* * * * * *return true;
* * *};
};

func void dia_moe_enterjoin_info ()
{
* * *AI_Output ( self, other, "dia_moe_enterjoin_01_01"); // &#209;&#242;&#238;&#233;. &#215;&#242;&#238; &#242;&#229;&#225;&#229; &#231;&#228;&#229;&#241;&#252; &#237;&#243;&#230;&#237;&#238;?
* * *AI_Output ( other, self, "dia_moe_enterjoin_02_01"); // &#204;&#229;&#237;&#255; &#230;&#228;&#229;&#242; &#226;&#224;&#248; &#225;&#238;&#241;&#241;.
* * *AI_Output ( self, other, "dia_moe_enterjoin_01_02"); // &#207;&#240;&#238;&#245;&#238;&#228;&#232;.
* * *AI_StopProcessInfos(self);
};
[/spoiler]

Да что ж ты будешь делать. Текст из ноутпада не делаеться по-русски
Ответить с цитированием