Level Up Listener¶
The Level Up Listener is a tool that allows you to listen for
the level up messages and run OnMessage callbacks which should be thread safe.
You can debug incoming level up messages by adding this compiler directive before you include WaspLib:
{$DEFINE WL_DEBUG_LEVEL_UP_LISTENER}
For more information on listeners and how to run them check Listeners.
LevelUpListener.LeveledUp¶
function TLevelUpListener.LeveledUp(img: TImage): Boolean;
Very similar to the start of Chat.LeveledUp.
Basically looks for a message containing “Congratulations” at the start and returns true if it’s found.
Example:
WriteLn LevelUpListener.LeveledUp(Target.GetImage());
LevelUpListener.Check¶
function TLevelUpListener.Check(): Boolean;
Returns true if there’s been new messages.
Example:
WriteLn LevelUpListener.Check();
LevelUpListener variable¶
Global TLevelUpListener variable.