Just installed OpenSuSe Linux 11.1 a lovely little operating system (Dual Booting it with Windows 7) and trying to get a mud system called Treant to work under WINE. I've managed to get MUSHClient to install properly but when it comes to opening my Treant.mcl file from my windows install (copied into the WINE file system) MUSHClient crashes with no error messages.
This also happens if I try to load plugins not associated with the Treant operating systems.
Switching over to Windows 98 emulation mode fixed 90% of my problems, had to reload a few plugins due to different installation paths but that was easy.
My only problem now is I have a miniwindows plugin as part of the system - shown below. The miniwindows loads fine, my problem is where its located, under windows it appears in the top right hand corner of the screen away from the MUD text, in Linux it shows in the top left corner, right over the main text out.
<!-- Script -->
<script>
<![CDATA[
if not map then
map = {}
end
-- First line of the in-game map detected, start the capturing process
function map:start(line, styles)
EnableTrigger("mapcapture__", true)
-- If we haven't already created the map window, do so now
if not self.win then
WindowCreate("treant_map", 0, 0, 0, 0, 6, 1, ColourNameToRGB("black"))
WindowFont("treant_map", "map", "Lucida Console", 8, false, false, false, false)
-- Re-create the window to fit the text using the chosen font
WindowCreate("treant_map", 0, 0, self.width, self.line_height * 25, 6, 1, ColourNameToRGB("black"))
WindowFont("treant_map", "map", "Lucida Console", 8, false, false, false, false)
WindowShow("treant_map", true)
local left = 0
for _,s in ipairs(styles) do
left = left + WindowText("treant_map", "map", s.text, left, 0, 0, 0, s.textcolour)
end
self.lines = 1
end
-- Last line of the in-game map detected, close the capturing process
function map:finish(line, styles)
local left = 0
for _,s in ipairs(styles) do
left = left + WindowText("treant_map", "map", s.text, left, self.lines * self.line_height, 0, 0, s.textcolour)
end
EnableTrigger("mapcapture__", false)
end
-- The map being displayed, one line at a time
function map:capture(line, styles)
local left = 0
for _,s in ipairs(styles) do
left = left + WindowText("treant_map", "map", s.text, left, self.lines * self.line_height, 0, 0, s.textcolour)
end
self.lines = self.lines + 1
end
function map_redirect(name, line, wildcards, styles)
if name == "mapstart__" then
map:start(line, styles)
elseif name == "mapfinish__" then
map:finish(line, styles)
else
map:capture(line, styles)
end
end
]]>
</script>
</muclient>
Oh, just as a note, originally the above code said this:
-- If we haven't already created the map window, do so now
if not self.win then
WindowCreate("treant_map", 0, 0, 300, 300, 6, 1, ColourNameToRGB("black"))
WindowFont("treant_map", "map", "Lucida Console", 8, false, false, false, false)
I changed it to:
-- If we haven't already created the map window, do so now
if not self.win then
WindowCreate("treant_map", 0, 0, 0, 0, 6, 1, ColourNameToRGB("black"))
WindowFont("treant_map", "map", "Lucida Console", 8, false, false, false, false)
Both versions show the Miniwindows in the top left hand corner of the screen.
Tried the code and it showed a green box in the upper right hand corner, tried replacing the code in the plugin with your code but same problem, it displays up in the top left corner rather than the top right corner. Any way I could change the above plugin to make the map window movable so I could just specify a location on screen by drag and drop?
Nice work! It looks that you are highly expert blogger. Your post is an excellent example of why I keep coming back to read your excellent quality content that is forever updated.