From 52e5af52eda7f971b63c7d05da7786fbcaa1f09f Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Mon, 10 Jun 2024 22:29:22 -0300 Subject: Some changes requested by specing --- npc/functions/aurora.txt | 5 ++++- npc/items/shovel.txt | 18 ++++++++++-------- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/npc/functions/aurora.txt b/npc/functions/aurora.txt index fc131bef4..334fad429 100644 --- a/npc/functions/aurora.txt +++ b/npc/functions/aurora.txt @@ -791,7 +791,8 @@ function script FYRewardEvent { rodex_sendmail($@aurora_charid[.@i], "Aurora Events", $EVENT$+" Reward!", "Final Ranking: #"+(.@i+1)+". Congratulations on making "+$@aurora_value[.@i]+" points on the event!", 0, StrangeCoin, .@prize); } // Send results copy to syslog - consoleinfo("%s event finished:\n#01 - %s (%d)\n#02 - %s (%d)\n#03 - %s (%d)\n#04 - %s (%d)\n#05 - %s (%d)\n", $EVENT$, $@aurora_name$[0], $@aurora_value[0], $@aurora_name$[1], $@aurora_value[1], $@aurora_name$[2], $@aurora_value[2], $@aurora_name$[3], $@aurora_value[3], $@aurora_name$[4], $@aurora_value[4]); + .@score$=sprintf("%s event finished:\n#01 - %s (%d)\n#02 - %s (%d)\n#03 - %s (%d)\n#04 - %s (%d)\n#05 - %s (%d)\n", $EVENT$, $@aurora_name$[0], $@aurora_value[0], $@aurora_name$[1], $@aurora_value[1], $@aurora_name$[2], $@aurora_value[2], $@aurora_name$[3], $@aurora_value[3], $@aurora_name$[4], $@aurora_value[4]); + consoleinfo(.@score$); // Magic Olympics has extra rewards if ($EVENT$ == "Olympics") { if ($@aurora_charid[0] > 0) @@ -812,6 +813,8 @@ function script FYRewardEvent { DelItemFromEveryPlayer(EventFish); DelItemFromEveryPlayer(EventOre); */ + // Specing wants scoreboards to be preserved + api_send(505, "[79, 21698, '', "+.@score$+"]"); } consolebug "FYRewardEvent end %d", gettimetick(0); return; diff --git a/npc/items/shovel.txt b/npc/items/shovel.txt index 8f0708a0b..9caeaf3c2 100644 --- a/npc/items/shovel.txt +++ b/npc/items/shovel.txt @@ -504,10 +504,11 @@ function script shovel_genrandtreasure { // Success if (checkcell(.@m$, .@x, .@y, cell_chkpass)) { - shovel_addquest(.@m$, .@x, .@y, "shovel_randomtreasure"); - ShovelQuests_AssignedMAP$=shovel_getcity(.@m$); - ShovelQuests_AssignedX=.@x; - ShovelQuests_AssignedY=.@y; + if (shovel_addquest(.@m$, .@x, .@y, "shovel_randomtreasure")) { + ShovelQuests_AssignedMAP$=shovel_getcity(.@m$); + ShovelQuests_AssignedX=.@x; + ShovelQuests_AssignedY=.@y; + } } return; } @@ -577,10 +578,11 @@ function script shovel_genranddungeon { // Success if (checkcell(.@m$, .@x, .@y, cell_chkpass)) { - shovel_addquest(.@m$, .@x, .@y, "shovel_randomdungeon"); - ShovelQuests_DungeonMAP$=.@m$; - ShovelQuests_DungeonX=.@x; - ShovelQuests_DungeonY=.@y; + if (shovel_addquest(.@m$, .@x, .@y, "shovel_randomdungeon")) { + ShovelQuests_DungeonMAP$=.@m$; + ShovelQuests_DungeonX=.@x; + ShovelQuests_DungeonY=.@y; + } } return; } -- cgit v1.2.3-70-g09d2