Skip to content

Cooldown Management

AnkhHeart edited this page Feb 25, 2018 · 1 revision

Adding a Command to the Cooldown Manager

Function

void AddCooldown(string scriptName, string command, int seconds)

Use in Python

Parent.AddCooldown(ScriptName,Command,100)

Checking if the Command is on Cooldown

Function

bool IsOnCooldown(string scriptName, string command)

Use in Python

result = Parent.IsOnCooldown(ScriptName,Command)

Retrieving the Remaining Cooldown Duration

Function

int GetCooldownDuration(string scriptName, string command)

Use in Python

result = Parent.GetCooldownDuration(ScriptName,Command)

Adding a Usercooldown to a Command

Function

void AddUserCooldown(string scriptName, string command, string userid, int seconds)

Use in Python

Parent.AddUserCooldown(ScriptName,Command,data.User,100)

Checking if a Command is on Usercooldown

Function

bool IsOnUserCooldown(string scriptName, string command, string userid)

Use in Python

result = Parent.IsOnUserCooldown(ScriptName,Command,data.User)

Retrieving the Remaining Usercooldown Duration

Function

bool GetUserCooldownDuration(string scriptName, string command, string userid)

Use in Python

result = Parent.GetUserCooldownDuration(ScriptName,Command,data.User)

Clone this wiki locally