Dobra teraz się wkurzyłem. Nic nie działa próbowałem wiele sposobów, ale nie działa. Oto skrypty (wszystkie - dla pewności):
Speel_Orc_Domes:
// **********
// SPL_Orc_Domes
// **********
const int SPL_Cost_Orc_Domes = 5;
INSTANCE Spell_Orc_Domes (C_Spell_Proto)
{
time_per_mana = 0;
spelltype = SPELL_NEUTRAL;
targetCollectAlgo = TARGET_COLLECT_FOCUS;
targetCollectRange = 1000; //10m
};
func int Spell_Logic_Orc_Domes (var int manaInvested)
{
if (Npc_GetActiveSpellIsScroll(self) && (self.attribute[ATR_MANA] >= SPL_Cost_Scroll))
{
return SPL_SENDCAST;
}
else if (self.attribute[ATR_MANA] >= SPL_Cost_Orc_Domes)
{
return SPL_SENDCAST;
}
else
{
return SPL_SENDSTOP;
};
};
func void Spell_Cast_Orc_Domes()
{
if (Npc_GetActiveSpellIsScroll(self))
{
self.attribute[ATR_MANA] = self.attribute[ATR_MANA] - SPL_Cost_Scroll;
}
else
{
self.attribute[ATR_MANA] = self.attribute[ATR_MANA] - SPL_Cost_Orc_Domes;
};
if (other.flags != NPC_FLAG_IMMORTAL)
&& (other.guild == GIL_ORC)
&& (!C_NpcIsUndead(other))
&& (other.guild > GIL_SEPERATOR_HUM)
{
Npc_ClearAIQueue (other);
B_ClearPerceptions (other);
Npc_SetTrueGuild (other, GIL_FRIENDLY_ORC);
other.guild = GIL_FRIENDLY_ORC;
AI_StartState (other, ZS_MM_Rtn_Follow_Sheep, 0, "");
other.aivar[AIV_ToughGuy] = TRUE;
other.aivar[AIV_MM_RoamStart] = OnlyRoutine;
};
self.aivar[AIV_SelectSpell] += 1;
};
It_Scrolls:
INSTANCE ItSc_Orc_Domes (C_Item)
{
name = "Oswojenie orka";
mainflag = ITEM_KAT_RUNE;
flags = ITEM_MULTI;
value = 5000;
visual = "ItSc_Light.3DS";
material = MAT_LEATHER;
spell = SPL_Orc_Domes;
cond_atr[2] = ATR_MANA_MAX;
cond_value[2] = SPL_Cost_Scroll;
wear = WEAR_EFFECT;
effect = "SPELLFX_WEAKGLIMMER";
description = NAME_SPL_Orc_Domes;
TEXT [1] = NAME_Mana_needed;
COUNT [1] = SPL_Cost_Scroll;
TEXT [5] = NAME_Value;
COUNT [5] = value;
};
Spell_ProcessMana:
if (activeSpell == SPL_Orc_Domes ) { return Spell_Logic_Orc_Domes (manaInvested); };
Constants:
const int SPL_Orc_Domes = 90;
"Sleep", // 90 SPL_Orc_Domes
"SLE", // 90 SPL_Orc_Domes
Text:
"SLE", // 90 SPL_Orc_Domes