Gm.lua 53 KB

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