• Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

Jerooski

Member
Apr 19, 2020
16
0
0
25
Im having trouble with a KOTH, so as long as a player is in the control point, it will keep adding points until it reaches 500, I have no trouble when players are no longer capping the point, but when they go back into the point it adds all the points that the player would have gained if he was in the point but they get added only if he joins the capture point again.

Code:
on walk on white wool or lime wool or orange wool:
    if {koth} is true:
        if distance between player and {KOTH::Location} is less than 4:
            if {capping::*} contains player:
                stop
            else:
                add player to {capping::*}
                if {limeteam::*} contains player:
                    while {limescore} is not 500:
                        if {capping::*} contains player:
                            set line 6 of all players' scoreboards to "&e%{limescore}%"
                            if {limescore} is less than or equal to 100:
                                broadcast "&d&lKOTH &7» &a&lLIME TEAM &7is at 100!"
                            if {limescore} is between 101 and 200:
                                broadcast "&d&lKOTH &7» &a&lLIME TEAM &7is at 200!"
                            if {limescore} is between 201 and 300:
                                broadcast "&d&lKOTH &7» &a&lLIME TEAM &7is at 300!"
                            if {limescore} is between 301 and 400:
                                broadcast "&d&lKOTH &7» &a&lLIME TEAM &7is about to win!"
                        wait 3 seconds
                        add 100 to {limescore}
                    pop burst colored lime fading to green at {KOTH::Location}
                    send title "&a&lGAME OVER" with subtitle "&a&lLime Wins!" to all players for 3 seconds

on walk on grass:
    if {koth} is true:
        {capping::*} contains player
        message "&eYou are no longer capturing!" to player
        remove player from {capping::*}
 
You can either add this to the while loop
Code:
if distance between player and {KOTH::Location} is less than 4:
or do this:
Code:
        if distance between player and {KOTH::Location} is less than 4:
            if {capping::*} contains player:
                stop
        else:
            remove player from {capping::*}
 
Status
Not open for further replies.