Problem z postacią i Info_AddChoice 3082 12

O temacie

Autor Mikotsune

Zaczęty 4.01.2018 roku

Wyświetleń 3082

Odpowiedzi 12

Mikotsune

Mikotsune

Czas Honoru
posty364
Propsy288
Profesjabrak
  • Czas Honoru
Cześć. Mam dziwne problemy i mam nadzieje, że mi ktoś pomoże. Z góry dziękuję za pomoc :ok:

1) Dodałem do postaci możliwość uczenia się many za pomocą Info_AddChoice, ale opcja dialogowa w ogóle się nie wyświetla podczas rozmowy. Inne Info_AddChoices działają bezproblemowo!
Dialog
Niedziałające linijki:

Info_AddChoice      (DIA_PC_Lester_Nauka, B_BuildLearnString(PRINT_LearnMANA1, B_GetLearnCostAttribute(other, ATR_MANA_MAX))        ,DIA_PC_Lester_Nauka_Mana1);
Info_AddChoice      (DIA_PC_Lester_Nauka, B_BuildLearnString(PRINT_LearnMANA5, B_GetLearnCostAttribute(other, ATR_MANA_MAX)*5)   ,DIA_PC_Lester_Nauka_Mana5);

Kod: (Cała opcja dialogowa) [Zaznacz]
INSTANCE DIA_PC_Lester_Nauka   (C_INFO)
{
npc         = PC_Lester;
nr          = 998;
condition   = DIA_PC_Lester_Nauka_Condition;
information = DIA_PC_Lester_Nauka_Info;
permanent = TRUE;
description = "Chcę zwiększyć swoją magiczną moc.";
};

FUNC INT DIA_PC_Lester_Nauka_Condition()
{
return TRUE;
};

FUNC VOID DIA_PC_Lester_Nauka_Info()
{
AI_Output (other, self, "DIA_PC_Lester_Nauka_15_00"); //Chcę zwiększyć swoją magiczną moc.
AI_Output (self ,other, "DIA_PC_Lester_Nauka_13_01"); //Świetnie! Zaczynamy od razu?

Info_ClearChoices (DIA_PC_Lester_Nauka);
Info_AddChoice (DIA_PC_Lester_Nauka, DIALOG_BACK, DIA_PC_Lester_Nauka_Back);
Info_AddChoice (DIA_PC_Lester_Nauka, B_BuildLearnString(PRINT_LearnMANA1, B_GetLearnCostAttribute(other, ATR_MANA_MAX)) ,DIA_PC_Lester_Nauka_Mana1);
Info_AddChoice (DIA_PC_Lester_Nauka, B_BuildLearnString(PRINT_LearnMANA5, B_GetLearnCostAttribute(other, ATR_MANA_MAX)*5) ,DIA_PC_Lester_Nauka_Mana5);

if(Npc_GetTalentSkill (other, NPC_TALENT_MAGE) == 0)
{
Info_AddChoice (DIA_PC_Lester_Nauka, "1 krąg magii (10 punktów nauki)", DIA_PC_Lester_Nauka_KregiMagii_1);
};
if(Npc_GetTalentSkill (other, NPC_TALENT_MAGE) == 1)
{
Info_AddChoice (DIA_PC_Lester_Nauka, "2 krąg magii (15 punktów nauki)", DIA_PC_Lester_Nauka_KregiMagii_2);
};
};

func void DIA_PC_Lester_Nauka_Back()
{
Info_ClearChoices (DIA_PC_Lester_Nauka);
};

func void DIA_PC_Lester_Nauka_Mana1()
{
if(Kapitel <= 2) // 90
{
if (other.attribute[ATR_MANA_MAX] >= T_MED)
{
AI_Output (self, other, "DIA_PC_Lester_Nauka_13_02"); //Nauczyłem cię wszystkiego co wiem!
AI_Output (self, other, "DIA_PC_Lester_Nauka_13_03"); //Teraz muszę się trochę pouczyć. Przyjdź do mnie później.
}
else
{
B_TeachAttributePoints (self, other, ATR_MANA_MAX, 1, T_MED);

Info_ClearChoices (DIA_PC_Lester_Nauka);
Info_AddChoice (DIA_PC_Lester_Nauka, DIALOG_BACK, DIA_PC_Lester_Nauka_Back);
Info_AddChoice (DIA_PC_Lester_Nauka, B_BuildLearnString(PRINT_LearnMANA1 , B_GetLearnCostAttribute(other, ATR_MANA_MAX)) ,DIA_PC_Lester_Nauka_Mana1);
Info_AddChoice (DIA_PC_Lester_Nauka, B_BuildLearnString(PRINT_LearnMANA5 , B_GetLearnCostAttribute(other, ATR_MANA_MAX)*5) ,DIA_PC_Lester_Nauka_Mana5);

if(Npc_GetTalentSkill (other, NPC_TALENT_MAGE) == 0)
{
Info_AddChoice (DIA_PC_Lester_Nauka, "1 krąg magii (10 punktów nauki)", DIA_PC_Lester_Nauka_KregiMagii_1);
};
if(Npc_GetTalentSkill (other, NPC_TALENT_MAGE) == 1)
{
Info_AddChoice (DIA_PC_Lester_Nauka, "2 krąg magii (15 punktów nauki)", DIA_PC_Lester_Nauka_KregiMagii_2);
};
};
}
else if(Kapitel = 3) // 120
{
if (other.attribute[ATR_MANA_MAX] >= T_HIGH)
{
AI_Output (self, other, "DIA_PC_Lester_Nauka_13_02"); //Nauczyłem cię wszystkiego co wiem!
AI_Output (self, other, "DIA_PC_Lester_Nauka_13_03"); //Teraz muszę się trochę pouczyć. Przyjdź do mnie później.
}
else
{
B_TeachAttributePoints (self, other, ATR_MANA_MAX, 1, T_HIGH);

Info_ClearChoices (DIA_PC_Lester_Nauka);
Info_AddChoice (DIA_PC_Lester_Nauka, DIALOG_BACK, DIA_PC_Lester_Nauka_Back);
Info_AddChoice (DIA_PC_Lester_Nauka, B_BuildLearnString(PRINT_LearnMANA1 , B_GetLearnCostAttribute(other, ATR_MANA_MAX)) ,DIA_PC_Lester_Nauka_Mana1);
Info_AddChoice (DIA_PC_Lester_Nauka, B_BuildLearnString(PRINT_LearnMANA5 , B_GetLearnCostAttribute(other, ATR_MANA_MAX)*5) ,DIA_PC_Lester_Nauka_Mana5);

if(Npc_GetTalentSkill (other, NPC_TALENT_MAGE) == 0)
{
Info_AddChoice (DIA_PC_Lester_Nauka, "1 krąg magii (10 punktów nauki)", DIA_PC_Lester_Nauka_KregiMagii_1);
};
if(Npc_GetTalentSkill (other, NPC_TALENT_MAGE) == 1)
{
Info_AddChoice (DIA_PC_Lester_Nauka, "2 krąg magii (15 punktów nauki)", DIA_PC_Lester_Nauka_KregiMagii_2);
};
};
}
else if(Kapitel = 4) // 200
{
if (other.attribute[ATR_MANA_MAX] >= T_MAX)
{
AI_Output (self, other, "DIA_PC_Lester_Nauka_13_02"); //Nauczyłem cię wszystkiego co wiem!
AI_Output (self, other, "DIA_PC_Lester_Nauka_13_03"); //Teraz muszę się trochę pouczyć. Przyjdź do mnie później.
}
else
{
B_TeachAttributePoints (self, other, ATR_MANA_MAX, 1, T_MAX);

Info_ClearChoices (DIA_PC_Lester_Nauka);
Info_AddChoice (DIA_PC_Lester_Nauka, DIALOG_BACK, DIA_PC_Lester_Nauka_Back);
Info_AddChoice (DIA_PC_Lester_Nauka, B_BuildLearnString(PRINT_LearnMANA1 , B_GetLearnCostAttribute(other, ATR_MANA_MAX)) ,DIA_PC_Lester_Nauka_Mana1);
Info_AddChoice (DIA_PC_Lester_Nauka, B_BuildLearnString(PRINT_LearnMANA5 , B_GetLearnCostAttribute(other, ATR_MANA_MAX)*5) ,DIA_PC_Lester_Nauka_Mana5);

if(Npc_GetTalentSkill (other, NPC_TALENT_MAGE) == 0)
{
Info_AddChoice (DIA_PC_Lester_Nauka, "1 krąg magii (10 punktów nauki)", DIA_PC_Lester_Nauka_KregiMagii_1);
};
if(Npc_GetTalentSkill (other, NPC_TALENT_MAGE) == 1)
{
Info_AddChoice (DIA_PC_Lester_Nauka, "2 krąg magii (15 punktów nauki)", DIA_PC_Lester_Nauka_KregiMagii_2);
};
};
}
else if(Kapitel >= 5) // 300
{
if (other.attribute[ATR_MANA_MAX] >= T_MEGA)
{
AI_Output (self, other, "DIA_PC_Lester_Nauka_13_04"); //Nie mogę Cię już niczego nauczyć, jesteś za dobry!
}
else
{
B_TeachAttributePoints (self, other, ATR_MANA_MAX, 1, T_MEGA);

Info_ClearChoices (DIA_PC_Lester_Nauka);
Info_AddChoice (DIA_PC_Lester_Nauka, DIALOG_BACK, DIA_PC_Lester_Nauka_Back);
Info_AddChoice (DIA_PC_Lester_Nauka, B_BuildLearnString(PRINT_LearnMANA1 , B_GetLearnCostAttribute(other, ATR_MANA_MAX)) ,DIA_PC_Lester_Nauka_Mana1);
Info_AddChoice (DIA_PC_Lester_Nauka, B_BuildLearnString(PRINT_LearnMANA5 , B_GetLearnCostAttribute(other, ATR_MANA_MAX)*5) ,DIA_PC_Lester_Nauka_Mana5);

if(Npc_GetTalentSkill (other, NPC_TALENT_MAGE) == 0)
{
Info_AddChoice (DIA_PC_Lester_Nauka, "1 krąg magii (10 punktów nauki)", DIA_PC_Lester_Nauka_KregiMagii_1);
};
if(Npc_GetTalentSkill (other, NPC_TALENT_MAGE) == 1)
{
Info_AddChoice (DIA_PC_Lester_Nauka, "2 krąg magii (15 punktów nauki)", DIA_PC_Lester_Nauka_KregiMagii_2);
};
};
};

Info_ClearChoices (DIA_PC_Lester_Nauka);
};

func void DIA_PC_Lester_Nauka_Mana5()
{
if(Kapitel <= 2) // 90
{
if (other.attribute[ATR_MANA_MAX] >= T_MED)
{
AI_Output (self, other, "DIA_PC_Lester_Nauka_13_02"); //Nauczyłem cię wszystkiego co wiem!
AI_Output (self, other, "DIA_PC_Lester_Nauka_13_03"); //Teraz muszę się trochę pouczyć. Przyjdź do mnie później.
}
else
{
B_TeachAttributePoints (self, other, ATR_MANA_MAX, 5, T_MED);

Info_ClearChoices (DIA_PC_Lester_Nauka);
Info_AddChoice (DIA_PC_Lester_Nauka, DIALOG_BACK, DIA_PC_Lester_Nauka_Back);
Info_AddChoice (DIA_PC_Lester_Nauka, B_BuildLearnString(PRINT_LearnMANA1 , B_GetLearnCostAttribute(other, ATR_MANA_MAX)) ,DIA_PC_Lester_Nauka_Mana1);
Info_AddChoice (DIA_PC_Lester_Nauka, B_BuildLearnString(PRINT_LearnMANA5 , B_GetLearnCostAttribute(other, ATR_MANA_MAX)*5) ,DIA_PC_Lester_Nauka_Mana5);

if(Npc_GetTalentSkill (other, NPC_TALENT_MAGE) == 0)
{
Info_AddChoice (DIA_PC_Lester_Nauka, "1 krąg magii (10 punktów nauki)", DIA_PC_Lester_Nauka_KregiMagii_1);
};
if(Npc_GetTalentSkill (other, NPC_TALENT_MAGE) == 1)
{
Info_AddChoice (DIA_PC_Lester_Nauka, "2 krąg magii (15 punktów nauki)", DIA_PC_Lester_Nauka_KregiMagii_2);
};
};
}
else if(Kapitel = 3) // 120
{
if (other.attribute[ATR_MANA_MAX] >= T_HIGH)
{
AI_Output (self, other, "DIA_PC_Lester_Nauka_13_02"); //Nauczyłem cię wszystkiego co wiem!
AI_Output (self, other, "DIA_PC_Lester_Nauka_13_03"); //Teraz muszę się trochę pouczyć. Przyjdź do mnie później.
}
else
{
B_TeachAttributePoints (self, other, ATR_MANA_MAX, 5, T_HIGH);

Info_ClearChoices (DIA_PC_Lester_Nauka);
Info_AddChoice (DIA_PC_Lester_Nauka, DIALOG_BACK, DIA_PC_Lester_Nauka_Back);
Info_AddChoice (DIA_PC_Lester_Nauka, B_BuildLearnString(PRINT_LearnMANA1 , B_GetLearnCostAttribute(other, ATR_MANA_MAX)) ,DIA_PC_Lester_Nauka_Mana1);
Info_AddChoice (DIA_PC_Lester_Nauka, B_BuildLearnString(PRINT_LearnMANA5 , B_GetLearnCostAttribute(other, ATR_MANA_MAX)*5) ,DIA_PC_Lester_Nauka_Mana5);

if(Npc_GetTalentSkill (other, NPC_TALENT_MAGE) == 0)
{
Info_AddChoice (DIA_PC_Lester_Nauka, "1 krąg magii (10 punktów nauki)", DIA_PC_Lester_Nauka_KregiMagii_1);
};
if(Npc_GetTalentSkill (other, NPC_TALENT_MAGE) == 1)
{
Info_AddChoice (DIA_PC_Lester_Nauka, "2 krąg magii (15 punktów nauki)", DIA_PC_Lester_Nauka_KregiMagii_2);
};
};
}
else if(Kapitel = 4) // 200
{
if (other.attribute[ATR_MANA_MAX] >= T_MAX)
{
AI_Output (self, other, "DIA_PC_Lester_Nauka_13_02"); //Nauczyłem cię wszystkiego co wiem!
AI_Output (self, other, "DIA_PC_Lester_Nauka_13_03"); //Teraz muszę się trochę pouczyć. Przyjdź do mnie później.
}
else
{
B_TeachAttributePoints (self, other, ATR_MANA_MAX, 5, T_MAX);

Info_ClearChoices (DIA_PC_Lester_Nauka);
Info_AddChoice (DIA_PC_Lester_Nauka, DIALOG_BACK, DIA_PC_Lester_Nauka_Back);
Info_AddChoice (DIA_PC_Lester_Nauka, B_BuildLearnString(PRINT_LearnMANA1 , B_GetLearnCostAttribute(other, ATR_MANA_MAX)) ,DIA_PC_Lester_Nauka_Mana1);
Info_AddChoice (DIA_PC_Lester_Nauka, B_BuildLearnString(PRINT_LearnMANA5 , B_GetLearnCostAttribute(other, ATR_MANA_MAX)*5) ,DIA_PC_Lester_Nauka_Mana5);

if(Npc_GetTalentSkill (other, NPC_TALENT_MAGE) == 0)
{
Info_AddChoice (DIA_PC_Lester_Nauka, "1 krąg magii (10 punktów nauki)", DIA_PC_Lester_Nauka_KregiMagii_1);
};
if(Npc_GetTalentSkill (other, NPC_TALENT_MAGE) == 1)
{
Info_AddChoice (DIA_PC_Lester_Nauka, "2 krąg magii (15 punktów nauki)", DIA_PC_Lester_Nauka_KregiMagii_2);
};
};
}
else if(Kapitel >= 5) // 300
{
if (other.attribute[ATR_MANA_MAX] >= T_MEGA)
{
AI_Output (self, other, "DIA_PC_Lester_Nauka_13_04"); //Nie mogę Cię już niczego nauczyć, jesteś za dobry!
}
else
{
B_TeachAttributePoints (self, other, ATR_MANA_MAX, 5, T_MEGA);

Info_ClearChoices (DIA_PC_Lester_Nauka);
Info_AddChoice (DIA_PC_Lester_Nauka, DIALOG_BACK, DIA_PC_Lester_Nauka_Back);
Info_AddChoice (DIA_PC_Lester_Nauka, B_BuildLearnString(PRINT_LearnMANA1 , B_GetLearnCostAttribute(other, ATR_MANA_MAX)) ,DIA_PC_Lester_Nauka_Mana1);
Info_AddChoice (DIA_PC_Lester_Nauka, B_BuildLearnString(PRINT_LearnMANA5 , B_GetLearnCostAttribute(other, ATR_MANA_MAX)*5) ,DIA_PC_Lester_Nauka_Mana5);

if(Npc_GetTalentSkill (other, NPC_TALENT_MAGE) == 0)
{
Info_AddChoice (DIA_PC_Lester_Nauka, "1 krąg magii (10 punktów nauki)", DIA_PC_Lester_Nauka_KregiMagii_1);
};
if(Npc_GetTalentSkill (other, NPC_TALENT_MAGE) == 1)
{
Info_AddChoice (DIA_PC_Lester_Nauka, "2 krąg magii (15 punktów nauki)", DIA_PC_Lester_Nauka_KregiMagii_2);
};
};
};

Info_ClearChoices (DIA_PC_Lester_Nauka);
};

func void DIA_PC_Lester_Nauka_KregiMagii_1()
{
AI_Output (other, self, "DIA_PC_Lester_Nauka_Krag_1_15_00"); //Wprowadź mnie proszę do pierwszego kręgu magii.

if B_TeachMagicCircle (self, other, 1)
{
AI_Output (self, other, "DIA_PC_Lester_Nauka_Krag_1_13_01"); //Zdołałem nauczyć się wytwarzać dwie runy tego kręgu.
AI_Output (self, other, "DIA_PC_Lester_Nauka_Krag_1_13_02"); //Zaklęcie światła oświetli ci drogę lepiej niż jakakolwiek pochodnia.
AI_Output (self, other, "DIA_PC_Lester_Nauka_Krag_1_13_03"); //Ognisty pocisk to najprostszy czar ofensywny kręgu ognia. Chyba nie muszę tłumaczyć jak działa.
AI_Output (self, other, "DIA_PC_Lester_Nauka_Krag_1_13_04"); //O ile wiem, istnieje tekże zaklęcie kręgu wody o nazwie "Lodowa strzała".
AI_Output (self, other, "DIA_PC_Lester_Nauka_Krag_1_13_05"); //Niestety nie mam jak zbadać tej formuły. Szkoda, że nie posiadam żadnego zwoju z tym zaklęciem...
};

Info_ClearChoices (DIA_PC_Lester_Nauka);
Info_AddChoice (DIA_PC_Lester_Nauka, DIALOG_BACK, DIA_PC_Lester_Nauka_Back);
Info_AddChoice (DIA_PC_Lester_Nauka, B_BuildLearnString(PRINT_LearnMANA1, B_GetLearnCostAttribute(other, ATR_MANA_MAX))   ,DIA_PC_Lester_Nauka_Mana1);
Info_AddChoice (DIA_PC_Lester_Nauka, B_BuildLearnString(PRINT_LearnMANA5, B_GetLearnCostAttribute(other, ATR_MANA_MAX)*5) ,DIA_PC_Lester_Nauka_Mana5);
if(Npc_GetTalentSkill (other, NPC_TALENT_MAGE) == 0)
{
Info_AddChoice (DIA_PC_Lester_Nauka, "1 krąg magii (10 punktów nauki)", DIA_PC_Lester_Nauka_KregiMagii_1);
};
if(Npc_GetTalentSkill (other, NPC_TALENT_MAGE) == 1)
{
Info_AddChoice (DIA_PC_Lester_Nauka, "2 krąg magii (15 punktów nauki)", DIA_PC_Lester_Nauka_KregiMagii_2);
};
};

func void DIA_PC_Lester_Nauka_KregiMagii_2()
{
AI_Output (other, self, "DIA_PC_Lester_Nauka_Krag_2_15_00"); //Wprowadź mnie proszę do drugiego kręgu magii.

if B_TeachMagicCircle (self, other, 2)
{
AI_Output (self, other,"DIA_PC_Lester_Nauka_Krag_2_13_01"); //Poznałeś już magiczną naturę języka runicznego. Teraz zgłębisz jego tajniki.
AI_Output (self, other,"DIA_PC_Lester_Nauka_Krag_2_13_02"); //Po przystąpieniu do Drugiego Kręgu poznasz silniejsze zaklęcia ofensywne oraz tajemnicę magii uzdrawiającej.
AI_Output (self, other,"DIA_PC_Lester_Nauka_Krag_2_13_03"); //Musisz się jeszcze wiele nauczyć, zanim dane ci będzie poznać prawdziwe oblicze magii.
AI_Output (self, other,"DIA_PC_Lester_Nauka_Krag_2_13_04"); //Wiesz już, że runy mogą być wykorzystywane do chwili wyczerpania twoich własnych pokładów siły magicznej.
AI_Output (self, other,"DIA_PC_Lester_Nauka_Krag_2_13_05"); //Ale prawdziwy mag wykorzystuje swoje zdolności tylko wtedy, gdy jest to absolutnie niezbędne.
AI_Output (self, other,"DIA_PC_Lester_Nauka_Krag_2_13_06"); //Kiedy w pełni uświadomisz sobie ten fakt, zrozumiesz prawdę kryjącą się za magią runiczną.
};

Info_ClearChoices (DIA_PC_Lester_Nauka);
Info_AddChoice (DIA_PC_Lester_Nauka, DIALOG_BACK, DIA_PC_Lester_Nauka_Back);
Info_AddChoice (DIA_PC_Lester_Nauka, B_BuildLearnString(PRINT_LearnMANA1 , B_GetLearnCostAttribute(other, ATR_MANA_MAX)) ,DIA_PC_Lester_Nauka_Mana1);
Info_AddChoice (DIA_PC_Lester_Nauka, B_BuildLearnString(PRINT_LearnMANA5 , B_GetLearnCostAttribute(other, ATR_MANA_MAX)*5) ,DIA_PC_Lester_Nauka_Mana5);
if(Npc_GetTalentSkill (other, NPC_TALENT_MAGE) == 1)
{
Info_AddChoice (DIA_PC_Lester_Nauka, "2 krąg magii (15 punktów nauki)", DIA_PC_Lester_Nauka_KregiMagii_2);
};
};
Zmieniony B_BuildLearnString
func string B_BuildLearnString(var string text,var int kosten)
{
   var string concatText;
   concatText = ConcatStrings(text," (");
   concatText = ConcatStrings(concatText,IntToString(kosten));
   
   if(kosten = 1)
   {
      concatText = ConcatStrings(concatText," punkt nauki)");
   }
   else if(kosten = 2) || (kosten = 3) || (kosten = 4)
   {
      concatText = ConcatStrings(concatText," punkty nauki)");
   }
   else
   {
      concatText = ConcatStrings(concatText," punktów nauki)");
   };
   
   return concatText;
};
B_GetLearnCostAttribute
Tutaj nic nie zmieniałem.

func int B_GetLearnCostAttribute(var C_Npc oth,var int attribut)
{
var int kosten;
kosten = 0;
if(attribut == ATR_STRENGTH)
{
if(oth.aivar[REAL_STRENGTH] >= 120)
{
kosten = 5;
}
else if(oth.aivar[REAL_STRENGTH] >= 90)
{
kosten = 4;
}
else if(oth.aivar[REAL_STRENGTH] >= 60)
{
kosten = 3;
}
else if(oth.aivar[REAL_STRENGTH] >= 30)
{
kosten = 2;
}
else
{
kosten = 1;
};
};
if(attribut == ATR_DEXTERITY)
{
if(oth.aivar[REAL_DEXTERITY] >= 120)
{
kosten = 5;
}
else if(oth.aivar[REAL_DEXTERITY] >= 90)
{
kosten = 4;
}
else if(oth.aivar[REAL_DEXTERITY] >= 60)
{
kosten = 3;
}
else if(oth.aivar[REAL_DEXTERITY] >= 30)
{
kosten = 2;
}
else
{
kosten = 1;
};
};
if(attribut == ATR_MANA_MAX)
{
if(oth.aivar[REAL_MANA_MAX] >= 120)
{
kosten = 5;
}
else if(oth.aivar[REAL_MANA_MAX] >= 90)
{
kosten = 4;
}
else if(oth.aivar[REAL_MANA_MAX] >= 60)
{
kosten = 3;
}
else if(oth.aivar[REAL_MANA_MAX] >= 30)
{
kosten = 2;
}
else
{
kosten = 1;
};
};
return kosten;
};
2) Drugi problem mam taki, że po teleportacji (AI_Teleport) postać nie chce ze mną rozmawiać, mimo iż ma ustawione important = true. Wcześniej postać raz chciała ze mną rozmawiać, raz nie, a teraz nie chce w ogóle rozmawiać - Tylko się na mnie patrzy. Jak kliknę na postać, żeby zagadać to ona się odwiesza i sama zaczyna ze mną rozmawiać (albo wraca do swojej rutyny i jak mnie zobaczy/przejdę koło postaci to zaczyna z nami rozmawiać).
Postać korzysta z nowej rutyny do stołu zaklęć - Edytowana rutyna alchemi - ale wątpię, żeby to był problem, bo postać wcześniej z nami normalnie zaczynała rozmawiać.
TA_Rune_Maker
// *************************
// NSC benutzt Alchemietisch
// *************************

FUNC VOID ZS_Rune_Maker ()
{   
   Perception_Set_Normal();
   
   B_ResetAll (self);
   
   AI_SetWalkmode    (self,NPC_WALK);
      
   if (Hlp_StrCmp (Npc_GetNearestWP(self), self.wp) == FALSE)
    {
      AI_GotoWP   (self, self.wp);
   };
   if (Npc_HasItems (self,ItMi_RuneBlank) == 0)
   {
      CreateInvItem (self,ItMi_RuneBlank);            
   };
};

FUNC int ZS_Rune_Maker_Loop ()
{
   // ------ SK: Sollte schon für das neue Mobsi funzen ------
   // ------ Alchemie-Tisch benutzen ------

   if (!C_BodyStateContains(self, BS_MOBINTERACT_INTERRUPT))
   && (Wld_IsMobAvailable(self,"RMAKER"))
   {
      AI_UseMob (self, "RMAKER", 1);      
   };
   
   return LOOP_CONTINUE;
};

FUNC VOID ZS_Rune_Maker_End ()
{
   AI_UseMob (self, "RMAKER", -1);
};
 
How can I see roses... and only feel thorns...

TheKetrab

TheKetrab

Użytkownicy
posty334
Propsy217
ProfesjaProducent
  • Użytkownicy
@1 jedyne, co mi przychodzi na myśl, to te ify. W G2 (nie wiem, jak w jedynce) w grze AddChoice'y są podawane w odwrotnej kolejności. Spróbuj może wywalić te ify? Czy zadziała? Spróbuj też zmienić kolejność. Możliwe, że wyświetlając od końca, te ify komplikują?
 

Bogdan Zwei

Bogdan Zwei

Użytkownicy
Wulgarny skurwiel pierdolony.
posty1864
Propsy541
Profesjabrak
  • Użytkownicy
  • Wulgarny skurwiel pierdolony.
Zmień rozdział na 2 lub większy.

Wywal warunki z if (Kapitel) i sprawdź czy działa.

Druga opcja, wyjeb pliki OU. Użyj tego śmiesznego programiku, którego nazwy zapomniałem, żeby skompilował dialogi (Redefix?).

Ogólnie, porównywując z plikami oryginalnymi, jest dokładnie tak samo. Warunki masz zapewne spierdolone (nie chce mi się ich wszystkich sprawdzać - addchoice jest zastosowane poprawnie).
 
:ok: zachęca do dalszej pomocy. Nie zapominaj o tym!

Prywatne wiadomości typu "Ej, pomocy" kasuję od razu. Od tego jest forum, a nie PW.

To me, defeat in anything is merely temporary, and its punishment is but an urge for me to greater effort to achieve my goal. Defeat simply tells me that something is wrong in my doing; it is a path leading to success and truth.

In order to realize our true self we must be willing to live without being dependent upon the opinion of others.

Mikotsune

Mikotsune

Czas Honoru
posty364
Propsy288
Profesjabrak
  • Czas Honoru
Problemem okazał się B_BuildLearnString. Trochę dziwnie bo i tak B_BuildLearnString powinien napisać cokolwiek...

W każdym IFie powinny być 2x =. Ja miałem wpisany 1x = i dlatego nie działało.
If(zmienna == 1)



Ma ktoś pomysł jak rozwiązać drugi problem związany z zawieszonym npc po użyciu AI_Teleport??
 
How can I see roses... and only feel thorns...

Cruc

Cruc

Użytkownicy
posty666
Propsy232
Profesjabrak
  • Użytkownicy
Przychodzą mi tylko takie pomysły do głowy.

1. Skorzystać z AI_TurnToNpc (self, other);

2. Wymusić na nim odpowiedniego perca zaraz po teleportacji. Npc_PercEnable(self,PERC_ASSESSPLAYER,B_AssessTalk);

down: Zapomniałem o tej funkcji. Ten sposób będzie chyba najlepszy.
 
while (!success) try{...}

Najlepszy modder od gothic multiplayer - polecam pytać go o wszystko!

Bogdan Zwei

Bogdan Zwei

Użytkownicy
Wulgarny skurwiel pierdolony.
posty1864
Propsy541
Profesjabrak
  • Użytkownicy
  • Wulgarny skurwiel pierdolony.
ClearAIQueue. To powinno rozwiązać problem. W G1 to chyba Resetall czy coś w tym stylu.
 
:ok: zachęca do dalszej pomocy. Nie zapominaj o tym!

Prywatne wiadomości typu "Ej, pomocy" kasuję od razu. Od tego jest forum, a nie PW.

To me, defeat in anything is merely temporary, and its punishment is but an urge for me to greater effort to achieve my goal. Defeat simply tells me that something is wrong in my doing; it is a path leading to success and truth.

In order to realize our true self we must be willing to live without being dependent upon the opinion of others.

Mikotsune

Mikotsune

Czas Honoru
posty364
Propsy288
Profesjabrak
  • Czas Honoru
Właśnie problem w tym, że nic nie działa!
Po teleporcie trzeba poczekać jakąś sekundę, po czym pojawia się Lester. W sturtup jest wpisana postać, tutaj się po prostu wszystko ładuje po teleporcie. Dla pewności, że wszystko będzie działać, ustawiłem trigger i po pojawieniu się Lestera, albo wchodzę w ten trigger, albo dodaję coś do dialogu z teleportem, a trigger zostawiam pusty. Nic nie pomaga, postać po prostu się na nas patrzy. Przed teleportem Lester normalnie z nami zaczyna rozmawiać.
 
How can I see roses... and only feel thorns...

Bogdan Zwei

Bogdan Zwei

Użytkownicy
Wulgarny skurwiel pierdolony.
posty1864
Propsy541
Profesjabrak
  • Użytkownicy
  • Wulgarny skurwiel pierdolony.
Zrób to na zasadzie zmiennej. Jeśli masz jakiś trigger który coś robi, to ustaw, że jak hero będzie przy WP na którym ma być ten pajac, zmienia się na true, a po zmienieniu się na true, Lester z tobą gada. To jest problem ze strony silnika, mam to samo z współpracą z innym npc (chodzi Ci za dupą i pomaga w walce).
 
:ok: zachęca do dalszej pomocy. Nie zapominaj o tym!

Prywatne wiadomości typu "Ej, pomocy" kasuję od razu. Od tego jest forum, a nie PW.

To me, defeat in anything is merely temporary, and its punishment is but an urge for me to greater effort to achieve my goal. Defeat simply tells me that something is wrong in my doing; it is a path leading to success and truth.

In order to realize our true self we must be willing to live without being dependent upon the opinion of others.

Mikotsune

Mikotsune

Czas Honoru
posty364
Propsy288
Profesjabrak
  • Czas Honoru
AI_Teleport nie może być użyte podczas dialogu.
Pierwszy sposób jest taki, że dodałem dotykowy trigger w miejsce startpointa, a w dialogu zmienną = true. Problem jest taki, że trzeba wejść ponownie w trigger, żeby się aktywował.

Drugi sposób jest taki, że aktywuję tick tocka na końcu dialogu, ale on się aktywuje podczas rozmowy ...

Jakieś pomysły??
 
How can I see roses... and only feel thorns...

Cruc

Cruc

Użytkownicy
posty666
Propsy232
Profesjabrak
  • Użytkownicy
Czekaj czekaj. Postać teleportujesz w dialogu i po tym nie reaguje, tak?

Jeśli tak to na koniec dialogu dorzuć to:

self.aivar[AIV_INVINCIBLE]= FALSE;
other.aivar[AIV_INVINCIBLE]= FALSE;
 
while (!success) try{...}

Najlepszy modder od gothic multiplayer - polecam pytać go o wszystko!

Mikotsune

Mikotsune

Czas Honoru
posty364
Propsy288
Profesjabrak
  • Czas Honoru
Działa! Chyba nigdy bym się nie domyślił, żeby dodać taki aivar.

Dziękuję za pomoc :ok:

Można zamknąć.
 
How can I see roses... and only feel thorns...

Cruc

Cruc

Użytkownicy
posty666
Propsy232
Profesjabrak
  • Użytkownicy
Kiedyś też miałem z tym problem.

Zgaduję, że AI_Teleport przerywa dialog, ale go nie kończy (nie wywołuje się StopProcesInfo) i później zarówno hero, jak i teleportowany NPC mogą nie mieć interakcji ze światem dopóki się ich w jakiś sposób nie odblokuje.
 
while (!success) try{...}

Najlepszy modder od gothic multiplayer - polecam pytać go o wszystko!

Mikotsune

Mikotsune

Czas Honoru
posty364
Propsy288
Profesjabrak
  • Czas Honoru
AI_Teleport nie przerywa aktualnej rozmowy. Wszystko się dzieje po kolei w skrypcie - z wyjątkiem b_kapitelwechsel, który się aktywuje po skończonej rozmowie, ale mniejsza o to. Ogólnie wygląda to tak:

"NPC rozmawiają"

b_kapitelwechsel(1,WORLD_ZEN);
AI_StopProcessInfos(self);
AI_PlayAni(hero,"T_MAGRUN_XARDAS_HEASHOOT"); //animacja teleportu z dodanym pfx (Wld_PlayEffect aktywowało się na samym początku podczas rozmowy z npc)
AI_Wait(hero,3);
AI_Teleport(hero,"OCC_CHAPEL_UPSTAIRS");
self.aivar[AIV_INVINCIBLE] = FALSE;
other.aivar[AIV_INVINCIBLE] = FALSE;

"Kończy się rozmowa i się teleportujemy + nowy rozdział"

Wcześniej może to zbyt chaotycznie napisałem. Chodziło wcześniej o to, że po teleportacji, postać która miała ustawione w dialogu important = true tylko się na nas patrzyła i nie zaczynała rozmowy. Jak kliknąłem przycisk, żeby z nią porozmawiać, to się odwieszała i wtedy zaczynała z nami rozmawiać (Czasami wracała najpierw do swojej rutyny).
 
How can I see roses... and only feel thorns...


0 użytkowników i 1 Gość przegląda ten wątek.
0 użytkowników
Do góry