Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- variables:
- {%player%.adminmode} = false
- options:
- exp1: &7&l&m=----------------
- xp: ✦
- rank: ❁
- t: ❃
- w: ✎
- # ・経験値の質上昇
- # &6❃ 強化レベル&f: &f50 &7/ &f50
- # &3&l✎&r&7ランクアップに必要な経験値を減らす
- #┗効果: -(10*[level])
- # ►費用: 50.0M gold
- on join:
- set {%player%::rank} to 0 if {%player%::rank} is not set
- set {%player%::xp} to 0 if {%player%::xp} is not set
- set {%player%::gold} to 0 if {%player%::gold} is not set
- set {%player%::upgrade::2x2} to 0 if {%player%::upgrade::2x2} is not set
- set {%player%::upgrade::3x3} to 0 if {%player%::upgrade::3x3} is not set
- set {%player%::upgrade::2x4} to 0 if {%player%::upgrade::2x4} is not set
- set {%player%::upgrade::3x2} to 0 if {%player%::upgrade::3x2} is not set
- set {%player%::upgrade::3x4} to 0 if {%player%::upgrade::3x4} is not set
- set {%player%::upgrade::1x1} to 0 if {%player%::upgrade::1x1} is not set
- function sg_itemset(name: text, loc: text, p: player) :: item:
- set {_answer} to clay named " &7[1x3] ランクアップ経験値ダウン" with lore "&6{@t} &6強化レベル&f: &f%{%{_p}%::upgrade::%{_loc}%}% &7/ &f50" and "&3&l{@w} &r&7ランクアップに必要な経験値を減らす" and " &8&l┗ &r&7効果&f: &7needxp:&3 -(10*[level]) {@xp}" and "%mg_cost(2, 1.8, 50, {_loc}, ""gold"", {_p})%" with nbt "{loc:%{_loc}%}" if {_loc} is "1x3"
- set {_answer} to ghast tear named "&7[2x2] &7ランク・経験値間アップグレード" with lore "&6{@t} &6強化レベル&f: &f%{%{_p}%::upgrade::%{_loc}%}% &7/ &f1" and "&3&l{@w} &r&7ランクに応じて獲得経験値量が増加" and " &8&l┗ &r&7効果&f:&3 +10log(rank+10) %% {@xp}" and "%mg_cost(750, 1.1, 1, {_loc}, ""gold"", {_p})%" with nbt "{loc:%{_loc}%}" if {_loc} is "2x2"
- set {_answer} to ghast tear named "&7[2x4] &7ランク・ゴールド間アップグレード" with lore "&6{@t} &6強化レベル&f: &f%{%{_p}%::upgrade::%{_loc}%}% &7/ &f1" and "&3&l{@w} &r&7ランクに応じて獲得ゴールド量が増加" and " &8&l┗ &r&7効果&f:&e +8log(rank+10) %% &6gold" and "%mg_cost(3000, 1.1, 1, {_loc}, ""gold"", {_p})%" with nbt "{loc:%{_loc}%}" if {_loc} is "2x4"
- set {_answer} to mg_createitem("3x2", flint, "&7経験値倍率上昇Ⅰ", 20000, 1.2, 200, "gold", "&7経験値倍率を上昇させる", "&3+ 8*[level] %% &3{@xp}", {_p}) if {_loc} is "3x2"
- set {_answer} to mg_createitem("3x4", gold nugget, "&7ゴールド倍率上昇Ⅰ", 15000, 1.15, 200, "gold", "&7ゴールド倍率を上昇させる", "&3+ 5*[level] %% &3{@xp}", {_p}, ("1x3", and "2x4"), (10, and 1)) if {_loc} is "3x4"
- set {_answer} to mg_createitem("3x3", iron pickaxe, "&7ランク倍率上昇Ⅰ", 250000, 1000, 5, "gold", "&7ランクアップで上昇するランクが増加", "&7gainrank: &d+ 100*[level] %% &d{@rank}", {_p}) if {_loc} is "3x3"
- set {_answer} to stone pickaxe named "yukit復活 cost: 1e1.7e308" with nbt "{loc:%{_loc}%}" if {_loc} is "10x2"
- set {_answer} to maxbuy_guicreate({_p}) if {_loc} is "buy"
- set {_answer} to gray glass pane named "" if {_answer} is not set
- return {_answer}
- function mg_createitem(loc: text, item: item, name: text, m: number, a: number, limit: number, c: text, lore: text, effect: text, p: player, conds: texts, conds2: numbers) :: item:
- if cu({_conds::*}, {_conds2::*}, {_p}) is true:
- set {_answer} to {_item} named "&7[&7%{_loc}%&7] %(colored {_name})%" with lore "&6{@t} &6強化レベル&f: &f%{%{_p}%::upgrade::%{_loc}%}% &7/ &f%{_limit}%" and "&3&l{@w} %(colored {_lore})%" and " &8&l┗ &r&7効果&f: %(colored {_effect})%" and "%mg_cost({_m}, {_a}, {_limit}, {_loc}, {_c}, {_p})%" with nbt "{loc:%{_loc}%}"
- else:
- loop (size of {_conds::*}) times:
- set {_text::%loop-number%} to "&8๏ &7アップグレード[%{_conds::%loop-number%}%&7] &f%{%{_p}%::upgrade::%{_conds::%loop-number%}%}%&7/ &f%{_conds2::%loop-number%}% &7レベル"
- loop {_text::*}:
- set {_lore} to "%{_lore}%%nl%%loop-value%"
- set {_lore} to join {_text::*} by nl
- set {_answer} to gray wool named "&7[&7%{_loc}%&7] &7???" with lore "&c&nLocked" and "%{_lore}%"
- return {_answer}
- on inventory click:
- if name of clicked inventory contains "[・]":
- cancel event
- set {_item} to event-item
- set {_n} to tag "loc" of nbt of {_item}
- if name of clicked inventory contains "upgrade":
- set {_a::1} to "upgrade"
- set {_a::2} to 6
- if {_n} is "1x3":
- maxbuy_shop(2, 1.8, {%player%::upgrade::%{_n}%}, 50, "gold", player, {_n})
- if {_n} is "2x2":
- maxbuy_shop(750, 1.1, {%player%::upgrade::%{_n}%}, 1, "gold", player, {_n})
- if {_n} is "2x4":
- maxbuy_shop(3000, 1.1, {%player%::upgrade::%{_n}%}, 1, "gold", player, {_n})
- if {_n} is "3x2":
- maxbuy_shop(20000, 1.2, {%player%::upgrade::%{_n}%}, 200, "gold", player, {_n})
- if {_n} is "3x4":
- maxbuy_shop(15000, 1.15, {%player%::upgrade::%{_n}%}, 200, "gold", player, {_n})
- if {_n} is "3x3":
- maxbuy_shop(250000, 1000, {%player%::upgrade::%{_n}%}, 5, "gold", player, {_n})
- if {_n} is "right":
- add 1 to {%player%.line::%{_a::1}%}
- sg_reload({_a::1}, {_a::2}, {%player%.line::%{_a::1}%}, player)
- else if {_n} is "left":
- add -1 to {%player%.line::%{_a::1}%} if {%player%.line::%{_a::1}%} > 1
- sg_reload({_a::1}, {_a::2}, {%player%.line::%{_a::1}%}, player)
- else if {_n} is "back":
- set {%player%.line::%{_a::1}%} to 1
- sg_reload({_a::1}, {_a::2}, {%player%.line::%{_a::1}%}, player)
- else if {_n} is "buy":
- add 1 to {%player%.guic}
- sg_reload({_a::1}, {_a::2}, {%player%.line::%{_a::1}%}, player)
- set slot (index of event-slot) of player's current inventory to sg_itemset({_a::1}, {_n}, player) if {_n} is set
- else:
- set slot (index of event-slot) of player's current inventory to sg_itemset({_a::1}, {_n}, player) if {_n} is set
- function mg_mine(nr: number, gain: number, res: text, p: player):
- if {%{_p}%::rank} >= {_nr}:
- add {_gain}*{%{_p}%::multixp} to {%{_p}%::xp}
- set {_r} to random integer between 1 and 1000000
- if {_res} is "dirt":
- give dirt named "&7&n土" with lore "{@exp1}" and "&7価値 &8> &e0.1 &6gold" with nbt "{sell:0.1}" to {_p}
- if {_res} is "sand":
- give sand named "&7&n砂" with lore "{@exp1}" and "&7価値 &8> &e0.5 &6gold" with nbt "{sell:0.5}" to {_p}
- give red sand named "&a&n赤砂" with lore "{@exp1}" and "&7価値 &8> &e2 &6gold" with nbt "{sell:2}" to {_p} if {_r} is between 1 and 200000
- give gold nugget named "&5&n砂金" with lore "{@exp1}" and "&7価値 &8> &e200K &6gold" with lore "&7&oとても砂の中にあったとは思えない" with nbt "{sell:200000}" to {_p} if {_r} is between 1 and 10
- if {_res} is "gravel":
- give gravel named "&7&n砂利" with lore "{@exp1}" and "&7価値 &8> &e3 &6gold" with nbt "{sell:3}" to {_p}
- give flint named "&2&n火打ち石" with lore "{@exp1}" and "&7価値 &8> &e100 &6gold" with nbt "{sell:100}" to {_p} if {_r} is between 1 and 50000
- if {_res} is "snow":
- give snow block named "&7&n雪" with lore "{@exp1}" and "&7価値 &8> &e5 &6gold" with nbt "{sell:5}" to {_p}
- give snowball named "&a&n雪玉" with lore "{@exp1}" and "&7価値 &8> &e30 &6gold" with nbt "{sell:30}" to {_p} if {_r} is between 1 and 150000
- else:
- message "&7&o採掘するには自分の力が弱すぎる..." to {_p}
- function mg_cost(m: number, a: number, limit: number, loc: text, c: text, p: player) :: text:
- set {_answer::*} to (maxbuy_multibuy({_m}, {_a}, {%{_p}%.maxbuy}, {%{_p}%::upgrade::%{_loc}%}, {_limit}, {%{_p}%::%{_c}%}))
- return "&7&l ► &r&7費用&f: &e%nn({_answer::1}, {_p})% &6gold"
- command /rankup:
- trigger:
- mg_rankup(player)
- #---====━━━━━━━━━━
- every 2 ticks:
- loop all players:
- set {%loop-player%::needxp} to 1000-(10*(upg("1x3", loop-player)))
- set {%loop-player%::multixp} to 1 + 0.01*((upg("2x2", loop-player))*10*log({%loop-player%::rank}+10)+8*upg("3x2", loop-player))
- set {%loop-player%::multigold} to 1 + 0.01*((upg("2x4", loop-player))*8*log({%loop-player%::rank}+10)+5*(upg("3x4", loop-player)))
- #---====━━━━━━━━━━
- function upg(loc: text, p: player) :: number:
- set {_answer} to {%{_p}%::upgrade::%{_loc}%}
- return {_answer}
- function mg_rankup(p: player):
- if {%{_p}%::xp} >= {%{_p}%::needxp}:
- set {_r} to floor({%{_p}%::xp}*(1/{%{_p}%::needxp}))
- remove {%{_p}%::needxp}*{_r} from {%{_p}%::xp}
- add {_r} * ({%{_p}%::upgrade::3x3}+1) to {%{_p}%::rank}
- message "&7ランクアップしました。 &d( +%{_r} * ({%{_p}%::upgrade::3x3}+1)% &d{@rank})" to {_p}
- on break:
- if event-block is dirt:
- mg_mine(0, 10, "dirt", player)
- cancel event
- if event-block is sand:
- mg_mine(3, 20, "sand", player)
- cancel event
- if event-block is gravel:
- mg_mine(15, 50, "gravel", player)
- cancel event
- if event-block is snow block:
- mg_mine(50, 150, "snow", player)
- cancel event
- every 2 ticks:
- loop all players:
- set name of sidebar of loop-player to ""
- set line 15 of loop-player's scoreboard to "&7&m------------------------------"
- set line 14 of loop-player's scoreboard to "&3経験値&f: &3%nn({%loop-player%::xp}, loop-player)% &3{@xp}"
- set line 13 of loop-player's scoreboard to "&7&l ┗&7倍率&f: &3x%{%loop-player%::multixp}%"
- set line 12 of loop-player's scoreboard to "&dランク&f: &d%nn({%loop-player%::rank}, loop-player)% &d{@rank}"
- set line 11 of loop-player's scoreboard to "&7&l ┗&7必要経験値&f: &3%{%loop-player%::needxp}% {@xp}"
- set line 10 of loop-player's scoreboard to "&6ゴールド&f: &e%nn({%loop-player%::gold}, loop-player)% &6gold"
- set line 9 of loop-player's scoreboard to "&7&l ┗&7倍率&f: &ex%{%loop-player%::multigold}%"
- set line 1 of loop-player's scoreboard to "&7&m------------------------------"
- command /sell:
- trigger:
- loop 36 times:
- set {_item} to slot ((loop-number)-1) of player's inventory
- set {_n} to tag "sell" of nbt of {_item}
- if {_n} > 0:
- set {_item2} to {_item}
- remove {_item2} from player's inventory
- add (item amount of {_item2})*{_n}*{%player%::multigold} to {%player%::gold}
- add (item amount of {_item2})*{_n}*{%player%::multigold} to {_total}
- set {_n} to 0
- message "&7[&8・&7] &6+ &e%nn({_total}, player)% &6gold" to player if {_total} is set
- command /ad-setupg <text> <number>:
- permission: skript.admin
- trigger:
- set {%player%::upgrade::%arg-1%} to arg-2
- command /ad-mode:
- permission: skript.admin
- trigger:
- add 1 to {%player%.admodenum}
- set {%player%.adminmode} to true if mod({%player%.admodenum}, 2) is 1
- set {%player%.adminmode} to false if mod({%player%.admodenum}, 2) is 0
- command /ad-setlv <text> <number>:
- permission: skript.admin
- trigger:
- set {%player%::%arg-1%} to arg-2
- function cu(locs: texts, locsn: numbers, p: player) :: boolean:
- loop (size of {_locs::*}) times:
- if {%{_p}%::upgrade::%{_locs::%loop-number%}%} < {_locsn::%loop-number%}:
- return false
- return true
- command /homehome:
- trigger:
- if cu(("1x3", and "2x2"), (5, and 1), player) is true:
- message "kawaiine"
- else:
- message "kimo..."
- on place:
- if player's gamemode is not creative:
- cancel event
- on break:
- if player's gamemode is not creative:
- cancel event
Add Comment
Please, Sign In to add comment