SetXP(object, int)
クリーチャーの経験値を特定の値に設定します。
void SetXP( object oCreature, int nXpAmount );
Parameters
oCreature
対象のクリーチャー
nXpAmount
XPの量
Description
oCreatureの経験値をnXpAmountの値に設定します。
Remarks
GiveXPToCreature()関数は、XP修正のもっと自然な方法です。しかし、クリーチャーがどれだけXPを持つといいのかを正確に知っているならば、SetXP()がかなり有効でしょう。
この機能はXPにペナルティーを与える場合や、%によって修正する状況に特に役立つことができます。
Version
1.22
Example
// PCをOnEnter時にLv2にする
void main()
{
int iXP;
object oCreature = GetEnteringObject();
iXP = GetXP(oCreature);
if (iXP < 1000)
{
SetXP(oCreature, 1000);
}
}
See Also
| functions: | GetXP | GiveXPToCreature |
| categories: | Experience Functions |
author: Chaz Mead, editor: Ryan Hunt, JP team: Rainie
Send comments on this topic.