Jump to content

Combat tag skripted


jonbar101
 Share

Recommended Posts

Hello minehut community,

Has anyone or could anyone make a small script so when you get combat tagged in pvp you can't  jump back into spawn. For example the skript will make a glass wall to stop you from getting in. Thank you for your time.

Link to comment
Share on other sites

I'm pretty sure you can do this with the plugin combat log.

 

Active Minehut Player since 2016

Advanced at Skript - Know a lot about running a server 

If you need help with anything contact me @ KJPAKA#0001

 

Link to comment
Share on other sites

Interesting, there should be some type of combat log plugin. At least last time I check there was.

 

Active Minehut Player since 2016

Advanced at Skript - Know a lot about running a server 

If you need help with anything contact me @ KJPAKA#0001

 

Link to comment
Share on other sites

on damage:
	if attacker is a player:
		set {combat::%attacker's uuid%} to now
		set {combat::%victim's uuid%} to now

on any command:
	if player is not op:
		if {combat::%player's uuid%} is set:
        	set {_time} to difference between {combat::%player's uuid%} and now
            if {_time} < 5 seconds:
        		send "&cYour currenly in combat, please wait" to player
        		cancel event

Should work fine not the most efficient but it works.

Edited by KJPAKA

 

Active Minehut Player since 2016

Advanced at Skript - Know a lot about running a server 

If you need help with anything contact me @ KJPAKA#0001

 

Link to comment
Share on other sites

  • 1 month later...
Quote

I'm pretty sure you can do this with the plugin combat log.

More people would use Skript for multiple things than install different plugins for features. Especially with the 12 plugin limit.

  • Like 1

Graphic Designer - Skript Developer - Professional Builder - Content Creator

Been on Minehut since January 2018. Throughout my time here I've mastered the skills you see above. I make free logos, banners, and server art for users on Minehut. I'm a proficient Skript developer. I'm also really good at building, you can see my portfolio by clicking here. Feel free to say hi if you see me somewhere 🙂

Amethyst Studios Discord

Link to comment
Share on other sites

The spawn area should be exit only unless you use /spawn. Here's my combat tag skript, Action Combat Tag Plus.

# Action Combat Tag Plus [ACT+], by EnderEyeGames/root@kali

on damage of a player:
  attacker is a player
  {actplus.immune.%victim's uuid%} is not 1:
    {actplus.time.%victim's uuid%} is not set:
      send "&6[&c&lACT&e+&6]&c You are now in combat. Do not log out." to victim
    set {actplus.time.%victim's uuid%} to 12
    set {actplus.combatant.%victim's uuid%} to "%attacker%"
  {actplus.immune.%attacker's uuid%} is not 1:
    {actplus.time.%attacker's uuid%} is not set:
      send "&6[&c&lACT&e+&6]&c You are now in combat. Do not log out." to attacker
    set {actplus.time.%attacker's uuid%} to 12
    set {actplus.combatant.%attacker's uuid%} to "%victim%"
every 2 ticks:
  loop all players where [{actplus.time.%player input's uuid%} exists]:
    {actplus.time.%loop-player's uuid%} is less than 0.1:
      send action bar "&aYou are no longer in combat." to loop-player
      send "&6[&c&lACT&e+&6]&a You are no longer in combat." to loop-player
      delete {actplus.time.%loop-player's uuid%}
      delete {actplus.combatant.%loop-player's uuid%}
    {actplus.time.%loop-player's uuid%} is greater than 0:
      loop-player is not sprinting:
        send action bar "&cYou are in combat for %{actplus.time.%loop-player's uuid%}% seconds (%{actplus.combatant.%loop-player's uuid%}%)" to loop-player
        subtract 0.1 from {actplus.time.%loop-player's uuid%}
      loop-player is sprinting:
        send action bar "&cCombat time frozen while sprinting (%{actplus.combatant.%loop-player's uuid%}%)" to loop-player
on command:
  {actplus.time.%player's uuid%} is set
  player does not have the permission "actplus.immune":
    send "&6[&c&lACT&e+&6]&c You cannot execute commands in combat." to player
    cancel event
    stop
  command is not "actimmune":
    send "&6[&c&lACT&e+&6]&c You cannot usually execute commands in combat." to player
    send "&6[&c&lACT&e+&6]&a You have the ability to escape combat with /actimmune." to player
    cancel event
on quit:
  {actplus.time.%player's uuid%} exists
  kill player
  broadcast "&6[&c&lACT&e+&6]&c&l %player%&c logged out while fighting &l%{actplus.combatant.%player's uuid%}%"
on death of a player:
  wait 1 tick
  {actplus.time.%victim's uuid%} exists
  set {actplus.time.%victim's uuid%} to 0
on join:
  {actplus.immune.%player's uuid%} exists:
    send "&6[&c&lACT&e+&6]&a You're currently immune to combat tag. Disable with /actimmune" to player
command /actimmune:
  permission: actplus.immune
  permission message: &6[&c&lACT&e+&6]&c Permission required: actplus.immune
  trigger:
    {actplus.immune.%player's uuid%} exists:
      delete {actplus.immune.%player's uuid%}
      send "&6[&c&lACT&e+&6]&a You are no longer immune to combat tag." to player
      stop
    {actplus.immune.%player's uuid%} is not set:
      set {actplus.immune.%player's uuid%} to 1
      send "&6[&c&lACT&e+&6]&a You are now immune to combat tag." to player
      delete {actplus.time.%player's uuid%}
      delete {actplus.combatant.%player's uuid%}

# End of Action Combat Tag Plus

 

  • Thanks 1
Link to comment
Share on other sites

  • 1 year later...
On 3/9/2022 at 1:48 AM, Disvand said:

bro smh lock for necropost someone

necroposting doesn't apply on specific categories. Skript Releases being one of them.

Minecraft Ranks
[DEFAULT] - 9th October 2020
[PRO] - 21st November 2020
[PATRON] - 27th October 2021

Proficiency
Python - 6 Years
C/C++ - 4 Years
Skript - 3 Years
Javascript - 1 Year
Java - 3 Months

Links
Website - https://kegnh.com/
Discord - kegnh#1234

 
Link to comment
Share on other sites

  • 2 weeks later...
On 7/21/2020 at 5:21 PM, EnderEyeGames said:

The spawn area should be exit only unless you use /spawn. Here's my combat tag skript, Action Combat Tag Plus.

# Action Combat Tag Plus [ACT+], by EnderEyeGames/root@kali

on damage of a player:
  attacker is a player
  {actplus.immune.%victim's uuid%} is not 1:
    {actplus.time.%victim's uuid%} is not set:
      send "&6[&c&lACT&e+&6]&c You are now in combat. Do not log out." to victim
    set {actplus.time.%victim's uuid%} to 12
    set {actplus.combatant.%victim's uuid%} to "%attacker%"
  {actplus.immune.%attacker's uuid%} is not 1:
    {actplus.time.%attacker's uuid%} is not set:
      send "&6[&c&lACT&e+&6]&c You are now in combat. Do not log out." to attacker
    set {actplus.time.%attacker's uuid%} to 12
    set {actplus.combatant.%attacker's uuid%} to "%victim%"
every 2 ticks:
  loop all players where [{actplus.time.%player input's uuid%} exists]:
    {actplus.time.%loop-player's uuid%} is less than 0.1:
      send action bar "&aYou are no longer in combat." to loop-player
      send "&6[&c&lACT&e+&6]&a You are no longer in combat." to loop-player
      delete {actplus.time.%loop-player's uuid%}
      delete {actplus.combatant.%loop-player's uuid%}
    {actplus.time.%loop-player's uuid%} is greater than 0:
      loop-player is not sprinting:
        send action bar "&cYou are in combat for %{actplus.time.%loop-player's uuid%}% seconds (%{actplus.combatant.%loop-player's uuid%}%)" to loop-player
        subtract 0.1 from {actplus.time.%loop-player's uuid%}
      loop-player is sprinting:
        send action bar "&cCombat time frozen while sprinting (%{actplus.combatant.%loop-player's uuid%}%)" to loop-player
on command:
  {actplus.time.%player's uuid%} is set
  player does not have the permission "actplus.immune":
    send "&6[&c&lACT&e+&6]&c You cannot execute commands in combat." to player
    cancel event
    stop
  command is not "actimmune":
    send "&6[&c&lACT&e+&6]&c You cannot usually execute commands in combat." to player
    send "&6[&c&lACT&e+&6]&a You have the ability to escape combat with /actimmune." to player
    cancel event
on quit:
  {actplus.time.%player's uuid%} exists
  kill player
  broadcast "&6[&c&lACT&e+&6]&c&l %player%&c logged out while fighting &l%{actplus.combatant.%player's uuid%}%"
on death of a player:
  wait 1 tick
  {actplus.time.%victim's uuid%} exists
  set {actplus.time.%victim's uuid%} to 0
on join:
  {actplus.immune.%player's uuid%} exists:
    send "&6[&c&lACT&e+&6]&a You're currently immune to combat tag. Disable with /actimmune" to player
command /actimmune:
  permission: actplus.immune
  permission message: &6[&c&lACT&e+&6]&c Permission required: actplus.immune
  trigger:
    {actplus.immune.%player's uuid%} exists:
      delete {actplus.immune.%player's uuid%}
      send "&6[&c&lACT&e+&6]&a You are no longer immune to combat tag." to player
      stop
    {actplus.immune.%player's uuid%} is not set:
      set {actplus.immune.%player's uuid%} to 1
      send "&6[&c&lACT&e+&6]&a You are now immune to combat tag." to player
      delete {actplus.time.%player's uuid%}
      delete {actplus.combatant.%player's uuid%}

# End of Action Combat Tag Plus

So /spawn wont work?

 

 

Link to comment
Share on other sites

  • 2 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share



×
×
  • Create New...