Replies: 7 comments 7 replies
-
You do not need browser extension to use, import or export plugins. I just fixed the bugs, import/export should work now. Extension is only a backup for the proxy server. Proxy server has limitations such as traffic and speed limits. Proxy server's IP address is fixed, so whoever uses it always uses the same IP address. This means that whenever you get banned from a room, the whole proxy server gets banned, meaning that nobody can join that room from the proxy server. Another limitation is for creating rooms. If you create many rooms using the same IP address, only 2 of your rooms will be shown in room list by basro's Haxball web server. Browser extension bypasses all those limits and uses your own computer to change headers instead of proxy server. The website has headless and GUI mode now, and it opens in GUI mode by default. GUI mode does not work exactly like headless mode. You should not work in console in GUI mode. If you want to work in console, you need the headless mode, so you have to follow this link: https://abc-haxball-proxy.up.railway.app/headless If you want to use browser extension, you need to manually install it on your browser first. There are some instructions on its README.MD file. Then you can use this link to have optimal performance and best experience: GUI: https://abc-haxball-proxy.up.railway.app/?no_proxy_server=true |
Beta Was this translation helpful? Give feedback.
-
By the way; you can use the plugins that you imported in GUI version, in headless version too. Example plugin file to import: (This is working.) function func({ OperationType, ConnectionState, Utils, Plugin, Room }){
Plugin.call(this, "test1", true, Plugin.AllowFlags.JoinRoom); // We allow this plugin to be activated on only JoinRoom.
this.onPlayerLeave = function(playerObj, reason, isBanned, byId, customData){
console.log("leave test", playerObj);
};
} |
Beta Was this translation helpful? Give feedback.
-
I create a plugin who receive the message and then will modify frameNo, ping and extrapolation. But when I type the message, nothing happens. function func({ OperationType, ConnectionState, Utils, Plugin, Room }){
Plugin.call(this, "modifyFrame", true, Plugin.AllowFlags.JoinRoom); // We allow this plugin to be activated on only JoinRoom.
this.onPlayerChat = function(id, message, customData){
//parse message into a array
var arr = message.trimEnd().split(" ");
if(arr[0] === ".frame"){
Room.modifyFrameNo = () => {
return 10;
};
Room.setExtrapolation = () => {
return 200;
};
Room.sendChat = () => {
return "Frame has been modified"
}
console.log("Frame test");
} else if (arr[0] === ".ping") {
Room.modifyClientPing = () => {
return arr[1];
}
}
}
this.onPlayerJoin = function(playerObj, reason, isBanned, byId, customData){
console.log("Join test", playerObj);
};
} |
Beta Was this translation helpful? Give feedback.
-
Try like this: function func({ OperationType, ConnectionState, Utils, Plugin, Room }){
Plugin.call(this, "modifyFrame", true, Plugin.AllowFlags.JoinRoom); // We allow this plugin to be activated on only JoinRoom.
var room = null, ping = null;
this.initialize = function(_room){ // You need the current room object, so you store it inside a variable.
room = _room;
};
this.modifyClientPing = function(originalPing){ // use modifyClientPing like this instead.
if (ping==null)
return originalPing;
else
return ping;
};
this.onPlayerChat = function(id, message, customData){
//parse message into a array
var arr = message.trimEnd().split(" ");
if(arr[0] === ".frame"){
room.modifyFrameNo(10); // here you use the current room object that you stored before.
room.setExtrapolation(200);
room.sendChat("Frame has been modified");
console.log("Frame test");
} else if (arr[0] === ".ping") {
ping = parseInt(arr[1]); // modifyClientPing is a modifier callback, you cannot use it like a function here.
}
}
this.onPlayerJoin = function(playerObj, reason, isBanned, byId, customData){
console.log("Join test", playerObj);
};
} |
Beta Was this translation helpful? Give feedback.
-
modifyFrameNo is a temporary function call. The game engine fixes it back very quickly. If you want it to be persistent, you need to do it inside an interval callback. Something like this: setInterval(function(){
room.modifyFrameNo(10);
}, 50); But the room host will probably auto-kick you with "bad actor" message. If that happens, you will have to change the interval time(50) to a higher value. |
Beta Was this translation helpful? Give feedback.
-
I understand now, the room object need to be first valuated in initialize before the use. Thanks. |
Beta Was this translation helpful? Give feedback.
-
I changed modifyFrameNo into a modifier callback and used it in opMode.js file in examples folder of this repo. You can check it out for an example usage now. I can assure you that it is working correctly. |
Beta Was this translation helpful? Give feedback.
-
I can't export or import plugins in your website.
And I don't know how to use exactly the extension, cause I do all the steps but when I put the script in console this don't work.
Beta Was this translation helpful? Give feedback.
All reactions