Commit 254173bb authored by Tommy Ang's avatar Tommy Ang 🤣

Merge branch 'develop' into 'master'

Develop

Closes #42, #50, #43, #52, #53, and #48

See merge request !3
parents 120cc5f3 64971f4f
......@@ -8,24 +8,16 @@ options:
MinTime: 300
MaxPlayers: 12
command /hi <text>:
trigger:
broadcast "%colored {pbroadcast::%arg 1%}%"
command /test23:
trigger:
broadcast "%{pbroadcast.maxplayers}%"
on script load:
clear {pbroadcast::*}
set {pbroadcast.number} to 1
if existence of "plugins/PotatoBroadcast/config.yml" is false:
if file "plugins/PotatoBroadcast/config.yml" doesn't exist:
log "[PotatoBroadcast] Config file doesn't exist, creating..."
create file "plugins/PotatoBroadcast/config.yml"
log "[PotatoBroadcast] Config file has been created"
add "Example 1" to yaml list "messages" from file "../../PotatoBroadcast/config.yml"
add "Example 2" to yaml list "messages" from file "../../PotatoBroadcast/config.yml"
set {pbroadcast::*} to yaml list "messages" from file "../../PotatoBroadcast/config.yml"
add "Example 1" to yaml list "messages" from file "plugins/PotatoBroadcast/config.yml"
add "Example 2" to yaml list "messages" from file "plugins/PotatoBroadcast/config.yml"
set {pbroadcast::*} to yaml list "messages" from file "plugins/PotatoBroadcast/config.yml"
set {pbroadcast.maxplayers} to {@MaxPlayers}
loop all players:
remove 1 from {pbroadcast.maxplayers}
......@@ -35,7 +27,7 @@ every 10 second:
set {pbroadcast.maxplayers} to ({@MaxPlayers} - size of all players)
set {pbroadcast.tobroadcast} to (({@MaxTime} - {@MinTime}) * ({pbroadcast.maxplayers} / {@MaxPlayers}) + 300)
if {pbroadcast.timer} is more than or equal to {pbroadcast.tobroadcast}:
broadcast "%colored {pbroadcast::%{pbroadcast.number}%}%"
broadcast colored {pbroadcast::%{pbroadcast.number}%}
clear {pbroadcast.timer}
add 1 to {pbroadcast.number}
if {pbroadcast.number} is more than size of {pbroadcast::*}:
......
......@@ -4,6 +4,9 @@
# Scripted by TomYaMee
#
import:
org.bukkit.entity.Player
variables:
{re.%player%.day} = 0
{re.%player%.hour} = 0
......@@ -1157,22 +1160,14 @@ on join:
else:
set {_ping} to "&e%{_ping}%"
set {_player} to size of all players
#set {_max} to max players #Umbaska
set {_max} to max players count
set tablist header of player to "&6You are now playing &lRammyCraft&r&6!%nl%&aOnline players: %{_player}%/%{_max}%"
player.setPlayerListHeader("&6You are now playing &lRammyCraft&r&6!%nl%&aOnline players: %{_player}%/%{_max}%")
if {re.%player%.current.hour} is more than 0:
set tablist footer of player to "Current Session: %{re.%player%.current.hour}% hour(s) | Ping : %{_ping}%"
player.setPlayerListFooter("Current Session: %{re.%player%.current.hour}% hour(s) | Ping : %{_ping}%")
else if {re.%player%.current.minute} is more than 0:
set tablist footer of player to "Current Session: %{re.%player%.current.minute}% minute(s) | Ping : %{_ping}%"
player.setPlayerListFooter("Current Session: %{re.%player%.current.minute}% minute(s) | Ping : %{_ping}%")
else if {re.%player%.current.second} is more than 0:
set tablist footer of player to "Current Session: %{re.%player%.current.second}% second(s) | Ping : %{_ping}%"
#on join:
# while player is online:
# set {_ping} to player's ping
# loop all players:
# set tab score of player to {_ping} for loop-player
# wait 3 seconds
player.setPlayerListFooter("Current Session: %{re.%player%.current.second}% second(s) | Ping : %{_ping}%")
on quit:
clear {re.%player%.current.hour}
......@@ -1181,26 +1176,20 @@ on quit:
clear {pwhisper.%player%}
on server ping:
set the motd to "&eRammyCraft RP &aAlpha &9v1132.0 &6EXTREME TESTING"
set the motd to "&eRammyCraft RP &9v1.14.2-0 &6https://www.rammycraft.pw"
#set the motd to "&eRammyCraft RP &aAlpha &9v1120.0 &6Feedback is welcomed!"
#set the motd to "&eServer undergoing host transfer maintenance"
on inventory click:
if inventory name of player's current inventory is "&5TPA":
if "%event.getView().getTitle()%" is "&5TPA":
cancel event
stop
#every 10 minute:
# execute console command "/plugman reload AdvancedBan"
command /update:
executable by: console
trigger:
broadcast "&6RammyCraft has been updated to v1122.0 ! Head over to our Facebook group to check for changelog."
broadcast "&6RammyCraft has been updated to v1.14.2-0 ! Head over to our Facebook group to check for changelog."
on join:
wait 1 seconds
set displayed skin of player to player's skin
message "&eServer has been updated to &bv1.12.2&e."
message "&eServer is in extreme testing mode there might be a chance of rolling back to pre 1.12.2 version, please do not progress too much"
message "&eServer has been updated to &bv1.14.2-0&e."
message "&eFor full update details, head over to https://web2.rammycraft.pw/updates/1.12.2.html"
This diff is collapsed.
......@@ -226,7 +226,8 @@ on join:
wait 0.5 second
add 1 to {auth.timeoutcheck.%player%}
#set action bar of player to "&eLogin TimeOut - &c%{auth.timeoutcheck.%player%}%/60"
show an action bar from "&eLogin TimeOut - &c%{auth.timeoutcheck.%player%}%/60" to player
# show an action bar from "&eLogin TimeOut - &c%{auth.timeoutcheck.%player%}%/60" to player
send action bar "&eLogin TimeOut - &c%{auth.timeoutcheck.%player%}%/60" to player
if {auth.timeoutcheck.%player%} is more than or equal to 60:
kick player due to "Timed out"
clear {auth.timeoutcheck.%player%}
......
......@@ -260,21 +260,21 @@ on sneak toggle:
message "{@Prefix} No longer selecting an NPC"
stop
every 5 seconds:
time in world "world" is between 6:00 and 7:00:
loop {rpg_npc::*}:
if {rpg_npc::%loop-index%::location} is set:
move citizen loop-index parsed as integer to {rpg_npc::%loop-index%::location} at speed 1.5
make citizen with id loop-index parsed as integer to wake
# every 50 seconds:
# time in world "world" is between 5:59 and 7:01:
# loop {rpg_npc::*}:
# if {rpg_npc::%loop-index%::location} is set:
# move citizen loop-index parsed as integer to {rpg_npc::%e-index%::location} at speed 1.5
# make citizen with id loop-index parsed as integer to wake
time in world "world" is between 18:00 and 19:00:
loop {rpg_npc::*}:
if {rpg_npc::%loop-index%::home} is set:
move citizen loop-index parsed as integer to {rpg_npc::%loop-index%::home} at speed 1.5
make citizen with id loop-index parsed as integer to sleep
# time in world "world" is between 17:59 and 19:01:
# loop {rpg_npc::*}:
# if {rpg_npc::%loop-index%::home} is set:
# move citizen loop-index parsed as integer to {rpg_npc::%loop-index%::home} at speed 1.5
# make citizen with id loop-index parsed as integer to sleep
on inventory click:
if inventory name of current inventory of player is "<yellow>NPC Shop":
if "%event.getView().getTitle()%" is "<yellow>NPC Shop":
cancel the event
stop
......
This diff is collapsed.
......@@ -56,11 +56,11 @@ on chat:
broadcast "[&6AFK&f] &c%player% &ereturned from being AFK. Let's welcome him back! :D"
set player's tab list name to "%player%"
every 1 second:
every 2 second:
loop all players:
if {pe.afk.%loop-player%} is set:
stop
add 1 to {pafk.%loop-player%}
add 2 to {pafk.%loop-player%}
if {pafk.%loop-player%} is more than or equal to 120:
set {pe.afk.%loop-player%} to "Auto AFK"
broadcast "[&6AFK&f] &c%loop-player% &eis now AFK. &f[&7%{pe.afk.%loop-player%}%&f]"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment