//请求所有数据,发包到服务器(开战和重连时) d.ini_StartWar=function (mode) {var show_menu=0; if(mode==2)//if是重连 {show_menu=2;} d.ini_start(show_menu); set_self(291,7,"房号:"+Desk.roomcode+"\n("+String(d.turn[1]+1)+"/"+Desk.count+"局)"); if(d.replay==0) {var send={"app":"youle","route":d.route,"rpc":"starta","data":{"agentid":GameData.AgentId,"gameid":GameData.GameId,"playerid":C_Player.playerid,"roomcode":Desk.roomcode,"seat":C_Player.seat,"send":mode}}; Net.ws_tcp.send(JSON.stringify(send)); } } d.baoting_send=function(ting) { var send = { "app": "youle", "route": d.route, "rpc": "baoting", "data": { "agentid": GameData.AgentId, "gameid": GameData.GameId, "playerid": C_Player.playerid, "roomcode": Desk.roomcode, "seat": C_Player.seat, "baoting": ting, } }; Net.ws_tcp.send(JSON.stringify(send)); set_self(2176, 37, 0, 0, 0); set_self(2177, 37, 0, 0, 0); set_self(2322,37,0); } d.robot_send=function(robot_chu) { var send = { "app": "youle", "route": d.route, "rpc": "baoting", "data": { "agentid": GameData.AgentId, "gameid": GameData.GameId, "playerid": C_Player.playerid, "roomcode": Desk.roomcode, "seat": C_Player.seat, "baoting": robot_chu, } }; Net.ws_tcp.send(JSON.stringify(send)); } d.offline_war = function (mode) { var send = { "app": "youle", "route": d.route, "rpc": "offline", "data": { "agentid": GameData.AgentId, "gameid": GameData.GameId, "playerid": C_Player.playerid, "roomcode": Desk.roomcode, "seat": C_Player.seat, "send": mode } }; Net.ws_tcp.send(JSON.stringify(send)); } d.Play_Card = function () { d.jishi_chu=0; var send = { "app": "youle", "route": d.route, "rpc": "sieves", "data": { "agentid": GameData.AgentId, "gameid": GameData.GameId, "playerid": C_Player.playerid, "roomcode": Desk.roomcode, "seat": C_Player.seat, "sieves": d.sieves[2], } }; Net.ws_tcp.send(JSON.stringify(send)); set_self(1363, 37, 0, 0, 0); } d.debug = function () { if (d.turn[1] + 1 == d.turn[2] && d.isEnd()) { return; } var send = { "app": "youle", "route": d.route, "rpc": "debug", "data": { "agentid": GameData.AgentId, "gameid": GameData.GameId, "playerid": C_Player.playerid, "roomcode": Desk.roomcode, "seat": C_Player.seat, "hand": d.hand[C_Player.seat] } }; Net.ws_tcp.send(JSON.stringify(send)); } d.offline_kick = function (offkick_seat) { if (Desk.PlayerList[offkick_seat].onstate == 1) { var send = { "app": "youle", "route": d.route, "rpc": "off_kick", "data": { "agentid": GameData.AgentId, "gameid": GameData.GameId, "playerid": C_Player.playerid, "roomcode": Desk.roomcode, "seat": C_Player.seat, "kick_seat": offkick_seat, } }; Net.ws_tcp.send(JSON.stringify(send)); Desk.PlayerList[offkick_seat].onstate = 0 ; } } d.unprepare_kick = function (unprepare_seat) { var send = { "app": "youle", "route": d.route, "rpc": "unprepare_kick", "data": { "agentid": GameData.AgentId, "gameid": GameData.GameId, "playerid": C_Player.playerid, "roomcode": Desk.roomcode, "seat": C_Player.seat, "unprepare_seat": unprepare_seat, } }; Net.ws_tcp.send(JSON.stringify(send)); } //重绘取消代打 d.time_over = function () { var send = { "app": "youle", "route": d.route, "rpc": "overtime", "data": { "agentid": GameData.AgentId, "gameid": GameData.GameId, "playerid": C_Player.playerid, "roomcode": Desk.roomcode, "seat": C_Player.seat, "daida": 0, } }; Net.ws_tcp.send(JSON.stringify(send)); } d.free_room=function(){ var send = { "app": "youle", "route": d.route, "rpc": "free_before_makewar", "data": { "agentid": GameData.AgentId, "gameid": GameData.GameId, "playerid": C_Player.playerid, "roomcode": Desk.roomcode, "seat": C_Player.seat, "go": 1, } }; Net.ws_tcp.send(JSON.stringify(send)); }