essentials sell multiplier

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

titustitus98

Member
Feb 19, 2018
47
0
6
25
Skript Version: 2.2-dev33
Skript Author:no idea
Minecraft Version:1.8-1.12

---
Full Code:
no code

code_language.skript:
ENTER YOUR CODE HERE, PLEASE BESURE TO USE PROPER INDENTATION (TABS OR SPACES)

Errors on Reload:no

code_language.skript:
ERROR HERE

Console Errors:none (if applicable)

code_language.skript:
ERROR HERE

Other Useful Info:hi i am looking in a system where if a run a certain command i can set a multiplier to someone and upgrade it and reset it and stuff and that multiplier would multiplie the sell value on essentials signs but i don't know how to do it so i hoped someone here could help me

Addons using (including versions):i don't know which ones i have
ADDONS HERE

Troubleshooting:

Have you tried searching the docs? Yes
Have you tried searching the forums? Yes
What other methods have you tried to fix it? google
 
Your best guess is to register placeholders when a player right clicks an essentials sign using PlaceholderAPI or Mv Placeholder API
 
code_language.skript:
on right click on sign:
    line 1 of event-block is "&8[Shop]"
    set {_item} to line 2 of event-block
    set {_amount} to line 3 of event-block
    set {_price} to line 4 of event-block
    set {_p} to "%{_price}%" parsed as number
    set {_i} to "%{_item}%" parsed as item
    set {_a} to "%{_amount}%" parsed as number
    player's inventory can hold {_a} of {_i}:
        if player has permission "ess.discount":
            remove {_p}*{discount.%player%} from {_p}
            remove {_p} from player's balance
            send "&a$%{_p}% has been removed from your account!"
            give player {_a} of {_i}
        else:
            remove {_p} from player's balance
            send "&a$%{_p}% has been removed from your account!"
            give player {_a} of {_i}
    else:
        send "&aYou do not have enough open slots!"
on sign change:
    line 1 is "[Shop]"
    if player does not have permission "signshop.create":
        cancel event
        wait 1 tick
        set line 1 to "Insufficient"
        set line 2 to "Permissions"
    else:
        set line 1 to "&8[Shop]"
        set {_item} to line 2
        set {_amount} to line 3
        set {_price} to line 4
        set {_p} to "%{_price}%" parsed as number
        set {_i} to "%{_item}%" parsed as item
        set {_a} to "%{_amount}%" parsed as number
        if {_i} is not an item:
            send "&aIncorrect Item Name"
        if {_p} is not a number:
            send "&aIncorrect Price"
        if {_a} is not a number:
            send "&aIncorrect Amount"
            
command /setdiscount <player> <number>:
    permission: setdiscount.player
    trigger:
        arg-2 is not more than 99:
            send "&a%arg-1% is now receiving a %arg-2%%% Discount!"
            set {_discount} to arg-2/100
            set {discount.%arg-1%} to {_discount}
        else:
            send "&bDiscount is too high! Must between 1 and 99!"

This is just meant as a way to apply a discount for buying items from shops. I don't use Essentials, so I am unaware if you are able to disable shops or not, but if you can, do it and use this code instead.
 
Thanks! I did not use the skript, but i used the sign line expression in one of my skripts!