-
Notifications
You must be signed in to change notification settings - Fork 0
EU AutoLoad
Home · BASIC · UO API · A–Z · Examples · Languages
Autoload\
├─ autoload.sc
├─ MyCombat.inj
├─ Crafting.bas
└─ Scripts\
├─ Healer.sc
└─ Hunter.sc
The root of Autoload is reserved for AutoLoad files and the Scripts directory. Supported AutoLoad extensions are .sc, .inj, .bas and .txt; the base name is unrestricted. Ordinary IDE scripts belong in Autoload\Scripts.
- Open Options → Basic IDE.
- Choose a file in the AutoLoad field.
- Press Apply.
The selection is stored per character in YokoAutoloadFile; its default value is autoload.sc. On entering the game scene, Runtime loads only the selected file and starts its SUB Main(). Other files in the directory do not start automatically.
In Options → Macros → Classic, Basic Auto Load reads procedures from the selected AutoLoad, displays them in its procedure list, and lets a procedure be assigned to a key or button. Activating the binding executes that procedure through the shared Basic Runtime. Changing the character or its selected AutoLoad changes the available list.
Basic Example stores a complete small script inside the normal macro profile. The editor uses a readable dark theme with light text, a visible caret and selection.
SUB Main()
UO.Print('Example macro')
END SUBTo use it:
- add Basic Example to a macro;
- open its source editor;
- write code between
SUB Main()andEND SUB; - assign the macro to a key;
- save the profile;
- press the key to execute this separate script through Runtime.
The example is stored with ordinary profile bindings, not as an extra file in the Autoload root. It does not replace the selected AutoLoad.
- a new unnamed document saved normally goes to
Autoload\Scripts; - a file opened from disk is saved back to its original path;
- Save All writes all modified documents;
- the IDE asks to save unsaved source before execution.
The IDE does not automatically create top-level AutoLoad files. Organize and select those files explicitly.
Macro execution is submitted to the managed Runtime queue, and game-thread work is kept short. A script must also yield cooperatively. Put UO.Wait(...) in repeated loops and divide expensive operations into small steps. Do not use an active infinite loop.
SUB PrintStatus()
UO.Print('HP: ' + CStr(UO.GetHP()))
END SUB
SUB Main()
UO.Print('Selected AutoLoad started')
END SUBMain starts on entry to the game scene. PrintStatus can be selected by Basic Auto Load if it appears in the procedure list generated from this file.
ClassicUO - Bad Newbie & Basic IDE Edition