Previous topicNext topic
Help > 检测命令 >
概率执行命令

命令格式:

Random  数值

例如数值为 10 ,从1~10之间取值, 如果取到1就执行,否则就不执行!

 

RandomEx  分子  分母

例如分子为5, 分母为8, 就是有8分之5的概率执行,否则就不执行!

 

示例一:

[@main]

#if

random 5

#act

sendmsg 6 你的运气不错!

#elseact

sendmsg 5 运气有点差啊 !

示例二:

[@main]

#if

RandomEx  5  8

#act

sendmsg 6 你的运气不错!

#elseact

sendmsg 5 运气有点差啊 !