C#:
using System;
using System.Linq;
using System.Collections.Generic;
using NewWidget.Core;
using NewWidget.Core.Native;
using NewWidget.Core.Scripting;
public class Script : ScriptBase {
public override void OnStart() {
base.OnStart();
Enabled = true;
CreateTimer(500, () => Client.IsLoggedIn && !Me.IsDead && Me.BuffEndtime(1323) == 0, DoNotice);
}
void DoNotice() {
var notif = new Notification(">> Noble", 1, System.Drawing.Color.Red, -1);
Notifications.Show(notif);
L2Helper.PlaySound("hp.wav");
while (Me.BuffEndtime(1323) == 0) {
if (!Enabled || Me.IsDead || !Client.IsLoggedIn)
break;
Wait(100);
}
Notifications.Remove(notif);
}
}