need help with on rightclick event

  • 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.

Tom1222322

Member
Feb 5, 2021
19
0
1
22
Hello, I don't quite understand one thing about this event:/ Well you see I made my sign sell system with it and it worked fine for 2 items but when I tried to add 3 items it doesn't work anymore and the code is still completely the same idk why:/ Its works only one time when its placed but then it stops. Anyway here's my code:
Code:
#WORKING
on rightclick:
    if block is sign:
        if line 1 is "sell":
            set line 1 to "&e&lParduoti"
        if line 2 is "cobblestone":
            set line 2 to "cobblestone"
            set line 3 to "16"
            set line 4 to "2€"
            if player's tool is air:
                if player has 16 cobblestone:
                    remove 16 cobblestone from player's inventory
                    send "&8[&bPrison&8] &aPardavei 16 cobblestone!"
                    add 2 to player's balance
                else:
                    send "&cTu neturi cobblestone pardavimui!"
            else:
                send "&cTavo ranka turi būti tuščia, kad galėtum parduoti!"
on rightclick:
    if block is sign:
        if line 1 is "sell":
            set line 1 to "&e&lParduoti"
        if line 2 is "stone":
            set line 2 to "stone"
            set line 3 to "16"
            set line 4 to "5€"
            if player's tool is air:
                if player has 16 stone:
                    remove 16 stone from player's inventory
                    send "&8[&bPrison&8] &aPardavei 16 cobblestone!"
                    add 5 to player's balance
                else:
                    send "&cTu neturi stone pardavimui!"
            else:
                send "&cTavo ranka turi būti tuščia, kad galėtum parduoti!"
#WORKING
#NOT WORKING
on rightclick:
    if block is sign:
        if line 1 is "sell":
            set line 1 to "&e&lParduoti"
        if line 2 is "birchlog":
            set line 2 to "birch log"
            set line 3 to "16"
            set line 4 to "2€"
            if player's tool is air:
                if player has 16 birch log:
                    remove 16 birch log from player's inventory
                    send "&8[&bPrison&8] &aPardavei 16 birch log!"
                    add 2 to player's balance
                else:
                    send "&cTu neturi birch log pardavimui!"
            else:
                send "&cTavo ranka turi būti tuščia, kad galėtum parduoti!"
#NOT WORKING
 
Hello, I don't quite understand one thing about this event:/ Well you see I made my sign sell system with it and it worked fine for 2 items but when I tried to add 3 items it doesn't work anymore and the code is still completely the same idk why:/ Its works only one time when its placed but then it stops. Anyway here's my code:
Code:
#WORKING
on rightclick:
    if block is sign:
        if line 1 is "sell":
            set line 1 to "&e&lParduoti"
        if line 2 is "cobblestone":
            set line 2 to "cobblestone"
            set line 3 to "16"
            set line 4 to "2€"
            if player's tool is air:
                if player has 16 cobblestone:
                    remove 16 cobblestone from player's inventory
                    send "&8[&bPrison&8] &aPardavei 16 cobblestone!"
                    add 2 to player's balance
                else:
                    send "&cTu neturi cobblestone pardavimui!"
            else:
                send "&cTavo ranka turi būti tuščia, kad galėtum parduoti!"
on rightclick:
    if block is sign:
        if line 1 is "sell":
            set line 1 to "&e&lParduoti"
        if line 2 is "stone":
            set line 2 to "stone"
            set line 3 to "16"
            set line 4 to "5€"
            if player's tool is air:
                if player has 16 stone:
                    remove 16 stone from player's inventory
                    send "&8[&bPrison&8] &aPardavei 16 cobblestone!"
                    add 5 to player's balance
                else:
                    send "&cTu neturi stone pardavimui!"
            else:
                send "&cTavo ranka turi būti tuščia, kad galėtum parduoti!"
#WORKING
#NOT WORKING
on rightclick:
    if block is sign:
        if line 1 is "sell":
            set line 1 to "&e&lParduoti"
        if line 2 is "birchlog":
            set line 2 to "birch log"
            set line 3 to "16"
            set line 4 to "2€"
            if player's tool is air:
                if player has 16 birch log:
                    remove 16 birch log from player's inventory
                    send "&8[&bPrison&8] &aPardavei 16 birch log!"
                    add 2 to player's balance
                else:
                    send "&cTu neturi birch log pardavimui!"
            else:
                send "&cTavo ranka turi būti tuščia, kad galėtum parduoti!"
#NOT WORKING
Any errors?
 
Status
Not open for further replies.