Witam,
Chciałem dodać do G1 nowego przeciwnika areny w starym obozie, i napisałem owe skrypty na podstawie skryptu Kirgo:
Skrypt postaci:
instance VLK_10001_Brudar (Npc_Default)
{
//-------- primary data --------
name = "Brudar";
npctype = npctype_main;
guild = GIL_NONE;
level = 8;
voice = 5;
id = 10001;
//-------- abilities --------
attribute[ATR_STRENGTH] = 20;
attribute[ATR_DEXTERITY] = 10;
attribute[ATR_MANA_MAX] = 0;
attribute[ATR_MANA] = 0;
attribute[ATR_HITPOINTS_MAX]= 100;
attribute[ATR_HITPOINTS] = 100;
//-------- visuals --------
// animations
Mdl_SetVisual (self,"HUMANS.MDS");
Mdl_ApplyOverlayMds (self,"Humans_Militia.mds");
// body mesh ,bdytex,skin,head mesh ,headtex,teethtex,ruestung
Mdl_SetVisualBody (self,"hum_body_Naked0", 0, 3,"Hum_Head_Fighter", 2, 1, VLK_ARMOR_M);
B_Scale (self);
Mdl_SetModelFatness(self,0);
self.aivar[AIV_IMPORTANT] = TRUE;
fight_tactic = FAI_HUMAN_STRONG;
//-------- Talente --------
Npc_SetTalentSkill (self, NPC_TALENT_1H,1);
Npc_SetTalentSkill (self, NPC_TALENT_1H,1);
//-------- inventory --------
EquipItem (self, ItMw_1H_Sword_Short_02);
CreateInvItem (self, ItFoApple);
CreateInvItems (self, ItMiNugget, 5);
//-------------Daily Routine-------------
daily_routine = Rtn_start_251;
};
FUNC VOID Rtn_start_10001 ()
{
TA_Stand (23,50,07,00,"OCR_ARENA_VWHEEL");
TA_StandAround (07,00,15,00,"OCR_ARENABATTLE_OUTSIDE");
TA_PracticeSword(15,00,17,30,"OCR_ARENABATTLE");
TA_Smith_Sharp (17,05,18,00,"OCR_ARENABATTLE_OUTSIDE");
TA_SitAround (18,15,23,50,"OCR_ARENABATTLE_OUTSIDE");
};
func VOID Rtn_Guide_10001 ()
{
TA_GuidePC (08,00,20,00,"OCR_ARENABATTLE_TRAIN");
TA_GuidePC (20,00,08,00,"OCR_ARENABATTLE_TRAIN");
};
i skrypt dialogu:
// **************************************************
// EXIT
// **************************************************
instance Info_Brudar_Exit (C_INFO)
{
npc = VLK_10001_Brudar;
nr = 999;
condition = Info_Brudar_Exit_Condition;
information = Info_Brudar_Exit_Info;
permanent = 1;
description = DIALOG_ENDE;
};
FUNC INT Info_Brudar_Exit_Condition()
{
return 1;
};
func VOID Info_Brudar_Exit_Info()
{
AI_StopProcessInfos ( self );
};
// **************************************************
// Co tu robisz?
// **************************************************
instance Info_Brudar_What(C_INFO)
{
npc = VLK_10001_Brudar;
nr = 1;
condition = Info_Brudar_What_Condition;
information = Info_Brudar_What_Info;
permanent = 0;
description = "Cześć! Co tam?";
};
FUNC INT Info_Brudar_What_Condition()
{
return 1;
};
func VOID Info_Brudar_What_Info()
{
AI_Output (other, self,"Info_Brudar_What_15_00"); //Cześć! Co tam?
AI_Output (self, other,"Info_Brudar_What_05_01"); //Witaj, Jestem Brudar i zajmuje się walką na arenie.
};
// **************************************************
// Wszystko ok
// **************************************************
instance Info_Brudar_Good(C_INFO)
{
npc = VLK_10001_Brudar;
nr = 1;
condition = Info_Brudar_Good_Condition;
information = Info_Brudar_Good_Info;
permanent = 0;
description = "Jak ci idzie?";
};
FUNC INT Info_Brudar_Good_Condition()
{
if (Npc_KnowsInfo (hero,Info_Brudar_What))
{
return 1;
};
};
func VOID Info_Brudar_Good_Info()
{
AI_Output (other, self,"Info_Brudar_Good_15_00"); //Jak ci idzie?
AI_Output (self, other,"Info_Brudar_Good_05_01"); //Nieźle, niejednemu kopaczowi dowalę.
};
// **************************************
// Fordern (Vorspiel)
// **************************************
instance Info_Brudar_Charge(C_INFO)
{
npc = VLK_10001_Brudar;
nr = 1;
condition = Info_Brudar_Charge_Condition;
information = Info_Brudar_Charge_Info;
permanent = 0;
description = "Zawalczmy!";
};
FUNC INT Info_Brudar_Charge_Condition()
{
if (Npc_KnowsInfo (hero,Info_Brudar_Good))
{
return 1;
};
};
func VOID Info_Brudar_Charge_Info()
{
AI_Output (other, self,"Info_Brudar_Charge_15_00"); //Zawalczmy!
AI_Output (self, other,"Info_Brudar_Charge_05_01"); //Heh, czemu nie! powiedz jak będziesz gotów!
};
// **************************************
// Fordern REAL
// **************************************
var int Brudar_Charged;
// **************************************
instance Info_Brudar_ChargeREAL(C_INFO)
{
npc = VLK_10001_Brudar;
nr = 1;
condition = Info_Brudar_ChargeREAL_Condition;
information = Info_Brudar_ChargeREAL_Info;
permanent = 0;
description = "Dobra, jestem gotów!";
};
FUNC INT Info_Brudar_ChargeREAL_Condition()
{
if (Npc_KnowsInfo (hero,Info_Brudar_Charge))
{
return 1;
};
};
func VOID Info_Brudar_ChargeREAL_Info()
{
AI_Output (other, self,"Info_Brudar_ChargeREAL_15_00"); //Dobra, jestem gotów!
AI_Output (self, other,"Info_Brudar_ChargeREAL_05_01"); //Jesteś gotów?
AI_Output (other, self,"Info_Brudar_ChargeREAL_15_02"); //Jestem gotów!
AI_StopProcessInfos ( self );
Brudar_Charged = TRUE;
Npc_ExchangeRoutine(self,"GUIDE");
};
// **************************************
// Na Arenie
// **************************************
instance Info_Brudar_InArena (C_INFO)
{
npc = VLK_10001_Brudar;
nr = 1;
condition = Info_Brudar_InArena_Condition;
information = Info_Brudar_InArena_Info;
permanent = 0;
important = 1;
};
FUNC INT Info_Brudar_InArena_Condition()
{
if ( (Brudar_Charged == TRUE) && (Npc_GetDistToWp (hero,"OCR_ARENABATTLE_TRAIN") < 500) )
{
return 1;
};
};
func VOID Info_Brudar_InArena_Info()
{
if (Kapitel <= 1) //Fix für spätere Kapitel ****Björn****
{
AI_Output (self, other,"Info_Brudar_InArena_05_00"); //Dobra, jazda!
AI_StopProcessInfos ( self );
Npc_ExchangeRoutine(self,"START");
Npc_SetTarget(self,other);
AI_StartState(self,ZS_ATTACK,1,"");
}
else
{
AI_Output (self, other,"SVM_5_LetsForgetOurLittleFight"); //Może zapomnijmy o naszej małej sprzeczce, dobra?
AI_StopProcessInfos ( self );
Npc_ExchangeRoutine(self,"START");
};
};
Gdy już sparsuje skrypty i dialogi to jest takie coś, że po rozpoczęciu dialogu z Brudar'em pisze tylko: "KONIEC" i nic więcej, kiedyś jak robiłem inne dialogi, lub je edytowałem wszystko działało jak należy, teraz miałem przerwę ok. 1 rok z modowaniem gothica 1.
Z góry dziękuje za pomoc.