I've yet to create anything that works, i am curious what i would need to do to get the following schenario to work correctly.
GMCP sends a packet of information during combat to indicate if your damage to an NPC is immune (thus doing no damage). I would like a note to be printed that states that the mob i am fighting is immune.
Here is the GMCP information the game sends when a mob is immune.
char.combat_immunity {"combat_immunity": "a tame dragon is immune to your attack"}i'm embarrased to show what i've written so far but i'll go ahead and do so just so you can see what i've attempted.
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE muclient>
<!-- Saved on Sunday, November 22, 2020, 7:28 PM -->
<!-- MuClient version 5.03 -->
<!-- Plugin "immunedamage" generated by Plugin Wizard -->
<muclient>
<plugin
name="immunedamage"
author="Niax"
id="e96785ac51b51fbcc18d90e0"
language="Lua"
purpose="checks for immune damage and says something"
save_state="y"
date_written="2020-11-22 19:27:43"
requires="5.03"
version="1.0"
>
</plugin>
<!-- Get our standard constants -->
<include name="constants.lua"/>
<!-- Triggers -->
<triggers>
<trigger
custom_colour="1"
enabled="y"
expand_variables="y"
group="immune"
keep_evaluating="y"
match="^You hit (.*) (.*), missing (.*) and (.*?) defends (.*?)\, leaving (.*?) at (.*?) percent. You are hit (.*?)\, are missed (.*?)\, and defend (.*?)\."
regexp="y"
send_to="12"
sequence="100"
>
</trigger>
</triggers>
<![CDATA[
--requires gmcp_handler for mm
--char.combat_immunity {"combat_immunity": "a tame dragon is immune to your attack"}
local res, gmcparg = CallPlugin("f67c4339ed0591a5b010d05b"), "gmcpval", "char.combat_immunity")
loadstring ("gmcpdata = " .. gmcparg)
Print ("this is a test. should proc on immune damage")
end
]]>
</muclient>
i have a feeling that part of the reason this isn't working is because this isn't something that i can request from gmcp behind the scenes but is instead something that is sent by the game. It doesn't happen every single combat round which i thought was odd but i'm not overly familiar with how these packets would be sent.
any insight into this would be very helpful. I am attempting to build this for blind players who are using the combat mode superbrief in materia magica. (as well as myself who isn't blind but doesn't like spam)