Comments (5)
Hi,
Thank you for your report! When I was coding this plugin, it's true that i didn't made any async tasks in skScraft because the BungeeBridge API already have implemented it. During stress tests of effects and expressions, there were no problem with lag spikes or tps drop, if you can post your skript for me to try by my self to remake your issue, I will try to implement the async tasks in the future releases. If you can add too your /timings, it will help me to find the main problem.
Best regards,
Scraft
from skscraft.
Also if you can send me the information about the connection of BungeeBride between subserver and BungeeCord. The information can be found when BungeeBridge is loading, it looks like that:
from skscraft.
Connected! Server ---[109ms]---> Bungee ---[3ms]---> Server
and the command code
# Network Information
command /networkinfo [<text>]:
aliases: /netinfo
trigger:
send "{@prefix} {@color-1}Grabbing Information..." to player
set {_servers::*} to {@server-list}
set {_offline} to 0
set {_online} to 0
loop {_servers::*}:
if server loop-value is online:
add 1 to {_online}
set {_servers::%loop-value%::players} to number of players on server loop-value
set {_servers::%loop-value%::online} to true
else:
add 1 to {_offline}
set {_servers::%loop-value%::players} to 0
set {_servers::%loop-value%::online} to false
send "&8&m " to player
send "{@color-3}Network Information:" to player
send "&8• {@color-1}Total Players: {@color-2}%number of players on network%" to player
send "&8• {@color-1}Online Servers: &f%{_online}%" to player
send "&8• {@color-1}Offline Servers: &f%{_offline}%" to player
send "{@color-3}Servers:" to player
loop {_servers::*}:
{_servers::%loop-value%::online} is true
if {_servers::%loop-value%::players} is not 0:
send "&8- &a%loop-value% &8({@color-2}%{_servers::%loop-value%::players}%&8)" to player
else:
send "&8- &a%loop-value% &8({@color-1}%{_servers::%loop-value%::players}%&8)" to player
loop {_servers::*}:
{_servers::%loop-value%::online} is false
send "&8- &c%loop-value% {@color-1}&o(Offline)" to player
send "&8&m " to player
from skscraft.
Here is the timings report.
https://timings.aikar.co/?id=b6cbf8d9c8894fdb9da689ef0820e34b
This only happens when I have the checking for the servers online mode and player counts on!
Also another part of the code for updating player counts and online mode.
# Online Mode & Player Count Checking
every 3 seconds:
{@enable-server-updates} is true
set {{@storage}::netPlayers} to number of players on network
set {_servers::*} to {@server-list}
loop {_servers::*}:
if server loop-value is online:
if {{@storage}::servers::%loop-value%::online} is false:
{{@storage}::servers::%loop-value%::onlineCount} is 4
set {{@storage}::servers::%loop-value%::online} to true
{@enable-server-update-messages} is true
broadcast "{@color-3}The server {@color-2}%loop-value%{@color-3} is now &aonline{@color-2}."
add 1 to {{@storage}::servers::%loop-value%::onlineCount}
else:
if {{@storage}::servers::%loop-value%::online} is true:
{@enable-server-update-messages} is true
{{@storage}::servers::%loop-value%::onlineCount} is greater than 4
broadcast "{@color-3}The server {@color-2}%loop-value%{@color-3} is now &coffline{@color-2}."
set {{@storage}::servers::%loop-value%::online} to false
delete {{@storage}::servers::%loop-value%::onlineCount}
set {_online} to number of players on server loop-value
if {_online} is not set:
set {{@storage}::servers::%loop-value%::players} to 0
else:
set {{@storage}::servers::%loop-value%::players} to {_online}
wait 3 tick
from skscraft.
Okey, so for now, i found the main issue, which is the connection ping between BungeeCord and Server.
For now i will work on addon to make this events async, because the server wait until answer is set. If you need a quick fix, you can use MundoSK async system, which will help you a lot to make the addon work without problems. Example code with MundoSK for async:
async
set {_online} to number of players on bungeecord server "hub1"
sync
broadcast "Number of players: %{_online}%"
If you can't find the working version of MundoSk, i have added it to this post, I hope it will help you until the version 1.4 will be released.
MundoSK.zip
Thank you for patient,
Scraft
from skscraft.
Related Issues (8)
- Some Thoughts - relating to SkriptHub docs & this addon HOT 1
- Execute console commands. HOT 1
- Hexcolor-Support HOT 1
- Conflicts between a skScraft and Skript expression HOT 4
- Expression to get the Bungee server that the script is running on. HOT 1
- Get all connected servers. HOT 1
- Error occurred while enabling BungeeBridgeC v1.6.3 (Is it up to date?) HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from skscraft.