Actions

GMCP Data

From Iron Realms Nexus Client Documentation

Revision as of 18:10, 11 February 2016 by Jeremy (talk | contribs) (Created page with "This sample code is called in the default onGMCP function in Reflexes. The onGMCP function is run every time the game receives a GMCP message from the server. This script ...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This sample code is called in the default onGMCP function in Reflexes. The onGMCP function is run every time the game receives a GMCP message from the server. This script has been added to that function.


if (args.gmcp_method == "Char.Vitals") {

   left = args.gmcp_args.leftwield;
   right = args.gmcp_args.rightwield;
   
   client.print("Right: " + right);
   client.print("Left: " + left);
   client.set_variable('wielded-right', right);
   client.set_variable('wielded-left', left);

};