#LP/Skript conflict

1 messages · Page 1 of 1 (latest)

balmy plover
#

lol

olive bluff
pine blaze
#

can you paste in here

#

make sure add it in

olive bluff
#

there we go lmfao

olive bluff
pine blaze
#

instead of "permission set"

#

use "parent set"

olive bluff
#

so parent.set group.builder true?

pine blaze
#

the permission is for per player's permission

olive bluff
#

or just builder

pine blaze
#

like this i think

olive bluff
#

yeah probably

#

I'll try that, thanks!

pine blaze
olive bluff
#

is that what you mean?

olive bluff
#

ah gotcha

#

thanks :D

pine blaze
#

the group.default is unnecessary

olive bluff
#

oh yeah that was a test

pine blaze
#

player already in default group by default so you can remove the "on join:"

olive bluff
#

yep, true

#

I forgot to remove that

olive bluff
pine blaze
olive bluff
#

alrighty

pine blaze
#

idk why u dont use variables instead permission

#

but it still works but just a lil slower ig

olive bluff
olive bluff
#

small difference lmfao

pine blaze
#

you can just add group.default permission in the other groups

olive bluff
#

well I could or I could just replace parent set with parent add :>

pine blaze
#

idk bro

#

sometimes it does add 3 groups

olive bluff
#

huh

pine blaze
#

like by mistake

#

you add a player 3 groups

#

fighter

#

builder

#

default

#

and you have to check again to fix it

olive bluff
#

ill uh

#

fix it if that ever happens

pine blaze
#

good luck

olive bluff
#

thank you

pine blaze
olive bluff
# pine blaze yw

so this solved it for normal players, but I still get the msg that I'm already in the team for both of them

#

I checked my permissions and groups trough the lp editor

#

I have group.builder, group.default, group.owner, a meta lp editor key and my parent groups are builder, default and owner

olive bluff
#

trough discord again or trough pastebin

pine blaze
#

discord

olive bluff
#
    cooldown-time: 1 hour
    
on join:
    wait 1 tick
    if player doesn't have permission "group.fighter":
        if player doesn't have permission "group.builder":
            execute console command "lp user %player% parent add fighter"
            send "&aHey! You have been given the Fighter role automatically, do /builder to switch to no pvp."
 
 
 
 
command /fighter:
    trigger:
        if player doesn't have permission "group.fighter":
            if player has permission "skript.roles_cooldown":
                execute console command "lp user %player% parent remove builder"
                execute console command "lp user %player% parent add fighter"
                send "&aYou are now part of the Fighter team!"
 
            else if {teamCooldown::%player%} is set:
                set {_timeLeft} to difference between now and {teamCooldown::%player%}
                if {_timeLeft} < {@cooldown-time}:
                    set {_remaining} to difference between {@cooldown-time} and {_timeLeft}
                    send "&cYou cannot switch teams yet! Wait &e%{_remaining}%&c."
                    stop
 
                execute console command "lp user %player% parent remove builder"
                execute console command "lp user %player% parent add fighter"
                send "&aYou are now part of the Fighter team!"
                set {teamCooldown::%player%} to now
 
        else:
            send "&cYou are already part of the Fighter team!"```
#
    trigger:        
        if player doesn't have permission "group.builder":
            if player has permission "skript.roles_cooldown":
                execute console command "lp user %player% parent remove fighter"
                execute console command "lp user %player% parent add builder"
                send "&aYou are now part of the Builder team!"
 
            else if {teamCooldown::%player%} is set:
                set {_timeLeft} to difference between now and {teamCooldown::%player%}
                if {_timeLeft} < {@cooldown-time}:
                    set {_remaining} to difference between {@cooldown-time} and {_timeLeft}
                    send "&cYou cannot switch teams yet! Wait &e%{_remaining}%&c."
                    stop
 
                execute console command "lp user %player% parent remove fighter"
                execute console command "lp user %player% parent add builder"
                send "&aYou are now part of the Builder team!"
                set {teamCooldown::%player%} to now
 
        else:
            send "&cYou are already part of the Builder team!"```
#
    if victim is a player:
        if victim has permission "group.builder":
            if attacker is a player:
                cancel event
                send "&cYou cannot PvP with Builders!" to attacker
            else if attacker is a primed tnt:
                cancel event
            else if attacker is an ender crystal:
                cancel event
            else if attacker is a projectile:
                if shooter is a player:
                    cancel event
                    send "&cYou cannot PvP with Builders!" to shooter
 
 
    if attacker is a player:
        if attacker has permission "group.builder":
            if victim is a player:
                cancel event
                send "&cYou can't PvP while being a Builder!" to attacker
            else:```
pine blaze
#

oh

#

make sure you are deoped and have no all permission

#

@olive bluff

olive bluff
#

Yeah when I deop myself and do it again

#

when I do /builder it says im already in that

#

and /fighter just gives no output

#

whatsoever

#

and console doesnt log any lp changes either

pine blaze
olive bluff
pine blaze
#

so your permission is "group.builder" and "group.default" ?

olive bluff
#

Yes

pine blaze
#

is your skript

#

the "else if" line

#

check again

olive bluff
#

wrong reply

pine blaze
# olive bluff wrong reply
    cooldown-time: 1 hour
    
on join:
    wait 1 tick
    if player doesn't have permission "group.fighter":
        if player doesn't have permission "group.builder":
            execute console command "lp user %player% parent add fighter"
            send "&aHey! You have been given the Fighter role automatically, do /builder to switch to no pvp."

command /fighter:
    trigger:
        if player doesn't have permission "group.fighter":
            if player has permission "skript.roles_cooldown":
                execute console command "lp user %player% parent remove builder"
                execute console command "lp user %player% parent add fighter"
                send "&aYou are now part of the Fighter team!"
 
            else if {teamCooldown::%player%} is set:
                set {_timeLeft} to difference between now and {teamCooldown::%player%}
                if {_timeLeft} < {@cooldown-time}:
                    set {_remaining} to difference between {@cooldown-time} and {_timeLeft}
                    send "&cYou cannot switch teams yet! Wait &e%{_remaining}%&c."
            else:
                execute console command "lp user %player% parent remove builder"
                execute console command "lp user %player% parent add fighter"
                send "&aYou are now part of the Fighter team!"
                set {teamCooldown::%player%} to now
 
        else:
            send "&cYou are already part of the Fighter team!"``` 
it should be like this i think
olive bluff
#

is what the error says

pine blaze
olive bluff
pine blaze
#

hm

olive bluff
#

line 53

#

wait a minute

#

line 53

#

thats the builder one

pine blaze
#

oh lol

olive bluff
#

aha

#

now it works

pine blaze
#

lol

olive bluff
#

now to test it

pine blaze
#

ok

olive bluff
#

EPIC

#

that works!

#

thanks a lot :DDD

#

but now uh

#

if I op myself

#

it doesnt work anymore

#

again

#

is there a way to fix that

olive bluff
pine blaze
olive bluff
#

I was opped there too

#

But there it DID work

#

I might have something

olive bluff
#

What I did is I searched online and apparently permission false overrides op

#

so I basically replaced all permission unset with permission set ... false

olive bluff
#

the part that's supossed to like say No pvping with builders! or so, doesnt work at all, and pvping just isnt possible

olive bluff
#

i tried to yeah

pine blaze
#

maybe other plugins

olive bluff
#

I think pvpmanager's messing with it

pine blaze
#

ok

olive bluff
#

it works on 1 player, but not the other

#

infact it works on everyone expect that 1 dude

#

he has the exact same permissions as someone else

pine blaze
olive bluff
pine blaze
#

sometimes luckperms kinda buggy

#

i recommended using variables instead

olive bluff
#

dont wanna

#

lmfao

pine blaze
olive bluff
olive bluff
#

I reloaded the skript and made them relog

pine blaze
olive bluff
pine blaze
olive bluff
#

and also

#

for some reason i doubt thatll fix it

pine blaze
#

maybe reset all permission in lp

#

delete all player's permissions

olive bluff
#

when I ask them to do /fighter it doesnt give an output for them

pine blaze
#

i know

#

you forgot to delete the cooldown after it ends

olive bluff
#

huh

#

where

pine blaze
#

nope nvm

olive bluff
#

uh

#

lmfao

pine blaze
#
    cooldown-time: 1 hour
    
on join:
    wait 1 tick
    if player doesn't have permission "group.fighter":
        if player doesn't have permission "group.builder":
            execute console command "lp user %player% parent add fighter"
            send "&aHey! You have been given the Fighter role automatically, do /builder to switch to no pvp."

command /fighter:
    trigger:
        if player doesn't have permission "group.fighter":
            if player has permission "skript.roles_cooldown":
                execute console command "lp user %player% parent remove builder"
                execute console command "lp user %player% parent add fighter"
                send "&aYou are now part of the Fighter team!"
            else if {teamCooldown::%player%} is set:
                set {_timeLeft} to difference between now and {teamCooldown::%player%}
                if {_timeLeft} < {@cooldown-time}:
                    set {_remaining} to difference between {@cooldown-time} and {_timeLeft}
                    send "&cYou cannot switch teams yet! Wait &e%{_remaining}%&c."
            else:
                execute console command "lp user %player% parent remove builder"
                execute console command "lp user %player% parent add fighter"
                send "&aYou are now part of the Fighter team!"
                set {teamCooldown::%player%} to now
                run task {@cooldown-time} later:
                    delete {teamCooldown::%player%}
        else:
            send "&cYou are already part of the Fighter team!"```
pine blaze
#

when the {teamCooldown::%player%} is set to now

#

after 1 hour it should delete

#

but you forgot to delete it so it stays

#

i added when the {teamCooldown::%player%} passed the cooldown time, it will delete after running the command

#

you should add on load: delete {teamCooldown::*}

olive bluff
#

wait a second

#

doesnt that bring back an older error

#

where we removed the stop part and replaced it with an else

olive bluff
#

you sure?

#

kk

pine blaze
#

ye

#

prob

olive bluff
#

nope

#

it brought it back

#

ah it for some reason uses parent again

#

wow its broken again

pine blaze
olive bluff
#

aha managed to fix it

pine blaze
#
    cooldown-time: 1 hour
    
on join:
    wait 1 tick
    if player doesn't have permission "group.fighter":
        if player doesn't have permission "group.builder":
            execute console command "lp user %player% parent add fighter"
            send "&aHey! You have been given the Fighter role automatically, do /builder to switch to no pvp."

command /fighter:
    trigger:
        if player doesn't have permission "group.fighter":
            if player has permission "skript.roles_cooldown":
                execute console command "lp user %player% parent remove builder"
                execute console command "lp user %player% parent add fighter"
                send "&aYou are now part of the Fighter team!"
            else if {teamCooldown::%player%} is set:
                set {_timeLeft} to difference between now and {teamCooldown::%player%}
                set {_remaining} to difference between {@cooldown-time} and {_timeLeft}
                send "&cYou cannot switch teams yet! Wait &e%{_remaining}%&c."
            else:
                execute console command "lp user %player% parent remove builder"
                execute console command "lp user %player% parent add fighter"
                send "&aYou are now part of the Fighter team!"
                set {teamCooldown::%player%} to now
                run task {@cooldown-time} later:
                    delete {teamCooldown::%player%}
        else:
            send "&cYou are already part of the Fighter team!"```
#

i made it shorter

#

idk if it works or not

#

the "run task ... later:" is like "wait ..." but doesnt delay the next line