Jump to content

Mamut_CZ

Member
  • Posts

    12
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Mamut_CZ's Achievements

Newbie

Newbie (2/6)

0

Reputation

  1. command /ai [<text>]: trigger: if argument 1 is "spawn": set {ai.spawn} to location of player send "Spawn AI set" to player if argument 1 is "end": set {ai.end} to location of player send "End AI set" to player if argument 1 is "start": set {ai.learning} to true set block at {ai.spawn} to green wool set {ai.coordinates.checked} to {ai.spawn} delete {ai.path::*} add {ai.spawn} to {ai.path::*} set {ai.steps} to 0 brain({ai.spawn}) if argument 1 is "stop": set {ai.learning} to false function check(): if {ai.learning} is true: set {_t1} to distance between {ai.end} and {ai.coordinates.unchecked} set {_t2} to distance between {ai.end} and {ai.coordinates.checked} if block at {ai.coordinates.unchecked} is air: if {_t1} is smaller than 0.99: broadcast "Generations %{ai.steps}%" broadcast "&a&lDONE &fAi learned new path." set {ai.learning} to false stop if {_t1} is smaller than {_t2}: add 1 to {ai.steps} set {ai.coordinates.checked} to {ai.coordinates.unchecked} add {ai.coordinates.checked} to {ai.path::*} goto() broadcast "Generations %{ai.steps}%" broadcast "Generation Succes Evolved. Loc %{ai.coordinates.checked}% Distance %{_t1}%" else: goto() else: goto() function goto(): if {ai.learning} is true: loop {ai.path::*}: set block at loop-value to green wool wait 5 ticks set block at loop-value to air set {_v} to ({ai.steps} * 0.5 + 1) wait 5 seconds brain({ai.coordinates.checked}) function brain(l: location): if {ai.learning} is true: set {_r} to random integer between 0 and 1 set {ai.coordinates.unchecked} to {_l} set {_d} to {ai.coordinates.unchecked} if {_r} is 0: set {_r} to random integer between 0 and 1 if {_r} is 0: #set block at {_d} to air add 1 to x-coordinates of {ai.coordinates.unchecked} #set block at {ai.coordinates.unchecked} to green wool check() if {_r} is 1: #set block at {_d} to air remove 1 from x-coordinates of {ai.coordinates.unchecked} #set block at {ai.coordinates.unchecked} to green wool check() if {_r} is 1: set {_r} to random integer between 0 and 1 if {_r} is 0: #set block at {_d} to air add 1 to z-coordinates of {ai.coordinates.unchecked} #set block at {ai.coordinates.unchecked} to green wool check() if {_r} is 1: #set block at {_d} to air remove 1 from z-coordinates of {ai.coordinates.unchecked} #set block at {ai.coordinates.unchecked} to green wool check() Hi because today i have lot of free time. I decided to try to create an AI that would learn how to go from point A to point B. And I did it. Although I know it could be written better but it's just a test. If someone wants to use this skript and edit it, they can. This skript is for all.
  2. Mamut_CZ

    Bossbar

    Dude, thanks so much. It worked!
  3. Mamut_CZ

    Bossbar

    I tried it too. And nothing worked
  4. Mamut_CZ

    Bossbar

    Hello readers, i need help with making a boss bar. I tried so many of addons (skRayFall, Skellet, SkLib…), but no-one worked. Server version is 1.14.4 Please, Mamut
  5. There you can help others with their problems, if you know a lot about our server!
  6. This chat is not connected with our server, so you can talk about something you want.
  7. WELCOME, let's talk with each other!
  8. Hello everyone, if someone of you have any idea to make something better or update on the server, write it down! - Staff
  9. Updates will be posted here.
×
×
  • Create New...