Gm.lua 52 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920
  1. local Config = require("Config")
  2. local Util = require("common.Util")
  3. local Log = require("common.Log")
  4. local Msg = require("core.Msg")
  5. local ObjHuman = require("core.ObjHuman")
  6. local BagLogic = require("bag.BagLogic")
  7. local Broadcast = require("broadcast.Broadcast")
  8. local Util = require("common.Util")
  9. local InnerMsg = require("core.InnerMsg")
  10. local CommonDB = require("common.CommonDB")
  11. local JjcDB = require("jjc.JjcDB")
  12. local VipLogic = require("vip.VipLogic")
  13. local VipExcel = require("excel.vip")
  14. local GMExcel = require("excel.gm")
  15. local RoleLogic = require("role.RoleLogic")
  16. local UnionDBLogic = require("union.UnionDBLogic")
  17. local CombatPosLogic = require("combat.CombatPosLogic")
  18. local CombatDefine = require("combat.CombatDefine")
  19. local ItemDefine = require("bag.ItemDefine")
  20. local MiddleConnect = require("middle.MiddleConnect")
  21. local BuyLogic = require("topup.BuyLogic")
  22. local WeekendLoopActManger = require("WeekendLoopActivity.WeekendLoopActManager")
  23. local RecommendLineup = require("drawCard.RecommendLineup")
  24. d3 = {}
  25. local function send(human, err)
  26. local mm = Msg.gc.GC_CHAT
  27. mm.item.msgType = 3
  28. mm.item.targetUuid = ""
  29. mm.item.sendTime = os.time()
  30. mm.item.msg = tostring(err)
  31. mm.item.vipLv = human.db.vipLv or 0
  32. mm.item.videoUuid = ""
  33. mm.item.isJson = 0
  34. mm.item.unionFrame = 0
  35. local union = {}
  36. if human.db.unionUuid ~= nil then
  37. union = UnionDBLogic.getUnion(human.db.unionUuid)
  38. end
  39. RoleLogic.getRoleBase(human,mm.item.roleBase)
  40. mm.item.label = human.db.throneLabel or 0
  41. Msg.send(mm, human.fd)
  42. end
  43. -- 直接调用gm命令
  44. function execGm(human, cmd,pos)
  45. print("直接调用gm命令",cmd,pos)
  46. Log.write(Log.LOGID_OSS_GM_CODE, human.db._id, human.db.account, human.db.name, cmd, pos)
  47. d3[cmd](human, tonumber(pos) or pos)
  48. return true
  49. end
  50. function checkGm(human, str)
  51. if not Config.IS_USE_GM_CMD and human.db.gm == nil then
  52. return
  53. end
  54. local pos = string.find(str, " ", 1, true)
  55. local cmd = string.sub(str, 1, pos and pos - 1)
  56. if not Config.IS_USE_GM_CMD then
  57. if human.db.gm == 1 and not GmControl[cmd] then -- 一级权限的gm只能使用部分gm命令
  58. send(human, "not permit for this gm cmd!")
  59. return true
  60. end
  61. if human.db.gm == 100 then -- 新手引导员不能使用gm命令
  62. return
  63. end
  64. end
  65. if not d3[cmd] then
  66. return
  67. end
  68. local arg = string.sub(str, #cmd + 2)
  69. Log.write(Log.LOGID_OSS_GM_CODE, human.db._id, human.db.account, human.db.name, cmd, arg)
  70. d3[cmd](human, tonumber(arg) or arg)
  71. return true
  72. end
  73. function d3.heroadd(human,val)
  74. if val == nil then return end
  75. local tb = Util.split(val, " ")
  76. local id = tonumber(tb[1])
  77. local cnt = tonumber(tb[2])
  78. local lv = tonumber(tb[3])
  79. local star = tonumber(tb[4])
  80. if not (id and cnt) then return end
  81. for i = 1, cnt do
  82. local heroGrid = require("hero.HeroGrid").createHeroGrid(id , star)
  83. if not heroGrid then break end
  84. local skinLogic = require("skin.SkinLogic")
  85. local skinOn = skinLogic.checkHeroSkinById(human,id)
  86. if skinOn then
  87. heroGrid.skinOn = skinOn
  88. end
  89. local attrConfig = require("hero.HeroDefine").getAttrConfig(id, heroGrid.star)
  90. if not attrConfig then return end
  91. local quality = require("hero.HeroGrid").getMaxQualityByLv(heroGrid.star, lv)
  92. local maxLv = require("hero.HeroGrid").getMaxLv(heroGrid.star, quality)
  93. heroGrid.lv = math.min(maxLv, lv or 0)
  94. heroGrid.quality = math.max(heroGrid.quality, quality or 0)
  95. require("hero.HeroLogic").addHeroByGrid(human, heroGrid, "gm")
  96. end
  97. end
  98. function d3.herodel(human,val)
  99. if val == nil then return end
  100. local pos = string.find(val, " ", 1, true)
  101. if pos == nil then return end
  102. local index = tonumber(string.sub(val, 1, pos - 1))
  103. local cnt= tonumber(string.sub(val,pos+1,#val))
  104. require("hero.HeroLogic").delHeroByIndex(human,index,"gm")
  105. end
  106. function d3.herodelAll(human,val)
  107. for index = 1, human.db.heroBag[0]do
  108. require("hero.HeroLogic").delHeroByIndex(human,index,"gm")
  109. end
  110. end
  111. function d3.itemadd(human,val)
  112. if val == nil then return end
  113. local pos = string.find(val, " ", 1, true)
  114. if pos == nil then return end
  115. local id = tonumber(string.sub(val, 1, pos - 1))
  116. if not id then
  117. local name = string.sub(val, 1, pos - 1)
  118. local ItemExcel = require("excel.item").item
  119. for k,v in pairs(ItemExcel) do
  120. if v.name == name then
  121. id = k
  122. break
  123. end
  124. end
  125. end
  126. if not id then
  127. local name = string.sub(val,1,pos - 1)
  128. local EquipExcel = require("excel.equip").equip
  129. for k,v in pairs(EquipExcel) do
  130. if v.name == name then
  131. id = k
  132. break
  133. end
  134. end
  135. end
  136. if not id then
  137. return
  138. end
  139. local EquipExcel = require("excel.equip").equip
  140. if EquipExcel[id] then
  141. local cnt= tonumber(string.sub(val,pos+1,pos + 2))
  142. local rare= tonumber(string.sub(val,pos+2,#val))
  143. require("bag.BagLogic").addItem(human, id, cnt, "gm", nil, rare)
  144. human.getEquip = nil
  145. else
  146. -- 分开是因为 常规道具 给不了
  147. local cnt= tonumber(string.sub(val,pos+1,#val))
  148. require("bag.BagLogic").addItem(human,id,cnt,"gm")
  149. end
  150. end
  151. -- 删除道具
  152. function d3.itemdel(human,val)
  153. if val == nil then return end
  154. local pos = string.find(val, " ", 1, true)
  155. if pos == nil then return end
  156. local id = tonumber(string.sub(val, 1, pos - 1))
  157. local cnt= tonumber(string.sub(val,pos+1,#val))
  158. require("bag.BagLogic").delItem(human,id,cnt,"gm")
  159. end
  160. function d3.qingbaoMax(human)
  161. require("bar.BarTaskLogic").addBarQingBao(human, 10000)
  162. end
  163. function d3.maxbattle(human, val)
  164. val = val + 0
  165. human.db.battleID = val
  166. human.db.guajiID = val - 1
  167. local BRoleLogic = require("billboard.BRoleLogic")
  168. local BillboardDefine = require("billboard.BillboardDefine")
  169. BRoleLogic.updateData(BillboardDefine.TYPE_BATTLE, human.db)
  170. end
  171. function d3.dbsave(human)
  172. ObjHuman.save(human)
  173. end
  174. -- 设置当前金币
  175. function d3.jinbi(human, val)
  176. val = val + 0
  177. ObjHuman.updateJinbi(human, val - human.db.jinbi, "gm")
  178. end
  179. -- 设置钻石
  180. function d3.zuanshi(human, val)
  181. val = val + 0
  182. if val > human.db.zuanshi then
  183. print("234234234",val)
  184. ObjHuman.addZuanshi(human, val - human.db.zuanshi, "gm")
  185. else
  186. ObjHuman.decZuanshi(human, val - human.db.zuanshi, "gm")
  187. end
  188. end
  189. --添加邮件
  190. function d3.mail(human,val)
  191. local param = Util.split(val, " ")
  192. local mailtype = tonumber(param[1])
  193. local title = param[2]
  194. local content = param[3]
  195. local max = #param
  196. local count = (type(param[max]) == "number") and param[max] or 1
  197. local items
  198. if param[4] then
  199. items = {}
  200. for i = 4,max-1 do
  201. items[#items + 1] = {tonumber(param[i]),math.floor(math.random(1,10))}
  202. end
  203. end
  204. if not (mailtype == 1 or mailtype == 2) or not title or not content then
  205. send(human, "参数错误 "..type.." "..title.." "..content.." "..#items)
  206. end
  207. local MailManager = require("mail.MailManager")
  208. for i= 1,count do
  209. MailManager.add(mailtype,human.db._id,title,content,items,mailtype == 2 and [[测试用户]])
  210. end
  211. end
  212. function d3.clbag(human)
  213. human.db.bag = {}
  214. local msgRet = Msg.gc.GC_BAG_LIST
  215. msgRet.list[0] = 0
  216. Msg.send(msgRet, human.fd)
  217. end
  218. function d3.clhero(human)
  219. local HeroLogic = require("hero.HeroLogic")
  220. for i = 1, human.db.heroBag[0] do
  221. HeroLogic.delHeroByIndex(human, i, "gm")
  222. end
  223. end
  224. function d3.god(human)
  225. local GMExcelConfig = GMExcel.god[1]
  226. BagLogic.addItemList(human, GMExcelConfig.addItem, "gm")
  227. for k, v in ipairs(GMExcelConfig.addHero) do
  228. local id = tonumber(v[1])
  229. local cnt = tonumber(v[2])
  230. local lv = tonumber(v[3])
  231. local star = tonumber(v[4])
  232. local quality = require("hero.HeroGrid").getMaxQualityByLv(star, lv)
  233. for i = 1, cnt do
  234. local heroGrid = require("hero.HeroGrid").createHeroGrid(id, star)
  235. if heroGrid then
  236. heroGrid.lv = math.max(heroGrid.lv, lv or 0)
  237. heroGrid.quality = math.max(heroGrid.quality, quality or 0)
  238. require("hero.HeroLogic").addHeroByGrid(human, heroGrid, "gm")
  239. end
  240. end
  241. end
  242. --d3.viplv(human, 13)
  243. --d3.lv(human, 1)
  244. --d3.noguide(human)
  245. end
  246. function d3.wudi(human)
  247. if wudi then
  248. wudi = false
  249. Broadcast.sendErr(human, "取消无敌状态")
  250. else
  251. wudi = true
  252. Broadcast.sendErr(human, "进入无敌状态")
  253. end
  254. end
  255. -- 清空副本次数和购买次数
  256. function d3.clcopy(human)
  257. human.db.copy = nil
  258. end
  259. -- 设置等级
  260. function d3.lv(human, val)
  261. val = val + 0
  262. local lvOld = human.db.lv
  263. local lvNew = val + 0
  264. human.db.lv = lvNew
  265. ObjHuman.onLvUpCB(human,lvOld , lvNew)
  266. end
  267. -- 加经验
  268. function d3.addexp(human, val)
  269. val = val + 0
  270. ObjHuman.addExp(human, val)
  271. end
  272. -- 设置vip等级
  273. function d3.viplv(human, val)
  274. val = val + 0
  275. local oldVipLv = VipLogic.getVipLv(human)
  276. human.db.vipExp = VipExcel.vip[val] and VipExcel.vip[val].exp or 0
  277. human.db.vipLv = val
  278. VipLogic.addExp(human, 0)
  279. end
  280. -- 增加vip经验
  281. function d3.vipexp(human, val)
  282. val = val + 0
  283. VipLogic.addExp(human, val)
  284. end
  285. function d3.it1(human, value)
  286. value = tonumber(value)
  287. if not value then return end
  288. local ItemExcel = require("excel.item").item
  289. local BagLogic = require("bag.BagLogic")
  290. for itemID, cf in pairs(ItemExcel) do
  291. if cf.subType == value then
  292. BagLogic.addItem(human, itemID, 1, "gm", true)
  293. end
  294. end
  295. BagLogic.sendBagList(human)
  296. end
  297. function d3.equip(human, value)
  298. value = tonumber(value)
  299. if not value then return end
  300. local BagLogic = require("bag.BagLogic")
  301. local EquipExcel = require("excel.equip").equip
  302. for itemID in pairs(EquipExcel) do
  303. BagLogic.addItem(human, itemID, 1, "gm", true)
  304. end
  305. BagLogic.sendBagList(human)
  306. end
  307. function d3.task(human, val)
  308. if val == nil then return end
  309. local task = string.find(val, " ", 1, true)
  310. if task == nil then return end
  311. local id = tonumber(string.sub(val, 1, task - 1))
  312. local cnt= tonumber(string.sub(val,task+1,#val))
  313. local DailyTaskLogic = require("dailyTask.DailyTaskLogic")
  314. DailyTaskLogic.recordDailyTaskFinishCnt(human, id, cnt, nil)
  315. end
  316. function d3.os(human, value)
  317. value = value and tonumber(value)
  318. if value == nil then
  319. local openSvrTime = CommonDB.getServerOpenTime()
  320. if openSvrTime == 0 then
  321. Broadcast.sendErr(human, "未设置开服时间")
  322. else
  323. local tb = os.date("%Y%m%d", openSvrTime)
  324. Broadcast.sendErr(human, "当前开服时间为" .. tb)
  325. end
  326. else
  327. local now = os.time()
  328. local temp = Util.getDayStartTime(now)
  329. temp = temp - (value - 1) * 24 * 3600
  330. CommonDB.setServerOpenTime(temp)
  331. local tb = os.date("%Y%m%d", temp)
  332. Broadcast.sendErr(human, "设置当前开服时间为" .. tb)
  333. --同步中心服开服时间
  334. --[[local msgRet = InnerMsg.lw.LW_OS
  335. msgRet.uuid = human.db._id
  336. msgRet.value = temp
  337. InnerMsg.sendMsg(0, msgRet)]]
  338. end
  339. end
  340. function d3.createtime(human, value)
  341. value = value and tonumber(value)
  342. if not value then return end
  343. local now = os.time()
  344. local temp = Util.getDayStartTime(now)
  345. temp = temp - (value - 1) * 24 * 3600
  346. human.db.createTime = temp
  347. local tb = os.date("%Y%m%d", temp)
  348. Broadcast.sendErr(human, "设置当前创角时间为" .. tb)
  349. end
  350. --设置中心服开服时间
  351. function d3.osw(human, value)
  352. value = value and tonumber(value)
  353. local msgRet = InnerMsg.lw.LW_OS
  354. msgRet.uuid = human.db._id
  355. msgRet.value = value
  356. InnerMsg.sendMsg(0, msgRet)
  357. end
  358. function d3.chengjiu(human,val)
  359. local param = Util.split(val, " ")
  360. local ChengjiuLogic = require("chengjiu.ChengjiuLogic")
  361. ChengjiuLogic.onCallback(human,3,3,4)
  362. end
  363. function d3.jjczero()
  364. local JjcLogic = require("jjc.JjcLogic")
  365. JjcLogic.onZero()
  366. end
  367. function d3.jjcreset()
  368. JjcDB.resetJJCDB()
  369. end
  370. function d3.jpSet(human,val)
  371. local point = tonumber(val)
  372. JjcDB.updatePlayerPoint(human.db._id, point, nil)
  373. end
  374. function d3.billboard(human)
  375. local BillboardDB = require("billboard.BillboardDB")
  376. BillboardDB.sort()
  377. end
  378. function d3.cldjs(human)
  379. human.db.jinbiExchange = nil
  380. end
  381. -- 激活钻石基金
  382. function d3.fund(human, val)
  383. local type = tonumber(val)
  384. local FundLogic = require("present.FundLogic")
  385. FundLogic.fundBuy(human, type)
  386. end
  387. -- 清空钻石基金购买和发放记录
  388. function d3.clfund(human)
  389. human.db.fundFlag = nil
  390. end
  391. function d3.clbuy(human)
  392. human.db.buy = {}
  393. end
  394. --增加好战者计数 仅限竞技场和试炼
  395. function d3.hzzadd(human, val)
  396. if val == nil then return end
  397. local pos = string.find(val, " ", 1, true)
  398. if pos == nil then return end
  399. local type = tonumber(string.sub(val, 1, pos - 1))
  400. local add= tonumber(string.sub(val,pos+1,#val))
  401. local MonthHzz = require("monthAct.MonthHzz")
  402. if type == MonthHzz.MONTHACT_HZZ_TYPE_1 then
  403. MonthHzz.addJjcFight(human, nil, add)
  404. elseif type == MonthHzz.MONTHACT_HZZ_TYPE_2 then
  405. MonthHzz.addTrialCnt(human, nil, add)
  406. end
  407. end
  408. function d3.ydjiuguan(human, val)
  409. if val == nil then return end
  410. local pos = string.find(val, " ", 1, true)
  411. if pos == nil then return end
  412. local star = tonumber(string.sub(val, 1, pos - 1))
  413. local add= tonumber(string.sub(val,pos+1,#val))
  414. local MonthDrunkery = require("monthAct.MonthDrunkery")
  415. MonthDrunkery.addDrunkCntEx(human, star, add)
  416. end
  417. function d3.ydhcjx(human, val)
  418. if val == nil then return end
  419. local param = Util.split(val, " ")
  420. local type = tonumber(param[1])
  421. local heroId= tonumber(param[2])
  422. local add = tonumber(param[3])
  423. local MonthHecJuex = require("monthAct.MonthHecJuex")
  424. MonthHecJuex.addCntByGm(human,type,heroId, add)
  425. end
  426. function d3.clboss(human)
  427. local DB = require("common.DB")
  428. local LuaMongo = _G.lua_mongo
  429. LuaMongo.remove(DB.db_boss)
  430. end
  431. function d3.clwish(human)
  432. human.db.wishCnt = nil
  433. human.db.wishActAlrCnt = nil
  434. end
  435. -- 设置高抽次数
  436. function d3.hsum(human,val)
  437. human.db.summonCnt = val
  438. end
  439. function d3.clhsum(human)
  440. human.db.summonCnt = nil
  441. human.db.sumWinScoCnt = nil
  442. end
  443. function d3.unionquery(human,val)
  444. local name = val
  445. local UnionLogic = require("union.UnionLogic")
  446. UnionLogic.createUnion(human,name)
  447. end
  448. function d3.uniondonate(human, value)
  449. local UnionDBLogic = require("union.UnionDBLogic")
  450. local union = UnionDBLogic.getUnion(human.db.unionUuid)
  451. if union == nil then
  452. return
  453. end
  454. union.donate = union.donate or {}
  455. union.donate[1] = value
  456. union.donate[2] = os.time()
  457. UnionDBLogic.updateUnionData(union)
  458. end
  459. function d3.settower(human,val)
  460. local HuanjingTowerLogic = require("huanjingTower.HuanjingTowerLogic")
  461. HuanjingTowerLogic.setTowerByGm(human, val)
  462. end
  463. function d3.setbattle(human,val)
  464. local BattleLogic = require("battle.BattleLogic")
  465. local param = Util.split(val, " ")
  466. BattleLogic.setBattleByGm(human, param[1], param[2])
  467. end
  468. function d3.overmonth(human, val)
  469. val = math.max(tonumber(val) or 0, 10)
  470. human.db.actMonthEndTime = os.time() + val
  471. end
  472. function d3.zhuanpantime(human,val)
  473. local param = Util.split(val, " ")
  474. local ZhuanpanLogic = require("zhuanpan.ZhuanpanLogic")
  475. ZhuanpanLogic.zhuanpanByGm(human, tonumber(param[1]), tonumber(param[2]) )
  476. end
  477. function d3.signin(human,val)
  478. human.db.signInCnt = val
  479. for i =1,human.db.signInCnt do
  480. human.db.signIn[i] = 1
  481. end
  482. end
  483. function d3.unionLv(human, val)
  484. val = tonumber(val)
  485. if not val then return end
  486. local UnionDBLogic = require("union.UnionDBLogic")
  487. local union = UnionDBLogic.getUnion(human.db.unionUuid)
  488. if not union then return end
  489. UnionDBLogic.upsetUnionData(union._id, "lv", val)
  490. UnionDBLogic.upsetUnionData(union._id, "exp", 0)
  491. end
  492. function d3.unionexp(human, val)
  493. val = tonumber(val)
  494. if not val then return end
  495. local UnionDBLogic = require("union.UnionDBLogic")
  496. local UnionLogic = require("union.UnionLogic")
  497. local union = UnionDBLogic.getUnion(human.db.unionUuid)
  498. if not union then return end
  499. UnionLogic.addUnionExp(union, val)
  500. UnionDBLogic.updateUnionData(union)
  501. end
  502. function d3.gws(human,val)
  503. local LoginSignLogic = require("loginSign.LoginSignLogic")
  504. for i = 1,val do
  505. LoginSignLogic.getReward(human)
  506. end
  507. end
  508. function d3.tsht(human)
  509. local AdminLogic = require("AdminLogic")
  510. local JsonInput = {}
  511. JsonInput.accountName = human.db.account
  512. JsonInput.roleName = human.db.name
  513. AdminLogic.adminFunction.getuserstatus(JsonInput)
  514. end
  515. function d3.bs(human,val)
  516. local param = Util.split(val, " ")
  517. local AdminLogic = require("AdminLogic")
  518. local JsonInput = {}
  519. JsonInput.account = human.db.account
  520. JsonInput.minute = param[1]
  521. JsonInput.reason = param[2]
  522. AdminLogic.adminFunction.banSay(JsonInput)
  523. end
  524. function d3.bl(human,val)
  525. local AdminLogic = require("AdminLogic")
  526. local JsonInput = {}
  527. JsonInput.accountName = human.db.account
  528. JsonInput.minute = val
  529. AdminLogic.adminFunction.banAccount(JsonInput)
  530. end
  531. function d3.bl2(human,val)
  532. local AdminLogic = require("AdminLogic")
  533. local param = Util.split(val, " ")
  534. local JsonInput = {}
  535. JsonInput.accountName = param[1]
  536. JsonInput.minute = tonumber(param[2])
  537. AdminLogic.adminFunction.banAccount(JsonInput)
  538. end
  539. function d3.cbl(human,val)
  540. local param = Util.split(val, " ")
  541. local AdminLogic = require("AdminLogic")
  542. local JsonInput = {}
  543. JsonInput.accountName = param[1]
  544. JsonInput.cancelBanSay = param[2]
  545. AdminLogic.adminFunction.cancelBanAccount(JsonInput)
  546. end
  547. function d3.bip(human,val)
  548. local param = Util.split(val, " ")
  549. local AdminLogic = require("AdminLogic")
  550. local JsonInput = {}
  551. JsonInput.IP = param[1]
  552. JsonInput.banTime = param[2]
  553. AdminLogic.adminFunction.banIp(JsonInput)
  554. end
  555. function d3.ursc(human)
  556. human.db.ectypeCnt = nil
  557. human.db.ectypeFreeTime = nil
  558. end
  559. function d3.sue(human,val)
  560. local newLevel = tonumber(val)
  561. if not newLevel then return end
  562. local UnionDBLogic = require("union.UnionDBLogic")
  563. local union = UnionDBLogic.getUnion(human.db.unionUuid)
  564. if not union then return end
  565. UnionDBLogic.updateBossLv(union,newLevel)
  566. end
  567. function d3.smtp(human,val)
  568. local param = Util.split(val, " ")
  569. local AdminLogic = require("AdminLogic")
  570. local JsonInput = {}
  571. JsonInput.recvType = 3
  572. JsonInput.title = param[1]
  573. JsonInput.content = param[2]
  574. JsonInput.fbAccount = param[3]
  575. JsonInput.senderName = "系统邮件"
  576. JsonInput.fbTime = os.time()
  577. JsonInput.fbContent = "反馈"
  578. JsonInput.startLv =0
  579. JsonInput.endLv = 51
  580. JsonInput.lastLoginTime = os.time() - 60*60
  581. AdminLogic.adminFunction.mail(JsonInput)
  582. end
  583. function d3.clmilltime(human)
  584. human.db.unionTaskGetTime = nil
  585. end
  586. function d3.tstx(human,val)
  587. local RoleHeadLogic = require("role.RoleHeadLogic")
  588. RoleHeadLogic.active(human, RoleHeadLogic.HEAD_TYPE_1, val)
  589. end
  590. function d3.tstxk(human,val)
  591. local RoleHeadLogic = require("role.RoleHeadLogic")
  592. RoleHeadLogic.active(human, RoleHeadLogic.HEAD_TYPE_2, val)
  593. end
  594. function d3.buy(human,val)
  595. local AdminLogic = require("AdminLogic")
  596. local PlatformHandler = require("platform.Handler")
  597. local ApiLogic = require("platform.ApiLogic")
  598. local BuyExcel = require("excel.buy")
  599. local buyConf = BuyExcel.buy[val]
  600. if not buyConf then return end
  601. local shopConf = BuyExcel.topup[val]
  602. if shopConf and shopConf.buyID == val then
  603. else
  604. shopConf = nil
  605. end
  606. local checkMoney = buyConf["CN"]
  607. local msg = {}
  608. msg.logintype = 2
  609. msg.openid = "oCD-L5RxAtfRe8-aiezdY-Ccla5U"
  610. msg.openkey = "VsBJf2DKah7QhzU5xuzLNA=="
  611. msg.yuanbao = shopConf and shopConf.cnt or buyConf.CN * 10
  612. msg.buyID = val
  613. msg.account = human.db.account
  614. msg.transaction_id = "transaction_id1"
  615. msg.pf = "android"
  616. msg.money = checkMoney
  617. ApiLogic.CHARGE_CODE_HIS = {}
  618. print("cccc:",val)
  619. local buyData = {buyID = val, price = checkMoney}
  620. BuyLogic.buy(human, buyData)
  621. --PlatformHandler.CG_TENCENT_BUY(human,msg)
  622. --AdminLogic.adminFunction.tencentPay(msg)
  623. end
  624. function d3.buyCharge(human, val)
  625. local BuyExcel = require("excel.buy")
  626. local buyConf = BuyExcel.buy[val]
  627. if not buyConf then
  628. return
  629. end
  630. local tOJsonInput = {}
  631. tOJsonInput.buyID = buyConf.id
  632. tOJsonInput.price = buyConf.CN
  633. tOJsonInput.money = buyConf.CN
  634. BuyLogic.charge(human, tOJsonInput)
  635. end
  636. function d3.gol(human)
  637. local AdminLogic = require("AdminLogic")
  638. AdminLogic.adminFunction.getonlinelist()
  639. end
  640. function d3.htm(human,val)
  641. local AdminLogic = require("AdminLogic")
  642. local oJsonInput = {}
  643. oJsonInput.recvType = val -- 邮件类型
  644. oJsonInput.title = "111" -- 邮件标题
  645. oJsonInput.content = "222" -- 邮件内容
  646. oJsonInput.items = nil -- 道具列表 可以为空
  647. oJsonInput.accounts = nil -- 指定玩家列表
  648. oJsonInput.startLv = 0
  649. oJsonInput.endLv = 200
  650. AdminLogic.adminFunction.mail(oJsonInput)
  651. end
  652. function d3.cluwar(human)
  653. require("union.UnionWarLogic").cleanUnionWar()
  654. local msg = InnerMsg.lw.LW_GM
  655. msg.gm = "cluwarmiddle"
  656. InnerMsg.sendMsg(0, msg)
  657. end
  658. function d3.cluniontime(human)
  659. human.db.unionJoinTime = nil
  660. end
  661. function d3.cluwarmiddle()
  662. local LuaMongo = _G.lua_mongo
  663. local DB = require("common.DB")
  664. LuaMongo.remove(DB.db_union_war)
  665. end
  666. function d3.uwarstart()
  667. -- 需要周1、3、5使用
  668. local UnionWarLogic = require("union.UnionWarLogic")
  669. UnionWarLogic.cleanUnionWar()
  670. local msg = InnerMsg.lw.LW_GM
  671. msg.gm = "cluwarmiddle"
  672. InnerMsg.sendMsg(0, msg)
  673. UnionWarLogic.onHour(0)
  674. UnionWarLogic.onHour(1)
  675. local msg = InnerMsg.lw.LW_GM
  676. msg.gm = "uwarstartmiddle"
  677. InnerMsg.sendMsg(0, msg)
  678. end
  679. function d3.warMaxtest(human, value)
  680. require("union.UnionWarLogic").auto(value)
  681. end
  682. function d3.uwar(human,state)
  683. local msg = InnerMsg.lw.LW_GM
  684. msg.gm = "muwar "..state
  685. InnerMsg.sendMsg(0, msg)
  686. if state == 1 then
  687. local UnionWarDBLogic = require("union.UnionWarDBLogic")
  688. UnionWarDBLogic.onHour(0, true)
  689. end
  690. end
  691. function d3.uwarshop(human, lv)
  692. require("union.UnionWarLogic").upWarShopLv(human, tonumber(lv))
  693. end
  694. function d3.uwarBuff(human)
  695. local msg = InnerMsg.lw.LW_GM
  696. msg.gm = "muwarBuff ".. human.db.unionUuid
  697. InnerMsg.sendMsg(0, msg)
  698. end
  699. function d3.muwar(human,state)
  700. local UnionWarDBLogic = require("union.UnionWarDBLogic")
  701. if state == 1 then
  702. UnionWarDBLogic.onHour(0, true)
  703. elseif state == 2 then
  704. UnionWarDBLogic.onHour(2, true)
  705. elseif state == 3 then
  706. UnionWarDBLogic.onHour(20, true)
  707. end
  708. end
  709. function d3.muwarBuff(human, unionUuid)
  710. local UnionWarDBLogic = require("union.UnionWarDBLogic")
  711. UnionWarDBLogic.addBuffLvByGm(unionUuid)
  712. end
  713. function d3.uwartask(human, type)
  714. local UnionWarLogic = require("union.UnionWarLogic")
  715. UnionWarLogic.chegnjiuFinishGm(human, tonumber(type))
  716. end
  717. function d3.uwarstartmiddle()
  718. -- 匹配
  719. require("union.UnionWarMiddleLogic").matchUnionStart()
  720. end
  721. function d3.cljjc(human, val)
  722. val = tonumber(val)
  723. local msgRet = InnerMsg.lw.LW_CL_JJC
  724. msgRet.type = val
  725. InnerMsg.sendMsg(0, msgRet)
  726. end
  727. function d3.cluwar(human)
  728. require("union.UnionWarLogic").cleanUnionWar()
  729. local msg = InnerMsg.lw.LW_GM
  730. msg.gm = "cluwarmiddle"
  731. InnerMsg.sendMsg(0, msg)
  732. end
  733. function d3.cluwarmiddle()
  734. local LuaMongo = _G.lua_mongo
  735. local DB = require("common.DB")
  736. LuaMongo.remove(DB.db_union_war)
  737. end
  738. function d3.uwarstart()
  739. -- 需要周1、3、5使用
  740. require("union.UnionWarLogic").onHour(0)
  741. require("union.UnionWarLogic").onHour(1)
  742. local msg = InnerMsg.lw.LW_GM
  743. msg.gm = "uwarstartmiddle"
  744. InnerMsg.sendMsg(0, msg)
  745. end
  746. function d3.uwarstartmiddle()
  747. -- 匹配
  748. require("union.UnionWarMiddleLogic").matchUnionStart()
  749. end
  750. function d3.cxh(human)
  751. d3.tgod(human)
  752. d3.lv(human,200)
  753. end
  754. function d3.drop(human,val)
  755. local BattleLogic = require("battle.BattleLogic")
  756. local param = Util.split(val, " ")
  757. local cnt = tonumber(param[1])
  758. local battleID = tonumber(param[2])
  759. BattleLogic.clacItemCntGM(human,cnt,battleID)
  760. end
  761. function d3.uif(human,val)
  762. local jsonInput = {}
  763. jsonInput.unionName = val
  764. local AdminLogic = require("AdminLogic")
  765. AdminLogic.adminFunction.unionInfo(jsonInput)
  766. end
  767. function d3.ul(human,val)
  768. local jsonInput = {}
  769. jsonInput.start = tonumber(val)
  770. local AdminLogic = require("AdminLogic")
  771. AdminLogic.adminFunction.unionList(jsonInput)
  772. end
  773. function d3.monthgaochou(human, val)
  774. local MonthSummon = require("monthAct.MonthSummon")
  775. MonthSummon.onSummon(human, tonumber(val))
  776. end
  777. function d3.jhtq(human,val)
  778. local TequanLogic = require("qqTequan.TequanLogic")
  779. local param = Util.split(val, " ")
  780. local val1 = tonumber(param[1])
  781. local val2 = tonumber(param[2])
  782. local val3 = tonumber(param[3])
  783. local val4 = tonumber(param[4])
  784. TequanLogic.activateTequan(human,val1,val2,val3,val4)
  785. end
  786. function d3.unionTecLv(human,val)
  787. local UnionTecLogic = require("union.UnionTecLogic")
  788. UnionTecLogic.lvAllUpByGm(human)
  789. end
  790. function d3.auto(human,val)
  791. local param = Util.split(val, " ")
  792. local str = param[1]
  793. local val = param[2]
  794. if not str or not val then
  795. return
  796. end
  797. for i = 1, val do
  798. require("union.UnionWarLogic").auto(str .. string.format("%02d", i))
  799. end
  800. end
  801. function d3.lvAuto(human, val)
  802. val = val + 0
  803. local lvOld = human.db.lv
  804. local lvNew = val + 0
  805. human.db.lv = lvNew
  806. end
  807. function d3.cap(human)
  808. human.db.buyCapCnt = require("hero.HeroDefine").BUY_CAP_CNT
  809. require("hero.HeroLogic").sendHeroBagCap(human)
  810. end
  811. function d3.abscharge(human)
  812. AbsBillboardLogic.charge(human,1000)
  813. end
  814. function d3.jhpt(human)
  815. if human.pf_info.pf == "qqgame" then
  816. human.db.txHall = {}
  817. elseif human.pf_info.pf == "qzone" or human.pf_info.pf == "website" then
  818. human.db.qqZone = {}
  819. end
  820. end
  821. function d3.addfuwen(human)
  822. d3.itemadd(human,"80001 10")
  823. d3.itemadd(human,"80002 10")
  824. d3.itemadd(human,"80003 10")
  825. d3.itemadd(human,"80004 10")
  826. d3.itemadd(human,"80005 10")
  827. end
  828. function d3.addSmelt(human,val)
  829. local num = tonumber(val)
  830. human.db.smeltVal = human.db.smeltVal or 0
  831. human.db.smeltVal = human.db.smeltVal + num
  832. end
  833. function d3.zdfw(human,val)
  834. local param = Util.split(val, " ")
  835. local fuwenID = tonumber(param[1])
  836. local attr1 = tonumber(param[2])
  837. local val1 = tonumber(param[3])
  838. local attr2 = tonumber(param[4])
  839. local val2 = tonumber(param[5])
  840. local skill1 = tonumber(param[6])
  841. local skill2 = tonumber(param[7])
  842. local FuwenGrid = require("fuwen.FuwenGrid")
  843. local FuwenExcel = require("excel.fuwen").skill
  844. if (skill1 ~= nil and FuwenExcel[skill1] == nil) or (skill2 ~= nil and FuwenExcel[skill2] == nil) then
  845. print("fuck! add fuwen skill is notreal")
  846. return
  847. end
  848. FuwenGrid.setFuwenSkillAttrByGM(human,fuwenID,attr1,val1,attr2,val2,skill1,skill2)
  849. end
  850. function d3.t2(human)
  851. local input = [[{"method":"OnTokenReturnForBuy","tencent_ret":{"ret":0,"token":"fC283BD0141D50418B68200972FBEE6A13102","url_params":"\/v1\/r\/1110099166\/mobile_goods_info?token_id=BC283BD0141D50418B68200972FBEE6A13102&transaction_id=BC283BD0141D50418B68200972FBEE6A13102&out_trade_no=&new_cpay=1&offer_type=0","transaction_id":"BC283BD0141D50418B68200972FBEE6A13102","attach":""},"callback_general_param":{"name":"0-15D9C743A68D57FF8B22CC944BAEAD8C","account":"0-a"}}]]
  852. local ret = require("AdminLogic").handleAdminRequest(_, input)
  853. print(ret)
  854. end
  855. function d3.t1(human)
  856. local input = {}
  857. input.token = "fC283BD0141D50418B68200972FBEE6A13102"
  858. input.payitem = "39*60*1"
  859. input.billno = os.time()
  860. local ret = require("platform.QQApi").onDeliverReturnForBuy(input)
  861. print(ret.ret,ret.msg)
  862. end
  863. function d3.skin(human,val)
  864. local tb = Util.split(val, " ")
  865. local id = tonumber(tb[1])
  866. local cnt = tonumber(tb[2])
  867. print(id,tb[1],tb[2])
  868. if not id then
  869. human.db.skinBag = {[0] = 999}
  870. return
  871. end
  872. local SkinLogic = require("skin.SkinLogic")
  873. SkinLogic.addSkin(human,id,cnt)
  874. end
  875. function d3.ff(human,val)
  876. local FriendLogic = require("friend.FriendLogic")
  877. FriendLogic.addFriend(human, val)
  878. end
  879. function d3.chenghao(human,val)
  880. val = tonumber(val)
  881. if not val then
  882. return
  883. end
  884. local RoleHeadLogic = require("role.RoleHeadLogic")
  885. RoleHeadLogic.active(human, RoleHeadLogic.HEAD_TYPE_4, val)
  886. end
  887. function d3.unionBillboard(human,val)
  888. val = tonumber(val)
  889. if not val then
  890. return
  891. end
  892. local BRoleLogic = require("billboard.BRoleLogic")
  893. BRoleLogic.queryUnionBillboard(human,val)
  894. end
  895. function d3.herotest(human, val)
  896. local tb = Util.split(val, " ")
  897. local combatType = 1
  898. local HeroExcel = require("excel.hero")
  899. local HeroLogic = require("hero.HeroLogic")
  900. local flags = {}
  901. human.db.combatHero = human.db.combatHero or {}
  902. human.db.combatHero[combatType] = {}
  903. for pos = 1, 6 do
  904. local id = tonumber(tb[pos])
  905. local index = nil
  906. if id and HeroExcel.hero[id] then
  907. for i = 1, human.db.heroBag[0] do
  908. local heroGrid = human.db.heroBag[i]
  909. if heroGrid and (heroGrid.id == id) and
  910. (not flags[i]) then
  911. flags[i] = true
  912. index = i
  913. break
  914. end
  915. end
  916. if not index then
  917. index = HeroLogic.getEmptyIndex(human)
  918. d3.heroadd(human, id .. " 1")
  919. end
  920. end
  921. human.db.combatHero[combatType][pos] = index
  922. end
  923. local CombatHandler = require("combat.Handler")
  924. CombatHandler.CG_COMBAT_BEGIN(human,{type = combatType, param = ""})
  925. end
  926. function d3.combat(human, monsterOutID)
  927. local CombatLogic = require("combat.CombatLogic")
  928. local param = {}
  929. param.defender, _, param.defRBase, param.defFormation = CombatLogic.getMonsterObjList(monsterOutID)
  930. require("combat.CombatLogic").combatBegin(human, 1001, param, 1)
  931. end
  932. function d3.combat2(human,id)
  933. local id = tonumber(id)
  934. local combatConf = require("excel.combat").gm[id]
  935. if not combatConf then
  936. assert()
  937. end
  938. local HeroGrid = require("hero.HeroGrid")
  939. local HeroLogic = require("hero.HeroLogic")
  940. local CombatLogic = require("combat.CombatLogic")
  941. local fakeman1 = {}
  942. local account1 = "combatFakeman1"
  943. local fakeman2 = {}
  944. local account2 = "combatFakeman2"
  945. local RoleDBLogic = require("role.RoleDBLogic")
  946. local fakemanDB1 = RoleDBLogic.getDbByAccount(account1)
  947. if not fakemanDB1 then
  948. fakemanDB1 = RoleDBLogic.createDefaultRole(account1)
  949. end
  950. fakeman1.db = fakemanDB1
  951. local fakemanDB2 = RoleDBLogic.getDbByAccount(account2)
  952. if not fakemanDB2 then
  953. fakemanDB2 = RoleDBLogic.createDefaultRole(account2)
  954. end
  955. fakeman2.db = fakemanDB2
  956. local attacker = {}
  957. local defender = {}
  958. for i = 1, fakeman1.db.heroBag[0] do
  959. HeroLogic.delHeroByIndex(fakeman1, i, "gm")
  960. end
  961. for i = 1, fakeman2.db.heroBag[0] do
  962. HeroLogic.delHeroByIndex(fakeman2, i, "gm")
  963. end
  964. for k,v in ipairs(combatConf.atk) do
  965. local heroGrid = HeroGrid.createHeroGrid(v[1], v[4])
  966. heroGrid.lv = math.max(heroGrid.lv, v[3] or 0)
  967. heroGrid.quality = HeroGrid.getMaxQuality(heroGrid.star)
  968. local heroIndex = HeroLogic.addHeroByGrid(fakeman1, heroGrid, "gm")
  969. attacker[v[2]] = CombatLogic.createHumanObj(fakeman1, heroGrid.uuid)
  970. end
  971. for k,v in ipairs(combatConf.def) do
  972. local heroGrid = HeroGrid.createHeroGrid(v[1], v[4])
  973. heroGrid.lv = math.max(heroGrid.lv, v[3] or 0)
  974. heroGrid.quality = HeroGrid.getMaxQuality(heroGrid.star)
  975. local heroIndex = HeroLogic.addHeroByGrid(fakeman2, heroGrid, "gm")
  976. defender[v[2]] = CombatLogic.createHumanObj(fakeman2, heroGrid.uuid)
  977. end
  978. local atkPet = nil
  979. local defPet = nil
  980. CombatLogic.combatGm(human,1001,combatConf.atkF, attacker,combatConf.defF,defender,atkPet,defPet,{{101,1},{102,2},{103,3},{104,4}})
  981. end
  982. function d3.combatEnd(human)
  983. local CombatLogic = require("combat.CombatLogic")
  984. for i = CombatDefine.COMBAT_TYPE1, CombatDefine.COMBAT_TYPE_MAX do
  985. CombatLogic.clientFinish(human, i)
  986. end
  987. end
  988. -- it道具添加(支持中文)
  989. function d3.it(human,value)
  990. local tb = Util.split(value," ")
  991. local id = tonumber(tb[1])
  992. local cnt = tonumber(tb[2])
  993. if id == nil then id = tb[1] end
  994. if type(id) == "string" then
  995. id = ItemDefine.getIdByName(id)
  996. end
  997. if type(id) ~= "number" then
  998. print("err id", tb[1], id, type(id))
  999. return
  1000. end
  1001. cnt = cnt or 1000
  1002. BagLogic.addItem(human, id, cnt, "gm")
  1003. end
  1004. -- 清除酒馆
  1005. function d3.clbartask(human)
  1006. human.db.bar = nil
  1007. end
  1008. function d3.updaily(human)
  1009. ObjHuman.updateDaily(human, true)
  1010. end
  1011. function d3.clguide(human)
  1012. human.db.noguide = nil
  1013. human.db.guide = nil
  1014. human.guideLoginStep = nil
  1015. require("guide.GuideLogic").refreshGuide(human)
  1016. require("guide.GuideLogic").sendStep(human)
  1017. end
  1018. function d3.nextguide(human)
  1019. local GuideExcel = require("excel.guide")
  1020. local GuideLogic = require("guide.GuideLogic")
  1021. local id = GuideLogic.getGuideID(human)
  1022. local nextstep = GuideLogic.getGuideStep(human) + 1
  1023. local cf = id and GuideExcel.main_guide[id]
  1024. local sid = cf and cf.guideList[nextstep]
  1025. GuideLogic.stepFinish(human, sid)
  1026. end
  1027. function d3.guide(human, id)
  1028. human.db.noguide = nil
  1029. human.guideLoginStep = nil
  1030. local GuideLogic = require("guide.GuideLogic")
  1031. GuideLogic.setGuide(human, id, GuideLogic.STATE_DOING)
  1032. GuideLogic.sendStep(human)
  1033. end
  1034. -- 跳过指引
  1035. function d3.noguide(human)
  1036. human.db.noguide = true
  1037. human.guideLoginStep = nil
  1038. require("guide.GuideLogic").sendStep(human, true)
  1039. end
  1040. function d3.creatunion(human,value)
  1041. d3.lv(human,30)
  1042. d3.viplv(human,2)
  1043. d3.zuanshi(human, 1000)
  1044. local UnionLogic = require("union.UnionLogic")
  1045. UnionLogic.createUnion(human, value)
  1046. end
  1047. function d3.cldraw(human, value)
  1048. human.db.drawCard = {jifen=tonumber(value),list={[1]={},[2]={},[3]={},[4]={}}}
  1049. end
  1050. function d3.cldrill(human)
  1051. require("drill.DrillDB").reset()
  1052. end
  1053. function d3.zhengdian(_, hour)
  1054. hour = tonumber(hour) or 0
  1055. require("core.Timer").doZhengDian(hour)
  1056. end
  1057. function d3.tgod(human)
  1058. local HeroLogic = require("hero.HeroLogic")
  1059. local HeroGrid = require("hero.HeroGrid")
  1060. local HeroExcel = require("excel.hero")
  1061. for heroID, config in pairs(HeroExcel.tujian) do
  1062. local heroConfig = HeroExcel.hero[heroID]
  1063. if heroConfig then
  1064. local star = heroConfig.star
  1065. local maxQuality = HeroGrid.getMaxQuality(star)
  1066. local maxLv = HeroGrid.getMaxLv(star,maxQuality)
  1067. d3.heroadd(human, heroID .. " 1".." "..maxLv.." "..maxQuality)
  1068. end
  1069. end
  1070. end
  1071. function d3.tujian(human, camp)
  1072. local HeroExcel = require("excel.hero")
  1073. camp = tonumber(camp)
  1074. for heroID, config in pairs(HeroExcel.tujian) do
  1075. if config.camp == camp or not camp then
  1076. d3.heroadd(human, heroID .. " 1")
  1077. end
  1078. end
  1079. end
  1080. function d3.cljingcailibao(human)
  1081. human.db.dailyLeiChong = nil
  1082. human.db.leichongHaoli = nil
  1083. human.db.topupAcountDaily = nil
  1084. human.db.topupAccountMonth = nil
  1085. end
  1086. function d3.qijifen(human,value)
  1087. human.db.sevenDayGoal = human.db.sevenDayGoal or {}
  1088. human.db.sevenDayGoal[9] = human.db.sevenDayGoal[8] or {}
  1089. human.db.sevenDayGoal[9].jifen = value
  1090. end
  1091. function d3.clqirimubiao(human)
  1092. human.db.sevenDayGoal = nil
  1093. end
  1094. function d3.throne(human, str)
  1095. if str == nil then return end
  1096. local tb = Util.split(str, " ")
  1097. local id = tonumber(tb[1])
  1098. local lv = tonumber(tb[2])
  1099. if not id or not lv then return end
  1100. local TheStarsDBLogic = require("theStars.TheStarsDBLogic")
  1101. local list = TheStarsDBLogic.getThroneList()
  1102. local throne = list[id]
  1103. if not throne then return end
  1104. throne.lv = lv
  1105. TheStarsDBLogic.updateThroneDB(throne)
  1106. end
  1107. function d3.cltsts(human)
  1108. human.db.throneTime = human.db.throneTime - 14400
  1109. end
  1110. -- 删号
  1111. function d3.delaccount(human, account)
  1112. if not account then return end
  1113. local target = ObjHuman.onlineAccount[account]
  1114. if target then
  1115. return Broadcast.sendErr(human, "can't delete online")
  1116. end
  1117. local RoleDBLogic = require("role.RoleDBLogic")
  1118. if not RoleDBLogic.getDbByAccount(account) then
  1119. return Broadcast.sendErr(human, "account not exist")
  1120. end
  1121. local LuaMongo = _G.lua_mongo
  1122. local DB = require("common.DB")
  1123. local query = {}
  1124. query.account = tostring(account)
  1125. LuaMongo.remove(DB.db_char, query)
  1126. require("core.RoleDel").roleDel()
  1127. Broadcast.sendErr(human, "delete ok, account = " .. account)
  1128. end
  1129. -- 临时开指引
  1130. function d3.openguide()
  1131. require("Config").HAS_GUIDE = true
  1132. end
  1133. function d3.closeguide()
  1134. require("Config").HAS_GUIDE = false
  1135. end
  1136. -- 自动上阵
  1137. function d3.autoteam(human, combatType)
  1138. if tonumber(combatType) == nil then return end
  1139. local CombatPosLogic = require("combat.CombatPosLogic")
  1140. local str = ""
  1141. for i = 1, 6 do
  1142. if not human.db.heroBag[i] then
  1143. local heroID = require("hero.HeroDefine").getRandHeroByIsElite()
  1144. local lv = math.random(50, 100)
  1145. d3.heroadd(human, heroID .. " 1 " .. lv)
  1146. end
  1147. str = str .. i
  1148. if i % 6 == 0 then str = str .. ","
  1149. else str = str .. "|" end
  1150. end
  1151. CombatPosLogic.updatePos(human,combatType,str)
  1152. end
  1153. function d3.fcmstate(human, state)
  1154. human.fcmState = state
  1155. require("fcm.FcmLogic").checkFcm(human)
  1156. end
  1157. function d3.oltimeday(human, time)
  1158. time = tonumber(time)
  1159. if not time then return end
  1160. human.db.onlineTimeDay = time
  1161. require("fcm.FcmLogic").checkFcm(human)
  1162. end
  1163. function d3.dis(human, code)
  1164. ObjHuman.doDisconnect(human, code)
  1165. end
  1166. function d3.project(human)
  1167. local Lang = require("common.Lang")
  1168. Broadcast.sendErr(human, Lang.TEST_MULTY_PROJECT)
  1169. end
  1170. function d3.clextrabattle(human)
  1171. human.db.battleExtraReward = nil
  1172. end
  1173. function d3.clsharepf(human)
  1174. human.db.plShare = nil
  1175. end
  1176. function d3.clshareboard()
  1177. require("present.SharePlatformLogic").resetBoard()
  1178. end
  1179. function d3.sharepfall(human, cnt)
  1180. cnt = tonumber(cnt) or 15
  1181. for i = 1, cnt do
  1182. require("present.SharePlatformLogic").onShareOk(human.db.account, "account" .. i, true)
  1183. end
  1184. end
  1185. function d3.sharepf(human, accountB)
  1186. require("present.SharePlatformLogic").onShareOk(human.db.account, accountB)
  1187. end
  1188. function d3.sharepf2(human, accountA)
  1189. require("present.SharePlatformLogic").onShareOk(accountA, human.db.account)
  1190. end
  1191. function d3.sharegroup(human)
  1192. require("present.SharePlatformLogic").groupShareOK(human)
  1193. end
  1194. function d3.shareinvate(human)
  1195. require("present.SharePlatformLogic").shareInvate(human)
  1196. end
  1197. function d3.cltuisonglibao(human)
  1198. human.db.tuiSongLiBao = nil
  1199. end
  1200. function d3.clmoshou(human)
  1201. human.db.moshou = nil
  1202. end
  1203. function d3.moshoulv(human,lv)
  1204. local MoShouExcel = require("excel.moshou")
  1205. if not lv or lv <= 0 or lv > #MoShouExcel.moshouLv then return end
  1206. local MoshouLogic = require("moshou.MoshouLogic")
  1207. local isAllActive = MoshouLogic.isAllMoshouActive(human)
  1208. if not isAllActive then
  1209. local MoShouExcel = require("excel.moshou")
  1210. local config = MoShouExcel.moshouActive
  1211. for i=1,#config do
  1212. local activeTask = config[i].activeTask
  1213. for j=1,#activeTask do
  1214. human.db.moshou = human.db.moshou or {}
  1215. human.db.moshou[i] = human.db.moshou[i] or {}
  1216. human.db.moshou[i].taskGet = human.db.moshou[i].taskGet or {}
  1217. human.db.moshou[i].taskGet[j] = j
  1218. end
  1219. end
  1220. end
  1221. human.db.moshou.lv = lv
  1222. human.db.moshou.lvExp = MoShouExcel.moshouLv[lv].needJinDu
  1223. human.db.moshou.skillLV = human.db.moshou.skillLV or 1
  1224. MoshouLogic.calMoshouHero(human)
  1225. end
  1226. function d3.activemoshou(human,moshouID)
  1227. if not moshouID or moshouID <= 0 then return end
  1228. local MoShouExcel = require("excel.moshou")
  1229. local config = MoShouExcel.moshouActive
  1230. for i=1,moshouID do
  1231. local activeTask = config[i].activeTask
  1232. for j=1,#activeTask do
  1233. human.db.moshou = human.db.moshou or {}
  1234. human.db.moshou[i] = human.db.moshou[i] or {}
  1235. human.db.moshou[i].taskGet = human.db.moshou[i].taskGet or {}
  1236. human.db.moshou[i].taskGet[j] = j
  1237. end
  1238. end
  1239. if moshouID == #config then
  1240. d3.moshoulv(human,1)
  1241. end
  1242. local MoshouLogic = require("moshou.MoshouLogic")
  1243. MoshouLogic.calMoshouHero(human)
  1244. end
  1245. function d3.moshouupneed(human)
  1246. local MoShouExcel = require("excel.moshou")
  1247. local lvUpNeed1 = MoShouExcel.moshouLv[2].lvUpNeed[1][1]
  1248. local lvUpNeed2 = MoShouExcel.moshouLv[2].lvUpNeed[2][1]
  1249. d3.it(human,lvUpNeed1)
  1250. d3.it(human,lvUpNeed2)
  1251. local jingLianUp1 = MoShouExcel.moshouJingLian[2].lvUpNeed[1][1]
  1252. local jingLianUp2 = MoShouExcel.moshouJingLian[2].lvUpNeed[2][1]
  1253. d3.it(human,jingLianUp1)
  1254. d3.it(human,jingLianUp2)
  1255. local zhuhunUp = MoShouExcel.moshouZhuHun[1].costID
  1256. d3.it(human,zhuhunUp)
  1257. local skillup1 = MoShouExcel.moshouSkillLv[2].upCost[1][1]
  1258. local skillup2 = MoShouExcel.moshouSkillLv[2].upCost[2][1]
  1259. d3.it(human,skillup1)
  1260. d3.it(human,skillup2)
  1261. end
  1262. function d3.moshoujinglian(human,val)
  1263. if not human.db.moshou then return end
  1264. human.db.moshou.jingLian = val
  1265. end
  1266. function d3.clolinereward(human)
  1267. require("onlineReward.OnlineRewardLogic").initDB(human)
  1268. end
  1269. function d3.clonlinerewardget(human)
  1270. human.db.onlineReward.getId = 0
  1271. end
  1272. function d3.bartaskfinish(human)
  1273. local BarTaskLogic = require("bar.BarTaskLogic")
  1274. BarTaskLogic.initDB(human)
  1275. for taskID, taskData in pairs(human.db.bar) do
  1276. if type(taskID) == "number" then
  1277. human.db.bar[taskID].ts = 0
  1278. end
  1279. end
  1280. end
  1281. function d3.test(human)
  1282. local str = Util.format("aa{1}{2}{3}{4}{5}{6}{7}{8}{9}{10}{11}{12}{13}{14}{15}{16}",1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16)
  1283. Broadcast.sendErr(human, str)
  1284. print(str)
  1285. end
  1286. function d3.clbattle()
  1287. local DB = require("common.DB")
  1288. local LuaMongo = _G.lua_mongo
  1289. LuaMongo.remove(DB.db_battle_shark)
  1290. end
  1291. -- 设置天梯争霸状态
  1292. function d3.jjcladderstart()
  1293. local JjcLadderLogic = require("jjcLadder.JjcLadderLogic")
  1294. local JjcLadderExcel = require("excel.jjcLadder")
  1295. local JjcLadderDefine = JjcLadderExcel.define[1]
  1296. JjcLadderLogic.onActReady()
  1297. local week = Util.getWeekDay(os.time()) - 1
  1298. if week == 0 then
  1299. week = 7
  1300. end
  1301. JjcLadderLogic.TEMP_TIMER_STAMPTIME = nil
  1302. JjcLadderDefine.startTime.week = week
  1303. JjcLadderDefine.endTime.week = week + 1
  1304. JjcLadderLogic.onTimer()
  1305. local msg = InnerMsg.lw.LW_GM
  1306. msg.gm = "jjcladderstartmiddle"
  1307. InnerMsg.sendMsg(0, msg)
  1308. end
  1309. function d3.jjcladderstartmiddle()
  1310. local JjcLadderLogic = require("jjcLadder.JjcLadderLogic")
  1311. local JjcLadderExcel = require("excel.jjcLadder")
  1312. local JjcLadderDefine = JjcLadderExcel.define[1]
  1313. JjcLadderLogic.onActReady()
  1314. local week = Util.getWeekDay(os.time()) - 1
  1315. if week == 0 then
  1316. week = 7
  1317. end
  1318. JjcLadderLogic.TEMP_TIMER_STAMPTIME = nil
  1319. JjcLadderDefine.startTime.week = week
  1320. JjcLadderDefine.endTime.week = week + 1
  1321. JjcLadderLogic.onTimer()
  1322. end
  1323. -- 天梯争霸报错
  1324. function d3.jjcladdersign(human)
  1325. local JjcLadderLogic = require("jjcLadder.JjcLadderLogic")
  1326. if JjcLadderLogic.getState() == JjcLadderLogic.STATE_ACT_START then
  1327. local commonDB = JjcLadderLogic.getCommonDB()
  1328. commonDB.uuid2sign = commonDB.uuid2sign or {}
  1329. commonDB.uuid2sign[human.db._id] = os.time()
  1330. JjcLadderLogic.saveCommonDB(commonDB)
  1331. JjcLadderLogic.onUpdatePos(human)
  1332. end
  1333. end
  1334. -- 天梯争霸结束回调
  1335. function d3.jjcladderend()
  1336. local JjcLadderLogic = require("jjcLadder.JjcLadderLogic")
  1337. JjcLadderLogic.onActEnd()
  1338. local msg = InnerMsg.lw.LW_GM
  1339. msg.gm = "jjcladderendmiddle"
  1340. InnerMsg.sendMsg(0, msg)
  1341. end
  1342. function d3.jjcladderendmiddle()
  1343. local JjcLadderLogic = require("jjcLadder.JjcLadderLogic")
  1344. JjcLadderLogic.onActEnd()
  1345. end
  1346. -- 重置天梯争霸活动信息
  1347. function d3.cljjcladder()
  1348. local JjcLadderLogic = require("jjcLadder.JjcLadderLogic")
  1349. JjcLadderLogic.saveCommonDB()
  1350. JjcLadderLogic.onActEnd()
  1351. local msg = InnerMsg.lw.LW_GM
  1352. msg.gm = "cljjcladdermiddle"
  1353. InnerMsg.sendMsg(0, msg)
  1354. end
  1355. function d3.cljjcladdermiddle()
  1356. local JjcLadderLogic = require("jjcLadder.JjcLadderLogic")
  1357. JjcLadderLogic.saveCommonDB()
  1358. JjcLadderLogic.onActEnd()
  1359. end
  1360. function d3.clcombat(human,val)
  1361. human.db.combatHero[val] = nil
  1362. end
  1363. function d3.clshop(human,val)
  1364. human.db.shop[val] = nil
  1365. end
  1366. -- 重置日常礼包
  1367. function d3.clrichanglibao(human)
  1368. human.db.richangLibao = nil
  1369. end
  1370. -- 重置荣耀峡谷(龙族战场)
  1371. function d3.clvalley()
  1372. local ValleyLogic = require("valley.ValleyLogic")
  1373. ValleyLogic.cleanDB()
  1374. local msg = InnerMsg.lw.LW_GM
  1375. msg.gm = "clvalleymiddle"
  1376. InnerMsg.sendMsg(0, msg)
  1377. end
  1378. function d3.clvalleymiddle()
  1379. local ValleyLogic = require("valley.ValleyLogic")
  1380. ValleyLogic.cleanDB()
  1381. end
  1382. -- 重置荣耀峡谷(龙族战场)成就
  1383. function d3.clvalleytask(human)
  1384. human.db.valleyTask = nil
  1385. end
  1386. -- 增加荣耀峡谷(龙族战场)个人成就值
  1387. function d3.valleytask1(human, value)
  1388. require("valley.ValleyTask").updateValue(human.db._id, value, 0)
  1389. end
  1390. -- 增加荣耀峡谷(龙族战场)团队成就值
  1391. function d3.valleytask2(human, value)
  1392. require("valley.ValleyTask").updateValue(human.db._id, 0, value)
  1393. end
  1394. function d3.touchLv(human,val)
  1395. local liveness = val + 0
  1396. require("union.UnionLivenessLogic").touchLv(human, liveness)
  1397. end
  1398. function d3.clyj()
  1399. local DB = require("common.DB")
  1400. local LuaMongo = _G.lua_mongo
  1401. LuaMongo.remove(DB.db_yjTreasure)
  1402. local YjTreasureDBLogic = require("yjTreasure.YjTreasureDB")
  1403. YjTreasureDBLogic.YJ_TREASURE_DB = {}
  1404. end
  1405. function d3.yjlayer(human,val)
  1406. local YjTreasureLogic = require("yjTreasure.YjTreasureLogic")
  1407. local YjTreasureDBLogic = require("yjTreasure.YjTreasureDB")
  1408. local YjTreasureExcel = require("excel.yjTreasure")
  1409. local Lang = require("common.Lang")
  1410. local layerData = YjTreasureDBLogic.getLayerDataByUuid(human.db._id)
  1411. local layCnf = YjTreasureExcel.layer
  1412. local nowLayer = layerData.layer
  1413. if val > #layCnf then return Broadcast.sendErr(human,Lang.YJTREASURE_LAYER_ERR) end
  1414. local roleData = YjTreasureDBLogic.getRoleDataByUuid(human.db._id)
  1415. local layerMax = roleData.layerMax or 0
  1416. if layerMax < val then
  1417. roleData.layerMax = val
  1418. YjTreasureDBLogic.updateRoleDataByUuid(roleData,human.db._id)
  1419. end
  1420. YjTreasureDBLogic.creatLayerDataByUuid(human.db._id,val)
  1421. YjTreasureLogic.CG_YJTREASURE_QUERY(human)
  1422. end
  1423. function d3.towerKing(human)
  1424. local HuanJingTowerLogic = require("huanjingTower.HuanjingTowerLogic")
  1425. HuanJingTowerLogic.unlockTowerKing(human)
  1426. end
  1427. -- 设置炼狱最大通关层
  1428. function d3.lianyu(human, value)
  1429. value = tonumber(value)
  1430. if not value then return end
  1431. if value < 0 then return end
  1432. local LianyuExcel = require("excel.lianyu")
  1433. if value > 0 and not LianyuExcel.gamelevel[value] then
  1434. return
  1435. end
  1436. LianyuLogic = require("lianyu.LianyuLogic")
  1437. LianyuLogic.setMaxLv(human, value)
  1438. end
  1439. function d3.cllianyu(human)
  1440. human.db.lianyu = nil
  1441. end
  1442. function d3.cllianyuhelp()
  1443. local CommonDB = require("common.CommonDB")
  1444. CommonDB.updateValue(CommonDB.KEY_LIANYU, nil)
  1445. end
  1446. -- 清除特权商店相关信息
  1447. function cltequanshop(human)
  1448. human.db.tequanShop = nil
  1449. human.db.tequanMopup = nil
  1450. if human.db.bar then
  1451. human.db.bar.vip = nil
  1452. human.db.bar.surVip = nil
  1453. end
  1454. end
  1455. function d3.addbts(human)
  1456. local now = os.time()
  1457. require("battle.BattleLogic").initBattleOut(human, now)
  1458. human.db.battleOut.expTs1 = now - 7200
  1459. human.db.battleOut.itemTs1 = now - 7200
  1460. human.db.battleOut.expTs2 = now - 7200
  1461. human.db.battleOut.itemTs2 = now - 7200
  1462. end
  1463. function d3.addbsd(human)
  1464. human.db.mopupDoCnt = 0
  1465. human.db.mopupFreeCnt = 0
  1466. end
  1467. function d3.addYjYj(human,type)
  1468. local YjTreasureLogic = require("yjTreasure.YjTreasureLogic")
  1469. YjTreasureLogic.yjYaoJiAdd(human,10,type)
  1470. end
  1471. function d3.ajfc(human,val)
  1472. for i = 1,val do
  1473. human.db.jjcDailyFight = (human.db.jjcDailyFight or 0) + 1
  1474. require("jjc.JjcDB").updateTotalFight(human.db._id)
  1475. end
  1476. end
  1477. function d3.godWartest(human)
  1478. local JjcGodWarLogic = require("jjcGodWar.JjcGodWarLogic")
  1479. JjcGodWarLogic.jjcGodWarFinishGm(human)
  1480. end
  1481. function d3.closeMiddle(human)
  1482. MiddleConnect.stopConnectMiddle()
  1483. end
  1484. function d3.resetMiddle(human)
  1485. MiddleConnect.autoResetMiddle()
  1486. end
  1487. function d3.loginSign(human, value)
  1488. value = tonumber(value)
  1489. local LoginSignLogic = require("loginSign.LoginSignLogic")
  1490. LoginSignLogic.updateGM(human, value)
  1491. end
  1492. function d3.yuanjun(human, value)
  1493. human.db.combatBackup = 1
  1494. end
  1495. function d3.buyItem(human, value)
  1496. require("shop.ShopLogic").buy(human, 9, 405007, 1, 1)
  1497. end
  1498. function d3.test1(human)
  1499. require("absAct.MangHeLogic").draw(human, 1)
  1500. end
  1501. function d3.zbsj(human,val)
  1502. if human.db.zhanbu == nil then
  1503. return
  1504. end
  1505. human.db.zhanbu.money = val
  1506. end
  1507. function d3.tjm(human)
  1508. require("present.RelationGiftLogic").relationBind(human, "017772140001")
  1509. end
  1510. function d3.qcjz(human)
  1511. human.db.unionDonate = nil
  1512. end
  1513. function d3.unionCopyLv(human, val)
  1514. require("union.UnionEctypeLogic").toUnionBossLvGm(human, tonumber(val))
  1515. end
  1516. function d3.fff(human)
  1517. human.db.leaveUnionLimit = nil
  1518. end
  1519. function d3.hgw(args)
  1520. require("absAct.HeroGrowUp").actLoop()
  1521. end
  1522. function d3.hgwlv(human,val)
  1523. require("absAct.HeroGrowUp").addJifen(human,tonumber(val))
  1524. end
  1525. function d3.paoma(human, val)
  1526. require("chat.ChatPaoMaLogic").notice(val)
  1527. end
  1528. -- 设置合服时间
  1529. function d3.merge(human,value)
  1530. value = value and tonumber(value)
  1531. if value == nil then
  1532. local mergeSvrTime = CommonDB.getMergeServerTime()
  1533. if mergeSvrTime == 0 then
  1534. Broadcast.sendErr(human, "未设置合服时间")
  1535. else
  1536. local tb = os.date("%Y%m%d", mergeSvrTime)
  1537. Broadcast.sendErr(human, "当前合服时间为" .. tb)
  1538. end
  1539. else
  1540. local now = os.time()
  1541. local temp = Util.getDayStartTime(now)
  1542. temp = temp - (value - 1) * 24 * 3600
  1543. CommonDB.setMergeTime(temp)
  1544. local tb = os.date("%Y%m%d", temp)
  1545. Broadcast.sendErr(human, "设置当前合服时间为" .. tb)
  1546. --同步中心服开服时间
  1547. --[[local msgRet = InnerMsg.lw.LW_OS
  1548. msgRet.uuid = human.db._id
  1549. msgRet.value = temp
  1550. InnerMsg.sendMsg(0, msgRet)]]
  1551. end
  1552. end
  1553. -- 设置战斗界面挂机时间
  1554. function d3.guaji(human,value)
  1555. value = value and tonumber(value)
  1556. local gmFuc = require("battle.BattleLogic").gmSetHangTime
  1557. gmFuc(human, value)
  1558. end
  1559. function d3.resetweek(human)
  1560. WeekendLoopActManger.GMResetWeekAct(human)
  1561. end
  1562. function d3.savedb(human)
  1563. ObjHuman.GM_SaveDB(human)
  1564. end
  1565. ------种族试炼------------
  1566. ---开启某个种族的试炼,value为种族
  1567. function d3.zzkq(human, value)
  1568. local RacialTrialLogic = require("racialTrial.RacialTrialLogic")
  1569. RacialTrialLogic.GmOpenTrial(human, value)
  1570. end
  1571. --某个种族关卡的跳关
  1572. function d3.zztg(human, value)
  1573. local pos = string.find(value, " ", 1, true)
  1574. if pos == nil then return end
  1575. local camp = tonumber(string.sub(value, 1, pos - 1))
  1576. local levelCnt = tonumber(string.sub(value,pos+1,#value))
  1577. local RacialTrialLogic = require("racialTrial.RacialTrialLogic")
  1578. RacialTrialLogic.GmSetlevel(human, camp, levelCnt)
  1579. end
  1580. --z增加某个种族关卡的每日奖励次数
  1581. function d3.zzjl(human, value)
  1582. local pos = string.find(value, " ", 1, true)
  1583. if pos == nil then return end
  1584. local camp = tonumber(string.sub(value, 1, pos - 1))
  1585. local levelCnt = tonumber(string.sub(value,pos+1,#value))
  1586. local RacialTrialLogic = require("racialTrial.RacialTrialLogic")
  1587. RacialTrialLogic.GmAddDailyAwardCnt(human, camp, levelCnt)
  1588. end
  1589. ------------秘宝---------------------
  1590. --设置某个秘宝的等级
  1591. function d3.mblv(human, value)
  1592. local pos = string.find(value, " ", 1, true)
  1593. if pos == nil then return end
  1594. local id = tonumber(string.sub(value, 1, pos - 1))
  1595. local level = tonumber(string.sub(value,pos+1,#value))
  1596. local TalismanLogic = require("talisman.TalismanLogic")
  1597. TalismanLogic.GmSetlevel(human, id, level)
  1598. end
  1599. function d3.delZR(human)
  1600. RecommendLineup.RecommendLineup_GMClear()
  1601. end