Jump to content

UntitledGoose

Member
  • Posts

    465
  • Joined

  • Last visited

  • Days Won

    4

Posts posted by UntitledGoose

  1. 8 hours ago, Mainkai1846456 said:

    They could also create their own fork of it like they did with skript, blocking files being created outside of the skript plugin folder and only being .yml files.

    that's still editing files though, and people would definitely find work arounds

  2. On 12/2/2019 at 11:41 PM, ThatOneTqnk said:

    Looking at the source, the 'where' filter loops anyway, it just is not evident to the Skripter. https://github.com/SkriptLang/Skript/blob/ec1e8d88bcd28f65c5a7613f63c0812332072256/src/main/java/ch/njol/skript/expressions/ExprFilter.java#L89-L109

     

    So there shouldn't be a difference in performance actually. You have to iterate, a server cannot do multiple operations at once.

    this is true but it does decrease parsing time (ever so slightly, that doesn't really matter) and it's more organized, organized as in fewer lines

  3. Works fine for me.

    command backpack <text=small> <player=%player%>:
    	permission: admin.bp
    	permission message: &cInsufficient permissions!
    	usage: &c/backpack <small/medium/large> [player]
    	trigger:
    		if arg-1 isn't "small", "medium" or "large":
    			send "&c/backpack <small/medium/large> [player]"
    			stop
    		give arg-2 1st element of (chest named "&fSmall Backpack", chest named "&fMedium Backpack" and chest named "&fLarge Backpack" where [name of input in lowercase contains arg-1]) with lore "%(size of {backpack::%player's uuid%::*} ? 0) + 1%" and player's uuid
    		send "&aGave you a %arg-1 in lowercase% &abackpack!"
    
    on place of chest:
    	cancel event if player's tool's name ends with " Backpack"
    
    on right click holding chest:
    	stop if player's tool's name doesn't end with " Backpack"
    	stop if line 2 of player's tool's lore isn't player's uuid
    	cancel event
    	set metadata value "bp" of player to line 1 of player's tool's lore
    	set {_size} to (1 if player's tool's name starts with "&fSmall ", else 3) if player's tool's name doesn't start with "&fLarge "
    	set {_} to chest inventory with ({_size} ? 6) rows named player's tool's name
    	loop {backpack::%player's uuid%::%line 1 of player's tool's lore%::*}:
    		set slot loop-index parsed as int of {_} to loop-value
    	open {_} to player
    
    on inventory close:
    	stop if metadata value "bp" of player isn't set
    	set {_} to metadata value "bp" of player
    	set {backpack::%player's uuid%::%{_}%::*} to all items in event-inventory
    	delete metadata value "bp" of player

     

  4. 16 hours ago, ReportCards said:

    Thank you ❤️ This shouldn't be too hard to fix as I've explained in a past reply as well, another solution could to always send a special header with the requests and block any requests that contain that header

     

    most admin endpoints require the token and session id of an admin account so this is pretty much already in action

    • Like 1
  5. 2 hours ago, jeep2729 said:

    Ez

     

    every 1 minute:    
        set {SMP.%player%} to a random integer between 1 and 30
        if {SMP.%player%} is 1:
            give a gold sword of sharpness 5 named "&e&lLucky Sword" to the player
            stop
        if {SMP.%player%} is 2:
            give a bow of power 5 named "&e&lLucky Bow" to the player
            stop
        if {SMP.%player%} is 3:
            spawn 10 sheep at the event-block 
            stop
        if {SMP.%player%} is 4:
            create an explosion of force 4 at the player
            stop
        if {SMP.%player%} is 5:
            poison the player for 30 seconds
            stop
        if {SMP.%player%} is 6:
            push the player upwards at speed 5
            stop
        if {SMP.%player%} is 7:
            ignite the player for 10 seconds
            stop
        if {SMP.%player%} is 8:
            strike lightning at the player
            stop
        if {SMP.%player%} is 9:
            set block above the player to anvil
            stop
        if {SMP.%player%} is 10:
            give a gold chestplate of protection 3 named "&l&eLucky chestplate" to the player
            stop
        if {SMP.%player%} is 11:
            spawn 5 zombies at the event-block
            stop
        if {SMP.%player%} is 12:
            spawn 5 creepers at the event-block
            stop
        if {SMP.%player%} is 13:
            spawn 2 tnt at the event-block
            stop
        if {SMP.%player%} is 14:
            spawn 5 squid
            stop
        if {SMP.%player%} is 15:
            give 15 stone to the player
            stop
        if {SMP.%player%} is 16:
            give 4 carrot to the player
            stop
        if {SMP.%player%} is 17:
            give 2 ender pearl to the player
            stop
        if {SMP.%player%} is 18:
            give a iron leggings to the player
            stop
        if {SMP.%player%} is 19:
            give stone sword of knockback 1 to the player
            stop
        if {SMP.%player%} is 20:
            give iron helmet of protection 1 to the player
            stop
        if {SMP.%player%} is 21:
            give diamond chestplate to the player
            stop
        if {SMP.%player%} is 22:
            give iron boots to the player
            stop
        if {SMP.%player%} is 23:
            spawn giant at the event-block
            stop
        if {SMP.%player%} is 24:
            give a gold sword of sharpness 5 named "&e&lLucky Sword" to the player
            stop
        if {SMP.%player%} is 25:
            give 10 snowball named "&l&2Shuriken" to the player
            stop
        if {SMP.%player%} is 26:
            give a gold hoe named "&4POOP" to the player
            stop
        if {SMP.%player%} is 27:
            give a netherite chestplate of protection 5 and unbreaking 5 named "&e&lOP" to the player
            stop 
        if {SMP.%player%} is 28:
            give a dirt  to the player
            stop 
        if {SMP.%player%} is 29:
            give a stone button to the player
            stop
        if {SMP.%player%} is 30:
            spawn 20 skeleton at event-block
            stop
        

    Inefficient and there isn't a player in periodical events

  6. 2 minutes ago, TheGoose said:

    yes but I have never had success using timespans, and it's a bit of a pain to convert "5w" to "5 weeks", plus timespans only goes up to weeks, you can't do something like "1 month", or "2 years"

    basically, I find unix timestamps a whole lot easier

    I wouldn't like to have to take "3 months" and convert to "12 weeks" to be honest, haha

×
×
  • Create New...