Solved Help with conditional events

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

Shawn11564

New Member
Feb 28, 2017
7
1
3
33
Skript Version: 2.1.1
Skript Author: Njolbrim
Minecraft Version: 1.11.2
---
Hello, I am in need of some assistance. I am trying to make a script that allows me to have gods in my server. I have a sacrifice pit in the world that I am working with. I want to have a script that can detect if a specific item is dropped into the pit, after that, if a specific sentence is said then it has a 50% chance of doing something. I mainly need help with the whole conditional part. I don't know how to make it so that it will execute something if someone says the sentence, regardless of if they made a sacrifice. Any help would be great. I did some searching and no one seems to have done this before so I have nothing to go off of. Thanks for the help!
[doublepost=1490611909,1490364149][/doublepost]Bump
 
THE location is THE center of THE pit

And THE distance how far away iT needs To be detected

code_language.skript:
On drop:
   Set {_temp} To location 0, 0, 0 in world "world"
   If distance between location of player And {_temp} is < 8:
      If event-item is a ghast tear:
         Set {active.%uuid of player%} To true
         Wait 3 seconds
         Kill event-item

On quit:
   Delete {active.%uuid of player%}

On chat:
   If {active.%uuid of player%} is set:
      Cancel event
      If "%message%" is "don't die":
         If chance of 50%:
            Delete {active.%uuid of player%}
            Message "boom god is alive"
            Stop
      Delete {active.%uuid of player%}
      Message "failed"
Skript Version: 2.1.1
Skript Author: Njolbrim
Minecraft Version: 1.11.2
---
Hello, I am in need of some assistance. I am trying to make a script that allows me to have gods in my server. I have a sacrifice pit in the world that I am working with. I want to have a script that can detect if a specific item is dropped into the pit, after that, if a specific sentence is said then it has a 50% chance of doing something. I mainly need help with the whole conditional part. I don't know how to make it so that it will execute something if someone says the sentence, regardless of if they made a sacrifice. Any help would be great. I did some searching and no one seems to have done this before so I have nothing to go off of. Thanks for the help!
[doublepost=1490611909,1490364149][/doublepost]Bump
[doublepost=1490628778][/doublepost]
code_language.skript:
On drop:
   Set {_temp} To location 0, 0, 0 in world "world"
   If distance between location of player And {_temp} is < 8:
      If event-item is a ghast tear:
         Set {active.%uuid of player%} To true
         Wait 3 seconds
         Kill event-item

On quit:
   Delete {active.%uuid of player%}

On chat:
   If {active.%uuid of player%} is set:
      Cancel event
      If "%message%" is "don't die":
         If chance of 50%:
            Delete {active.%uuid of player%}
            Message "boom god is alive"
            Stop
      Delete {active.%uuid of player%}
      Message "failed"
 
THE location is THE center of THE pit

And THE distance how far away iT needs To be detected

code_language.skript:
On drop:
   Set {_temp} To location 0, 0, 0 in world "world"
   If distance between location of player And {_temp} is < 8:
      If event-item is a ghast tear:
         Set {active.%uuid of player%} To true
         Wait 3 seconds
         Kill event-item

On quit:
   Delete {active.%uuid of player%}

On chat:
   If {active.%uuid of player%} is set:
      Cancel event
      If "%message%" is "don't die":
         If chance of 50%:
            Delete {active.%uuid of player%}
            Message "boom god is alive"
            Stop
      Delete {active.%uuid of player%}
      Message "failed"

[/QUOTE]
Thank you so much!
 
Status
Not open for further replies.