C# Класс Aura.Channel.Scripting.Scripts.ItemScript

Item script base
Stat updates are done automatically, after running the scripts.
Наследование: GeneralScript
Показать файл Открыть проект

Открытые методы

Метод Описание
Init ( ) : bool

Called when script is initialized after loading it.

OnCreation ( Item item ) : void

Executed when item is first created.

OnEquip ( Creature creature, Item item ) : void

Executed when item is equipped.

OnUnequip ( Creature creature, Item item ) : void

Executed when item is unequipped.

OnUse ( Creature creature, Item item, string parameter ) : void

Executed when item is used.

Защищенные методы

Метод Описание
ActivateChatSticker ( Creature creature, ChatSticker sticker, int duration ) : void

Activates the sticker for the given duration.

AddGesture ( Creature creature, string keyword, string name ) : void

Adds gesture by keyword.

Buff ( Creature creature, Item item, int timeout, double str, double int_, double dex, double will, double luck, double life, double mana, double stamina, double lifeRecovery, double manaRecovery, double staminaRecovery, double injuryRecovery, int defense, int protection ) : void

Activates food stat mods for the given timeout and stats.

Feed ( Creature creature, double hunger, double weight, double upper, double lower, double str, double int_, double dex, double will, double luck, double life, double mana, double stm ) : void

Reduces hunger by amount and handles weight gain/loss and stat bonuses.

Body and stat changes are applied inside Creature, on MabiTick (every 5 minutes).

Heal ( Creature creature, double life, double mana, double stamina, double toxicity ) : void

Heals a certain amount of life, mana, and stamina.

HealFull ( Creature creature, double toxicity ) : void

Heals life, mana, and stamina completely.

HealRate ( Creature creature, double life, double mana, double stamina, double toxicity ) : void

Heals a certain percentage of life, mana, and stamina.

MagicSeal ( Item item, string color, string script = null ) : void

Adds magic seal meta data to item.

ShootFirework ( Location location, FireworkType type, string message ) : void
SummonBrownie ( Creature creature, Item item, string typeName ) : void

Spawns brownie for creature's personal shop.

TrainSkill ( Creature creature, SkillId skillId, int condition ) : void

Trains the specified condition for skill by one.

Treat ( Creature creature, double injuries, double toxicity ) : void

Reduces injuries by amount.

Weaken ( Creature creature, int levels, int duration ) : void

Activates weaken conditions for creature.

Приватные методы

Метод Описание
GetToxicityStage ( double toxicity ) : ToxicityStage

Returns toxicity stage based on given toxicity.

Poison ( Creature creature, double life, double mana, double stamina, double toxicity ) : void

Handles potion poisoning.

The stages and the toxicity in general are based on information from the Wiki and in-game obsvervation.

Описание методов

ActivateChatSticker() защищенный Метод

Activates the sticker for the given duration.
protected ActivateChatSticker ( Creature creature, ChatSticker sticker, int duration ) : void
creature Aura.Channel.World.Entities.Creature
sticker ChatSticker Sticker to activate.
duration int Duration in seconds.
Результат void

AddGesture() защищенный Метод

Adds gesture by keyword.
protected AddGesture ( Creature creature, string keyword, string name ) : void
creature Aura.Channel.World.Entities.Creature
keyword string
name string
Результат void

Buff() защищенный Метод

Activates food stat mods for the given timeout and stats.
protected Buff ( Creature creature, Item item, int timeout, double str, double int_, double dex, double will, double luck, double life, double mana, double stamina, double lifeRecovery, double manaRecovery, double staminaRecovery, double injuryRecovery, int defense, int protection ) : void
creature Aura.Channel.World.Entities.Creature
item Item
timeout int
str double
int_ double
dex double
will double
luck double
life double
mana double
stamina double
lifeRecovery double
manaRecovery double
staminaRecovery double
injuryRecovery double
defense int
protection int
Результат void

Feed() защищенный Метод

Reduces hunger by amount and handles weight gain/loss and stat bonuses.
Body and stat changes are applied inside Creature, on MabiTick (every 5 minutes).
protected Feed ( Creature creature, double hunger, double weight, double upper, double lower, double str, double int_, double dex, double will, double luck, double life, double mana, double stm ) : void
creature Aura.Channel.World.Entities.Creature
hunger double
weight double
upper double
lower double
str double
int_ double
dex double
will double
luck double
life double
mana double
stm double
Результат void

Heal() защищенный Метод

Heals a certain amount of life, mana, and stamina.
protected Heal ( Creature creature, double life, double mana, double stamina, double toxicity ) : void
creature Aura.Channel.World.Entities.Creature
life double
mana double
stamina double
toxicity double
Результат void

HealFull() защищенный Метод

Heals life, mana, and stamina completely.
protected HealFull ( Creature creature, double toxicity ) : void
creature Aura.Channel.World.Entities.Creature
toxicity double
Результат void

HealRate() защищенный Метод

Heals a certain percentage of life, mana, and stamina.
protected HealRate ( Creature creature, double life, double mana, double stamina, double toxicity ) : void
creature Aura.Channel.World.Entities.Creature
life double
mana double
stamina double
toxicity double
Результат void

Init() публичный Метод

Called when script is initialized after loading it.
public Init ( ) : bool
Результат bool

MagicSeal() защищенный Метод

Adds magic seal meta data to item.
protected MagicSeal ( Item item, string color, string script = null ) : void
item Item
color string
script string
Результат void

OnCreation() публичный Метод

Executed when item is first created.
public OnCreation ( Item item ) : void
item Item
Результат void

OnEquip() публичный Метод

Executed when item is equipped.
public OnEquip ( Creature creature, Item item ) : void
creature Aura.Channel.World.Entities.Creature
item Item
Результат void

OnUnequip() публичный Метод

Executed when item is unequipped.
public OnUnequip ( Creature creature, Item item ) : void
creature Aura.Channel.World.Entities.Creature
item Item
Результат void

OnUse() публичный Метод

Executed when item is used.
public OnUse ( Creature creature, Item item, string parameter ) : void
creature Aura.Channel.World.Entities.Creature
item Item
parameter string
Результат void

ShootFirework() защищенный Метод

protected ShootFirework ( Location location, FireworkType type, string message ) : void
location Aura.Channel.World.Location
type FireworkType
message string
Результат void

SummonBrownie() защищенный Метод

Spawns brownie for creature's personal shop.
protected SummonBrownie ( Creature creature, Item item, string typeName ) : void
creature Aura.Channel.World.Entities.Creature
item Item
typeName string
Результат void

TrainSkill() защищенный Метод

Trains the specified condition for skill by one.
protected TrainSkill ( Creature creature, SkillId skillId, int condition ) : void
creature Aura.Channel.World.Entities.Creature
skillId SkillId
condition int
Результат void

Treat() защищенный Метод

Reduces injuries by amount.
protected Treat ( Creature creature, double injuries, double toxicity ) : void
creature Aura.Channel.World.Entities.Creature
injuries double
toxicity double
Результат void

Weaken() защищенный Метод

Activates weaken conditions for creature.
protected Weaken ( Creature creature, int levels, int duration ) : void
creature Aura.Channel.World.Entities.Creature
levels int Amount of levels to lower the power level.
duration int Duration of the state.
Результат void