0% found this document useful (0 votes)
35 views4 pages

Host Preme

script by zabao

Uploaded by

avqhva57
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
35 views4 pages

Host Preme

script by zabao

Uploaded by

avqhva57
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 4

//---------------------------------------------------------------------------------

------------------------------------------------------

roomName = "𝗳𝘂𝘁𝘅𝟯";
//RoomSetting
var
var roomPassword = null;
var maxPlayers = 20;
var roomPublic = true;
var allowPublicAdmin = true;

var room = HBInit({


roomName: roomName,
password: roomPassword,
maxPlayers: maxPlayers,
public: roomPublic,
noPlayer: true,
});

//---------------------------------------------------------------------------------
----------------------------------------------------
//GetMap
function getfutsalmap(){
var getfutsalll =
`{"name":"...","width":420,"height":200,"spawnDistance":180,"bg":
{"type":"hockey","width":368,"height":171,"kickOffRadius":50,"cornerRadius":0},"ver
texes":[{"x":-368,"y":171,"bCoef":1,"cMask":["ball"],"trait":"ballArea"},{"x":-
368,"y":50,"bCoef":1,"cMask":["ball"],"trait":"ballArea"},{"x":-368,"y":-
50,"bCoef":1,"cMask":["ball"],"trait":"ballArea"},{"x":-368,"y":-
171,"bCoef":1,"cMask":["ball"],"trait":"ballArea"},
{"x":368,"y":171,"bCoef":1,"cMask":["ball"],"trait":"ballArea"},
{"x":368,"y":50,"bCoef":1,"cMask":["ball"],"trait":"ballArea"},{"x":368,"y":-
50,"bCoef":1,"cMask":["ball"],"trait":"ballArea"},{"x":368,"y":-
171,"bCoef":1,"cMask":["ball"],"trait":"ballArea"},
{"x":0,"y":176,"trait":"kickOffBarrier"},{"x":0,"y":50,"trait":"kickOffBarrier"},
{"x":0,"y":-50,"trait":"line"},{"x":0,"y":-176,"trait":"kickOffBarrier"},{"x":-
384,"y":-50,"bCoef":0.1,"cMask":["all"],"trait":"goalNet"},{"x":384,"y":-
50,"bCoef":0.1,"cMask":["all"],"trait":"goalNet"},{"x":-
384,"y":50,"bCoef":0.1,"cMask":["all"],"trait":"goalNet"},
{"x":384,"y":50,"bCoef":0.1,"cMask":["all"],"trait":"goalNet"},{"x":-368,"y":-
127,"trait":"line"},{"x":368,"y":-127,"trait":"line"},{"x":-
368,"y":127,"trait":"line"},{"x":368,"y":127,"trait":"line"},{"x":-350,"y":-
171,"bCoef":0,"trait":"line"},{"x":-368,"y":-163,"bCoef":0,"trait":"line"},
{"x":350,"y":-171,"bCoef":0,"trait":"line"},{"x":368,"y":-
163,"bCoef":0,"trait":"line"},{"x":-350,"y":171,"bCoef":0,"trait":"line"},{"x":-
368,"y":163,"bCoef":0,"trait":"line"},{"x":350,"y":171,"bCoef":0,"trait":"line"},
{"x":368,"y":163,"bCoef":0,"trait":"line"},
{"x":368,"y":171,"bCoef":1,"trait":"ballArea"},{"x":368,"y":-
171,"bCoef":1,"trait":"ballArea"},{"x":0,"y":171,"bCoef":0,"trait":"line"},
{"x":0,"y":-171,"bCoef":0,"trait":"line"},{"x":0,"y":50,"trait":"kickOffBarrier"},
{"x":0,"y":-50,"trait":"kickOffBarrier"},{"x":377,"y":-50,"bCoef":1,"cMask":
["red"],"trait":"line"},{"x":377,"y":-171,"bCoef":1,"cMask":
["ball"],"trait":"ballArea"},{"x":-377,"y":-50,"bCoef":1,"cMask":
["blue"],"trait":"line"},{"x":-377,"y":-171,"bCoef":1,"cMask":
["ball"],"trait":"ballArea"},{"x":-377,"y":50,"bCoef":1,"cMask":
["blue"],"trait":"line"},{"x":-377,"y":171,"bCoef":1,"cMask":
["ball"],"trait":"ballArea"},{"x":377,"y":50,"bCoef":1,"cMask":
["red"],"trait":"line"},{"x":377,"y":171,"bCoef":1,"cMask":
["ball"],"trait":"ballArea"}],"segments":[{"v0":0,"v1":1,"trait":"ballArea"},
{"v0":2,"v1":3,"trait":"ballArea"},{"v0":4,"v1":5,"trait":"ballArea"},
{"v0":6,"v1":7,"trait":"ballArea"},{"v0":8,"v1":9,"trait":"kickOffBarrier"},
{"v0":9,"v1":10,"curve":180,"cGroup":["blueKO"],"trait":"kickOffBarrier"},
{"v0":9,"v1":10,"curve":-180,"cGroup":["redKO"],"trait":"kickOffBarrier"},
{"v0":10,"v1":11,"trait":"kickOffBarrier"},{"v0":2,"v1":12,"curve":-
35,"vis":true,"color":"FFFFFF","bCoef":0.1,"cMask":["all"],"trait":"goalNet"},
{"v0":6,"v1":13,"curve":35,"vis":true,"color":"FFFFFF","bCoef":0.1,"cMask":
["all"],"trait":"goalNet"},
{"v0":1,"v1":14,"curve":35,"vis":true,"color":"FFFFFF","bCoef":0.1,"cMask":
["all"],"trait":"goalNet"},{"v0":5,"v1":15,"curve":-
35,"vis":true,"color":"FFFFFF","bCoef":0.1,"cMask":["all"],"trait":"goalNet"},
{"v0":12,"v1":14,"curve":-35,"vis":true,"color":"FFFFFF","bCoef":0.1,"cMask":
["all"],"trait":"goalNet","x":-585},
{"v0":13,"v1":15,"curve":35,"vis":true,"color":"FFFFFF","bCoef":0.1,"cMask":
["all"],"trait":"goalNet","x":585},
{"v0":1,"v1":0,"vis":true,"color":"FFFFFF","bCoef":1,"cMask":
["ball"],"trait":"ballArea","x":-368},
{"v0":5,"v1":4,"vis":true,"color":"FFFFFF","bCoef":1,"cMask":
["ball"],"trait":"ballArea","x":368},
{"v0":2,"v1":3,"vis":true,"color":"FFFFFF","bCoef":1,"cMask":
["ball"],"trait":"ballArea","x":-368},
{"v0":6,"v1":7,"vis":true,"color":"FFFFFF","bCoef":1,"cMask":
["ball"],"trait":"ballArea","x":368},
{"v0":0,"v1":28,"vis":true,"color":"FFFFFF","bCoef":1,"trait":"ballArea","y":171},
{"v0":3,"v1":29,"vis":true,"color":"FFFFFF","bCoef":1,"trait":"ballArea","y":-171},
{"v0":30,"v1":31,"curve":0,"vis":true,"color":"FFFFFF","bCoef":0,"trait":"line"},
{"v0":10,"v1":9,"curve":-180,"vis":true,"color":"FFFFFF","bCoef":0,"trait":"line"},
{"v0":33,"v1":32,"curve":180,"vis":true,"color":"FFFFFF","bCoef":0,"trait":"line"},
{"v0":2,"v1":1,"curve":0,"vis":true,"color":"FFFFFF","bCoef":0,"trait":"line"},
{"v0":6,"v1":5,"curve":0,"vis":true,"color":"FFFFFF","bCoef":0,"trait":"line"},
{"v0":34,"v1":35,"vis":false,"color":"FFFFFF","bCoef":1,"cMask":
["ball"],"trait":"ballArea","x":330},
{"v0":36,"v1":37,"vis":false,"color":"FFFFFF","bCoef":1,"cMask":
["ball"],"trait":"ballArea","x":-330},
{"v0":38,"v1":39,"vis":false,"color":"FFFFFF","bCoef":1,"cMask":
["ball"],"trait":"ballArea","x":-330},
{"v0":40,"v1":41,"vis":false,"color":"FFFFFF","bCoef":1,"cMask":
["ball"],"trait":"ballArea","x":330},
{"v0":34,"v1":40,"curve":60,"vis":false,"color":"FFFFFF","bCoef":1,"cMask":
["red"],"trait":"line"},
{"v0":38,"v1":36,"curve":60,"vis":false,"color":"FFFFFF","bCoef":1,"cMask":
["blue"],"trait":"line"}],"goals":[{"p0":[-372,-52],"p1":[-372,48],"team":"red"},
{"p0":[372,50],"p1":[372,-50],"team":"blue"}],"discs":[{"radius":5,"pos":[-
368,50],"color":"FFFFFF","trait":"goalPost"},{"radius":5,"pos":[-368,-
50],"color":"FFFFFF","trait":"goalPost"},{"radius":5,"pos":
[368,50],"color":"FFFFFF","trait":"goalPost"},{"radius":5,"pos":[368,-
50],"color":"FFFFFF","trait":"goalPost"},{"radius":3,"invMass":0,"pos":
[383,51],"color":"FFFFFF","bCoef":0,"trait":"line"},{"radius":3,"invMass":0,"pos":
[-383,51],"color":"FFFFFF","bCoef":0,"trait":"line"},{"radius":3,"invMass":0,"pos":
[383,-51],"color":"FFFFFF","bCoef":0,"trait":"line"},{"radius":3,"invMass":0,"pos":
[-383,-51],"color":"FFFFFF","bCoef":0,"trait":"line"}],"planes":[{"normal":
[0,1],"dist":-171,"trait":"ballArea"},{"normal":[0,-1],"dist":-
171,"trait":"ballArea"},{"normal":[0,1],"dist":-200,"bCoef":0.2,"cMask":["all"]},
{"normal":[0,-1],"dist":-200,"bCoef":0.2,"cMask":["all"]},{"normal":[1,0],"dist":-
420,"bCoef":0.2,"cMask":["all"]},{"normal":[-1,0],"dist":-420,"bCoef":0.2,"cMask":
["all"]}],"traits":{"ballArea":{"vis":false,"bCoef":1,"cMask":["ball"]},"goalPost":
{"radius":8,"invMass":0,"bCoef":1},"goalNet":{"vis":true,"bCoef":0.1,"cMask":
["all"]},"kickOffBarrier":{"vis":false,"bCoef":0.1,"cGroup":
["redKO","blueKO"],"cMask":["red","blue"]},"line":{"vis":true,"bCoef":0,"cMask":
[""]},"arco":{"radius":2,"cMask":["n\/d"],"color":"cccccc"}},"playerPhysics":
{"acceleration":0.11,"kickingAcceleration":0.1,"kickStrength":6.5},"ballPhysics":
{"radius":6.4,"color":"EAFF00"}}`;
return getfutsalll;
}
room.setCustomStadium(getfutsalmap());
room.setScoreLimit(5);
room.setTimeLimit(0);
room.setTeamsLock(true);

𝒇𝒖𝒏𝒄𝒕𝒊𝒐𝒏-------------------------------------------------------------------------
//--------------------------------------------------------------

------
function announce(msg, targetId, color, style, sound) {
if (color == null) {
color = 0xFFFD82;
}
if (style == null) {
style = "bold";
}
if (sound == null) {
sound = 0;
}
room.sendAnnouncement(msg, targetId, color, style, sound);
console.log("Announce: " + msg);
}
function whisper(msg, targetId, color, style, sound) {
if (color == null) {
color = 0x66C7FF;
}
if (style == null) {
style = "normal";
}
if (sound == null) {
sound = 0;
}
room.sendAnnouncement(msg, targetId, color, style, sound);
if (room.getPlayer(targetId) != null) {
console.log("Whisper -> " + room.getPlayer(targetId).name + ": " + msg);
}
}
function isAdminPresent() {
var players = room.getPlayerList();
if (players.find((player) => player.admin) != null) {
return true;
}
else {
return false;
}
}

function displayAdminMessage() {
if (isAdminPresent() == false && allowPublicAdmin == true) {
announce("No admin present: Type !admin to take control");
}
}

𝙂𝙖𝙢𝙚Play-------------------------------------------------------------------------
//-------------------------------------------------------------------

-
room.onPlayerJoin = function(player) {
console.log(player.name + " joined the room");
whisper("\t\t𝖂𝖊𝖑𝖈𝖔𝖒𝖊 𝖙𝖔 𝖆𝖚𝖙𝖔𝖋𝖚𝖙𝖘𝖆𝖑 ⚽");
displayAdminMessage();
}

room.onPlayerLeave = function(player) {
displayAdminMessage();
console.log(player.name + " left the room");
}

room.onPlayerChat = function(player, message) {


console.log(player.name + ": " + message);
if (message.startsWith("!")) {
message = message.substr(1);
let args = message.split(" ");

if (args[0] == "admin" && args.length == 1 && allowPublicAdmin == true)


{
if (isAdminPresent() == false) {
room.setPlayerAdmin(player.id, true);
}
else {
whisper("Admin is already present or !admin command is not
allowed", player.id);
}
}

else if (args[0] == "bb") {


room.kickPlayer(player.id, "Bye", false);
}
}

}
room.onPlayerBallKick = function(player)
{

You might also like