The Trigger class represents a trigger registered with the hub.
When ever a user typed !triggername your script will be called, for more information read the The OnTrigger(iTriggerId, iUserId, bIsPm, sParameters) callback section.
Hex.Trigger() returns a new object of type Trigger.
mytrigger = Hex.Trigger() mytrigger:SetTrigger("trigger") -- fired when some one types "!trigger" in mainchat or in pm to hub bot function OnTrigger(iTriggerId, iUserId, bIsPm, sParameters) if mytrigger:GetTriggerId() == iTriggerId then -- a trigger we registered is being used print("Lua: TrigId="..iTriggerId.." UserId="..iUserId.."Parameters="..sParameters) end end