REGoth icon indicating copy to clipboard operation
REGoth copied to clipboard

Alrik doesn't notice that you gave him his sword back

Open ataulien opened this issue 8 years ago • 4 comments

ataulien avatar Feb 16 '17 11:02 ataulien

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.");
		};
	}

ataulien avatar Feb 16 '17 19:02 ataulien

I'll look into it.

rose27 avatar Feb 18 '17 17:02 rose27

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

rose27 avatar Feb 18 '17 18:02 rose27

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.

markusobi avatar May 17 '17 19:05 markusobi