From 3a4953cc4fbb78b17a6347ef3ce1b863448a928c Mon Sep 17 00:00:00 2001 From: ismooch Date: Thu, 13 Mar 2014 21:35:50 -0500 Subject: [PATCH 1/2] Create signshoptestthing.sk --- Obam-Testing/signshoptestthing.sk | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 Obam-Testing/signshoptestthing.sk diff --git a/Obam-Testing/signshoptestthing.sk b/Obam-Testing/signshoptestthing.sk new file mode 100644 index 0000000..0b7617a --- /dev/null +++ b/Obam-Testing/signshoptestthing.sk @@ -0,0 +1,13 @@ +on sign chage: + set {_lookup} to line 4 of block + {item.alias::%{_lookup}%} is set: + set line 4 of block to {item.alias::%{_lookup}%} + stop + loop {item.alias::*}: + {item.alias::%loop-index%::%{_lookup}%} is set: + set line 4 of block to {item.alias::%loop-index%} + stop + + cancel event + send "&e%{_lookup}% &c is not a recognized item!" to player + From 5a82362cf9436d7ae3509f846c008f2c1ff48f86 Mon Sep 17 00:00:00 2001 From: ismooch Date: Fri, 14 Mar 2014 01:09:49 -0500 Subject: [PATCH 2/2] update fortune.sk - added death notes - fixed aura bugs - some work on prizehweel --- OBAM-Voting/prizewheel.sk | 140 ++++++++++++++++++++++++++++++++++++++ Obam-Survival/fortune.sk | 11 ++- Obam-Survival/heads.sk | 5 ++ 3 files changed, 153 insertions(+), 3 deletions(-) diff --git a/OBAM-Voting/prizewheel.sk b/OBAM-Voting/prizewheel.sk index e7a9356..23c4abc 100644 --- a/OBAM-Voting/prizewheel.sk +++ b/OBAM-Voting/prizewheel.sk @@ -49,6 +49,146 @@ command /prize [] [] []: {_time} is less than 12 hours: send "&cYou must wait &e%12 hours - {_time}% &cbefore you can spin again!" stop + chance of 1%: + set {_size} to size of {db_wheel.ultrarare::*} + set {_ran} to random integer between 1 and {_size} + loop {db_wheel.ultrarare::*}: + {_loop.count} is not set: + set {_loop.count} to 0 + add 1 to {_loop.count} + {_loop.count} is {_ran}: + set {_amount} to loop-value + set {_item} to loop-index + set {_location} to {db_wheel.ultrarare::%loop-index%::"location"} + {_item} is "tickets": + set {_bal} to player's balance + add {_amount} to player's balance + send "&aYou have received &e%{_amount}% Tickets&a as your prize" + log "%player%^%{_bal}%^ADD^%{_amount}%^%player's balance%^ultrarare PRIZE WHEEL WINNINGS" to "tickets/PRIZEWHEELWINNINGS.log" + stop + {db_wheel.rewards.%player%::%{_location}%::%{_item}%} is not set: + set {db_wheel.rewards.%player%::%{_location}%::%{_item}%} to {_amount} + send "&aYou have had &e%{_amount}% %{_item}%&a added to your rewards chest. Do &e/prize show&a in &e%{_location}%&a to claim the items." + log "%player%^ADD^%{_amount}%^%{_item}%^%{_location}%^ultrarare PRIZE WHEEL WINNINGS" to "prizewheel/PRIZELOGS.log" + stop + {db_wheel.rewards.%player%::%{_location}%::%{_item}%} is set: + add {_amount} to {db_wheel.rewards.%player%::%{_location}%::%{_item}%} + send "&aYou have had &e%{_amount}% %{_item}%&a added to your rewards chest. Do &e/prize show&a in &e%{_location}%&a to claim the items." + log "%player%^ADD^%{_amount}%^%{_item}%^%{_location}%^ultrarare PRIZE WHEEL WINNINGS" to "prizewheel/PRIZELOGS.log" + stop + + chance of 5%: + set {_size} to size of {db_wheel.rare::*} + set {_ran} to random integer between 1 and {_size} + loop {db_wheel.rare::*}: + {_loop.count} is not set: + set {_loop.count} to 0 + add 1 to {_loop.count} + {_loop.count} is {_ran}: + set {_amount} to loop-value + set {_item} to loop-index + set {_location} to {db_wheel.rare::%loop-index%::"location"} + {_item} is "tickets": + set {_bal} to player's balance + add {_amount} to player's balance + send "&aYou have received &e%{_amount}% Tickets&a as your prize" + log "%player%^%{_bal}%^ADD^%{_amount}%^%player's balance%^rare PRIZE WHEEL WINNINGS" to "tickets/PRIZEWHEELWINNINGS.log" + stop + {db_wheel.rewards.%player%::%{_location}%::%{_item}%} is not set: + set {db_wheel.rewards.%player%::%{_location}%::%{_item}%} to {_amount} + send "&aYou have had &e%{_amount}% %{_item}%&a added to your rewards chest. Do &e/prize show&a in &e%{_location}%&a to claim the items." + log "%player%^ADD^%{_amount}%^%{_item}%^%{_location}%^rare PRIZE WHEEL WINNINGS" to "prizewheel/PRIZELOGS.log" + stop + {db_wheel.rewards.%player%::%{_location}%::%{_item}%} is set: + add {_amount} to {db_wheel.rewards.%player%::%{_location}%::%{_item}%} + send "&aYou have had &e%{_amount}% %{_item}%&a added to your rewards chest. Do &e/prize show&a in &e%{_location}%&a to claim the items." + log "%player%^ADD^%{_amount}%^%{_item}%^%{_location}%^rare PRIZE WHEEL WINNINGS" to "prizewheel/PRIZELOGS.log" + stop + + chance of 8%: + set {_size} to size of {db_wheel.semirare::*} + set {_ran} to random integer between 1 and {_size} + loop {db_wheel.semirare::*}: + {_loop.count} is not set: + set {_loop.count} to 0 + add 1 to {_loop.count} + {_loop.count} is {_ran}: + set {_amount} to loop-value + set {_item} to loop-index + set {_location} to {db_wheel.semirare::%loop-index%::"location"} + {_item} is "tickets": + set {_bal} to player's balance + add {_amount} to player's balance + send "&aYou have received &e%{_amount}% Tickets&a as your prize" + log "%player%^%{_bal}%^ADD^%{_amount}%^%player's balance%^semirare PRIZE WHEEL WINNINGS" to "tickets/PRIZEWHEELWINNINGS.log" + stop + {db_wheel.rewards.%player%::%{_location}%::%{_item}%} is not set: + set {db_wheel.rewards.%player%::%{_location}%::%{_item}%} to {_amount} + send "&aYou have had &e%{_amount}% %{_item}%&a added to your rewards chest. Do &e/prize show&a in &e%{_location}%&a to claim the items." + log "%player%^ADD^%{_amount}%^%{_item}%^%{_location}%^semirare PRIZE WHEEL WINNINGS" to "prizewheel/PRIZELOGS.log" + stop + {db_wheel.rewards.%player%::%{_location}%::%{_item}%} is set: + add {_amount} to {db_wheel.rewards.%player%::%{_location}%::%{_item}%} + send "&aYou have had &e%{_amount}% %{_item}%&a added to your rewards chest. Do &e/prize show&a in &e%{_location}%&a to claim the items." + log "%player%^ADD^%{_amount}%^%{_item}%^%{_location}%^semirare PRIZE WHEEL WINNINGS" to "prizewheel/PRIZELOGS.log" + stop + + chance of 15%: + set {_size} to size of {db_wheel.uncommon::*} + set {_ran} to random integer between 1 and {_size} + loop {db_wheel.uncommon::*}: + {_loop.count} is not set: + set {_loop.count} to 0 + add 1 to {_loop.count} + {_loop.count} is {_ran}: + set {_amount} to loop-value + set {_item} to loop-index + set {_location} to {db_wheel.uncommon::%loop-index%::"location"} + {_item} is "tickets": + set {_bal} to player's balance + add {_amount} to player's balance + send "&aYou have received &e%{_amount}% Tickets&a as your prize" + log "%player%^%{_bal}%^ADD^%{_amount}%^%player's balance%^uncommon PRIZE WHEEL WINNINGS" to "tickets/PRIZEWHEELWINNINGS.log" + stop + {db_wheel.rewards.%player%::%{_location}%::%{_item}%} is not set: + set {db_wheel.rewards.%player%::%{_location}%::%{_item}%} to {_amount} + send "&aYou have had &e%{_amount}% %{_item}%&a added to your rewards chest. Do &e/prize show&a in &e%{_location}%&a to claim the items." + log "%player%^ADD^%{_amount}%^%{_item}%^%{_location}%^uncommon PRIZE WHEEL WINNINGS" to "prizewheel/PRIZELOGS.log" + stop + {db_wheel.rewards.%player%::%{_location}%::%{_item}%} is set: + add {_amount} to {db_wheel.rewards.%player%::%{_location}%::%{_item}%} + send "&aYou have had &e%{_amount}% %{_item}%&a added to your rewards chest. Do &e/prize show&a in &e%{_location}%&a to claim the items." + log "%player%^ADD^%{_amount}%^%{_item}%^%{_location}%^uncommon PRIZE WHEEL WINNINGS" to "prizewheel/PRIZELOGS.log" + stop + + set {_size} to size of {db_wheel.common::*} + set {_ran} to random integer between 1 and {_size} + loop {db_wheel.common::*}: + {_loop.count} is not set: + set {_loop.count} to 0 + add 1 to {_loop.count} + {_loop.count} is {_ran}: + set {_amount} to loop-value + set {_item} to loop-index + set {_location} to {db_wheel.common::%loop-index%::"location"} + {_item} is "tickets": + set {_bal} to player's balance + add {_amount} to player's balance + send "&aYou have received &e%{_amount}% Tickets&a as your prize" + log "%player%^%{_bal}%^ADD^%{_amount}%^%player's balance%^COMMON PRIZE WHEEL WINNINGS" to "tickets/PRIZEWHEELWINNINGS.log" + stop + {db_wheel.rewards.%player%::%{_location}%::%{_item}%} is not set: + set {db_wheel.rewards.%player%::%{_location}%::%{_item}%} to {_amount} + send "&aYou have had &e%{_amount}% %{_item}%&a added to your rewards chest. Do &e/prize show&a in &e%{_location}%&a to claim the items." + log "%player%^ADD^%{_amount}%^%{_item}%^%{_location}%^COMMON PRIZE WHEEL WINNINGS" to "prizewheel/PRIZELOGS.log" + stop + {db_wheel.rewards.%player%::%{_location}%::%{_item}%} is set: + add {_amount} to {db_wheel.rewards.%player%::%{_location}%::%{_item}%} + send "&aYou have had &e%{_amount}% %{_item}%&a added to your rewards chest. Do &e/prize show&a in &e%{_location}%&a to claim the items." + log "%player%^ADD^%{_amount}%^%{_item}%^%{_location}%^COMMON PRIZE WHEEL WINNINGS" to "prizewheel/PRIZELOGS.log" + stop + + diff --git a/Obam-Survival/fortune.sk b/Obam-Survival/fortune.sk index 801aed7..b5a949c 100644 --- a/Obam-Survival/fortune.sk +++ b/Obam-Survival/fortune.sk @@ -63,9 +63,13 @@ command /aura [] [] [text]: send "&7 This aura gives you an increasing chance to find more gems and ingots at the cost of alerting others to your position." argument 1 is "debug": send "spam count: %{fortune.spam.%player%}%" - send "Fortune on: %{fortune.aura.%player%}%" + send "Fortune on: %{current.aura.%player%}%" send "Current chance: %{fortune.chance.%player%}%" - send "Alert Status: %{fortune.alert.%player%}%" + send "Alert Status: %{aura.alert.%player%}%" + {for.ran.%player%} is not set: + send "Random Number: &cNOT SET" + {for.ran.%player%} is set: + send "Random Number: %{for.ran.%player%}%" every 15 minutes: loop all players: @@ -99,10 +103,11 @@ on break: block is diamond ore or emerald ore or gold ore or iron ore or lapis ore or redstone ore or coal ore or nether quartz ore: {fortune.spam.%player%} is greater than {for.ran.%player%}: loop all players: - {aura.alert.%player%} is true: + {aura.alert.%loop-player%} is true: send "&3&lIt seems %player% hit the %block% jackpot at %location of player%!" to loop-player set {fortune.spam.%player%} to 0 set {for.ran.%player%} to random integer between 5 and 15 + {current.aura.%player%} is "fortune" block is diamond ore: add 1 to {fortune.spam.%player%} chance of {fortune.chance.%player%}%: diff --git a/Obam-Survival/heads.sk b/Obam-Survival/heads.sk index c132026..1ececea 100644 --- a/Obam-Survival/heads.sk +++ b/Obam-Survival/heads.sk @@ -2,6 +2,11 @@ on death of a player: attacker is a player: attacker is not victim: add skull of victim to drops + set {_item} to "paper;&3Death Note - &eVICTIM;&7This note shows that &eATTACKER&7 took the||&7life of &eVICTIM&7 on &eDATE EST" + replace "VICTIM" in {_item} with "%victim%" + replace "ATTACKER" in {_item} with "%attacker%" + replace "DATE" in {_item} with "%now%" + add named item stack from {_item} to drops on death of a creeper or skeleton or zombie: attacker is a player: