51 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
			
		
		
	
	
			51 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
| getroottable().DebugModelFlag <- false;
 | |
| //初始化插件
 | |
| function InitPluginInfo() {
 | |
|     //初始化定时器
 | |
|     _Timer_Object <- Timer();
 | |
|     //初始化自动重载
 | |
|     GameManager.OpenHotFix("/dp_s/Dps_A");
 | |
| 
 | |
|     local PoolObj = MysqlPool.GetInstance();
 | |
|     PoolObj.SetBaseConfiguration("127.0.0.1", 3306, "game", "uu5!^%jg");
 | |
|     //连接池大小
 | |
|     PoolObj.PoolSize = 10;
 | |
|     //初始化
 | |
|     PoolObj.Init();
 | |
| 
 | |
|     //从池子拿连接
 | |
|     local SqlObj = MysqlPool.GetInstance().GetConnect();
 | |
| 
 | |
|     //建库
 | |
|     SqlObj.Select("create database if not exists frida default charset utf8;", []);
 | |
| 
 | |
|     SqlObj.Select("CREATE TABLE `frida`.`setCharacSlotLimit` (`account_id` INT NOT NULL,`slot` INT NOT NULL DEFAULT 2,PRIMARY KEY (`account_id`)) ENGINE=InnoDB DEFAULT CHARSET=utf8;", []);
 | |
| 
 | |
|     //把连接还池子
 | |
|     MysqlPool.GetInstance().PutConnect(SqlObj);
 | |
| 
 | |
|     // Sq_CreatCConnectPool(2, 4, "127.0.0.1", 3306, "game", "uu5!^%jg");
 | |
|     Sq_CreatSocketConnect("192.168.200.24", "65109");
 | |
| }
 | |
| 
 | |
| 
 | |
| 
 | |
| function PrintTag() {
 | |
|     print(InitSuccessTag);
 | |
| }
 | |
| 
 | |
| function main() {
 | |
| 
 | |
|     InitPluginInfo();
 | |
| 
 | |
|     PrintTag();
 | |
| 
 | |
|     GameManager.SetGameMaxLevel(95);
 | |
| 
 | |
| }
 | |
| 
 | |
| 
 | |
| // getroottable().CombatRankServerProject <- CombatRank();
 | |
| // getroottable().ServerControlProject <- ServerControl();
 | |
| // getroottable().AntonServerProject <- Anton();
 | |
| // getroottable().FiendwarServerProject <- Fiendwar(); |