|
@@ -125,107 +125,6 @@ matchup = Command.new(:matchup, desc, opts) do |event, primary, secondary|
|
|
|
end
|
|
end
|
|
|
end
|
|
end
|
|
|
|
|
|
|
|
-opts = { "" => ""}
|
|
|
|
|
-desc = "Shows the weather"
|
|
|
|
|
-weather = Command.new(:weather, desc, opts) do |event|
|
|
|
|
|
-
|
|
|
|
|
- channel = event.channel.id
|
|
|
|
|
- size_width = 700;
|
|
|
|
|
- size_height = 600;
|
|
|
|
|
- output_file = "images/Image_Builder/Weather"
|
|
|
|
|
- map1 = "images/TheMap1.png"
|
|
|
|
|
- map2 = "images/TheMap2.png"
|
|
|
|
|
- map3 = "images/TheMap3.png"
|
|
|
|
|
- frame = "images/FrameFG.png"
|
|
|
|
|
-
|
|
|
|
|
- time = Time.now
|
|
|
|
|
- #Map 1
|
|
|
|
|
- merge_image(
|
|
|
|
|
- ["images/Image_Builder/BG.png", map1, frame, "images/Castform.png",
|
|
|
|
|
- "images/Day_Night.png", "images/Day_Sunny.png","images/Day_Snow.png", "images/Day_Stormy.png",
|
|
|
|
|
- "images/Day_Windy.png","images/Day_Sandstorm.png","images/Day_Rainy.png"],
|
|
|
|
|
- output_file,
|
|
|
|
|
- size_width,
|
|
|
|
|
- size_height,
|
|
|
|
|
- [nil, size_width-500, nil, 0, 350, 400, 200, 300, 475, 550, 325],
|
|
|
|
|
- [nil, size_height-500, nil, 100, 250, 400, 400, 350, 475, 250, 100],
|
|
|
|
|
- [size_width, 500, nil, 250, 100, 100, 100, 100, 100, 100, 100],
|
|
|
|
|
- [size_height, 500, nil, 250, 100, 100, 100, 100, 100, 100, 100]
|
|
|
|
|
- )
|
|
|
|
|
-
|
|
|
|
|
- temp = ["56°F \ 13°C", "84°F \ 28°C", "61°F \ 16°C", "40°F \ 4°C", "51°F \ 10°C", "59°F \ 15°C", "56°F \ 13°C"]
|
|
|
|
|
- weather = ["Clear", "Partly Cloudy", "Mostly Cloudy", "Rain Shower", "Clear ", "Partly Cloudy", "Cloudy"]
|
|
|
|
|
-
|
|
|
|
|
- fullforcast = "Zaplana weather is as follows!\n\n" +
|
|
|
|
|
- "Well, let's start us off at Diglett Cave and Infant Isle. Conditions there are **#{weather[0]}** at a tempature of **#{temp[0]}**.\n\n" +
|
|
|
|
|
- "Moving east by the Ravenous Ruins, Taurel, and Bambina, conditions there look **#{weather[1]}** hanging around a temp of **#{temp[1]}**.\n\n" +
|
|
|
|
|
- "Over in Melody Springs, Liquamond, it's looking **#{weather[2]}** with a tempature of **#{temp[2]}**.\n\n" +
|
|
|
|
|
- "Wrapping right on around the island, the mountain peaks of Styx, Mesmer, and Evo are looking **#{weather[3]}** at **#{temp[3]}**\n\n" +
|
|
|
|
|
- "Anyone looking to visit Moomoo Fields or Lake Carbonation might run into some **#{weather[4]}** conditions around **#{temp[4]}**\n\n" +
|
|
|
|
|
- "In the city, LaRousse and the island are **#{weather[5]}** lingering around **#{temp[5]}**.\n\n" +
|
|
|
|
|
- "And to wrap us up, here in The Village and Obe City is **#{weather[6]}** reaching **#{temp[6]}**.\n\n" +
|
|
|
|
|
- "";
|
|
|
|
|
-
|
|
|
|
|
- msg = bot.send_file(channel, File.open("#{output_file}.png", 'r'))
|
|
|
|
|
- event.send_embed("", message_embed("Weather Report", fullforcast, 'https://i.imgur.com/3i9UuHH.png'))
|
|
|
|
|
-
|
|
|
|
|
- sleep 1
|
|
|
|
|
-
|
|
|
|
|
- #Map 2
|
|
|
|
|
- merge_image(
|
|
|
|
|
- ["images/Image_Builder/BG.png", map2, frame,
|
|
|
|
|
- "images/Castform.png", "images/Day_Night.png", "images/Day_Sunny.png"],
|
|
|
|
|
- output_file,
|
|
|
|
|
- size_width,
|
|
|
|
|
- size_height,
|
|
|
|
|
- [nil, size_width-500, nil, 0, 350, 250],
|
|
|
|
|
- [nil, size_height-500, nil, 100, 400, 100],
|
|
|
|
|
- [size_width, 500, nil, 250, 100, 100],
|
|
|
|
|
- [size_height, 500, nil, 250, 100, 100]
|
|
|
|
|
- )
|
|
|
|
|
-
|
|
|
|
|
- temp = ["84°F \ 28°C", "85°F \ 29°C"]
|
|
|
|
|
- weather = ["Partly Cloudy", "Fair"]
|
|
|
|
|
-
|
|
|
|
|
- fullforcast = "As we move our focus to the West!\n\n" +
|
|
|
|
|
- "We see the conditions at Twin Lakes Island are **#{weather[0]}** at a tempature of **#{temp[0]}**.\n\n" +
|
|
|
|
|
- "The weather over by the Living Islands look **#{weather[1]}** hanging around a temp of **#{temp[1]}**.\n\n" +
|
|
|
|
|
- "";
|
|
|
|
|
-
|
|
|
|
|
- msg = bot.send_file(channel, File.open("#{output_file}.png", 'r'))
|
|
|
|
|
- event.send_embed("", message_embed("Weather Report", fullforcast, 'https://i.imgur.com/3i9UuHH.png'))
|
|
|
|
|
-
|
|
|
|
|
- sleep 1
|
|
|
|
|
-
|
|
|
|
|
- #Map 3
|
|
|
|
|
- merge_image(
|
|
|
|
|
- ["images/Image_Builder/BG.png", map3, frame,
|
|
|
|
|
- "images/Castform.png", "images/Day_Night.png", "images/Day_Sunny.png","images/Day_Snow.png",
|
|
|
|
|
- "images/Day_Stormy.png"],
|
|
|
|
|
- output_file,
|
|
|
|
|
- size_width,
|
|
|
|
|
- size_height,
|
|
|
|
|
- [nil, size_width-500, nil, 0, 500, 500, 400, 600],
|
|
|
|
|
- [nil, size_height-500, nil, 100, 200, 400, 450, 500],
|
|
|
|
|
- [size_width, 500, nil, 250, 100, 100, 100, 100],
|
|
|
|
|
- [size_height, 500, nil, 250, 100, 100, 100, 100]
|
|
|
|
|
- )
|
|
|
|
|
-
|
|
|
|
|
- temp = ["61°F \ 16°C", "82°F \ 27°C", "57°F \ 13°C", "14°F \ -10°C"]
|
|
|
|
|
- weather = ["Rain", "Sandstorm", "Clear", "Fair"]
|
|
|
|
|
-
|
|
|
|
|
- fullforcast = "Lastly! The lands further east! \n\n" +
|
|
|
|
|
- "Santorini looks **#{weather[0]}** at a tempature of **#{temp[0]}**.\n\n" +
|
|
|
|
|
- "As we travel into the desert, conditions appear **#{weather[1]}** hanging around a temp of **#{temp[1]}**.\n\n" +
|
|
|
|
|
- "On the east coast of Santorini we have conditions looking **#{weather[2]}** with a tempature of **#{temp[2]}**.\n\n" +
|
|
|
|
|
- "And to wrap it up, Glacius seems to be having condiions looking **#{weather[3]}** at **#{temp[3]}**\n\n" +
|
|
|
|
|
- "Back to you in the studio!";
|
|
|
|
|
-
|
|
|
|
|
- msg = bot.send_file(channel, File.open("#{output_file}.png", 'r'))
|
|
|
|
|
- event.send_embed("", message_embed("Weather Report", fullforcast, 'https://i.imgur.com/3i9UuHH.png'))
|
|
|
|
|
-
|
|
|
|
|
-end
|
|
|
|
|
-
|
|
|
|
|
opts = {
|
|
opts = {
|
|
|
"@user" => "List all user stats",
|
|
"@user" => "List all user stats",
|
|
|
}
|
|
}
|
|
@@ -233,8 +132,8 @@ desc = "Shows ones stats, level, rank, and experience"
|
|
|
stats = Command.new(:stats, desc, opts) do |event, name|
|
|
stats = Command.new(:stats, desc, opts) do |event, name|
|
|
|
|
|
|
|
|
case name
|
|
case name
|
|
|
- when Regex::UID
|
|
|
|
|
- user_id = Regex::UID.match(name)
|
|
|
|
|
|
|
+ when UID
|
|
|
|
|
+ user_id = UID.match(name)
|
|
|
user = event.server.member(user_id[1])
|
|
user = event.server.member(user_id[1])
|
|
|
user_url = user.avatar_url if user
|
|
user_url = user.avatar_url if user
|
|
|
when String
|
|
when String
|
|
@@ -242,29 +141,100 @@ stats = Command.new(:stats, desc, opts) do |event, name|
|
|
|
end
|
|
end
|
|
|
|
|
|
|
|
channel = event.channel.id
|
|
channel = event.channel.id
|
|
|
- size_width = 513;
|
|
|
|
|
|
|
+ size_width = 570;
|
|
|
size_height = 376;
|
|
size_height = 376;
|
|
|
stats_frame = "images/LevelUp.png"
|
|
stats_frame = "images/LevelUp.png"
|
|
|
level_up = "images/LevelUpFont.png"
|
|
level_up = "images/LevelUpFont.png"
|
|
|
- user_url_img = "images/Image_Builder/user_url.png"
|
|
|
|
|
|
|
+ user_url_img = "images/Image_Builder/user_url_img.png"
|
|
|
output_file = "images/Image_Builder/LevelUp"
|
|
output_file = "images/Image_Builder/LevelUp"
|
|
|
|
|
|
|
|
Down.download(user_url, destination: user_url_img)
|
|
Down.download(user_url, destination: user_url_img)
|
|
|
|
|
|
|
|
|
|
+ #Gif Destroyer
|
|
|
i = Magick::ImageList.new(user_url_img)
|
|
i = Magick::ImageList.new(user_url_img)
|
|
|
binding.pry
|
|
binding.pry
|
|
|
|
|
|
|
|
|
|
+ if(i.count > 1)
|
|
|
|
|
+ i[0].write(user_url_img);
|
|
|
|
|
+ end
|
|
|
|
|
+ #End Gif Destroyer
|
|
|
|
|
+
|
|
|
merge_image(
|
|
merge_image(
|
|
|
[stats_frame, level_up, user_url_img],
|
|
[stats_frame, level_up, user_url_img],
|
|
|
output_file,
|
|
output_file,
|
|
|
size_width,
|
|
size_width,
|
|
|
size_height,
|
|
size_height,
|
|
|
- [nil, 0, 19],
|
|
|
|
|
- [nil, 0, 92],
|
|
|
|
|
- [size_width, 100, 165],
|
|
|
|
|
- [size_width, 100, 165]
|
|
|
|
|
|
|
+ [nil, nil, 19],
|
|
|
|
|
+ [nil, nil, 92],
|
|
|
|
|
+ [size_width, size_width, 165],
|
|
|
|
|
+ [size_height, size_height, 165]
|
|
|
)
|
|
)
|
|
|
|
|
|
|
|
|
|
+ # C# code for getting the percantage to the next level
|
|
|
|
|
+ #int levelprior = LevelUp[task].NextLevel - (10 * (LevelUp[task].CurrentLevel - 1) ^ 2);
|
|
|
|
|
+ #double ratio = (double)(LevelUp[task].Messages - levelprior) / (double)(LevelUp[task].NextLevel - levelprior);
|
|
|
|
|
+
|
|
|
|
|
+ ratio = 0.5
|
|
|
|
|
+
|
|
|
|
|
+ gc = Draw.new
|
|
|
|
|
+
|
|
|
|
|
+ gc.font('OpenSans-SemiBold.ttf')
|
|
|
|
|
+
|
|
|
|
|
+ gc.stroke('#39c4ff').fill('#39c4ff')
|
|
|
|
|
+ gc.rectangle(42, 48, 42 + (95 * ratio), 48 + 3)
|
|
|
|
|
+
|
|
|
|
|
+ gc.stroke('none').fill('black')
|
|
|
|
|
+ gc.pointsize('15')
|
|
|
|
|
+ name_sm = "Test Name 1"
|
|
|
|
|
+ gc.text(15,25, name_sm)
|
|
|
|
|
+ level = 'Lv.4'
|
|
|
|
|
+ gc.text(40, 45, level)
|
|
|
|
|
+ level_rank = 'Rank 104'
|
|
|
|
|
+ gc.text(15, 290, level_rank)
|
|
|
|
|
+ exp = '12340'
|
|
|
|
|
+ gc.text(40, 65, exp)
|
|
|
|
|
+
|
|
|
|
|
+ gc.stroke('white').fill('white')
|
|
|
|
|
+ gc.pointsize('30')
|
|
|
|
|
+ name_lg = "Test Name 2"
|
|
|
|
|
+ gc.text(40,330, name_lg)
|
|
|
|
|
+ reached = "reached level 4!"
|
|
|
|
|
+ gc.text(40,360, reached)
|
|
|
|
|
+
|
|
|
|
|
+ gc.stroke('none').fill('black')
|
|
|
|
|
+ gc.pointsize('18')
|
|
|
|
|
+ lvl_max_hp = '10'
|
|
|
|
|
+ gc.text(450, 97, lvl_max_hp)
|
|
|
|
|
+ lvl_atk = '11'
|
|
|
|
|
+ gc.text(450, 127, lvl_atk)
|
|
|
|
|
+ lvl_def = '12'
|
|
|
|
|
+ gc.text(450, 159, lvl_def)
|
|
|
|
|
+ lvl_sp_atk = '13'
|
|
|
|
|
+ gc.text(450, 191, lvl_sp_atk)
|
|
|
|
|
+ lvl_sp_def = '14'
|
|
|
|
|
+ gc.text(450, 222, lvl_sp_def)
|
|
|
|
|
+ lvl_speed = '15'
|
|
|
|
|
+ gc.text(450, 255, lvl_speed)
|
|
|
|
|
+
|
|
|
|
|
+ gc.stroke('none').fill('maroon')
|
|
|
|
|
+ iv_max_hp = '+10'
|
|
|
|
|
+ gc.text(505, 97, iv_max_hp)
|
|
|
|
|
+ iv_atk = '+11'
|
|
|
|
|
+ gc.text(505, 127, iv_atk)
|
|
|
|
|
+ iv_def = '+12'
|
|
|
|
|
+ gc.text(505, 159, iv_def)
|
|
|
|
|
+ iv_sp_atk = '+13'
|
|
|
|
|
+ gc.text(505, 191, iv_sp_atk)
|
|
|
|
|
+ iv_sp_def = '+14'
|
|
|
|
|
+ gc.text(505, 222, iv_sp_def)
|
|
|
|
|
+ iv_speed = '+15'
|
|
|
|
|
+ gc.text(505, 255, iv_speed)
|
|
|
|
|
+
|
|
|
|
|
+ u = Magick::ImageList.new("#{output_file}.png")
|
|
|
|
|
+ gc.draw(u[0])
|
|
|
|
|
+
|
|
|
|
|
+ u.write("#{output_file}.png")
|
|
|
|
|
+
|
|
|
msg = bot.send_file(channel, File.open("#{output_file}.png", 'r'))
|
|
msg = bot.send_file(channel, File.open("#{output_file}.png", 'r'))
|
|
|
|
|
|
|
|
end
|
|
end
|
|
@@ -781,10 +751,15 @@ commands = [
|
|
|
member,
|
|
member,
|
|
|
item,
|
|
item,
|
|
|
inv,
|
|
inv,
|
|
|
|
|
+<<<<<<< 77a766d541086a3ee08efe0eebbbcad8820c7865
|
|
|
status,
|
|
status,
|
|
|
afflict,
|
|
afflict,
|
|
|
cure,
|
|
cure,
|
|
|
team,
|
|
team,
|
|
|
|
|
+||||||| merged common ancestors
|
|
|
|
|
+ weather,
|
|
|
|
|
+=======
|
|
|
|
|
+>>>>>>> level up
|
|
|
stats
|
|
stats
|
|
|
]
|
|
]
|
|
|
|
|
|