UOOutlands / Razor

Razor is a free tool designed to help with simple tasks while playing Ultima Online.
http://www.uor-razor.com
GNU General Public License v3.0
9 stars 6 forks source link

Implemented string interpolation for sysmsg and overhead #92

Open Tranq1 opened 2 years ago

Tranq1 commented 2 years ago

This PR enables string interpolation for variables in sysmessage and overhead outputs. To achieve this, put your variable in between double curly braces like this: {{myvar}}.

Example script:

@setvar myvar backpack
getlabel backpack mylabel

removelist mylist
createlist mylist
pushlist mylist "hello"

sysmsg "myvar: {{myvar}}" 40
sysmsg "mylabel: {{mylabel}}" 30
foreach listvar in mylist
    sysmsg "list var: {{listvar}}" 20
endfor
sysmsg "not found: {{doesntexist}}" 10

Result:

image

anethus commented 2 years ago

Beta Client Build and Release #55