找回密码
 注册
搜索
查看: 450|回复: 1

ll结束后可以选继续做几次的code

[复制链接]
门派:明教
发表于 2020-2-9 21:57:20 | 显示全部楼层 |阅读模式
本帖最后由 aoxue@tj 于 2020-2-9 22:20 编辑

主要参考了之前的duihuanSometing模块的一些code,也再次表示感谢
  1. function dolostAg()
  2.         SetVariable("duihuanllTimes",0)
  3.     l_result=utils.msgbox ( "信送完啦!!是否继续送信?", "dolost", "yesno", "?", 1 )
  4.         if l_result and l_result=="yes" then
  5.                 l_result=utils.inputbox ("继续换信使之证多少个?","信使之证",GetVariable("duihuanllTimes"),"宋体","12")
  6.                 print(l_result)
  7.                 if not isNil(GetVariable("duihuanllTimes")) then
  8.                         SetVariable("duihuanllTimes",l_result)
  9.                         if tonumber(GetVariable("duihuanllTimes"))~=0 then
  10.                                 local l_lltimes=tonumber(GetVariable("duihuanllTimes"))*10
  11.                                 lostno=lostno+l_lltimes
  12.                                 print('当前送信次数为:'..LLlost..',总共送信次数为:'..lostno)
  13.                                 return duihuanLostletter()
  14.                         else
  15.                                 needdolost=0
  16.                                 return check_job()                               
  17.                         end
  18.                 else
  19.                         needdolost=0
  20.                         return check_job()                       
  21.                 end
  22.         else
  23.                 needdolost=0
  24.         return check_job()
  25.         end
  26. end
  27. function duihuanLostletter()
  28.         exe('jobtimes')
  29.         tmp.duihuan=0
  30.         DeleteTriggerGroup("duihuanLostletter")
  31.         create_trigger_t('duihuanLostletter1',"^(> )*当铺老板吆喝一声:"..score.name.."兑换限制级宝物\\D*,收讫书剑通宝(\\D*)个*",'','duihuanLostletter_add')
  32.         SetTriggerOption("duihuanLostletter1","group","duihuanLostletter")
  33.         go(duihuanLostletter_duihuan,"扬州城","当铺")
  34. end
  35. function duihuanLostletter_add(n,l,w)
  36.         tmp.duihuan=tmp.duihuan or 0
  37.         tmp.duihuan=tmp.duihuan+1
  38.         print('本次兑换信使之证'..tmp.duihuan..'次')
  39.         if tmp.duihuan>=tonumber(GetVariable("duihuanllTimes")) then
  40.                 EnableTriggerGroup("duihuanLostletter",false)
  41.                 DeleteTriggerGroup("duihuanLostletter")
  42.                 return check_busy(check_job)
  43.         end
  44.         check_busy(duihuanLostletter_duihuan)
  45. end
  46. function duihuanLostletter_duihuan()
  47.         exe('duihuan pcert')
  48. end
复制代码
门派:明教
 楼主| 发表于 2020-2-9 22:00:45 | 显示全部楼层
注意,填写的数字是兑换几封信使之证,不是再做几封信,1就是10封信,别填写错了
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|书剑永恒MUD ( 闽ICP备14012032号|闽公网安备 35050202000162号 )

GMT+8, 2025-8-14 10:53 , Processed in 0.024531 second(s), 18 queries .

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

快速回复 返回顶部 返回列表