• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
  • Minecraft 1.16.220 Update + Bug/Crash Fixes
    Added MCPE 1.16.220 version and fixed crashes for multiple plugins. You can view the full changelist here.
  • Forum Updates - 4/11/2021
    Various changes have been made to the forums and a few categories. You can view the full changelist here.

Banknote

Warning!
Hello , there have been no replies in this thread for more than 30 days.
Please make sure you have a valid reason before you reply to this thread or you may face moderation action.
#1
This is the command /banknote <amount>:
Code:
cmd add banknote let %bal% = playerbalance(%p%)
cmd add banknote if varset(%args%[1]) then goto 5
cmd add banknote message %p% §cInvalid use! Usage: /banknote <amount>
cmd add banknote exit
cmd add banknote if %args%[1] > 0 then goto 8
cmd add banknote message %p% §cInvalid amount!
cmd add banknote exit
cmd add banknote let %amount% = int(%args%[1])
cmd add banknote if %amount% <= %bal% then goto 12
cmd add banknote message %p% §cYou do not have enough money!
cmd add banknote exit
cmd add banknote ascon /takemoney %p% %amount%
cmd add banknote let %name% = \"§aBanknote §2($\" + %amount% + \")§R§A§9\"
cmd add banknote let %lore% = \"§r§5Original Banknote Holder:\\n§7\" + %p%
cmd add banknote ascon /give %p% paper:300 1 {display:{Name:%name%,Lore:[%lore%]}}
cmd add banknote message %p% §c-$%amount%
cmd add banknote exit
This is the touch trigger for banknote:

Code:
cmd add bnt let %id% = %args%[7]
cmd add bnt let %name% = %args%[9]
cmd add bnt let %meta% = %args%[8]
cmd add bnt if (%id% != 339) or (%meta% != 300) then exit
cmd add bnt let %check% = position(%name%, \"§R§A§9\")
cmd add bnt if %check% != -1 then goto 9
cmd add bnt message %p% §cInvalid Banknote!
cmd add bnt exit
cmd add bnt let %apos1% = position(%name%, \"$\")
cmd add bnt if %apos1% = -1 then goto 7
cmd add bnt let %apos2% = position(%name%, \")\")
cmd add bnt if %apos2% = -1 then goto 7
cmd add bnt let %pos1% = %apos1% + 1
cmd add bnt let %length% = %apos2% - %pos1%
cmd add bnt let %amount% = substring(%name%, %pos1%, %length%)
cmd add bnt let %inv% = playerinventory(%p%)
cmd add bnt async
cmd add bnt let %size% = size(%inv%)
cmd add bnt let %size% = %size% - 1
cmd add bnt if %size% = -1 then exit
cmd add bnt let %item% = %inv%[%size%]
cmd add bnt if (%item%["id"] != %id%) or (%item%["variant"] != %meta%) or (%item%["name"] != %name%) then goto 19
cmd add bnt sync
cmd add bnt let %item%["count"] = %item%["count"] - 1
cmd add bnt let %inv%[%size%] = %item%
cmd add bnt carry %p% %inv%
cmd add bnt ascon /givemoney %p% %amount%
cmd add bnt message %p% §a+$%amount%
cmd add bnt exit
Note: Windows 10 players can exploit because there is a glitch with either pocketmine or Minecraft itself where Windows 10 player's taps register like 6 times.
 
Last edited by a moderator: