This repository has been archived by the owner on Dec 13, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Scripting API
Stanislav Zhukov edited this page Jul 16, 2016
·
1 revision
Function | description | lua example |
---|---|---|
void GetPos(unsigned short pid, float *x, float *y, float *z); | not supported on lua see functions below for replacing | |
double GetPosX(unsigned short pid); | local x = tes3mp.GetPosX(pid) | |
double GetPosY(unsigned short pid); | local y = tes3mp.GetPosY(pid) | |
double GetPosZ(unsigned short pid); | local z = tes3mp.GetPosZ(pid) | |
void SetPos(unsigned short pid, float x, float y, float z); | tes3mp.SetPos(pid, 0, 0, 100) | |
void GetAngle(unsigned short pid, float *x, float *y, float *z); | not supported on lua see functions below for replacing | |
double GetAngleX(unsigned short pid); | local x = tes3mp.GetAngleX(pid) | |
double GetAngleY(unsigned short pid); | local y = tes3mp.GetAngleY(pid) | |
double GetAngleZ(unsigned short pid); | local z = tes3mp.GetAngleZ(pid) | |
void SetAngle(unsigned short pid, float x, float y, float z); | ||
void SetCell(unsigned short pid, const char *name); | ||
const char *GetCell(unsigned short pid); | ||
bool IsInInterior(unsigned short pid); |
Function | description | lua example |
---|---|---|
void SetName(unsigned short pid, const char *name); | ||
const char *GetName(unsigned short pid); | ||
void SetBirthsign(unsigned short pid, const char *name); | not implemented yet | |
const char *GetBirthsign(unsigned short pid); | not implemented yet | |
void SetRace(unsigned short pid, const char *race); | ||
const char *GetRace(unsigned short pid); | ||
void SetHead(unsigned short pid, const char *head); | ||
const char *GetHead(unsigned short pid); | ||
void SetHairstyle(unsigned short pid, const char *style); | ||
const char *GetHairstyle(unsigned short pid); | ||
void SetIsMale(unsigned short pid, int male); | ||
int GetIsMale(unsigned short pid); | ||
float GetHealth(unsigned short pid); | ||
void SetHealth(unsigned short pid, float health); | ||
float GetCurrentHealth(unsigned short pid); | ||
void SetCurrentHealth(unsigned short pid, float health); | ||
float GetMagicka(unsigned short pid); | ||
void SetMagicka(unsigned short pid, float magicka); | ||
float GetCurrentMagicka(unsigned short pid); | ||
void SetCurrentMagicka(unsigned short pid, float magicka); | ||
float GetFatigue(unsigned short pid); | ||
void SetFatigue(unsigned short pid, float fatigue); | ||
float GetCurrentFatigue(unsigned short pid); | ||
void SetCurrentFatigue(unsigned short pid, float fatigue); | ||
int GetAttribute(unsigned short pid, unsigned short attribute); | ||
void SetAttribute(unsigned short pid, unsigned short attribute, int value); | ||
int GetCurrentAttribute(unsigned short pid, unsigned short attribute); | ||
void SetCurrentAttribute(unsigned short pid, unsigned short attribute, int value); | ||
int GetSkill(unsigned short pid, unsigned short skill); | ||
void SetSkill(unsigned short pid, unsigned short skill, int value); | ||
int GetCurrentSkill(unsigned short pid, unsigned short skill); | ||
void SetCurrentSkill(unsigned short pid, unsigned short skill, int value); | ||
int GetIncreaseSkill(unsigned short pid, unsigned int pos); | not implemented | |
void SetIncreaseSkill(unsigned short pid, unsigned int pos, int value); | not implemented | |
void Resurrect(unsigned short pid); |
Function | description | lua example |
---|---|---|
int CreateTimer(ScriptFunc callback, int msec); | ||
int CreateTimerEx(ScriptFunc callback, int msec, const char *types, ...); | ||
void StartTimer(int timerId); | ||
void StopTimer(int timerId); | ||
void RestartTimer(int timerId, int msec); | ||
void FreeTimer(int timerId); | ||
bool IsTimerElapsed(int timerId) noexcept; |
Function | description | lua example |
---|---|---|
void Kick(unsigned short pid); |