Created
February 5, 2014 17:22
-
-
Save Cosrnos/8828851 to your computer and use it in GitHub Desktop.
An untested code snipped that enables daily scripting in Aura. Add to BaseScript.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void CompleteDaily(WorldClient client, string name) | |
{ | |
var varName = "daily_" + name; | |
client.Character.Vars.Perm[varName] = DateTime.Now.ToString(); | |
} | |
public bool DailyDone(WorldClient client, string name) | |
{ | |
var varName = "daily_" + name; | |
if (client.Character.Vars.Perm[varName] == null) | |
return false; | |
DateTime completedLast = DateTime.Parse(client.Character.Vars.Perm[varName]); | |
if (completedLast == null) | |
return false; | |
if (completedLast.Date == DateTime.Today) | |
return true; | |
return false; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment