Creative+ Auction house tutorial cuz deefer gay.

Aalus

Big Bandar
Joined
May 20, 2023
Messages
489
First of all Set up the auction house chest - Create a variable called "auctionHouseChest" to store the location of the auction house chest.
Use a function for the auction house command like @ah sell.
Use an array called commands to store the command which will be used in order to sell a particular item. Convert the item into value and then store the value in an array.
Check if the entered command is in the "commands" array using a loop block
If the command equals "@ah sell <price>", remove the item from the player's hand and add it to the "playerItems" array.
Place the item from playerItems" into the fill container chest using the "auctionHouseChest" variable and put the location of the chest and set its name to "Auction House"

Buying items from the auction house:

Create an array called "playerBalances" to store the players' money by putting the variable of money/coin such as %player%_money but make sure to change it to %selected%.
Use a loop to check if the player has enough money to buy the item by using the "if variable" block. Deduct the price from the player's balance in the "playerBalances" array. Remove the item from the auction house chest using the "auctionHouseChest" variable, putting the variable In the remove item container thing. Give the item to the player using the same variable. You may also add sound effects when a player buys a particular item.

By the variable "auctionHouseChest" "playerItems", you can store and change the information if necessary for the auction house. If you want to make your auction house code look bigger, you may want to fill the "fill container" block with air 😉
 

Aalus

Big Bandar
Joined
May 20, 2023
Messages
489
First of all Set up the auction house chest - Create a variable called "auctionHouseChest" to store the location of the auction house chest.
Use a function for the auction house command like @ah sell.
Use an array called commands to store the command which will be used in order to sell a particular item. Convert the item into value and then store the value in an array.
Check if the entered command is in the "commands" array using a loop block
If the command equals "@ah sell <price>", remove the item from the player's hand and add it to the "playerItems" array.
Place the item from playerItems" into the fill container chest using the "auctionHouseChest" variable and put the location of the chest and set its name to "Auction House"

Buying items from the auction house:

Create an array called "playerBalances" to store the players' money by putting the variable of money/coin such as %player%_money but make sure to change it to %selected%.
Use a loop to check if the player has enough money to buy the item by using the "if variable" block. Deduct the price from the player's balance in the "playerBalances" array. Remove the item from the auction house chest using the "auctionHouseChest" variable, putting the variable In the remove item container thing. Give the item to the player using the same variable. You may also add sound effects when a player buys a particular item.

By the variable "auctionHouseChest" "playerItems", you can store and change the information if necessary for the auction house. If you want to make your auction house code look bigger, you may want to fill the "fill container" block with air 😉
I have explained 90 percent of the code, you may code "item tag" and "item description" (in which you'll put the price of the item) too!
 

veddnt

Active member
Joined
Jun 2, 2023
Messages
194
Goofy ahhh code... Cant even say if this even is about auction house tbh. Like fr yall 12yo cringe dumbass kids coded something looking alike an auction house and claimed it as s fking "Auction house"? Bozo's yall making stupid terms like "Throwable vector", Do you even know what a fking vector means? Just go commit unalive ffs... C+ and world would be a better plave w/o arrogant, over smart and prolly 12or13 yo morons like you.
 

Hayden

Member
Joined
May 19, 2023
Messages
34
First of all Set up the auction house chest - Create a variable called "auctionHouseChest" to store the location of the auction house chest.
Use a function for the auction house command like @ah sell.
Use an array called commands to store the command which will be used in order to sell a particular item. Convert the item into value and then store the value in an array.
Check if the entered command is in the "commands" array using a loop block
If the command equals "@ah sell <price>", remove the item from the player's hand and add it to the "playerItems" array.
Place the item from playerItems" into the fill container chest using the "auctionHouseChest" variable and put the location of the chest and set its name to "Auction House"

Buying items from the auction house:

Create an array called "playerBalances" to store the players' money by putting the variable of money/coin such as %player%_money but make sure to change it to %selected%.
Use a loop to check if the player has enough money to buy the item by using the "if variable" block. Deduct the price from the player's balance in the "playerBalances" array. Remove the item from the auction house chest using the "auctionHouseChest" variable, putting the variable In the remove item container thing. Give the item to the player using the same variable. You may also add sound effects when a player buys a particular item.

By the variable "auctionHouseChest" "playerItems", you can store and change the information if necessary for the auction house. If you want to make your auction house code look bigger, you may want to fill the "fill container" block with air 😉
this explanation is so convoluted because it is 90% you talking and 0 code.
By the way, you do not need "AuctionHouseChest" variable as you can use the paper

Making your code look bigger is also useless.
PlayerBalances should not be created, as a game with auction house already has an economy.

also that command can be done like this:

Code:
String 1: On chat > Split text into array (Player's message to array "%player%-message" > Get element 1 of %player%-message as variable "%player%-commandcheck" > If %player%-commandcheck is text "@ah" > Get element 2 of %player%-message as variable "%player%-argcheck" > If %player%-argcheck is text "sell" > Get element 3 of %player%-message as variable "%player%-num" > set %player%-numparsed to %player%-num parsed as number > If %player%-numparsed is more than 0 > (Your auction code here)> else > send "&cMust be above 0 pounds!"  > else > (other cmds here)
 

mugheera1122

Member
Joined
May 21, 2023
Messages
105
First of all Set up the auction house chest - Create a variable called "auctionHouseChest" to store the location of the auction house chest.
Use a function for the auction house command like @ah sell.
Use an array called commands to store the command which will be used in order to sell a particular item. Convert the item into value and then store the value in an array.
Check if the entered command is in the "commands" array using a loop block
If the command equals "@ah sell <price>", remove the item from the player's hand and add it to the "playerItems" array.
Place the item from playerItems" into the fill container chest using the "auctionHouseChest" variable and put the location of the chest and set its name to "Auction House"

Buying items from the auction house:

Create an array called "playerBalances" to store the players' money by putting the variable of money/coin such as %player%_money but make sure to change it to %selected%.
Use a loop to check if the player has enough money to buy the item by using the "if variable" block. Deduct the price from the player's balance in the "playerBalances" array. Remove the item from the auction house chest using the "auctionHouseChest" variable, putting the variable In the remove item container thing. Give the item to the player using the same variable. You may also add sound effects when a player buys a particular item.

By the variable "auctionHouseChest" "playerItems", you can store and change the information if necessary for the auction house. If you want to make your auction house code look bigger, you may want to fill the "fill container" block with air 😉
i want to sleep after reading this
 
Top