REGoth
REGoth copied to clipboard
Alrik doesn't notice that you gave him his sword back
External Npc_HasEquippedMeleeWeapon needs to be implemented I think.
Regarding script code:
// ------ EXIT: Wenn Alrik schonmal verloren, nächster Kampf erst, wenn Alrik das bessere Schwert hat ------
if ( (Alrik_ArenaKampfVerloren > 0) && (Npc_HasItems (self, ItMW_AlriksSword_Mis) == 0) )
|| (Npc_HasEquippedMeleeWeapon (self) == FALSE)
{
if (MIS_Alrik_Sword == LOG_SUCCESS) //Wenn nach Schwert-Mission niedergeschlagen und Schwert weggenommen
{
AI_Output (self ,other,"DIA_Alrik_WannaFight_09_01"); //Gib mir erst mein Schwert zurück. Dann sehen wir weiter ...
}
else
{
AI_Output (self ,other,"DIA_Alrik_WannaFight_09_02"); //Nee, nee. Bevor ich noch mal gegen dich antrete, brauch ich 'ne bessere Waffe!
AI_Output (self ,other,"DIA_Alrik_WannaFight_09_03"); //Ich musste vor ein paar Tagen mein Schwert verkaufen.
AI_Output (self ,other,"DIA_Alrik_WannaFight_09_04"); //Mit dem Teil bin ich unschlagbar! Wenn du es mir wieder besorgst, trete ich noch mal gegen dich an!
Alrik_VomSchwertErzaehlt = TRUE;
Log_CreateTopic (TOPIC_AlrikSchwert,LOG_MISSION);
Log_SetTopicStatus (TOPIC_AlrikSchwert,LOG_RUNNING);
B_LogEntry (TOPIC_AlrikSchwert,"Alrik hat sein Schwert an den Händler Jora verkauft. Er kämpft nur gegen mich, wenn ich es ihm zurückbringe.");
};
}
I'll look into it.
Ok, Npc_HasEquippedMeleeWeapon is one thing. I think (correct me if I'm wrong) that npcs doesn't equip items that are given to them: onInventoryItemInserted
onInventoryItemInserted should not equip any weapon at all.
This is explicitly handled by the scripts:
FUNC VOID DIA_Alrik_HaveSword_Info()
{
AI_Output (other,self ,"DIA_Alrik_HaveSword_15_00"); //Ich hab dein Schwert!
B_GiveInvItems (other,self,ItMW_AlriksSword_Mis,1);
...
AI_EquipBestMeleeWeapon (self);
};
The script function AI_EquipBestMeleeWeapon is not implemented yet.