Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- options:
- prefix: &d婚姻系統 &d>>
- born_time_sec: 10800
- training_time_sec: 86400
- on rightclick on player:
- type of player's tool is air
- sneaking state of player is true
- if metadata "NPC" of clicked entity is not set:
- open chest with 4 rows named "&e玩家互動菜單 - &a%clicked entity%" to player
- loop integers from 0 to 35:
- set slot loop-value of player's current inventory to black glass named "&f"
- set slot 4 of player's current inventory to skull of clicked entity named "&a&l%clicked entity%"
- set slot 19 of player's current inventory to rose bushes named "&c婚姻系統" with lore "&7>> &a求婚||&7>> &a離婚||&7更多操作..."
- set slot 21 of player's current inventory to emerald named "&a交易系統" with lore "&7>> &a按我向對方發出交易邀請"
- command /maccept:
- trigger:
- if {婚姻暫存.%player%::邀約玩家} is set:
- set {_hus} to {婚姻暫存.%player%::邀約玩家}
- set {_husP} to "%{_hus}%" parsed as player
- set {玩家資料.%player%::伴侶} to {_hus}
- set {玩家資料.%{_hus}%::伴侶} to "%player%"
- delete {婚姻暫存.%{_hus}%::求婚對象}
- delete {婚姻暫存.%{_hus}%::求婚時間}
- delete {婚姻暫存.%player%::邀約玩家}
- send "{@prefix} &e您接受了 &a%{_hus}% &e的求婚! 恭喜!"
- send "{@prefix} &a%player% &e接受了您的求婚! 恭喜!" to {_husP}
- broadcast "{@prefix} &a%player% &e跟 &a%{_hus}% &e結婚了!!! 恭喜他們吧!"
- else:
- send "{@prefix} &e別幻想了,根本沒有人跟你求婚"
- command /mrefuse:
- trigger:
- if {婚姻暫存.%player%::邀約玩家} is set:
- set {_hus} to {婚姻暫存.%player%::邀約玩家}
- set {_husP} to "%{_hus}%" parsed as player
- delete {婚姻暫存.%{_hus}%::求婚對象}
- delete {婚姻暫存.%{_hus}%::求婚時間}
- delete {婚姻暫存.%player%::邀約玩家}
- send "{@prefix} &e您拒絕了 &a%{_hus}% &e的求婚,對方哭着跑走了"
- send "{@prefix} &a%player% &e拒絕了您的求婚" to {_husP}
- else:
- send "{@prefix} &e別幻想了,根本沒有人跟你求婚"
- on join:
- if {婚姻暫存.%player%::求婚對象} is set:
- set {_tar} to {婚姻暫存.%player%::求婚對象}
- delete {婚姻暫存.%player%::求婚對象}
- delete {婚姻暫存.%player%::求婚時間}
- delete {婚姻暫存.%{_tar}%::邀約玩家}
- on inventory click:
- if name of player's current inventory contains "玩家互動菜單 -":
- cancel event
- set {_playerID} to uncoloured name of player's current inventory
- replace all "玩家互動菜單 - " with "" in {_playerID}
- if name of clicked item is "&c婚姻系統":
- close player's inventory
- open chest with 4 rows named "&e婚姻系統 - &a%{_playerID}%" to player
- loop integers from 0 to 35:
- set slot loop-value of player's current inventory to black glass named "&f"
- set slot 4 of player's current inventory to skull of {_playerID} parsed as player named "&a&l%{_playerID}%"
- if {玩家資料.%{_playerID}%::伴侶} is "無":
- if {玩家資料.%player%::伴侶} is "無":
- if {婚姻暫存.%player%::求婚對象} is not set:
- if {婚姻暫存.%{_playerID}%::邀約玩家} is not set:
- set slot 19 of player's current inventory to red poppy named "&e求婚" with lore "&a按我向對方求婚"
- else:
- set slot 19 of player's current inventory to red poppy named "&e求婚" with lore "&c對方已經被其他人求婚了||&c等等再來吧"
- else:
- set slot 19 of player's current inventory to red poppy named "&e求婚" with lore "&c您已經向某人求婚了!"
- else:
- set slot 19 of player's current inventory to red poppy named "&e求婚" with lore "&c您已經有伴侶了!"
- else:
- set slot 19 of player's current inventory to red poppy named "&e求婚" with lore "&c對方已經有伴侶了!"
- if {玩家資料.%{_playerID}%::伴侶} is player:
- set slot 25 of player's current inventory to dead bush named "&e離婚" with lore "&a按我與對方離婚"
- else:
- set slot 25 of player's current inventory to dead bush named "&e離婚" with lore "&c你不是對方的伴侶!"
- else if name of clicked item is "&a交易系統":
- close player's inventory
- execute player command "/trade %{_playerID}%"
- else if name of player's current inventory contains "&e婚姻系統 -":
- cancel event
- set {_playerID} to uncoloured name of player's current inventory
- replace all "婚姻系統 - " with "" in {_playerID}
- if name of clicked item is "&e求婚":
- if lore of clicked item contains "&a按我向對方求婚":
- close player's inventory
- set {_player} to {_playerID} parsed as player
- set {婚姻暫存.%player%::求婚對象} to {_player}
- set {婚姻暫存.%player%::求婚時間} to date now as unix
- set {婚姻暫存.%{_playerID}%::邀約玩家} to player
- send "{@prefix} &e您向 &a%{_player}% &e求婚了! 請耐心等待對方的答覆"
- send "{@prefix} &a%player% &e向您求婚了! 您有 30 秒時間考慮: 輸入 &a/maccept &e以接受,輸入 &a/mrefuse &e以拒絕" to {_player}
- wait 30 seconds
- if {婚姻暫存.%player%::求婚對象} is set:
- delete {婚姻暫存.%player%::求婚對象}
- delete {婚姻暫存.%player%::求婚時間}
- delete {婚姻暫存.%{_playerID}%::邀約玩家}
- send "{@prefix} &e30 秒過了 &a%{_player}% &e還沒答應您,下次再努力吧!!"
- send "{@prefix} &e30 秒過了您還沒對 &a%player% &e的求婚作出回應,對方哭着跑走了" to {_player}
- else if name of clicked item is "&e離婚":
- if lore of clicked item contains "&a按我與對方離婚":
- close player's inventory
- set {_player} to {_playerID} parsed as player
- set {玩家資料.%player%::伴侶} to "無"
- set {玩家資料.%{_player}%::伴侶} to "無"
- send "{@prefix} &e你已與 &a%{_player}% &e離婚"
- send "{@prefix} &a%player% &e跟你離婚了" to {_player}
- broadcast "{@prefix} &a%player% &e跟 &a%{_player}% &e離婚了! &7(群眾: YES!!!)"
- on rightclick:
- if name of player's tool is "&e強制離婚文件":
- if {玩家資料.%player%::伴侶} is not "無":
- remove 1 from item amount of player's tool
- set {_hus} to {玩家資料.%player%::伴侶}
- set {玩家資料.%player%::伴侶} to "無"
- set {玩家資料.%{_hus}%::伴侶} to "無"
- send "{@prefix} &e您使用了 &a強制離婚文件 &e與對方離婚"
- if {_hus} is online:
- send "{@prefix} &a%player% &e使用了 &a強制離婚文件 &e與您離婚" to {_hus}
- broadcast "{@prefix} &a%player% &e使用 &a強制離婚文件 &e跟 &a%{_hus}% &e離婚了! &7(群眾: YES!!!)"
- else:
- send "{@prefix} &e你根本沒有伴侶,不要自我安慰了"
- #Kiss#
- function negative(n: number) :: number:
- if {_n} is smaller than 0:
- set {_re} to absolute value of {_n}
- else:
- set {_re} to 0 - {_n}
- return {_re}
- function oppositeFace(d: direction) :: direction:
- if {_d} is north:
- return south
- else if {_d} is north east:
- return south west
- else if {_d} is east:
- return west
- else if {_d} is south east:
- return north west
- else if {_d} is south:
- return north
- else if {_d} is south west:
- return north east
- else if {_d} is west:
- return east
- else if {_d} is north west:
- return south east
- else if {_d} is below:
- return above
- else if {_d} is above:
- return below
- function getBabyAge(p: player) :: integer:
- return floor((date now as unix - {繁殖系統.%{_p}%::孩子出生時間}) / 51840)
- on rightclick on player:
- #sneaking state of player is true
- "%name of clicked entity%" is "%{玩家資料.%player%::伴侶}%"
- set {_target} to "%name of clicked entity%" parsed as player
- set {_playerface} to player's facing
- set {_fffface} to clicked entity's facing
- oppositeFace({_playerface}) is {_fffface}
- set {_playerloc} to player's location
- set {_fffloc} to clicked entity's location
- distance between {_playerloc} and {_fffloc} is smaller than 2.5
- set {_targetX} to negative((x-coord of {_playerloc} - x-coord of {_fffloc}) / 2)
- set {_targetY} to negative((y-coord of {_playerloc} - y-coord of {_fffloc}) / 2) + 1
- set {_targetZ} to negative((z-coord of {_playerloc} - z-coord of {_fffloc}) / 2)
- add {_targetX} to x-coord of {_playerloc}
- add {_targetY} to y-coord of {_playerloc}
- add {_targetZ} to z-coord of {_playerloc}
- drawDot count 3, particle "heart", XYZ 0.1, 0.1, 0.1, center {_playerloc}, visibleRange 32, pulseDelay 2, keepFor 0.3 seconds
- on command:
- player is op
- command is "lemonhome"
- cancel event
- teleport player to location(105, 3, 75, world("RPG"))
- # Gayau :P
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement