GMCP Data: Difference between revisions
From Iron Realms Nexus Client Documentation
(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 ...") |
No edit summary |
||
Line 2: | Line 2: | ||
------------- | ------------- | ||
if (args.gmcp_method == "Char.Vitals") | if (args.gmcp_method == "Char.Vitals") | ||
{ | { | ||
Line 12: | Line 13: | ||
client.set_variable('wielded-left', left); | client.set_variable('wielded-left', left); | ||
}; | }; | ||
------------- | ------------- |
Revision as of 18:10, 11 February 2016
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);
};