EC Command Scripts

Return to: Technical Information
Stygian Abyss Client – Command Action – Scripts

Below is a list of some commonly desired script commands. These can be used in two ways:

  1. Putting each line, exactly as listed, into a “Command” action within a macro (or on a hotbar) – one action per line.
  2. Adding a single slash (“/”) before each line, and putting that into your chat input box (one line at a time).

For the multi-line commands, you can hold your mouse over each line (on this page, not in game) to get an explanation as to what the individual lines do.
Note that there is a slight delay in between Commands within the same macro, so make sure you wait until every line executes before starting another macro. If you don’t, you will stop the macro before it can complete and you may get unexpected (and in some cases, potentially dangerous) results.

Opening/Closing Commonly Used Windows

Open Tip of the Day

script CreateWindow("TipoftheDayWindow", true)

Open Bug Report Window

script MainMenuWindow.OnOpenBugReportItem()

Open/Close Your Paperdoll Window

script MenuBarWindow.TogglePaperdollWindow()

Open Debug Window

script WindowSetShowing("DebugWindow", true)

Open Settings Window at the Legacy Tab

script MainMenuWindow.OnOpenUserSettings()
script SettingsWindow.OpenLegacyTab()

Hide Play Window Border

Note: Effectively prevents resizing and moving of the play window. You will need to re-run this command every time you log in.

script WindowSetShowing( "ResizeWindow", false )

Show Play Window Border

Note: Allows resizing and moving of the play window again. You will need to re-run this command every time you log in.

script WindowSetShowing( "ResizeWindow", true )

Open/Close Your Backpack

script MenuBarWindow. ToggleInventoryWindow()

 

Targetting

Clear Your Target

script TargetWindow.ClearPreviousTarget()

 

Adjusting the Object Handle Filter

Dynamic Objects

script SystemData.Settings.GameOptions.objectHandleFilter = SystemData.Settings.ObjectHandleFilter.eDynamicFilter
script UserSettingsChanged()

Corpses

script SystemData.Settings.GameOptions.objectHandleFilter = SystemData.Settings.ObjectHandleFilter.eCorpseFilter
script UserSettingsChanged()

NPCs

script SystemData.Settings.GameOptions.objectHandleFilter = SystemData.Settings.ObjectHandleFilter.eNPCFilter
script UserSettingsChanged()

NPC Vendors

script SystemData.Settings.GameOptions.objectHandleFilter = SystemData.Settings.ObjectHandleFilter.eNPCVendorFilter
script UserSettingsChanged()

Mobiles

script SystemData.Settings.GameOptions.objectHandleFilter = SystemData.Settings.ObjectHandleFilter.eMobileFilter
script UserSettingsChanged()

 

Adjusting Sound Settings

Turn Sounds Off

script SystemData.Settings.Sound.master.enabled = false
script UserSettingsChanged()

Turn Sounds On

script SystemData.Settings.Sound.master.enabled = true
script UserSettingsChanged()

Turn Sounds On

script SystemData.Settings.Sound.master.enabled = not SystemData.Settings.Sound.master.enabled
script UserSettingsChanged()

Lower Volume by 10%

Note: The numerical display on the settings window may become inaccurate until logging out and back in after using this macro.

script SystemData.Settings.Sound.master.volume = math.max( SystemData.Settings.Sound.master.volume - 0.1, 0 )
script UserSettingsChanged()

Raise Volume by 10%

Note: The numerical display on the settings window may become inaccurate until logging out and back in after using this macro.

script SystemData.Settings.Sound.master.volume = math.min( SystemData.Settings.Sound.master.volume + 0.1, 1 )
script UserSettingsChanged()

Toggle Footsteps

script SystemData.Settings.Sound.footsteps.enabled = not SystemData.Settings.Sound.footsteps.enabled
script UserSettingsChanged()

 

Changing Other Settings

Toggle Foliage Display

script SystemData.Settings.Resolution.displayFoliage = not SystemData.Settings.Resolution.displayFoliage
script UserSettingsChanged()

Toggle legacy containers On/Off

Note: Just like changing the setting in the settings window. this will not toggle containers already open.

script SystemData.Settings.Interface.LegacyContainers = not SystemData.Settings.Interface.LegacyContainers
script UserSettingsChanged()

Toggle Always Attack

script SystemData.Settings.GameOptions.alwaysAttack = not SystemData.Settings.GameOptions.alwaysAttack
script UserSettingsChanged()

 

Misc. Scripts

Dismount

Note: If you’re not mounted it will toggle your paperdoll.

script UserActionUseItem( WindowData.PlayerStatus.PlayerId, false )

Announce Your Current Facet

script _facetLbl = GetStringFromTid( UORadarGetFacetLabel( WindowData.PlayerLocation.facet ) )
script SendChat( L"We are currently in the ".._facetLbl..L" facet." )

Create Mobile Healthbar for Current Target

Note: Creates the healthbar in the top-left corner of the screen. See next command for moving it elsewhere.

script UserActionUseItem( WindowData.PlayerStatus.PlayerId, false )

Create Mobile Healthbar for Current Target near Mobile

script _mobID, _x = WindowData.CurrentTarget.TargetId, MobileHealthBarWindow.CreateHealthBar(WindowData.CurrentTarget.TargetId)
script AttachWindowToWorldObject(_mobID, "MobileHealthBarWindow".._mobID)
script DetachWindowFromWorldObject(_mobID, "MobileHealthBarWindow".._mobID)

Toggle “UI Freeze”

Note: This effectively locks (or unlocks) the play window, status window, chat windows, and menubar. You will need to re-run this set of commands every time you log in.

script Debug.PrintToChat(L"UI (Un)Freezing...")
script _doFreeze = _WindowGetShowing( "ResizeWindow" )
script WindowSetShowing( "ResizeWindow", not _doFreeze )
script WindowSetMovable( "StatusWindow", not _doFreeze )
script ChatWindow.LockWindow( _doFreeze )
script WindowSetMovable( "MenuBarWindow", not _doFreeze )
script WindowSetMovable( "MenuBarWindowMinimized", not _doFreeze )
script Debug.PrintToChat(L"UI Frozen? "..StringToWString( tostring(_doFreeze) ) )

Logout

script BroadcastEvent( SystemData.Events.LOG_OUT )

Zoom the Radar Map

Note: You can change the -50 to a different number to zoom different amounts. Make it positive and you will change the zoom in the opposite direction.

script MapCommon.AdjustZoom(-50)

Set the game window size to 1200×809

Note: 809 height used to be the magic number to make legacy art render at a 1:1 scale. This is no longer true, but this command can still be useful to get your game window to be the exact size that you want – just change the 1200 and 809 numbers to the size you want.

script ResizeWindow.SendViewportData(1200,809)

Change Heal/Cure buttons for Party Healthbars to Chivalry Spells

Note: You will need to re-run this command every time you log in.

script MobileHealthBarWindow.Spells = { Heal = 202, Cure = 201 }

Commands written by Ash, Beastmaster, BTeng_Mythic, Gildar, Maplestone, R Traveler, and Tullymars

Last modified: March 27, 2011

1 Trackbacks/Pingbacks

  1. Enhanced Client: LUA Commands/Macros - Ultima Online Forums 21 07 12

Leave a Reply

You must be logged in to post a comment.