Jump to content

morris79

Members
  • Posts

    39
  • Joined

  • Last visited

Reputation Activity

  1. Like
    morris79 reacted to Matenia in Wrong Lua events   
    public static void Start() { EventsLuaWithArgs.OnEventsLuaWithArgs += AntiDrownEventHandler; } public static void Stop() { EventsLuaWithArgs.OnEventsLuaWithArgs -= AntiDrownEventHandler; } private static void AntiDrownEventHandler(LuaEventsId id, List<string> args) { if (id == LuaEventsId.MIRROR_TIMER_START) { Logging.WriteDebug(args[0] + " " + args[1]); } if (id == LuaEventsId.MIRROR_TIMER_START && args[0] == "BREATH") { //sets BreathExpires to be in the future by x milliseconds BreathExpires = DateTime.Now.AddMilliseconds(double.Parse(args[1])); Logging.WriteDebug("Breath has " + double.Parse(args[1]) + " milliseconds left"); } } This code is also "bugged". Ingame Lua event handler: works perfectly, it shows event id, "BREATH" and even 4 arguments.
    But using this in the bot, it's never called.
    @Droidz maybe you need to add this event manually?
×
×
  • Create New...