Gm.lua 52 KB

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