123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148 |
- LSK_Test = {}
- LSK_Test.__index = LSK_Test
- local this = {}
- -- ------------------------------------------------------------- --
- -- 测试入口 @lua l_test_main
- function l_test_main(actor)
- jprint("-------- lua test main function --------")
- -- setplayersetting(actor, 1, 13)
- -- local fightModel = getbaseinfo(actor, "fightmodel")
- -- tipinfo(actor, "fightmodel: " .. fightModel)
- --local data = createitemsbymap({ [20310121] = 1 })
- --this.debug("createitem:", data)
- --
- --sendmailbycompleteitems(actor, actor:toString(), "测试邮件001", "这是邮件00001", data)
- -- sendmailbycompleteitems(actor, actor:toString(), "测试邮件001", "这是邮件00001")
- end
- -- ------------------------------------------------------------- --
- -- 测试入口 @lua l_test_main1
- function l_test_main1(actor)
- jprint("-------- lua test main1 function --------")
- KunDun.EnterKunDun(actor)
- end
- -- 测试入口 @lua l_test_main2
- function l_test_main2(actor)
- jprint("-------- lua test main2 function --------")
- KunDun.sendPanelData(actor)
- end
- -- 测试入口 @lua l_test_main3
- function l_test_main3(actor)
- jprint("-------- lua test main3 function --------")
- quitduplicate(actor)
- end
- -- 测试入口 @lua l_test_main4
- function l_test_main4(actor)
- jprint("-------- lua test main4 function --------")
- sendmailbyrid(actor:toString(), "这是标题", "这是正文", { [20310111] = 1 })
- end
- -- ------------------------------------------------------------- --
- -- 获取地图信息
- -- @lua l_test_map_info
- function l_test_map_info(actor)
- local mapId = getbaseinfo(actor, "mapid")
- local x = getbaseinfo(actor, "x")
- local y = getbaseinfo(actor, "y")
- jprint("当前地图ID:", mapId, x, y)
- end
- -- 校验是否可以进入跨服地图
- -- @lua l_test_chack_is_can_enter_cross_map 21000
- function l_test_chack_is_can_enter_cross_map(actor, map_id)
- local ret = CrossMap.canEnter(actor, map_id)
- this.jprint("检查是否可以进入跨服地图:", map_id, "result:", ret)
- end
- -- 初始化圣域BOSS缓存数据
- -- @lua l_test_sanctuary_boss_init_cache
- function l_test_sanctuary_boss_init_cache()
- SanctuaryBoss.initBossState()
- end
- -- 结算战盟更换盟主
- -- @lua l_test_finish_union_change_leader
- function l_test_finish_union_change_leader(actor)
- UnionChangeLeader.RunForLeader.finishRunforLeaderActor()
- end
- -- 战盟臂章最大等级缓存
- -- @lua l_test_union_armbands_init_cache
- function l_test_union_armbands_init_cache()
- UnionArmbands.serverStart()
- end
- -- 发起定点传送
- -- @lua l_test_transfer_within_map 210 180
- function l_test_transfer_within_map(actor, x, y)
- MapMoveTransfer.transferWithinMap(actor, { x, y })
- end
- -- 充值月卡礼包7001
- -- @lua l_test_month_gift_recharge_event 7001 1401
- function l_test_month_gift_recharge_event(actor, param, id)
- MonthGiftPack.rechargeEvent(actor, { ['parameter'] = param, ['id'] = id })
- end
- -- 领取月卡每日礼包
- -- @lua l_test_month_gift_req_recharge 1401
- function l_test_month_gift_req_recharge(actor, id)
- MonthGiftPack.reqRechargeAction(actor, _, "reward", { ["id"] = id })
- end
- -- 昆顿上架道具
- -- @lua l_test_kun_dun_auction_system_publish
- function l_test_kun_dun_auction_system_publish()
- KunDunAuction.Publish()
- end
- -- 昆顿执行一次定时器
- -- @lua l_test_kun_dun_auction_on_timer
- function l_test_kun_dun_auction_on_timer()
- KunDunAuction.ontimer()
- end
- -- 昆顿执行竞拍
- -- @lua l_test_kun_dun_auction_player_bid 19142921868113925
- function l_test_kun_dun_auction_player_bid(actor, goodsId)
- local msgData = {['goodsId'] = goodsId, ['type'] = 0}
- KunDunAuction.PlayerBidding(actor, msgData)
- end
- -- ------------------------------------------------------------- --
- this.log_open = true
- this.log_name = "[LskTest]"
- function this.debug(...)
- if not this.log_open then
- return
- end
- gameDebug.print(this.log_name, ...)
- end
- function this.jprint(...)
- if not this.log_open then
- return
- end
- if param == nil then
- param = "error! 输出内容为空. nil"
- end
- jprint(this.log_name, ...)
- end
- function this.info(actor, ...)
- info(actor, ...)
- this.jprint(...)
- end
|