Jump to content

Need help to make this skript faster to load


Marconium

Recommended Posts

Hey guys! I ran into an issue while using script. I am currently using skript with the script-holo addon for making holograms and from what ive tested, a simple script like this one of about 35 lines takes up to 5 whole seconds loading (sometimes more). My problem is that I have many scripts of that type and the time adds up to 5-6 mins to load all. the problem is that my server wont let me in until all scripts aernt done loading but after 5 mins, the server shuts down (no players online for 5 min). so im basically stuck. I need help making it load faster.

on left click on iron ore:
    if block 4 meters under event-block is gold block:
        if player's tool is a iron pickaxe named "&2Iron Tool" with lore "&cIncreases your damage on &4Iron &cby 50%%":
            remove {dmg.%player%}/2 from {iron1}
on left click on iron ore:
    if block 4 meters under event-block is gold block:
        if player is holding iron pickaxe named "&2Superior Iron Tool" with lore "&cIncreases your damage on &4Iron &cby 100%%":
            remove {dmg.%player%} from {iron1}
on left click on iron ore:
    if block 4 meters under event-block is gold block:
        if player is holding iron pickaxe named "&2Highly Superior Iron Tool" with lore "&cIncreases your damage on &4Iron &cby 200%%":
            remove {dmg.%player%}*2 from {iron1}
on left click on iron ore:
    cancel event
    if block 3 meters under event-block is gold block:
        remove {dmg.%player%} from {iron1}
        delete holo {ironh1}
        create a new hologram with lines "&4Iron Ore" and "%{iron1}%/%{iron2.2}%" at location -1113.5, 83, -528 in world "Ul_Generation" and store it in the variable {ironh1}
        if {iron1} is smaller or equal to 0:
            give 1 iron ingot named "&bIron" to player
            set {iron} to cobblestone
            loop 15 times:
                loop all blocks in radius 4 of event-block:
                    if loop-block is iron ore:
                        set loop-block to {iron}
            wait 10 second
            set {iron} to iron ore
            loop 15 times:
                loop all blocks in radius 4 of event-block:
                    if loop-block is cobblestone:
                        set loop-block to {iron}
            delete holo {ironh1}
            set {iron1} to 2500
            create a new hologram with lines "&4Iron Ore" and "%{iron1}%/%{iron1.1}%" at location -1113.5, 83, -528 in world "Ul_Generation" and store it in the variable {ironh1}
 

Link to comment
Share on other sites

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
×
×
  • Create New...