Replace picked up item with another items

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

K_Abbage

Member
Feb 9, 2022
4
0
1
34
So I am trying to make a wood type changer and I made a script to do that but it didn't work.
My code:
Code:
on pickup of oak logs :
    set {inv.%player%} to player's inventory
    set {woodcount.%player%} to amount of oak logs in {inv.%player%}
    if {woodtype.%player%} is not 1:
        if {woodtype.%player%} is 2:
            give {woodcount.%player%} of spruce logs to the player
        if {woodtype.%player%} is 3:
            give {woodcount.%player%} of birch logs to the player
        if {woodtype.%player%} is 4:
            give {woodcount.%player%} of jungle logs to the player
        if {woodtype.%player%} is 5:
            give {woodcount.%player%} of acacia logs to the player
        if {woodtype.%player%} is 6:
            give {woodcount.%player%} of dark oak logs to the player
        send {woodcount.%player%}
but when i picked up the logs nothing happened (my woodtype variable is set to 2)
any help?
p/s: also woodtype 1 is oak so i used if not for that
 
So I am trying to make a wood type changer and I made a script to do that but it didn't work.
My code:
Code:
on pickup of oak logs :
    set {inv.%player%} to player's inventory
    set {woodcount.%player%} to amount of oak logs in {inv.%player%}
    if {woodtype.%player%} is not 1:
        if {woodtype.%player%} is 2:
            give {woodcount.%player%} of spruce logs to the player
        if {woodtype.%player%} is 3:
            give {woodcount.%player%} of birch logs to the player
        if {woodtype.%player%} is 4:
            give {woodcount.%player%} of jungle logs to the player
        if {woodtype.%player%} is 5:
            give {woodcount.%player%} of acacia logs to the player
        if {woodtype.%player%} is 6:
            give {woodcount.%player%} of dark oak logs to the player
        send {woodcount.%player%}
but when i picked up the logs nothing happened (my woodtype variable is set to 2)
any help?
p/s: also woodtype 1 is oak so i used if not for that


Do some debugging with adding like
Code:
send "%{woodcount.%player%}%"
 
Status
Not open for further replies.