Jump to content

AttePatte

Member
  • Posts

    22
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by AttePatte

  1. on load: loop all players: loop all zombies in world of loop-player: add loop-zombie to {_zombies::*} add loop-player to {_players::*} every 5 seconds: loop {_players::*}: set {_player} to loop-player loop {_zombies::*}: set {_zombie} to loop-zombie if {_zombies::*} is empty: continue if {_player} is not online: remove {_player} from {_players::*} remove {_zombie} from {_zombies::*} continue set {_path} to walkable path from location of {_zombie} to location of {_player} if {_path} is not set: continue set {_current} to first entry of {_path} remove loop-value-1 from {_path} while {_path} is not empty: teleport {_zombie} to {_current} set {_current} to first entry of {_path} remove loop-value-1 from {_path} wait 1 tick on quit: set {_exited} to event-player remove {_exited} from {_players::*} loop {_zombies::*}: if loop-zombie is in world of event-player: remove loop-zombie from {_zombies::*} on join: add event-player to {_players::*} loop all zombies in world of event-player: add loop-value to {_zombies::*} It's possible that the Skript syntax or plugin version is different from what I'm familiar with.
  2. AttePatte

    add-ons/plugins

    Help. Can't use skript anymore my life's work is gone Please, bring back the simpleness of just installing legacy add-ons that is the main reason I use minehut, learning to use skript/code as well as being able to invite random players to test my creations :') Only your imagination is the limit! Edit: Grammar
  3. I don't know how. I uploaded a skript.jar and a skbee.jar but there are no skript plugins when I'm in the server :,( Edit. Im gonna cry
  4. Hi. I haven't been doing much with plugins for a while. To my shock the Skript add-on is "incompatible"! Why is this and what is the workaround to this? Thank you!
  5. AttePatte

    Uploading Maps

    Hello. I have been trying for an hour to get a map that I downloaded to my minehut server. I finally got it in the files but doesn't do anything.
  6. Thank you all for your awesome feedback! I learned quite a lot of new stuff! @TheCodingDuck_Sorry for "pinging" u I haven't figured out how to reply. Ur code was amazing and had 0 error messages on the first try!! I like the approach it gave me a lot to gaze at and I hope it leads me towards an even improved code. Unfortunately your code does lag slightly but doesn't become unplayable but that could be because I don't know how to lower the distance of which zombies pathfind from. Okay, now I think this subject can be closed or whatever! Ty all!
  7. Thank you for replying and for your time. The skript is very embarassing and it has a lot of nonsense which you will laugh at. I would be super thankful if you could tell me a better way to approach this lag problem so we could find a solution. I have been so far just lowering numbers, adding 'kill the loop-zombie' and 'if' statements all over the skript. It is VERY impractical and I know I have been looking at this the wrong way and REPEATING the same pattern that leads to this very laggy code. I sometimes think that it's ridiculous how I keep on working on this same zombie skript while the answer could be obvious. On the other hand I think that pathfinding is not working that well but why does it lag when there are more than 2-3 players? So I deeply apologise for the horrible mess I have created and spent my time on... maybe I just wanted to create something special and enjoyable, something fun! I think that end goal blinded me the goal of making a server which people enjoy hours upon hours a day. So i think that lead me to use the same laggy methods that ended me with this code. So again. That is why it is so horrible and that is WHY I want YOU to consider these mentioned things before you laugh at me, before you laugh at this. I have worked on other things such as scoreboards, abilities with cooldowns so I have not wasted all of my time on this. every 20 seconds in "world": #If i have it pathfinding zombies every second it will lag... obviosly and this is a poor method. The zombies aren't pathfinding all the time just set {p} to a random player out of all players loop zombies in radius 55 of {p}: #The radius has varied from 35 to 65 but I suspect that it affects performance if {p}'s world is not "nether" or "the_end": #This is so that it doesn't make zombies pathfind to somewhere that isn't the overworld if distance between {p} and loop-zombie is greater than 15: #pretty obvious, but it's so that it doesn't make zombies that are close pathfind for no reason if distance between {p} and loop-zombie is greater than 60: #This is so that zombies in caves or far away would 'despawn' chance of 25%: #i put this for... idk kill the loop-zombie if block below loop-zombie is stone or Deepslate or Tuff or Cobbled Deepslate: #so zombies underground wouldn't multiply to hundreds but instead courages the zombies to spawn and multiply aboveground chance of 25%: kill the loop-zombie if distance between {p} and loop-zombie is less than 60: #I think what affects performance is zombies having to pathfind from far away..? set path targets of loop-zombie to location of {p} #This, I think is SkBee method apply speed 3 without any particles to loop-zombie for 16 seconds chance of 25%: summon 2 zombies at location of loop-zombie #Multiply thingie wait 3 minutes #For example if zombies have been around one player for too long they will die thus allowing zombies to spawn near other players kill the loop-zombie #This whole code works with few players, desirably with 10 or less but as said it starts to lag at 3+ players
  8. I made a pretty resource heavy skript. I have been trying to make it more efficient for a year now. Not every day for a whole year, but sometimes I just come back to it and try to fix it. I am now settled to it's current state and am not willing to work on it anymore. It's pretty chill with 2-3 players but as soon as a 4th player joins the whole server starts struggling. I was wondering which server plan is enough for like 10 players with "mods". I hear some say that the 2gb upgrade is enough already, but should I get a plan with higher ram. The script is laggy because it makes zombies pathfind to a random player and stuff so yeah. Help is needed and appreciated!
  9. Very clearly explained, thank you.
  10. When you loop say.. a zombie yes, when you loop a zombie does the looped zombie get stored to the server memory? And if so, wouldn't it after a while start to lag the server. Ik, pretty dumb question but that's why I'm asking from smart people only.
  11. on spawn of a zombie: zombie is alive: while true: set path targets of event-zombie to location of a random player out of all players apply speed 1 without any particles to event-zombie for 5 seconds wait 5 seconds I tried to make it so every 5 seconds it sets the path targets of a zombie to the location of a random player, but there is no output for some reason..? I tried putting broadcast on there as well and it wouldn't broadcast anything. Any advice on what I did wrong?
  12. on death of a zombie: attacker is a player: add 1 to {kill counter::%uuid of attacker%::kills_total} on death of player: set {kill counter::%uuid of player%::kills_total} to 0 on join: while player is online: toggle player's scoreboard on set title of player's scoreboard to "&cFland&5SMP" set line 4 of player's scoreboard to " OnlinePlayers: &c%size of all players%" set line 3 of player's scoreboard to " " set line 2 of player's scoreboard to " &aZombie &cKills: %{kill counter::%uuid of player%::kills_total}%" set line 1 of player's scoreboard to " " wait 1 tick What I would like to add is few lines that show other people's kill count
  13. not all scripts are broken, but many of my important ones are and it's starting to piss me off! Either causes lag that hasn't been there before or doesn't work at all. I hate the fact that I have to struggle with learning a way to fix things when I got something finally to work. I'm sorry for ranting and If I wanna do proper stuff like this maybe im just unqualified
  14. so yeah, as the title says all of the scripts that I have made, no longer work. I took a long break from minehut and all this scripting and now I come back to find out that they don't work...? I have a decent amount of script knowledge and the scripts worked last time I used them. Some random errors like 'loop all players' is a thing..!? I might be forgetting something and might realize it tomorrow so I apologise for making such an angry post here so swiftly.
  15. I kind of fixed it!. THANK YOU for replying. I just made it so it loops a random player out of all players and then sets the path targets of the zombies to that player. It's not the same as the zombies going for all of the players at the same time, but it's something
  16. There isn't (almost) any lag while there is only 1 player online.. could this be because the zombies have to pathfind to multiple players and its confusing it somehow and causing lag? I have no clue why this is the case, but I do know that looping tends to cause lag. I would like for anyone to comment on my post! Thank you
  17. on spawn of a zombie: if "%Spawn Reason%" is "Natural": wait 1 second loop zombies in radius 5 of last spawned zombie: loop all players: set path targets of loop-zombie to location of loop-player apply speed 1 without any particles to loop-zombie for 10 seconds if block below last spawned zombie is stone or deepslate or gravel: chance of 25%: kill the last spawned zombie every 30 seconds in "world": loop all players: loop zombies in radius 75 of loop-player: set path targets of loop-zombie-1 to location of loop-player apply speed 2 without any particles to loop-zombie-1 for 10 seconds block below loop-zombie is stone or deepslate or gravel: chance of 25%: kill the loop-zombie Im trying to avoid looping often, because it lags the server quite a lot. If you didn't get it already I am trying to make it so zombies will start to pathfind towards the player as lag free as possible, but after hours and hours this is the only one that works. Now I am a beginner at skript stuff and I don't know many code languages. I have to loop the zombie every 30 seconds because they will only pathfind for like 3 seconds and I have to keep making them pathfind. Now If I looped the zombies every 3 seconds it would kill the server with lag in and with some players online in just 10 minutes or so. Any negative/positivie/negative feedback would be kinda nice. Thanks. Bye
  18. Okay that was a bad example it has mistakes and stuff but still ;-;
  19. Hello there! I have been struggling to make a lag free pathfind skript, but none of them work or are giving errors on console. For Example: ```every 10 seconds in "world": loop all players: loop all zombies: set {_player} to loop-player set {_loop-zombie} to loop-zombie make {_loop-zombie} pathfind to {_player} at speed 1.5```
  20. I've been trying to use pathfind on my scripts but cant make them really work.. Have I been trying days for nothing or am I just that bad at using pathfind? Thanks
×
×
  • Create New...