Cześć. Mam dziwne problemy i mam nadzieje, że mi ktoś pomoże. Z góry dziękuję za pomoc
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);
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);
};
};
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ć.