Custom economy and factions

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

KorixCZ

New Member
Jun 29, 2021
5
0
1
29
Hello, I have a problem .. I want to make a faction of the vineyard with a menu that will have a withdrawal and deposit money .. I want to do it so that as soon as I click on a certain thing in the inventory, it will turn off that inventory wrote the amount I want to withdraw. Currently, the only thing that came to my mind is that I set a certain variable to true as soon as I click on a certain item in the vinar menu. As soon as I click on it, the variable starts and in the chat it starts to capture the amount and it adds the amount to another variable. But. Castka registers with the variable but if I do
add {vineyard :: player ::% player's uuid%} to {economy :: balance :: policedep}
that's not how it works. Its not working without uuid players too. Thank you for your help

Skript code:

command /frakcevinice:
trigger:
open virtual chest inventory with size 1 named "&c&lFrakcni menu vinice" to player
format gui slot 0 of player with gold ingot named "&6&lFrakcni penize - &a%{economy::balance::emoji_stuck_out_tongue:olicedep}%$"
format gui slot 4 of player with tripwire hook named "&c&lxxx"
format gui slot 8 of player with book and quill named "&2&lManagment zamestnancu"

on inventory click:
if clicked inventory isn't player's inventory:
if inventory name of player's current inventory is "&c&lFrakcni menu vinice":
clicked slot = 0:
open virtual chest inventory with size 1 named "&c&lVinice - Penize" to player
format gui slot 3 of player with gold ingot named "&c&lVybrat penize"
format gui slot 8 of player with gold ingot named "&c&lVlozit penize"

on inventory click:
if clicked inventory isn't player's inventory:
if inventory name of player's current inventory is "&c&lVinice - Penize":
clicked slot = 3:
send "&c&lVINICE &7Napis do chatu castku, kterou chces vybrat"
close player's inventory
set {vinice::emoji_stuck_out_tongue:layer} to true
wait 4 second
add {vinice::emoji_stuck_out_tongue:layer::%player's uuid%} to {economy::balance::emoji_stuck_out_tongue:olicedep}

on chat:
if {vinice::emoji_stuck_out_tongue:layer::%player's uuid%} is true:
set {vinice::emoji_stuck_out_tongue:layer::%player's uuid%} to message

Code in pastebin
https://pastebin.com/Sqcy4cVU
 
Next time, put your code in a code box, so you don't have to upload it to pastebin. I don't understand what you ment with:
"But. Castka registers with the variable but if I do
add {vineyard :: player ::% player's uuid%} to {economy :: balance :: policedep}
that's not how it works. Its not working without uuid players too. Thank you for your help"
 
Next time, put your code in a code box, so you don't have to upload it to pastebin. I don't understand what you ment with:
"But. Castka registers with the variable but if I do
add {vineyard :: player ::% player's uuid%} to {economy :: balance :: policedep}
that's not how it works. Its not working without uuid players too. Thank you for your help"

Thus. I would need to do this so that the faction of the vineyard, which is called the vinice, took the amount that was recorded in the chat and added it to the player's balance
 
Still not sure, but if you mean that it won't work try this:
Code:
on chat:
    if {vinice::player::%player's uuid%} is true:
        set {vinice::player::%player's uuid%} to "%message%" parsed as a number
 
Status
Not open for further replies.