Witam! Chciałbym, żeby ork po rozmowie zaatakował bohatera. Jednak, kiedy ma to zrobić, to nic się nie dzieje, chociaż ma w dialogu wpisane:
Spoiler
AI_StopProcessInfos ( self );
Npc_SetTarget(self,other);
B_Attack (self, other, AR_NONE, 2);
Skrypt orka
Spoiler
INSTANCE NONE_5036_Hetros (C_Npc)
{
//-------- primary data --------
name = "Hetros";
guild = GIL_FRIENDLY_ORC;
aivar[AIV_MM_REAL_ID] = ID_ORCELITE;
id = 5036;
voice = 18;
flags = 0;
Npctype = NPCTYPE_MAIN;
level = 100;
//----- Attribute -----
attribute [ATR_STRENGTH] = 425; //+180 Waffe //MIN 180!
attribute [ATR_DEXTERITY] = 425;
attribute [ATR_HITPOINTS_MAX] = 1;
attribute [ATR_HITPOINTS] = 1;
attribute [ATR_MANA_MAX] = 0;
attribute [ATR_MANA] = 0;
//----- Protections ----
protection [PROT_BLUNT] = 200;
protection [PROT_EDGE] = 200;
protection [PROT_POINT] = 200;
protection [PROT_FIRE] = 200;
protection [PROT_FLY] = 200;
protection [PROT_MAGIC] = 150;
//----- HitChances -----
HitChance [NPC_TALENT_1H] = 100;
HitChance [NPC_TALENT_2H] = 100;
HitChance [NPC_TALENT_BOW] = 100;
HitChance [NPC_TALENT_CROSSBOW] = 100;
//----- Damage Types ----
damagetype = DAM_EDGE;
// damage [DAM_INDEX_BLUNT] = 0;
// damage [DAM_INDEX_EDGE] = 0;
// damage [DAM_INDEX_POINT] = 0;
// damage [DAM_INDEX_FIRE] = 0;
// damage [DAM_INDEX_FLY] = 0;
// damage [DAM_INDEX_MAGIC] = 0;
fight_tactic = FAI_ORC;
Mdl_SetVisual (self, "Orc.mds");
Mdl_SetVisualBody (self, "Orc_BodyElite", DEFAULT, DEFAULT, "Orc_HeadWarrior", DEFAULT, DEFAULT, -1);
EquipItem (self, ItMw_2H_OrcSword_02);
start_aistate = ZS_Orc_Sit_Campfire;
daily_routine = Rtn_PreStart_5036;
};
FUNC VOID Rtn_PreStart_5036 ()
{
TA_Orc_Sit_Bench (08,00,12,00,"AR_07A");
TA_Stand_WP (12,00,13,00,"AR_08");
TA_Orc_Eat (13,00,14,00,"AR_08");
TA_Orc_Sit_Bench (14,00,18,00,"AR_07A");
TA_Stand_WP (18,00,19,00,"AR_08");
TA_Orc_Eat (19,00,20,00,"AR_08");
TA_Orc_Sit_Campfire (20,00,08,00,"AR_09");
};
func VOID Rtn_Guide_5036 ()
{
TA_Guide_Player (08,00,20,00,"AR_41");
TA_Guide_Player(20,00,08,00,"AR_41");
};
Dialog
Spoiler
//*********************************************************************
// Info EXIT
//*********************************************************************
INSTANCE DIA_NONE_5036_Hetros_EXIT (C_INFO)
{
npc = NONE_5036_Hetros;
nr = 999;
condition = DIA_NONE_5036_Hetros_EXIT_Condition;
information = DIA_NONE_5036_Hetros_EXIT_Info;
permanent = TRUE;
description = DIALOG_ENDE;
};
FUNC INT DIA_NONE_5036_Hetros_EXIT_Condition()
{
return TRUE;
};
FUNC VOID DIA_NONE_5036_Hetros_EXIT_Info()
{
AI_StopProcessInfos (self);
};
//*********************************************************************
// Info Hello
//*********************************************************************
INSTANCE DIA_NONE_5036_Hetros_Hello (C_INFO)
{
npc = NONE_5036_Hetros;
nr = 100;
condition = DIA_NONE_5036_Hetros_Hello_Condition;
information = DIA_NONE_5036_Hetros_Hello_Info;
permanent = FALSE;
description = "Ork na tutejszej arenie?";
};
FUNC INT DIA_NONE_5036_Hetros_Hello_Condition()
{
return TRUE;
};
FUNC VOID DIA_NONE_5036_Hetros_Hello_Info()
{
AI_Output (other,self ,"DIA_NONE_5036_Hetros_Hello_15_00"); //Ork na tutejszej arenie?
AI_Output (self ,other,"DIA_NONE_5036_Hetros_Hello_08_01"); //Orkowie honorowi i silni wojownicy, morra słabe i przebiegłe.
AI_Output (other,self ,"DIA_NONE_5036_Hetros_Hello_15_02"); //Tak, tak...
AI_Output (self ,other,"DIA_NONE_5036_Hetros_Hello_08_03"); //Morra, jak chcieć zawalczyć z Hetrosem, to ten połamać mu wszystkie kości, a wtedy on zrozumieć moje słowa.
};
//*********************************************************************
// Info Hello3
//*********************************************************************
INSTANCE DIA_NONE_5036_Hetros_Hello3 (C_INFO)
{
npc = NONE_5036_Hetros;
nr = 4;
condition = DIA_NONE_5036_Hetros_Hello3_Condition;
information = DIA_NONE_5036_Hetros_Hello3_Info;
permanent = FALSE;
description = "Chcę z tobą walczyć - jesteś gotów?";
};
FUNC INT DIA_NONE_5036_Hetros_Hello3_Condition()
{
if ((ARENAHETROS == TRUE) && (Wld_IsTime(12,00,19,59)))
{
return TRUE;
};
};
FUNC VOID DIA_NONE_5036_Hetros_Hello3_Info()
{
AI_Output (other,self ,"DIA_NONE_5036_Hetros_Hello3_15_00"); //Chcę z tobą walczyć - jesteś gotów?
AI_Output (self ,other,"DIA_NONE_5036_Hetros_Hello3_08_01"); //Morra, ty dziś umrzeć.
AI_StopProcessInfos ( self );
Npc_ExchangeRoutine (self,"GUIDE");
};
//*********************************************************************
// Info Hello4
//*********************************************************************
INSTANCE DIA_NONE_5036_Hetros_Hello4 (C_INFO)
{
npc = NONE_5036_Hetros;
nr = 5;
condition = DIA_NONE_5036_Hetros_Hello4_Condition;
information = DIA_NONE_5036_Hetros_Hello4_Info;
permanent = FALSE;
important = TRUE;
};
FUNC INT DIA_NONE_5036_Hetros_Hello4_Condition()
{
if ((ARENAHETROS == TRUE) && (Npc_GetDistToWp (self,"AR_41") <= 500))
{
return TRUE;
};
};
FUNC VOID DIA_NONE_5036_Hetros_Hello4_Info()
{
AI_Output (self ,other,"DIA_NONE_5036_Hetros_Hello4_08_00"); //Morra, gotuj się na śmierć!
AI_StopProcessInfos ( self );
Npc_SetTarget(self,other);
B_Attack (self, other, AR_NONE, 2);
};
Co zrobić, by ork zaatakował bohatera?
Myślę, że zachowanie orka powinno się zmienić na
start_aistate = ZS_MM_AllScheduler;
aivar[AIV_MM_RestStart] = OnlyRoutine;
tylko nie wiem, jak we właściwy sposób wpisać to w dialog.
Post połączony: 2014-11-17, 21:15
Anuluję pytanie. Pospieszyłem się. Przepraszam...
Ze skryptu orka usunąłem: daily_routine = Rtn_PreStart_5036;
a dodałem:
start_aistate = ZS_MM_AllScheduler;
start_aistate = ZS_MM_Rtn_DragonRest;
aivar[AIV_MM_RestStart] = OnlyRoutine;
i jest dobrze.