User Tools

Site Tools


misc_func

Scripting - Misc data and function

Here can find some infomation about Enhanced Scripting function and data misc!

Message

Player Sysmessage
Syntax Misc.SendMessage(string or int or bool)
Description:
Send a sysmessage.
Returns void
In Object: Misc
Parameters: string Message, int Value, bool Status

Player Sysmessage colored
Syntax Misc.SendMessage(string or int or bool, color)
Description:
Send a sysmessage whit specific color
Returns none
In Object: Misc
Parameters: string Message or int Value or bool Status, int color
Player SendToClient
Syntax Misc.SendToClient(string)
Description:
Send a string to the UO client window. Can contain control characters by prefixing the character with ^ (e.g. ctrl-u is “^u”)
Returns none
In Object: Misc
Parameters: string to send to client window

System

Resync Game Data
Syntax Misc.Resync( )
Description:
Resync game data.
Returns void
In Object: Misc
Parameters: none

Pause on Script
Syntax Misc.Pause(int)
Description:
Pause script for X millisecond.
Returns void
In Object: Misc
Parameters: MSpause
Focus on UoClient window
Syntax Misc.FocusUOWindow()
Description:
Set UoClient window in focus or restore if minimized.
Returns void
In Object: Misc
Parameters: none

Misc

Beep
Syntax Misc.Beep( )
Description:
Play beep system sound.
Returns void
In Object: Misc
Parameters: none
Shard Name
Syntax Misc.ShardName( )
Description:
Get string with shard name you play.
Returns string
In Object: Misc
Parameters: none

Disconnect

Disconnect
Syntax Misc.Disconnect( )
Description: Immediate logout
Force client to disconnect.
Returns void
In Object: Misc
Parameters: none

Context Menu

Wait Context Menu
Syntax Misc.WaitForContext(int or mobile or item, int)
Description:
Wait server response a context menu request.
Returns List < Context > - Context { int reply, string text in menu }
In Object: Misc
Parameters: timeout
Context Menu Reply
Syntax Misc.ContextReply(int or mobile or item, int or string)
Description:
Respond to a context menu on mobile or item. Menu ID is base zero, or can use string of menu text
Returns void
In Object: Misc
Parameters: Menuname

Share Data for Script

Read Shared Value
Syntax Misc.ReadSharedValue(string)
Description:
Read a shared value, if value not exist return null.
Returns obj
In Object: Misc
Parameters: nameofvalue
Remove Shared Value
Syntax Misc.RemoveSharedValue(string)
Description:
Remove a shared value,
Returns void
In Object: Misc
Parameters: nameofvalue
Check Shared Value
Syntax Misc.CheckSharedValue(string)
Description:
Get a true o flase if value exist.
Returns bool
In Object: Misc
Parameters: nameofvalue
Set Shared Value
Syntax Misc.SetSharedValue(string, obj)
Description:
Set a value by specific name, if value exist he repalce value.
Returns void
In Object: Misc
Parameters: value

Old Menu

Has Menu
Syntax Misc.HasMenu()
Description:
Return bool if have or not a menu opened.
Returns bool
In Object: Misc
Parameters: none
Close Menu
Syntax Misc.CloseMenu()
Description:
Close opened menu.
Returns void
In Object: Misc
Parameters: none
Menu Contain
Syntax Misc.MenuContain(string)
Description:
Search in opened menu if contains a specific string, return true or false.
Returns bool
In Object: Misc
Parameters: texttosearch
Menu Title
Syntax Misc.GetMenuTitile()
Description:
Return a string of title for opene menu.
Returns string
In Object: Misc
Parameters: none
Wait For Menu
Syntax Misc.WaitForMenu(int)
Description:
Pause script until server send menu, delay is in ms.
Returns void
In Object: Misc
Parameters: delayinms
Menu Response
Syntax Misc.MenuResponse(string)
Description:
Perform a menu response by subitem name. If item not exist close menu
Returns void
In Object: Misc
Parameters: subitemname

Query String

Has Has QueryString
Syntax Misc.HasQueryString( )
Description:
Check if a have a query string menu opened, return true or false.
Returns bool
In Object: Misc
Parameters: none
Wait For Query String
Syntax Misc.WaitForQueryString(int)
Description:
Pause script until server send query string request, delay is in ms.
Returns void
In Object: Misc
Parameters: delayinms
Query String Response
Syntax Misc.QueryStringResponse(bool, string)
Description:
Perform a query string response by ok or cancel button and specific response string.
Returns void
In Object: Misc
Parameters: stringtoresponse

Script Function

Run a Script
Syntax Misc.ScriptRun(string)
Description:
Run a script by file name, Script must be present in script grid.
Returns void
In Object: Misc
Parameters: scriptfilename
Stop a Script
Syntax Misc.ScriptStop(string)
Description:
Stop a script by file name, Script must be present in script grid.
Returns void
In Object: Misc
Parameters: scriptfilename
Stop all Script
Syntax Misc.ScriptStopAll( )
Description:
Stop all script running.
Returns void
In Object: Misc
Parameters: none
Script Status
Syntax Misc.ScriptStatus(string)
Description:
Get status of script if running or not, Script must be present in script grid.
Returns bool
In Object: Misc
Parameters: scriptfilename

Pets

Rename Pet
Syntax Misc.PetRename(int or mobile, string )
Description:
Rename a specific pet.
Returns void
In Object: Misc
Parameters: newname

String Prompt Response

Reset Prompt response
Syntax Misc.ResetPrompt()
Description:
Reset a prompt response.
Returns void
In Object: Misc
Parameters: none
Reset Prompt response
Syntax Misc.HasPrompt()
Description:
Check if have a prompt request.
Returns bool
In Object: Misc
Parameters: none
Wait Prompt
Syntax Misc.WaitForPrompt(int)
Description:
Wait a prompt response.
Returns bool
In Object: Misc
Parameters: delaytowait
Cancel Prompt
Syntax Misc.CancelPrompt()
Description:
Cancel a prompt request.
Returns bool
In Object: Misc
Parameters: none
Prompt Response
Syntax Misc.ResponsePrompt( string )
Description:
Response a prompt request.
Returns bool
In Object: Misc
Parameters: reponsetosend

Ignore List

Add onbject to Ignore List
Syntax Misc.IgnoreObject( )
Description:
Add a object to ignore list. Can add serial, items or mobiles
Returns void
In Object: Misc
Parameters: mobtoignore
Remove onbject from Ignore List
Syntax Misc.UnIgnoreObject( )
Description:
Remove object from ignore list. Can remove serial, items or mobiles
Returns void
In Object: Misc
Parameters: mobtounignore
Check onbject if present in Ignore List
Syntax Misc.CheckIgnoreObject( )
Description:
Check object from ignore list, return true if present. Can check serial, items or mobiles
Returns bool
In Object: Misc
Parameters: mobtocheck
Clear ignore list
Syntax Misc.ClearIgnore( )
Description:
Clear ignore list from all object
Returns void
In Object: Misc
Parameters: none
Get the path to the script directory
Syntax Misc.CurrentScriptDirectory( )
Description:
Return the path to the current script directory use in your code like:

import sys
#
if not Misc.CurrentScriptDirectory() in sys.path:
    sys.path.append(Misc.CurrentScriptDirectory())
#

Returns void
In Object: Misc
Parameters: none

misc_func.txt · Last modified: 2020/07/06 03:29 (external edit)