Jump to content

Fletchermed

Member
  • Posts

    12
  • Joined

  • Last visited

Posts posted by Fletchermed

  1. on spawn of pig:
    	set {_health} to health of last spawned pig
    	set the name of the last spawned entity to "Pig - %{_health} * 2%/10"
    
    on damage of pig:
    	set {_health} to health of victim
    	set the name of victim to "Pig - %{_health} * 2%/10"

    here you go

  2. variables:
    	{RandomX} = 0
    	{RandomZ} = 0
    	{RandomY} = 0
    	
    every 120 seconds:
    	loop 10 times:
    		set {RandomX} to random integer between 10 and 10
    		set {RandomZ} to random integer between 10 and 10
    		set {RandomY} to random integer between 10 and 10
    		execute console command "/setblock %{RandomX}% %{RandomY}% %{RandomZ}% glow_stone"

    havnt tested this yet but it should work

  3. how are you spawning the entity?

    if you are spawning the entity via skript, then this is what you should do

    command /pig:
    	trigger:
    		spawn 1 pig at the player
    		set {_health} to health of last spawned pig
    		set the name of the last spawned entity to "Pig - %{_health} * 2%/10"
    
    on damage of pig:
    	set {_health} to health of victim
    	set the name of victim to "Pig - %{_health} * 2%/10"

    the reason you are multiplying the health variable is because the pig max hp is 5, so if you double the variable it doesnt change the hp of the pig but changes the name to 10/10, if that makes sense.

    otherwise, you could just do 5/5 instead of 10/10

     

    hope this helps

  4. I am having trouble getting shields to work with mythicmobs. when they player is attacked while blocking, they don't lose durability, or break. so i added code to remove custom durability when the player takes damage but it doesn't break, can someone please help me?

    here is the code that i have been trying to get to work
    on damage of player:
        if the victim is blocking:
            if the victim's tool is a shield:
                add 1 to the durability of the victim's tool
                if the victim's tool's durability < 1:
                    set the victim's tool to air
                    execute console command "/execute at %victim% run playsound minecraft:item.shield.break master %victim% ~ ~ ~ 1 1"
            else if the victim's offhand tool is a shield:
                add 1 to the durability of the victim's offhand tool
                if the victim's offhand tool's durability < 1:
                    set the victim's offhand tool to air
                    execute console command "/execute at %victim% run playsound minecraft:item.shield.break master %victim% ~ ~ ~ 1 1"

    for some odd reason, the durability goes into the negatives and doesn't break when below 1 durability. there is no errors when i reload the skript either.

  5. EVERONE... IT WORKS!!! I took a little look at the log, and figured out that the problem was that I had a GUI addon and that was what was messing it all up. So I got rid of it and It works, now I just need to make a texture pack for the glass panes to hearts and I'm good! Thank you everyone for your help!

    Minecraft 1.16.5 4_21_2021 4_52_21 PM (2).png

  6. 23 hours ago, AgentGamerPro said:

    I have fixed the skript and here is the link:
    https://pastebin.com/hjP4NKcq

    After receiving your code, I encountered 6 errors, however, I have actually managed to fix all the errors, believe it or not. The only problem is, I can't seem to run it, Skript tells me: "An internal error has occurred while attempting to perform this command." when I try and run it. So if someone can try the command: /livesplus or /lp and see what happens. that would be awesome. If the same thing happens, then there is probably something wrong with the code still. Almost forgot the pastebin link lol: https://pastebin.com/jRmPDfGG 

     

    Oh and if you manage to find the problem, whether it is in the code or not, can you please tell me, thanks!

    Minecraft 1.16.5 4_20_2021 5_29_26 PM (2).png

  7. 1 minute ago, FletcherMed said:

    Now I have 14 errors, so if you can maybe fix the problem for me... that might honestly be better lol here's the updated the code I have: https://pastebin.com/y1efE0Wg. If you wouldn't mind I think I would honestly prefer someone else to fix this since I have no idea what is going on and then I can have feedback and learn off of that along with more tutorials, lol.

    Screenshot (3).png

    Also I forgot to change the colons from the format lines back to the if statements

  8. 17 hours ago, AgentGamerPro said:

    Oh boy, here we go.

    * You can replace "if player hasn't played before:" with "on first join:"

    * remove the "livesplus" from formatting the gui

    * with if statements you'll need a ":" at the end of them

    Now I have 14 errors, so if you can maybe fix the problem for me... that might honestly be better lol here's the updated the code I have: https://pastebin.com/y1efE0Wg. If you wouldn't mind I think I would honestly prefer someone else to fix this since I have no idea what is going on and then I can have feedback and learn off of that along with more tutorials, lol.

    Screenshot (3).png

  9. Once I am able to get on, I will take and send a screenshot of the errors if still needed. But for now while I am on mobile, I will add the TuSKe addon to skript and try to reload in the console.

  10. Currently I am unable to get into my pc so I cannot take a screenshot, when I am able to get on again, I will post a screenshot of the errors, first I need to know what you mean the by the errors though. Do I need to take a picture ingame or a picture of the code on the minehut website? Also, I have no addons to the skript plugin.

  11. My friend and just started a new minehut server where we only have 3 lives, I am just learning skript so I wanted to test how much I knew... clearly not much, but I want to know why there are 11 errors and how I can fix them. the code is in pastebin: https://pastebin.com/VQFsQiyA

     

    The thing that is messed up is the command /livesplus at the bottom, I don't really understand how the GUI system works but I would like some help! Thanks!

×
×
  • Create New...