#Explain why this doesn’t work.

1 messages · Page 1 of 1 (latest)

glad matrix
#

I’m making a virtual bank skript that listens to gems/physical currency on the server and upon clicking the blocks either deposit 16 it should deposit 16 of the desired coin/item with /depositcoin but it wont work and pointers?

#

so far im only at the commands, the gui (makeshift one for now), and the depositing.

velvet ferry
glad matrix
#

@velvet ferry like when i click the deposit 16 it wont take 16 of the item

velvet ferry
#

send error also

glad matrix
#

theres only one

#

ill send 1s

glad matrix
velvet ferry
#

if player's inventory contains 16 of {deposititem.coin}: remove 16 of {deposititem.coin} from player's inventory play sound "block.note_block.pling" for player

if player's inventory contains 16 of {deposititem.coin}: remove 16 of {deposititem.coin} from player's inventory play sound "block.note_block.pling" for player

try

glad matrix
#

alright also is the gui stuff okay?

#

like is it good

velvet ferry
#

u are not utilizing the shape in the gui

glad matrix
#

oh

#

how do i use it

velvet ferry
#

⁨```on script load:

create gui with id "forge" with virtual chest inventory with 5 rows named "Forge" and shape "xxxxxxxxx", "xabcdefgx", "xhijklmnx", "xopqrstux" and "xxxxXxxxx":
    
    # border
    make gui slot "x" to {border}
    make gui slot "X" with a barrier named "&cClose":
        close player's inventory
#

use id also

#

this is example from my server

#

everywhere i wanted a border in the gui i put an "x" but it could be anything
and then I made all x to be border

#

also use id when making gui

#

btw is the problem fixed?

glad matrix
#

got it

glad matrix
velvet ferry
#

if its not working send error

glad matrix
#

got it 1s

glad matrix
velvet ferry
#

no id is just to identify the gui

#

its not needed but good to use

#

u can do ⁨open gui with id "forge" to player⁩ for example

glad matrix
#

okay I have this so far

#

{border}

#

also how would I make ⁨{border}⁩ a real border

#

@velvet ferry

velvet ferry
#

u need to set a variable to be border

#

set {border} to barrier

glad matrix
#

got it

#

how do I make the barrier close the inventory

#

⁨```
on script load:

create gui with id "bank" with virtual chest inventory with 5 rows named "ʏᴏᴜʀ ʙᴀɴᴋ" and shape "xxxxxxxxx", "xeeeAeeex", "xabcBefgx", "xeeeeeeex" and "xxxxXxxxx":

    make gui slot "x" to {border}
    make gui slot "A" to a emerald named "&a&lBANK INFO"
    make gui slot "e" to air
    make gui slot "X" with a barrier named "&cClose"
    close player's inventory
#

@velvet ferry

velvet ferry
#

for this instance

#

close player's inventory

glad matrix
#

this what I got now

#

@velvet ferry

#

make gui slot "X" with a barrier named "&cClose": close player's inventory

velvet ferry
# glad matrix

bro im kinda busy rn this is last i help u

idk a good way to fix this but i did

⁨```function sell(p: player, i: item, amount: number, coinsper: number):
set {_allof} to amount of {_i} in inventory of {_p}
if {_allof} < 1:
stop
if {_allof} >= {_amount}:
remove {_amount} of {_i} from {_p}
increase {coins::%{_p}'s uuid%} by ({_coinsper} * {_amount})


this is a function i created for my server, change it to work for your var names and stuff
glad matrix
#

where would I use this?