1. 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!

  2. LOOKING FOR A VERSION OF SKRIPT?

    You can always check out our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Solved Please help me!!

Discussion in 'Skript' started by LoneDragon38, Dec 20, 2020.

Thread Status:
Not open for further replies.
  1. LoneDragon38

    LoneDragon38 New Member

    Joined:
    Oct 10, 2020
    Messages:
    5
    Likes Received:
    0
    Hello, can you guys please fix this simple skript. I cannot cancel potion event. Please help mee

    on throw of a potion:
    send "No using potion" to player
    cancel event

    Thank x10000

     
  2. Best Answer:
    Post #4 by Tistay, Dec 20, 2020
  3. MusicManSK

    MusicManSK Active Member

    Joined:
    Nov 30, 2017
    Messages:
    232
    Likes Received:
    11
    Throwing potions are projectiles just like arrows or snowballs, so you can use `on shoot` event:
    Code (Text):
    1. on shoot:
    2.     if projectile is potion:
    3.         send "No using potion" to shooter
    4.         cancel event
     
  4. LoneDragon38

    LoneDragon38 New Member

    Joined:
    Oct 10, 2020
    Messages:
    5
    Likes Received:
    0
    Not working, even though no errors but it's not working :/
     
  5. Tistay

    Tistay New Member

    Joined:
    Nov 15, 2020
    Messages:
    7
    Likes Received:
    0
    I believe you have to use:
    Code (Text):
    1. if projectile is thrown potion:
     
  6. MusicManSK

    MusicManSK Active Member

    Joined:
    Nov 30, 2017
    Messages:
    232
    Likes Received:
    11
    Code (Text):
    1. on shoot:
    2.     "%projectile%" is "thrown potion":
    3.         send "No using potion" to shooter
    4.         cancel event
    This is odd. That's why you should code in Java rather than this.
     
  7. LoneDragon38

    LoneDragon38 New Member

    Joined:
    Oct 10, 2020
    Messages:
    5
    Likes Received:
    0
    --- Double Post Merged, Dec 22, 2020, Original Post Date: Dec 22, 2020 ---
    Thanks it works perfectly!
     
  8. MusicManSK

    MusicManSK Active Member

    Joined:
    Nov 30, 2017
    Messages:
    232
    Likes Received:
    11
    This is not supposed to be working:
    Code (Text):
    1. on shoot:
    2.     if projectile is thrown potion:
    3.         send "test" to shooter
    4.         cancel event
     
Thread Status:
Not open for further replies.

Share This Page

Loading...