C# 클래스 Aura.Channel.Scripting.Scripts.ItemScript

Item script base
Stat updates are done automatically, after running the scripts.
상속: GeneralScript
파일 보기 프로젝트 열기: aura-project/aura

공개 메소드들

메소드 설명
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