Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- on server start:
- delete {aucsys::*}
- command /auchelp:
- aliases: /auctionhelp
- trigger:
- send "&6‡&7==============================&6&lAuction&7==============================&6‡"
- send "&c/auc <開始金額> [<即決金額(任意)>]&4: &6手に持っているアイテムをオークションに出します"
- send "&c/aucs&4: &6自分が開催しているオークションを中止します"
- send "&c/bid <金額>&4: &6開催しているオークションに入札します"
- send "&c/aucd&4: &6出品された品を確認します"
- send "&6‡&7====================================================================&6‡"
- command /auc <integer> [<integer>]:
- aliases: /auction
- usage: /auction <開始金額> [<即決金額(任意)>]
- trigger:
- if {aucsys::cond} is 1:
- send "&c今は他の誰かがオークションをしています"
- else:
- if player's tool is air:
- send "&c無は出品できません"
- else:
- if arg 1 is less than 1:
- send "&c開始金額は1以上にしてください"
- else:
- if arg 2 is set:
- if arg 2 is less than arg 1:
- send "&c即決金額は開始金額より高くしてください"
- else:
- set {aucsys::selr} to player
- set {aucsys::cond} to 1
- set {aucsys::valu} to arg 1
- set {aucsys::item} to player's tool
- set {aucsys::time} to 180
- set {aucsys::dire} to arg 2
- delete player's tool
- broadcast "&6‡&7==============================&6&lAuction&7==============================&6‡"
- broadcast "&f&l%player%&6さんがオークションを始めました"
- broadcast "&6開始金額は&c%arg 1%$"
- broadcast "&6即決金額は&4%arg 2%$&6です"
- broadcast "&a/aucd&6で出品された品を確認できます"
- broadcast "&6‡&7====================================================================&6‡"
- while {aucsys::time} is more than 0:
- if {aucsys::stop} is 1:
- delete {aucsys::*}
- stop
- else:
- wait 1 second
- remove 1 from {aucsys::time}
- if {aucsys::time} is 5, 10, 30, 60 or 120:
- broadcast "&7[&6Auction&7] &6%player%さんのオークションはあと%{aucsys::time}%秒で終わります"
- if {aucsys::time} is 0:
- if {aucsys::buyr} is set:
- broadcast "&6‡&7==============================&6&lAuction&7==============================&6‡"
- broadcast "&f%player%&6さんのオークションが終了しました"
- broadcast "&f&l%{aucsys::buyr}%&6さんが&6&l%{aucsys::valu}%$&6で落札しました"
- broadcast "&6‡&7====================================================================&6‡"
- send "&6‡&6%{aucsys::valu}%$を%{aucsys::selr}%に送りました" to {aucsys::buyr}
- send "&6‡&6%{aucsys::valu}%$を%{aucsys::buyr}%から受け取りました"
- remove {aucsys::valu} from {aucsys::buyr}'s money
- add {aucsys::valu} to player's money
- aucend()
- stop
- else:
- broadcast "&6‡&7==============================&6&lAuction&7==============================&6‡"
- broadcast "&f%player%&6さんのオークションが終了しました"
- broadcast "&6入札者は誰も居ませんでした"
- broadcast "&6‡&7====================================================================&6‡"
- aucdead()
- else:
- set {aucsys::selr} to player
- set {aucsys::cond} to 1
- set {aucsys::item} to player's tool
- set {aucsys::time} to 180
- set {aucsys::valu} to arg 1
- delete player's tool
- broadcast "&6‡&7==============================&6&lAuction&7==============================&6‡"
- broadcast "&f&l%player%&6さんがオークションを始めました"
- broadcast "&6開始金額は&c%arg 1%$&6です"
- broadcast "&a/aucd&6で出品された品を確認できます"
- broadcast "&6‡&7====================================================================&6‡"
- while {aucsys::time} is more than 0:
- if {aucsys::stop} is 1:
- delete {aucsys::*}
- stop
- else:
- wait 1 second
- remove 1 from {aucsys::time}
- if {aucsys::time} is 5, 10, 20 or 30:
- broadcast "&7[&6Auction&7] &6%player%さんのオークションはあと%{aucsys::time}%秒で終わります"
- if {aucsys::time} is 0:
- if {aucsys::buyr} is set:
- broadcast "&6‡&7==============================&6&lAuction&7==============================&6‡"
- broadcast "&f%player%&6さんのオークションが終了しました"
- broadcast "&f&l%{aucsys::buyr}%&6さんが&6&l%{aucsys::valu}%$&6で落札しました"
- broadcast "&6‡&7====================================================================&6‡"
- send "&7[&6Auction&7] &6%{aucsys::valu}%$を%{aucsys::selr}%に送りました" to {aucsys::buyr}
- send "&7[&6Auction&7] &6%{aucsys::valu}%$を%{aucsys::buyr}%から受け取りました"
- remove {aucsys::valu} from {aucsys::buyr}'s money
- add {aucsys::valu} to player's money
- aucend()
- stop
- else:
- broadcast "&6‡&7==============================&6&lAuction&7==============================&6‡"
- broadcast "&f%player%&6さんのオークションが終了しました"
- broadcast "&6入札者は誰も居ませんでした"
- broadcast "&6‡&7====================================================================&6‡"
- aucdead()
- stop
- command /auctionstop:
- aliases: /aucs
- permission: auction.start
- trigger:
- if {aucsys::cond} is 1:
- if {aucsys::selr} is player:
- set {aucsys::stop} to 1
- broadcast "&6‡&7==============================&6&lAuction&7==============================&6‡"
- broadcast "&f%player%&6さんのオークションが中止されました"
- broadcast "&6‡&7====================================================================&6‡"
- aucdead()
- else if player has the permission "auction.fstop":
- set {aucsys::stop} to 1
- broadcast "&6‡&7==============================&6&lAuction&7==============================&6‡"
- broadcast "&f%{aucsys::selr}%&6さんのオークションは管理者によって中止されました"
- broadcast "&6‡&7====================================================================&6‡"
- aucdead()
- else:
- send "&cオークションの出品者以外は中止できません"
- else:
- send "&c今は誰もオークションをしていません"
- command /bid <integer>:
- usage: /bid <入札額(整数)>
- trigger:
- if player is not {aucsys::selr}:
- if {aucsys::cond} is not 1:
- send "&c今は誰もオークションをしていません"
- else:
- if arg is less than or equal to {aucsys::valu}:
- send "&c最高入札額より高く設定してください"
- else:
- if player's money is less than arg:
- send "&c所持金が足りません"
- else:
- if {aucsys::dire} is set:
- if arg is more than or equal to {aucsys::dire}:
- broadcast "&6‡&7==============================&6&lAuction&7==============================&6‡"
- broadcast "&f%{aucsys::selr}%&6さんのオークションが終了しました"
- broadcast "&f&l%player%&6さんが&6&l%{aucsys::dire}%$&6即決で落札しました"
- broadcast "&6‡&7====================================================================&6‡"
- set {aucsys::buyr} to player
- set {aucsys::stop} to 1
- remove {aucsys::dire} from player's money
- add {aucsys::dire} to {aucsys::selr}'s money
- send "&6‡&6%{aucsys::dire}%$を%{aucsys::selr}%に送りました""
- aucend()
- stop
- else:
- set {aucsys::valu} to arg
- set {aucsys::buyr} to player
- broadcast "&7[&6Auction&7] &6%player%さんが%arg%$で入札"
- if {aucsys::time} is less than 10:
- add 13 to {aucsys::time}
- else:
- set {aucsys::valu} to arg
- set {aucsys::buyr} to player
- broadcast "&7[&6Auction&7] &6%player%さんが%arg%$で入札"
- if {aucsys::time} is less than 10:
- set {aucsys::time} to 13
- else:
- loop 12 times:
- send "&4&l!!!出品者は入札できません!!!"
- wait 1 tick
- function aucend():
- if {aucsys::buyr} has air:
- loop 36 times:
- if slot (loop-number - 1) of {aucsys::buyr}'s inventory is air:
- set slot (loop-number - 1) of {aucsys::buyr}'s inventory to {aucsys::item}
- delete {aucsys::*}
- stop
- drop {aucsys::item} at location of {aucsys::buyr}
- send "&6‡インベントリに空きが無かった為足元にアイテムをドロップしました" to {aucsys::buyr}
- delete {aucsys::*}
- function aucdead():
- if {aucsys::selr} has air:
- loop 36 times:
- if slot (loop-number - 1) of {aucsys::selr}'s inventory is air:
- set slot (loop-number - 1) of {aucsys::selr}'s inventory to {aucsys::item}
- delete {aucsys::*}
- stop
- drop {aucsys::item} at location of {aucsys::selr}
- send "&6‡インベントリに空きが無かった為足元にアイテムをドロップしました" to {aucsys::selr}
- delete {aucsys::*}
- command /aucd:
- trigger:
- if {aucsys::cond} is 1:
- open chest with 1 row named "&6Auction Display" to player
- wait 1 tick
- set {_q} to iron bars named "&b値札"
- if {aucsys::dire} is set:
- set line 1 of lore of {_q} to "&a現在&8: &6%{aucsys::valu}%$"
- set line 2 of lore of {_q} to "&c即決&8: &6%{aucsys::dire}%$"
- set line 3 of lore of {_q} to "&b最高入札者&8: &6%{aucsys::buyr}%"
- else:
- set line 1 of lore of {_q} to "&a現在&8: &6%{aucsys::valu}%$"
- set line 2 of lore of {_q} to "&b最高入札者&8: &6%{aucsys::buyr}%"
- loop 9 times:
- set {_a} to loop-number - 1
- set slot {_a} of player's current inventory to {_q}
- delete slot 4 of player's current inventory
- wait 1 tick
- set slot 4 of player's current inventory to {aucsys::item}
- else:
- send "&c今は誰もオークションをしていません"
- on inventory click:
- name of player's current inventory is "&6Auction Display"
- cancel event
- close player's inventory
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement