Background Image

Posted by Serris on Sat 19 Jun 2010 08:03 PM — 3 posts, 14,186 views.

#0
I recently updated MUSH from 4.40 to 4.43 for some of the lua modules. I -hate- the black background and I used a textured background image exactly like that from Achaea's Nexus client using this code:

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE muclient>
<!-- Saved on Saturday, June 19, 2010, 12:56 PM -->
<!-- MuClient version 4.43 -->

<!-- Plugin "Background2" generated by Plugin Wizard -->

<muclient>
<plugin
   name="Background2"
   id="a92d3920c3c07b26853182cd"
   language="Lua"
   save_state="y"
   date_written="2010-06-19 12:56:00"
   requires="4.43"
   version="1.0"
   >

</plugin>


<!--  Get our standard constants -->

<include name="constants.lua"/>

<!--  Script  -->


<script>
<![CDATA[
SetBackgroundImage ("clientbg.png", 13)
]]>
</script>


</muclient>


The background image was placed in the worlds folder and worked perfectly until this update. Is there any way I can get this plugin to work again?
Australia Forum Administrator #1
Try specifically mentioning the folder. GetInfo (66) is the location of the MUSHclient.exe file. So use this modified version and move the PNG file to the same directory as MUSHclient is.



<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE muclient>
<!-- Saved on Saturday, June 19, 2010, 12:56 PM -->
<!-- MuClient version 4.43 -->

<!-- Plugin "Background2" generated by Plugin Wizard -->

<muclient>
<plugin
   name="Background2"
   id="a92d3920c3c07b26853182cd"
   language="Lua"
   save_state="y"
   date_written="2010-06-19 12:56:00"
   requires="4.43"
   version="1.0"
   >

</plugin>

<!--  Script  -->


<script>
<![CDATA[
check (SetBackgroundImage (GetInfo (66) .. "clientbg.png", 13))
]]>
</script>


</muclient>


[EDIT] I added the "check" function - this reports the error message (eg. file not found, wrong file format). This will help in debugging when you install the plugin.
Amended on Sat 19 Jun 2010 09:41 PM by Nick Gammon
#2
Worked. Many thanks as always.