Skip to content

Commit

Permalink
回答加上emoji符号
Browse files Browse the repository at this point in the history
  • Loading branch information
chenxuuu committed Feb 8, 2019
1 parent 61438c2 commit 8a8ddab
Show file tree
Hide file tree
Showing 6 changed files with 56 additions and 51 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,16 @@ public static string Lottery(string qq, IMahuaApi _mahuaApi,string group)
{
if (CheckCount(qq))
{
return Tools.At(qq) + "今日抽奖次数已用完!";
return Tools.At(qq) + "[CQ:emoji,id=127539]今日抽奖次数已用完!";
}
string result = "";
int need_add = 0;
Random ran = new Random(System.DateTime.Now.Millisecond);
int RandKey = ran.Next(1, 22);
int RandKey2 = ran.Next(0, 10);
if (RandKey > 12)
if (RandKey > 19)
{
result += Tools.At(qq) + "\r\n恭喜你!什么也没有抽中!";
result += Tools.At(qq) + "\r\n[CQ:emoji,id=127881]恭喜你!什么也没有抽中!";
}
else if (RandKey == 1 && RandKey2 != 0)
{
Expand All @@ -37,7 +37,7 @@ public static string Lottery(string qq, IMahuaApi _mahuaApi,string group)
need_add += 10;
TimeSpan span = new TimeSpan(0, 10, 0, 0);
_mahuaApi.BanGroupMember(group, qq, span);
result += Tools.At(qq) + "\r\n恭喜你抽中了超豪华禁言套餐,并附赠10张禁言卡!奖励已发放!";
result += Tools.At(qq) + "\r\n[CQ:emoji,id=127882]恭喜你抽中了超豪华禁言套餐,并附赠10张禁言卡!奖励已发放!";
}
else
{
Expand All @@ -51,7 +51,7 @@ public static string Lottery(string qq, IMahuaApi _mahuaApi,string group)
need_add -= 200;
TimeSpan span = new TimeSpan(30, 0, 0, 0);
_mahuaApi.BanGroupMember(group, qq, span);
result += Tools.At(qq) + "\r\n恭喜你抽中了顶级豪华月卡禁言套餐,并扣除200张禁言卡!奖励已发放!";
result += Tools.At(qq) + "\r\n[CQ:emoji,id=127882]恭喜你抽中了顶级豪华月卡禁言套餐,并扣除200张禁言卡!奖励已发放!";
}
else
{
Expand All @@ -63,13 +63,13 @@ public static string Lottery(string qq, IMahuaApi _mahuaApi,string group)
TimeSpan span = new TimeSpan(0, RandKey, 0, 0);
_mahuaApi.BanGroupMember(group, qq, span);
need_add -= RandKey;
result += Tools.At(qq) + "\r\n恭喜你抽中了禁言" + RandKey + "小时,并扣除" + RandKey + "张禁言卡!奖励已发放到你的QQ~\r\n送我礼物可以提升好感度降低禁言几率哦~";
result += Tools.At(qq) + "\r\n[CQ:emoji,id=127882]恭喜你抽中了禁言" + RandKey + "小时,并扣除" + RandKey + "张禁言卡!奖励已发放到你的QQ~\r\n送我礼物可以提升好感度降低禁言几率哦~";
}
else
{
int lucky = ran.Next(1, Tools.GetXmlNumber("gift", qq) / 10 + 1);
need_add += lucky;
result += Tools.At(qq) + "\r\n恭喜你抽中了"+ need_add + "张禁言卡,回复“禁言卡”可以查看使用帮助。";
result += Tools.At(qq) + "\r\n[CQ:emoji,id=127873]恭喜你抽中了" + need_add + "张禁言卡,回复“禁言卡”可以查看使用帮助。";
}

if(need_add != 0)
Expand All @@ -93,7 +93,7 @@ public static string GetBanCard(string qq)
fk = int.Parse(fks);
}
return Tools.At(qq) +
"\r\n禁言卡可用于禁言或解禁他人,如果接待权限足够。\r\n" +
"\r\n[CQ:emoji,id=128683]禁言卡可用于禁言或解禁他人,如果接待权限足够。\r\n" +
"使用方法:发送禁言或解禁加上@那个人\r\n" +
"禁言时长将为1分钟-10分钟随机\r\n" +
"获取方式:抽奖时有十分之一的概率获得\r\n" +
Expand Down Expand Up @@ -129,7 +129,7 @@ public static string BanSomebody(string fromqq, string banqq, string group, IMah
XmlSolve.del("ban_card", fromqq);
XmlSolve.insert("ban_card", fromqq, fk.ToString());

return Tools.At(fromqq) + "\r\n已将" + banqq + "禁言" + RandKey + "分钟";
return Tools.At(fromqq) + "\r\n[CQ:emoji,id=128683]已将" + banqq + "禁言" + RandKey + "分钟";
}
catch
{
Expand All @@ -138,7 +138,7 @@ public static string BanSomebody(string fromqq, string banqq, string group, IMah
}
else
{
return Tools.At(fromqq) + "\r\n你哪儿有禁言卡?";
return Tools.At(fromqq) + "\r\n[CQ:emoji,id=128162]你哪儿有禁言卡?";
}
}

Expand Down Expand Up @@ -168,7 +168,7 @@ public static string UnbanSomebody(string fromqq, string banqq, string group, IM
XmlSolve.del("ban_card", fromqq);
XmlSolve.insert("ban_card", fromqq, fk.ToString());

return Tools.At(fromqq) + "\r\n已将" + banqq + "解除禁言";
return Tools.At(fromqq) + "\r\n[CQ:emoji,id=9989]已将" + banqq + "解除禁言";
}
catch
{
Expand All @@ -177,7 +177,7 @@ public static string UnbanSomebody(string fromqq, string banqq, string group, IM
}
else
{
return Tools.At(fromqq) + "\r\n你哪儿有禁言卡?";
return Tools.At(fromqq) + "\r\n[CQ:emoji,id=128162]你哪儿有禁言卡?";
}
}

Expand Down Expand Up @@ -228,17 +228,17 @@ public static string ReceiveGift(string qq)
string extra = "";
int gift = Tools.AddXmlNumber("gift", qq, 1);
if (gift % 5 == 0)
extra += "\r\n每日抽奖次数+1了哦~";
extra += "\r\n[CQ:emoji,id=127748]每日抽奖次数+1了哦~";
if(gift == 10)
extra += "\r\n以后的大禁言套餐都由我请客~";
extra += "\r\n[CQ:emoji,id=128157]以后的大禁言套餐都由我请客~";
if (gift % 10 == 0 && gift < 110)
extra += "\r\n禁言概率降低了哦~";
extra += "\r\n[CQ:emoji,id=9878]禁言概率降低了哦~";
if (gift % 10 == 0 )
extra += "\r\n每次抽中禁言卡数量上限+1~";
extra += "\r\n[CQ:emoji,id=127881]每次抽中禁言卡数量上限+1~";
if (gift == 110)
extra += "\r\n再也不会让你抽中禁言啦~";
extra += "\r\n[CQ:emoji,id=128150]再也不会让你抽中禁言啦~";

return "感谢"+Tools.At(qq)+"的礼物~\r\n当前羁绊值:"+ gift + extra;
return "[CQ:emoji,id=127853]感谢" + Tools.At(qq)+"的礼物~\r\n当前羁绊值:"+ gift + extra;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace Newbe.Mahua.Receiver.Meow.MahuaApis
{
class MessageSolve
{
private static string prem = "你没有权限调教接待喵,权限获取方法请去问开发者";
private static string prem = "[CQ:emoji,id=128683]你没有权限调教接待喵,权限获取方法请去问开发者";
public static string GetReplay(string fromqq,string msg, IMahuaApi _mahuaApi, string fromgroup = "common")
{
if (Tools.MessageControl(5))
Expand All @@ -23,7 +23,7 @@ public static string GetReplay(string fromqq,string msg, IMahuaApi _mahuaApi, st
{
string get_msg = msg.Replace("!ban ", "");
XmlSolve.insert(fromgroup, get_msg, "[ban]");
return "已禁用包含关键词" + get_msg + "的所有响应";
return "[CQ:emoji,id=128683]" + get_msg;
}
else
{
Expand All @@ -36,7 +36,7 @@ public static string GetReplay(string fromqq,string msg, IMahuaApi _mahuaApi, st
{
string get_msg = msg.Replace("!unban ", "");
XmlSolve.remove(fromgroup, get_msg, "[ban]");
return "已移除关键词" + get_msg + "的禁用";
return "[CQ:emoji,id=9989]" + get_msg;
}
else
{
Expand All @@ -50,31 +50,31 @@ public static string GetReplay(string fromqq,string msg, IMahuaApi _mahuaApi, st
if (msg == "赞我" || msg == "点赞")
{
_mahuaApi.SendLike(fromqq);
result += Tools.At(fromqq) + "已为你点赞";
result += Tools.At(fromqq) + "已为你点赞[CQ:emoji,id=128077]";
}
else if (msg.ToUpper() == "HELP" || msg == "帮助" || msg == "菜单")
{
result += @"命令帮助
!add 关键词:回答
!del 关键词:回答
!list 关键词
!delall 关键词
!ban 禁止响应的词
!unban 恢复响应的词
坷垃金曲+数字序号(最大71)
点赞
今日运势
查快递 加 单号
空气质量
点歌 加 网易云id或歌名
复读 加 百分比
查动画 加 没裁剪过的视频截图
!lua 查看lua工具使用说明
自己运行/反馈:https://github.com/chenxuuu/receiver-meow";
result += @"命令帮助[CQ:emoji,id=128172]
[CQ:emoji,id=128227]!add 关键词:回答
[CQ:emoji,id=128465]!del 关键词:回答
[CQ:emoji,id=128221]!list 关键词
[CQ:emoji,id=128465]!delall 关键词
[CQ:emoji,id=128683]!ban 禁止响应的词
[CQ:emoji,id=9989]!unban 恢复响应的词
[CQ:emoji,id=127806]坷垃金曲+数字序号(最大71)
[CQ:emoji,id=128077]点赞
[CQ:emoji,id=127881]今日运势
[CQ:emoji,id=128667]查快递 加 单号
[CQ:emoji,id=128168]空气质量
[CQ:emoji,id=127932]点歌 加 网易云id或歌名
[CQ:emoji,id=128252]复读 加 百分比
[CQ:emoji,id=128444]查动画 加 没裁剪过的视频截图
[CQ:emoji,id=128295]!lua 查看lua工具使用说明
[CQ:emoji,id=128483]自己运行/反馈:https://github.com/chenxuuu/receiver-meow";
}
else if(msg.ToUpper()=="!LUA")
{
result += @"lua功能使用帮助:
result += @"[CQ:emoji,id=128295]lua功能使用帮助:
lua 加 代码 直接运行
!luaadd 关键词:代码
!luadel 关键词
Expand All @@ -85,13 +85,13 @@ lua 加 代码 直接运行
}
else if (msg.IndexOf("!list ") == 0)
{
result += string.Format("当前词条回复如下:\r\n{0}\r\n全局词库内容:\r\n{1}",
result += string.Format("[CQ:emoji,id=128221]当前词条回复如下:\r\n{0}\r\n全局词库内容:\r\n{1}",
XmlSolve.list_get(fromgroup, msg.Replace("!list ", "")),
XmlSolve.list_get("common", msg.Replace("!list ", "")));
}
else if (msg.IndexOf("!lualist") == 0)
{
result += string.Format("本群脚本:\r\n{0}\r\n全局脚本:\r\n{1}",
result += string.Format("[CQ:emoji,id=128295]本群脚本:\r\n{0}\r\n全局脚本:\r\n{1}",
XmlSolve.lua_list_get(fromgroup),
XmlSolve.lua_list_get("common"));
}
Expand All @@ -105,7 +105,7 @@ lua 加 代码 直接运行
{
string tmsg = luaMsg.Substring(0, len), tans = luaMsg.Substring(len + 1);
XmlSolve.insert(fromgroup, tmsg, "[lua]" + fromqq + "." + tans);
result += "添加完成!\r\n词条:" + tmsg + "\r\n回答为一个脚本";
result += "[CQ:emoji,id=9989]添加完成!\r\n词条:" + tmsg + "\r\n回答为一个脚本";
}
else
{
Expand All @@ -123,7 +123,7 @@ lua 加 代码 直接运行
{
string get_msg = msg.Replace("!luadel ", "");
XmlSolve.luadel(fromgroup, get_msg);
result += "删除完成!\r\n脚本触发词为:" + get_msg;
result += "[CQ:emoji,id=128465]删除完成!\r\n脚本触发词为:" + get_msg;
}
else
{
Expand Down Expand Up @@ -153,7 +153,7 @@ lua 加 代码 直接运行
if (len >= 0 && tans.Length > 0)
{
XmlSolve.insert(fromgroup, tmsg, tans);
result += "添加完成!\r\n词条:" + tmsg + "\r\n回答为:" + tans;
result += "[CQ:emoji,id=9989]添加完成!\r\n词条:" + tmsg + "\r\n回答为:" + tans;
}
else
{
Expand All @@ -176,7 +176,7 @@ lua 加 代码 直接运行
if (len >= 0 && tans.Length > 0)
{
XmlSolve.remove(fromgroup, tmsg, tans);
result += "删除完成!\r\n词条:" + tmsg + "\r\n回答为:" + tans;
result += "[CQ:emoji,id=128465]删除完成!\r\n词条:" + tmsg + "\r\n回答为:" + tans;
}
else
{
Expand All @@ -196,7 +196,7 @@ lua 加 代码 直接运行
if (get_msg.Length > 0)
{
XmlSolve.del(fromgroup, get_msg);
result += "删除完成!\r\n触发词:" + get_msg;
result += "[CQ:emoji,id=128465]删除完成!\r\n触发词:" + get_msg;
}
else
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,12 @@ public static string GetAlmanac(string qq,int now)
count = 0;

int allsum = ran.Next(0, 100);
ReplayString = string.Format("{0}\r\n你的运势如下~\r\n宜:\r\n{1}\r\n{2}\r\n{3}\r\n{4}\r\n忌:\r\n{5}\r\n{6}\r\n日期:{7}\r\n综合幸运指数:{8}%\r\n当日吉言:{9}",
ReplayString = string.Format("{0}\r\n你的运势如下~\r\n" +
"[CQ:emoji,id=127569]宜:\r\n{1}\r\n{2}\r\n{3}\r\n{4}\r\n" +
"[CQ:emoji,id=127538]忌:\r\n{5}\r\n{6}\r\n" +
"[CQ:emoji,id=128197]日期:{7}\r\n" +
"[CQ:emoji,id=127919]综合幸运指数:{8}%\r\n" +
"[CQ:emoji,id=128221]当日吉言:{9}",
Tools.At(qq),
GoodThings[sum1],
GoodThings[sum2],
Expand Down
2 changes: 1 addition & 1 deletion 全局词条的lua脚本/新番.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

--初始化新番列表
function onInitAnime()
return parse(get("http://www.dilidili.wang/"))
return parse(get("http://www.dilidili.name/"))
end

--列表项点击事件
Expand Down
2 changes: 1 addition & 1 deletion 全局词条的lua脚本/要开会吗.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ local qq,name = message:match("[7|七]号要开会吗%[CQ:at,qq=(%d+)%](.+)")
if qq then
print(at(qq).."是你们直接@的?"..(name and "现在你是在叫"..name.."").."我不想再看见第二次")
print(at(fromqq).."你自己心里没点数?")
print("请各位群员以后自己的身份和说话方式@全体成员")
print("请各位群员以后注意自己的身份和说话方式@全体成员")
end
2 changes: 1 addition & 1 deletion 全局词条的lua脚本/长链接.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ function geturl()
if not html then return "加载失败" end
if html:find("网址过长,生成失败!") then return "网址过长,生成失败!" end
local url = html:match("biubiubiubiubiu.com/(.-)\"")
return "26个biu加上点com斜杠"..url
return "https://biubiubiubiubiubiubiubiubiubiubiubiubiubiubiubiubiubiubiubiubiu.com/"..url
end

if message:find("长链接") == 1 and message:len() > 6 then
Expand Down

0 comments on commit 8a8ddab

Please sign in to comment.