Blame view

robot/robot_config.lua 1009 Bytes
4dc77717   zhouhaihai   压测
1
2
3
4
5
6
7
8
9
10
11
12
  local skynet = require "skynet"
  local string_format = string.format 
  local math_floor = math.floor
  
  
  function log( msg )
  	print(string_format("[%s]: %s", os.date("%m%d %H:%M:%S", math_floor(skynet.time())), msg))
  end
  
  
  
  return {
7e6aa5d9   zhouhaihai   redis 信息
13
  	http = "http://192.168.0.199:9090", -- 登录服
4dc77717   zhouhaihai   压测
14
15
16
17
18
19
20
  	host = "127.0.0.1", --服务器地址
  	port = 12001,  	-- 服务器端口
  
  
  	online = 100,	-- 稳定状态在线人数
  	inpre = 10,		-- 稳定前每秒进入人数  -- 必须小于online数
  	max = 200, 	-- 最大玩家数 必须大于 online 数
d9c023b8   zhouhaihai   压测
21
  	online_time = {10 * 60, 20 * 60}, -- 在线时间控制 秒
4dc77717   zhouhaihai   压测
22
  
a5fa0074   zhouhaihai   robot
23
  	uname_prefix = "robothehe", --机器名称前缀
4dc77717   zhouhaihai   压测
24
25
26
27
  
  
  	-- 机器上线后的行为
  	units = {
d9c023b8   zhouhaihai   压测
28
29
30
31
32
33
34
35
36
  		chat = {weight = 100}, -- 聊天
  		item = {weight = 100}, -- 物品操作
  		hero = {weight = 500}, -- 英雄
  		hang = {weight = 1000}, -- 挂机战斗
  		tower = {weight = 500}, -- 爬塔
  		car = {weight = 100}, -- 爬塔
  		pvp = {weight = 500}, -- pvp
  		email = {weight = 100}, -- 邮件
  		adv = {weight = 200}, -- 冒险
4dc77717   zhouhaihai   压测
37
38
  	}
  }