summaryrefslogtreecommitdiff
path: root/npc/commands/grantpower.txt
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2023-10-28 14:17:35 -0300
committerJesusaves <cpntb1@ymail.com>2023-10-28 14:17:35 -0300
commit03562f1ef1a8896a3056b0d3ef667b0c02ad19a3 (patch)
tree6eb1c19bfa8f500673b6d490f1869880e256c712 /npc/commands/grantpower.txt
parente086d8c87aa007a4dfe8dd675abb60ff32fc78af (diff)
downloadserverdata-03562f1ef1a8896a3056b0d3ef667b0c02ad19a3.tar.gz
serverdata-03562f1ef1a8896a3056b0d3ef667b0c02ad19a3.tar.bz2
serverdata-03562f1ef1a8896a3056b0d3ef667b0c02ad19a3.tar.xz
serverdata-03562f1ef1a8896a3056b0d3ef667b0c02ad19a3.zip
Blightbringer (original acquisition)
Diffstat (limited to 'npc/commands/grantpower.txt')
-rw-r--r--npc/commands/grantpower.txt19
1 files changed, 19 insertions, 0 deletions
diff --git a/npc/commands/grantpower.txt b/npc/commands/grantpower.txt
index 406d1a111..1762bdd5d 100644
--- a/npc/commands/grantpower.txt
+++ b/npc/commands/grantpower.txt
@@ -38,6 +38,7 @@ OnCall:
rif(countitem(Tyranny), l("Tyranny")), Tyranny,
rif(countitem(Runestaff), l("Runestaff")), Runestaff,
rif(countitem(AegisShield), l("Aegis Shield")), AegisShield,
+ rif(countitem(Blightbringer), l("Blightbringer")), Blightbringer,
l("Abort"), 0;
mes "";
.@ori=getcharid(3);
@@ -62,6 +63,8 @@ OnCall:
$RUNES_HOLDER$ = .@request$; break;
case AegisShield:
$AEGIS_HOLDER$ = .@request$; break;
+ case Blightbringer:
+ $SHADY_HOLDER$ = .@request$; break;
default:
Exception("Invalid legendary item "+str(.@ite),
RB_DEFAULT|RB_IRCBROADCAST); break;
@@ -199,6 +202,22 @@ OnClock0238:
}
}
//////////////////////////////////////////
+ if ($SHADY_HOLDER$ != "") {
+ .@nb = query_sql("SELECT last_login, char_id, account_id FROM `char` WHERE `name` = '"+$SHADY_HOLDER$+"' LIMIT 1", .@login, .@cid, .@aid);
+ if (.@login < .@kban) {
+ // Destroy the item by force
+ DelItemFromEveryPlayer(Blightbringer);
+ $SHADY_HOLDER$="";
+ kamibroadcast("The Blightbringer has given up on its previous owner and is now available for someone worthier.");
+ } else if (legendaryTimeCheck(.@login, .@kick)) {
+ // Send warning via API
+ legendaryAPIWarning(.@aid);
+ } else if (legendaryTimeCheck(.@login, .@warn)) {
+ // Send warning ingame
+ legendaryRodexWarning(.@cid);
+ }
+ }
+ //////////////////////////////////////////
end;
}