Don't worry about this post for right now. I've been working on this for the past couple of hours, and I needed a way to get this data from my work computer to my home computer since my private email is down at the moment.
I'm sure I'll eventually ask for help regarding this, but for now, I'm not even finished with it.
The main concept of this Alias is to allow a user to specify how they want their screen's Mini Windows to be set up so they can tailor them to their own needs.
So the Alias aims to "turn on" a set of variables/triggers, as well as create mini windows (or hide unused windows).
I am not a programmer by far, so I'm sure this code has many mistakes in it right now, but it's a start.
--I need to make 'layout window variables for use with many interfaces (triggers alias's etc)
<aliases>
<alias
match="+layout=(battle|ooc|ic)$"
enabled="y"
send_to="12"
sequence="100"
>
<send>
local layout = %1 -- Create a var named layout with the value of whatever the wildcard was used for the Alias
-- determine what layout was requested and then set the global variables to reflect this as well as enable the specific trigger set that goes with it.
if layout == "battle" then
SetVariable(battlelayout) == 1
SetTriggerOption ("battlewindow_mod", "enabled", 1)
SetVariable(ooclayout) == 0
SetTriggerOption ("oocwindow_mod", "enabled", 0)
SetVariable(iclayout) == 0
SetTriggerOption ("icwindow_mod", "enabled", 0)
local battlewin = GetPluginID () .. ":battlewindow" -- get a unique name for Var battlewin
WindowCreate (battlewin, 0, 0, 400, 800, 4, 10, ColourNameToRGB("white")) -- create window
local battlewin2 = GetPluginID () .. ":battlewindow2" -- get a unique name for Var battlewin2
WindowCreate (battlewin, 0, 400, 400, 800, 0, 10, ColourNameToRGB("white")) -- create window
local dexwin = GetPluginID () .. ":dexwindow" -- get a unique name for Var dexwin
WindowCreate (oocwin, 0, 0, 200, 200, 12, 0, ColourNameToRGB("white")) -- create window
end --if
if layout == "ooc" then
SetVariable(battlelayout) == 0
SetTriggerOption ("battlewindow_mod", "enabled", 0)
SetVariable(ooclayout) == 1
SetTriggerOption ("oocwindow_mod", "enabled", 1)
SetVariable(iclayout) == 0
SetTriggerOption ("icwindow_mod", "enabled", 0)
end --if
if layout == "ic" then
SetVariable(battlelayout) == 1
SetTriggerOption ("battlewindow_mod", "enabled", 0)
SetVariable(ooclayout) == 0
SetTriggerOption ("oocwindow_mod", "enabled", 0)
SetVariable(iclayout) == 0
SetTriggerOption ("icwindow_mod", "enabled", 1)
end --if
-- Create windows - but not show yet
-- Main window for ooc text while RPing
local oocwin = GetPluginID () .. ":oocwindow" -- get a unique name for Var oocwin
WindowCreate (oocwin, 0, 0, 200, 200, 12, 0, ColourNameToRGB("white")) -- create window
-- Main window for battle data
local icwin = GetPluginID () .. ":icwindow" -- get a unique name for Var icwin
WindowCreate (oocwin, 0, 0, 200, 200, 12, 0, ColourNameToRGB("white")) -- create window
-- Main window for battle data
local whowin = GetPluginID () .. ":whowindow" -- get a unique name for Var whowin
WindowCreate (oocwin, 0, 0, 200, 200, 12, 0, ColourNameToRGB("white")) -- create window
if layout == "battle" then
WindowShow (battlewin, true) -- show Battlewindow miniwindow
if not WindowInfo (battlewin, 1) then
WindowCreate (battlewin, 0, 0, 0, 0, 4, 0, 0) -- positioned at the top left corner
WindowFont (battlewin, font, "Lucida Console", 9)
end -- if
battleenabled = GetTriggerOption ("battlewindow_mod", "enabled")
end -- if
end -- if
if battleenabled == 1 then
print
</send>
</alias>
</aliases>
|