Tak jak pisał Dragon Master zastosuj instrukcję warunkową:
//#######################################
// Mod
//#######################################
var int Trf_Logic;//Czy bohater tworzy runy przemiany?
var int Trf_C1;//Krąg 1
var int Trf_C2;//Krąg 2
var int Trf_C3;//Krąg 3
var int Trf_C4;//Krąg 4
var int Trf_C5;//Krąg 5
var int Trf_C6;//Krąg 6
//****************************************************************************************************
instance PC_Rune_Transform (C_Info)
{
npc = PC_Hero;
nr = 998;
condition = PC_Rune_Transform_Condition;
information = PC_Rune_Transform_Info;
permanent = TRUE;
description = "Twórz runy przemiany"; //Po wybraniu tej opcji wybieramy krąg runy, którą chcemy stworzyć
};
func int PC_Rune_Transform_Condition ()
{
if( (PLAYER_MOBSI_PRODUCTION == MOBSI_MAKERUNE)
&& ((PLAYER_TALENT_RUNES[SPL_TrfDragonSnapper] == TRUE)
|| (PLAYER_TALENT_RUNES[SPL_TrfSheep] == TRUE)
|| (PLAYER_TALENT_RUNES[SPL_TrfScavenger] == TRUE)
|| (PLAYER_TALENT_RUNES[SPL_TrfGiantRat] == TRUE)
|| (PLAYER_TALENT_RUNES[SPL_TrfGiantBug] == TRUE)
|| (PLAYER_TALENT_RUNES[SPL_TrfWolf] == TRUE)
|| (PLAYER_TALENT_RUNES[SPL_TrfWaran] == TRUE)
|| (PLAYER_TALENT_RUNES[SPL_TrfSnapper] == TRUE)
|| (PLAYER_TALENT_RUNES[SPL_TrfWarg] == TRUE)
|| (PLAYER_TALENT_RUNES[SPL_TrfFireWaran] == TRUE)
|| (PLAYER_TALENT_RUNES[SPL_TrfLurker] == TRUE)
|| (PLAYER_TALENT_RUNES[SPL_TrfShadowbeast ] == TRUE) ) )
{
return TRUE;
};
};
func void PC_Rune_Transform_Info()
{
Trf_Logic=TRUE;//Tworzymy runy, bardzo ważna operacja przypisania
};
instance PC_Rune_Transform_Back (C_Info)
{
npc = PC_Hero;
nr = 998;
condition = PC_Rune_Transform_Back_Condition;
information = PC_Rune_Transform_Back_Info;
permanent = TRUE;
description = "Wstecz";
};
func int PC_Rune_Transform_Back_Conditiom()
{
return Trf_Logic;
};
func void PC_Rune_Transform_Back_Info()
{
Trf_Logic=FALSE;
};
//****************************************************************************************************
instance PC_Rune_Transform_C1 (C_Info)
{
npc = PC_Hero;
nr = 1;
condition = PC_Rune_Transform_C1_Condition;
information = PC_Rune_Transform_C1_Info;
permanent = TRUE;
description = "Runy pierwszego kręgu";
};
func int PC_Rune_Transform_C1_Conditiom()
{
return Trf_Logic;
};
func void PC_Rune_Transform_C1_Info()
{
if (PLAYER_TALENT_RUNES[SPL_TrfSheep] == TRUE)
{
Trf_C1=TRUE;
};
};
//****************************************************************************************************
instance PC_Rune_Transform_C2 (C_Info)
{
npc = PC_Hero;
nr = 2;
condition = PC_Rune_Transform_C2_Condition;
information = PC_Rune_Transform_C2_Info;
permanent = TRUE;
description = "Runy drugiego kręgu";
};
func int PC_Rune_Transform_C2_Conditiom()
{
return Trf_Logic;
};
func void PC_Rune_Transform_C2_Info()
{
if (PLAYER_TALENT_RUNES[SPL_TrfScavenger] == TRUE)
|| (PLAYER_TALENT_RUNES[SPL_TrfGiantRat] == TRUE)
|| (PLAYER_TALENT_RUNES[SPL_TrfGiantBug] == TRUE)
{
Trf_C2=TRUE;
};
};
//****************************************************************************************************
instance PC_Rune_Transform_C3 (C_Info)
{
npc = PC_Hero;
nr = 3;
condition = PC_Rune_Transform_C3_Condition;
information = PC_Rune_Transform_C3_Info;
permanent = TRUE;
description = "Runy trzeciego kręgu";
};
func int PC_Rune_Transform_C3_Conditiom()
{
return Trf_Logic;
};
func void PC_Rune_Transform_C3_Info()
{
if (PLAYER_TALENT_RUNES[SPL_TrfWolf] == TRUE)
|| (PLAYER_TALENT_RUNES[SPL_TrfWaran] == TRUE)
|| (PLAYER_TALENT_RUNES[SPL_TrfLurker] == TRUE)
{
Trf_C3=TRUE;
};
};
//****************************************************************************************************
instance PC_Rune_Transform_C4 (C_Info)
{
npc = PC_Hero;
nr = 4;
condition = PC_Rune_Transform_C4_Condition;
information = PC_Rune_Transform_C4_Info;
permanent = TRUE;
description = "Runy czwartego kręgu";
};
func int PC_Rune_Transform_C4_Conditiom()
{
return Trf_Logic;
};
func void PC_Rune_Transform_C4_Info()
{
if (PLAYER_TALENT_RUNES[SPL_TrfWarg] == TRUE)
|| (PLAYER_TALENT_RUNES[SPL_TrfFireWaran] == TRUE)
{
Trf_C4=TRUE;
};
};
//****************************************************************************************************
instance PC_Rune_Transform_C5 (C_Info)
{
npc = PC_Hero;
nr = 5;
condition = PC_Rune_Transform_C5_Condition;
information = PC_Rune_Transform_C5_Info;
permanent = TRUE;
description = "Runy piątego kręgu";
};
func int PC_Rune_Transform_C5_Conditiom()
{
return Trf_Logic;
};
func void PC_Rune_Transform_C5_Info()
{
if (PLAYER_TALENT_RUNES[SPL_TrfSnapper] == TRUE)
|| (PLAYER_TALENT_RUNES[SPL_TrfDragonSnapper] == TRUE)
{
Trf_C5=TRUE;
};
};
//****************************************************************************************************
instance PC_Rune_Transform_C6 (C_Info)
{
npc = PC_Hero;
nr = 6;
condition = PC_Rune_Transform_C6_Condition;
information = PC_Rune_Transform_C6_Info;
permanent = TRUE;
description = "Runy szóstego kręgu";
};
func int PC_Rune_Transform_C6_Conditiom()
{
return Trf_Logic;
};
func void PC_Rune_Transform_C6_Info()
{
if (PLAYER_TALENT_RUNES[SPL_TrfShadowbeast] == TRUE)
{
Trf_C6=TRUE;
};
};
//****************************************************************************************************
// Teraz wybieramy konkretną runę
//****************************************************************************************************
instance PC_Rune_Transform_Sheep (C_Info)
{
npc = PC_Hero;
nr = 1;
condition = PC_Rune_Transform_Sheep_Condition;
information = PC_Rune_Transform_Sheep_Info;
permanent = TRUE;
description = "Przemiana w owcę";
};
func int PC_Rune_Transform_Sheep_Conditiom()
{
return Trf_Logic;
};
func void PC_Rune_Transform_Sheep_Info()
{
if (PLAYER_TALENT_RUNES[SPL_TrfSheep] == TRUE)//Tu dodaj jeszcze warunki posiadania składników
{
//A tutaj usunięcie ich z ekwipunku
CreateInvItems (hero,ItRu_TrfSheep,1);
Print (PRINT_RuneSuccess);
}
else
{
Print (PRINT_ProdItemsMissing);
CreateInvItems (self, ItMi_RuneBlank,1);
};
Trf_Logic=FALSE;
B_ENDPRODUCTIONDIALOG ();
};
//Inne runy robisz analogiczne do tej. Dziękuję, dobranoc