22.08.2019, 03:33:20
1.5.1
1.4
var int portion2;
instance ITPO_XMAGICDEF(C_Item)
{
name = "Mikstura Ochrony Przed Magią";
mainflag = ITEM_KAT_POTIONS;
flags = ITEM_MULTI;
value = VALUE_POACROBAT;
visual = "ItPo_MagicDef.3ds";
material = MAT_GLAS;
on_state[0] = useitpo_magicdef;
scemeName = "POTIONFAST";
wear = WEAR_EFFECT;
effect = "SPELLFX_ITEMGLIMMER";
description = name;
text[2] = NAME_Prot_Magic;
count[2] = 5;
text[3] = "Działa do pierwszej kradzieży albo utraty życia";
text[5] = NAME_Value;
count[5] = value;
};
func void b_usecoastportion2()
{
if(portion2 == false)
{
hero.protection[PROT_MAGIC] += 5;
Wld_PlayEffect("spellFX_LIGHTSTAR_BLUE",hero,hero,0,0,0,FALSE);
Snd_Play("SFX_HealObsession");
portion2=true;
}
else if(portion2 == true)
{
AI_PrintScreen("Mikstura nie wywołała na tobie żadnych efektów.",-1,YPOS_GoldGiven,FONT_ScreenSmall,2);
};
};
func void useitpo_magicdef()
{
b_usecoastportion2();
};
func void b_stopcoastportion2()
{
if(portion2 == true)
{
hero.protection[PROT_MAGIC] -= 5;
Wld_PlayEffect("spellFX_LIGHTSTAR_VIOLET",hero,hero,0,0,0,FALSE);
Snd_Play("SFX_HealObsession");
portion2=false;
};
};
instance ITPO_XMAGICDEF(C_Item)
{
name = "Mikstura Ochrony Przed Magią";
mainflag = ITEM_KAT_POTIONS;
flags = ITEM_MULTI;
value = VALUE_POACROBAT;
visual = "ItPo_MagicDef.3ds";
material = MAT_GLAS;
on_state[0] = useitpo_magicdef;
scemeName = "POTIONFAST";
wear = WEAR_EFFECT;
effect = "SPELLFX_ITEMGLIMMER";
description = name;
text[2] = NAME_Prot_Magic;
count[2] = 5;
text[3] = "Działa do pierwszej kradzieży albo utraty życia";
text[5] = NAME_Value;
count[5] = value;
};
func void b_usecoastportion2()
{
if(portion2 == false)
{
hero.protection[PROT_MAGIC] += 5;
Wld_PlayEffect("spellFX_LIGHTSTAR_BLUE",hero,hero,0,0,0,FALSE);
Snd_Play("SFX_HealObsession");
portion2=true;
}
else if(portion2 == true)
{
AI_PrintScreen("Mikstura nie wywołała na tobie żadnych efektów.",-1,YPOS_GoldGiven,FONT_ScreenSmall,2);
};
};
func void useitpo_magicdef()
{
b_usecoastportion2();
};
func void b_stopcoastportion2()
{
if(portion2 == true)
{
hero.protection[PROT_MAGIC] -= 5;
Wld_PlayEffect("spellFX_LIGHTSTAR_VIOLET",hero,hero,0,0,0,FALSE);
Snd_Play("SFX_HealObsession");
portion2=false;
};
};
instance itpo_xmagicdef(c_item)
{
name = "Mikstura Ochrony Przed Magią";
mainflag = item_kat_potions;
flags = item_multi;
value = value_poacrobat;
visual = "ItPo_MagicDef.3ds";
material = mat_glas;
on_state = useitpo_magicdef;
scemename = "POTIONFAST";
wear = wear_effect;
effect = "SPELLFX_ITEMGLIMMER";
description = name;
text[2] = name_prot_magic;
count[2] = 5;
text[5] = name_value;
count[5] = value;
};
func void useitpo_magicdef()
{
self.protection[5] += 5;
ai_printscreen("+ 5 do ochrony przed magią", -1, ypos_itemgiven, font_screensmall, 2);
};
{
name = "Mikstura Ochrony Przed Magią";
mainflag = item_kat_potions;
flags = item_multi;
value = value_poacrobat;
visual = "ItPo_MagicDef.3ds";
material = mat_glas;
on_state = useitpo_magicdef;
scemename = "POTIONFAST";
wear = wear_effect;
effect = "SPELLFX_ITEMGLIMMER";
description = name;
text[2] = name_prot_magic;
count[2] = 5;
text[5] = name_value;
count[5] = value;
};
func void useitpo_magicdef()
{
self.protection[5] += 5;
ai_printscreen("+ 5 do ochrony przed magią", -1, ypos_itemgiven, font_screensmall, 2);
};