What's new
  • Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Visit Resources
  • Visit Downloads
  • Visit Portal

[Rquest] Some/popup on PM

goodle

New Member
Joined
Apr 17, 2014
Messages
146
Reaction score
0
can some 1 make plugin to popup some sound/top screen message when PM received ?
 
edit :

Code:
using System;
using System.Drawing;
using System.Windows.Forms;
using System.Threading;
using System.Collections.Generic;
using System.Linq;
using ArcheBuddy.Bot.Classes;     

namespace DefaultNameSpace{
   public class DefaultClass : Core
   {
       public static string GetPluginAuthor()
       {
           return "Syllae";
       }

       public static string GetPluginVersion()
       {
           return "1.0.0.0";
       }

       public static string GetPluginDescription()
       {
           return "Alert you when you have a PM";
       }

       //Call on plugin start
       public void PluginRun()
       {
        messageHandler = new CoreInternal.ChatMessage(messageHandler);
        onChatMessage += messageHandler;
       }
       //Call on plugin stop
       public void PluginStop()
       {
           if(messageHandler != null) {
         onChatMessage -= messageHandler;
        }
       }

 public CoreInternal.ChatMessage messageHandler = null;

       public void onPM(ChatType chatType, string text, string sender) {
        if(chatType == ChatType.Whisper) {
          MessageBox.Show("PM received from " + sender + ": " + text);
        }

       }
   }
}

I'm at work so I didn't tried it
 
Last edited:
edit :

Code:
using System;
using System.Drawing;
using System.Windows.Forms;
using System.Threading;
using System.Collections.Generic;
using System.Linq;
using ArcheBuddy.Bot.Classes;     

namespace DefaultNameSpace{
   public class DefaultClass : Core
   {
       public static string GetPluginAuthor()
       {
           return "Syllae";
       }

       public static string GetPluginVersion()
       {
           return "1.0.0.0";
       }

       public static string GetPluginDescription()
       {
           return "Alert you when you have a PM";
       }

       //Call on plugin start
       public void PluginRun()
       {
        messageHandler = new CoreInternal.ChatMessage(messageHandler);
        onChatMessage += messageHandler;
       }
       //Call on plugin stop
       public void PluginStop()
       {
           if(messageHandler != null) {
         onChatMessage -= messageHandler;
        }
       }

 public CoreInternal.ChatMessage messageHandler = null;

       public void onPM(ChatType chatType, string text, string sender) {
        if(chatType == ChatType.Whisper) {
          MessageBox.Show("PM received from " + sender + ": " + text);
        }

       }
   }
}

I'm at work so I didn't tried it

does not work(
 
No, its start the plugin and turn it off after second
 
Code:
using System;
using System.Drawing;
using System.Windows.Forms;
using System.Threading;
using System.Collections.Generic;
using System.Linq;
using ArcheBuddy.Bot.Classes;

namespace DefaultNameSpace{
   public class DefaultClass : Core
   {
       public static string GetPluginAuthor()
       {
           return "Plugin Author";
       }

       public static string GetPluginVersion()
       {
           return "1.0.0.0";
       }

       public static string GetPluginDescription()
       {
           return "My plugin description";
       }

       public void MyChatMessage(ChatType chatType,string text,string sender)
       {
           if(chatType == ChatType.Whisper) MessageBox.Show("PM received from " + sender + ": " + text);
       }
       //Call on plugin start
       public void PluginRun()
       {                 
           onChatMessage += MyChatMessage;
           while (true)
               Thread.Sleep(1000);
       }
       //Call on plugin stop
       public void PluginStop()
       {
       }
   }
}
 
Back
Top