Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import flashex.mem;
- import flashex.io;
- import flash.vm;
- import flash.vmex;
- import flash.swf;
- import flash.minimap;
- import Network;
- import licence;
- import base.ini;
- import base.win;
- import base.gui;
- import std.string;
- import std.file;
- import std.time;
- import std.random;
- import std.io;
- Dialog ref dlg;
- CheckBox jump;
- FlashObject Jump_O, Temperature_O;
- bool rew;
- HWND Btn_state;
- class HotKeyInfo{ char c; bool alt; bool ctrl; bool shift; void HotKeyInfo(char _c, bool _alt, bool _ctrl, bool _shift){
- c = _c; alt = _alt; ctrl = _ctrl; shift = _shift;}}
- HotKeyInfo hotkeyTest1 = HotKeyInfo('R', false, false, false); //Alt , Ctrl, Shift
- HotKeyControl hotKey1;
- void EventTimer(Dialog ref dlg, int param){
- Jump_O.SetDouble("z", 2222);
- Temperature_O.SetDouble("temperature", 77);
- }
- void EventHotKey1(Dialog ref dlg, int param)
- {
- if(!rew)
- {
- dlg.AddTimer(1, EventTimer, 1); Btn_state.Enable(true); Btn_state.SetText("on");
- }else{
- dlg.KillTimer(EventTimer); Btn_state.Enable(false); Btn_state.SetText("off");
- }
- rew =! rew;
- }
- void HotKeyEvent(Dialog ref dlg, int lparam){
- dlg.DelHotKey(hotkeyTest1.c, hotkeyTest1.alt, hotkeyTest1.ctrl, hotkeyTest1.shift);
- hotKey1.Get(hotkeyTest1.c, hotkeyTest1.alt, hotkeyTest1.ctrl, hotkeyTest1.shift); if(hotkeyTest1.c != 0)
- dlg.AddHotKey(hotkeyTest1.c, hotkeyTest1.alt, hotkeyTest1.ctrl, hotkeyTest1.shift, EventHotKey1, 1);}
- void SetHotKey1(Dialog ref dlg, int param)
- {
- //============= HotKeyControl выкл. вкл
- if(jump.IsChecked())
- { Beep(1000, 200);
- //BattleMinesModel\localTank\tankBody\body\pseudoVelocity\z
- //BattleMinesModel\localTank\temperature
- Jump_O = FlashObjectFind("BattleMinesModel");
- Jump_O.GetObject("localTank", Temperature_O);
- Temperature_O.GetObject("tankBody", Jump_O);
- Jump_O.GetObject("body", Jump_O);
- Jump_O.GetObject("pseudoVelocity", Jump_O);
- hotKey1.GetHWND().Enable(true);//включим контрол
- dlg.AddHotKey(hotkeyTest1.c, hotkeyTest1.alt, hotkeyTest1.ctrl, hotkeyTest1.shift, EventHotKey1, 1); //зарегистрируем (включим) хоткей
- }else{Beep(500, 200);
- hotKey1.GetHWND().Enable(false);//сделаем серым
- dlg.DelHotKey(hotkeyTest1.c, hotkeyTest1.alt, hotkeyTest1.ctrl, hotkeyTest1.shift);
- }
- }
- void EventClose(Dialog ref dlg, int param){}
- dlg = CreateDialog("Jump Hack", 230, 200, 250, 80, EventClose);
- jump = dlg.AddCheckBox("Прыжок", 40, 10, 60, 25, SetHotKey1, 1);
- Btn_state = dlg.AddButton("off", 200, 13, 20, 20, EventClose, 1);
- Btn_state.Enable(false); // Btn_state.Enable(0);
- hotKey1 = dlg.AddHotKeyControl(113, 13, 70, 19, HotKeyEvent, 0);
- hotKey1.GetHWND().Enable(false);//сделаем серым контролд хоткей
- hotKey1.Set(hotkeyTest1.c, hotkeyTest1.alt, hotkeyTest1.ctrl, hotkeyTest1.shift);//покажем дефолтный хоткей
- dlg.Show(1);
- dlg.OnTop(1); // dlg.OnTop(true);
- dlg.WaitClose();
Add Comment
Please, Sign In to add comment