From 273e8bb199237cfb38a04a0f74653f93d640319a Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Wed, 8 Jan 2020 17:32:56 -0300 Subject: Add EVOL_MONSTER_IDENTIFY skill. Allow players with this skill to use both `/mi` and `@monsterinfo` commands. The skill still isn't obtainable anywhere. Single level. --- npc/commands/mobinfo.txt | 29 +++++++++++++++++++++++++++++ npc/scripts.conf | 1 + 2 files changed, 30 insertions(+) create mode 100644 npc/commands/mobinfo.txt (limited to 'npc') diff --git a/npc/commands/mobinfo.txt b/npc/commands/mobinfo.txt new file mode 100644 index 00000000..691bfb68 --- /dev/null +++ b/npc/commands/mobinfo.txt @@ -0,0 +1,29 @@ +// The Mana World Script +// +// @monsterinfo +// Sends @mobinfo with a delay (moved from atcommand.conf) +// Requires EVOL_MONSTER_IDENTIFY +// +- script @monsterinfo 32767,{ + end; + +OnCall: + // Check for skill level + if (!getskilllv(EVOL_MONSTER_IDENTIFY)) + end; + + // ... + if (@rsync_delay > gettimetick(2)) { + dispbottom l("Not doing that to prevent flood."); + end; + } + + // Send @mobinfo and set a cooldown of 3 seconds. + atcommand("@mobinfo " + implode(.@atcmd_parameters$, " ")); + @rsync_delay=gettimetick(2)+3; + end; + +OnInit: + bindatcmd "monsterinfo", "@monsterinfo::OnCall", 0, 60, 0; + end; +} diff --git a/npc/scripts.conf b/npc/scripts.conf index 16619850..cce40899 100644 --- a/npc/scripts.conf +++ b/npc/scripts.conf @@ -115,6 +115,7 @@ "npc/commands/zeny.txt", "npc/commands/motd-debug-text.txt", "npc/commands/motd.txt", +"npc/commands/mobinfo.txt", "npc/commands/scheduled-broadcasts.txt", "npc/commands/rate-management.txt", "npc/commands/event.txt", -- cgit v1.2.3-70-g09d2