[Home] [Downloads] [Search] [Help/forum]


Register forum user name Search FAQ

Gammon Forum

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  Plugins
. . -> [Subject]  Aardwolf Look and scan to miniwindows. (OLD)

Aardwolf Look and scan to miniwindows. (OLD)

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page


Posted by Blainer   (191 posts)  [Biography] bio
Date Mon 27 Jul 2009 04:51 AM (UTC)

Amended on Sat 10 Oct 2009 06:40 AM (UTC) by Blainer

Message
This plugin has been replaced with http://www.gammon.com.au/forum/?id=9783






Look_Scan Plugin for Aardwolf
This plugin puts the Scan and Look command output from Aardwolf into miniwindows.

Features:
-Puts scan and look commands into miniwindows.
-Does a scan after each look command.
-Sets highlights for campaign mobs.
-Custom keywords highlight stored in SQLite database.
-Right click menu on characters and mobs in scan window.
-Copy character and mob keyword to clipboard (the keywords aren't always the right ones).

Command line:
scan - update scan window.
look - update look window.
sl <add / rem> <keywords> c:<colour> g:<group> - add keywords with colour and group
rlscan - reload plugin, use when you change the script file or it screws up
sl ? - show this help.

Macro keys:
ALT+s Show / Hide scan window.
ALT+l Show / Hide look window.

Install instructions:

If your using Inventory_window2.xml (http://www.gammon.com.au/forum/?id=9574) then you will need
upgrade this plugin following the instructions for upgrading.

1.
Download these from http://code.google.com/p/aardinvwin/:
Look_Scan.xml save to MUSH plugin directory (default: C:\Program Files\MUSHclient\worlds\plugins\)
aardsql.lua save to MUSH lua directory (default: C:\Program Files\MUSHclient\lua\)

2.
Then install Look_Scan.xml into MUSHclient using the File menu -> Plugins.
No windows will appear until you do look or scan command or just move you character however you will
see "Look_Scan.xml loaded" in the output.
http://www.gammon.com.au/forum/?id=9617

A database is created in the plugin directory (default) this can be changed by editing the aardsql.lua file.
change:
db_path = GetPluginInfo (GetPluginID(), 20) .. "\Aardwolfdb.db"

to:
db_path = [[c:\your directory]]


These options are required to be set with the MUD.
Commands:
tags EXITS on
tags ROOMDESCS on
tags ROOMNAMES on
tags ROOMCHARS on
tags ROOMOBJS on
The plugin has an option to switch these on and off when the script starts and stops (set SetTags = true below).
If you plan to enable and disable this plugin as needed and don't want to see the tags when this plugin in disabled
SetTags = true would be best, however if you plan to have this plugin running all the time SetTags = false. You can
switch off scanning after each look temporialy by clicking the minimize button or "ALT+s".


I recommend creating an alias to reload the script from the command line. This is useful if you are editing the settings
in the script file or if the script screws up. Reloading the script won't change setting unless you have edited the script.
I plan to add this alias via the script but for now you'll need to do it manually.
1.
Select and copy between the lines below.
2.
Open "Game -> Configure -> Aliases" or "CTRL+SHIFT+9" menu.
3.
Click the paste button.

--cut--
<aliases>
<alias
match="rlscan"
enabled="y"
send_to="12"
sequence="100"
>
<send>
if ReloadPlugin ("73766b7b4dfab1cd1ce9494d") == error_code.eNoSuchPlugin then
check (LoadPlugin ("/program files/mushclient/worlds/plugins/Look_Scan.xml"))
end
</send>
</alias>
</aliases>
--cut--

Full cut and paste aliases, triggers and timers instructions can be found here:
http://www.gammon.com.au/forum/?id=4777


To change the look and behaviour of the plugin open the Look_Scan.xml file
and edit the options below. An editor like Crimson Editor can be configured to display MUSH xml
files with colours making editing MUCH easier.
http://www.gammon.com.au/forum/bbshowpost.php?bbsubject_id=8692

You can find the options below starting at line 269 of Look_Scan.xml, make a backup of
these settings because tests are not done for unreasonable values.

FontName = GetInfo(20) -- Font for window, i.e. "Times New Roman", GetInfo(20) is current window font.
BackgroundColour = GetInfo (271) -- Background colour for window. Supports Lua codes and MUSH colour names
-- i.e. "2432272" or "black" or GetInfo(271) can be used, last one is your current window colour.
TitleColour = "lime" -- Colour of title text. Supports Lua codes and MUSH colour names
BannerColour = "925008" -- Title Banner colour. Supports Lua codes and MUSH colour names.
ButtonColour = "white" -- Button body colour. Supports Lua codes and MUSH colour names.
ButtonBorderColour = "black" -- Button border colour. Supports Lua codes and MUSH colour names.
BorderColour = "white" -- Window border colour. Supports Lua codes and MUSH colour names.
CampaignColour = "lime" -- Colour for campaign mob highlights. Supports Lua codes and MUSH colour names.
LFontSize = 8 -- Window font size.
FontName = GetInfo(20) -- Font for window, i.e. "Times New Roman", GetInfo(20) is current window font.
BorderWidth = 1 -- Line thickness borders.
ButtonGap = 5 -- Space between buttons.
LineSpace = 3 -- Space in points between lines of text.
OffSet = BorderWidth + 4 -- Objects offset from window edge.
ShowBorders = true -- "true" = Draw borders, "false" = Don't draw borders
ShowWelcome = true -- Show "plugin installed" msg when plugin enabled.
ScanAfterCombat = true -- Will send scan to MUD after you recieve experience
EchoCharObjs = true -- "true" = show objects and characters in display
-- "false" = only display objects and characters in miniwindow
EchoDesc = true -- "true" = show room descriptions in display
-- "false" = only display room descriptions in miniwindow
EchoName = true -- "true" = show room names in display
-- "false" = only display room names in miniwindow
ShowRoomSep = true -- "true" = will print "[-]" after look output is finished
-- "false = won't print anything
LookSpace = true -- "true" = print a blank line after look
-- "false" = no line printed after look
dbmsgs = false -- Toggle SQL msgs from db, can be toggled from cmd line. Used for testing.
SetTags = false -- "true" = will turn tags for look command on and off
-- "false" = won't set the tags, once tags are set at the MUD false is faster
-- if false is used ensure these commands are run once "tags" command will show their state:
-- tags EXITS on
-- tags ROOMDESCS on
-- tags ROOMNAMES on
-- tags ROOMCHARS on
-- tags ROOMOBJS on




[Go to top] top

Posted by Blainer   (191 posts)  [Biography] bio
Date Reply #1 on Mon 10 Aug 2009 03:16 AM (UTC)
Message
Bump.

Added whois to database and made a popup showing the whois from the db
on the scan window.
[Go to top] top

Posted by Abott   (2 posts)  [Biography] bio
Date Reply #2 on Sun 06 Sep 2009 05:38 PM (UTC)

Amended on Sun 06 Sep 2009 08:46 PM (UTC) by Abott

Message
This is a nice plugin. I turned off the whois function mainly because I didn't use it much, but is there a way to do a left click, customizable action (like in your consider mini window)? I wanted it to default to backstab.
[Go to top] top

Posted by Blainer   (191 posts)  [Biography] bio
Date Reply #3 on Tue 08 Sep 2009 12:37 AM (UTC)
Message
Abott said:

This is a nice plugin. I turned off the whois function mainly because I didn't use it much, but is there a way to do a left click, customizable action (like in your consider mini window)? I wanted it to default to backstab.

Yeah the whois display never really had a use and is *really* badly written, but I thought it was cool.

I added a couple of options to the script to do what you needed.

DEFAULT_COMMAND     = "examine"     -- default left click command
DoWhois             = "false"       -- if false script will not do a whois when moused over.


I posted it here:
http://code.google.com/p/aardinvwin/



[Go to top] top

Posted by Blainer   (191 posts)  [Biography] bio
Date Reply #4 on Tue 08 Sep 2009 12:55 AM (UTC)

Amended on Tue 08 Sep 2009 01:35 AM (UTC) by Blainer

Message
I also added an OnPluginBroadcast to this plugin because I found the command line I did very clumsy.

What it does is enable other plugins to to turn look and scan on and off.
After installing the plugin below:

"town" is off and "explore" is on.

To get another plugin to turn it on use:

BroadcastPlugin (99, "explore")

To turn it off from with in a plugin use:

BroadcastPlugin (99, "town")

To make a macro to enable it use (the "/" is the script prefix set on the script dialog):

/Execute ("chmode town")

To make an alias use it just set the the alias to execute and use:

chmode town

Template:saveplugin=Aardwolf_Chnage_Modes To save and install the Aardwolf_Chnage_Modes plugin do this:
  1. Copy between the lines below (to the Clipboard)
  2. Open a text editor (such as Notepad) and paste the plugin into it
  3. Save to disk on your PC, preferably in your plugins directory, as Aardwolf_Chnage_Modes.xml
  4. Go to the MUSHclient File menu -> Plugins
  5. Click "Add"
  6. Choose the file Aardwolf_Chnage_Modes.xml (which you just saved in step 3) as a plugin
  7. Click "Close"


<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE muclient>
<!-- Saved on Saturday, August 22, 2009, 11:58 AM -->
<!-- MuClient version 4.43 -->

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

<muclient>
<plugin
   name="Aardwolf_Change_Modes"
   author="Blainer"
   id="c471cbdbb5dd42756ec21c27"
   language="Lua"
   purpose="Broadcast change of mode to other plugins."
   date_written="2009-08-22 11:57:15"
   requires="4.43"
   version="1.0"
   >

</plugin>
<aliases>
  <alias
   match="^chmode\s(town|explore)?$"
   enabled="y"
   regexp="y"
   group="CHANGE_MODE"
   send_to="12"
   script="ChangeMode"
   sequence="100"
  >
  </alias>
</aliases>

<!--  Get our standard constants -->

<include name="constants.lua"/>
<!--  Script  -->

<script>
<![CDATA[

Mode = "Town"

function say_mode ()
    Note("Mode changed to: " .. Mode)
end -- say_mode

function ChangeMode (name, line, wildcards)

    if wildcards[1] == "explore" then
        BroadcastPlugin (99, "explore")
        Mode = "Explore"
        say_mode ()
        return
    elseif wildcards[1] == "town" then
        BroadcastPlugin (99, "town")
        Mode = "town"
        say_mode ()
        return
    end
    if Mode == "town" then
        BroadcastPlugin (99, "explore")
        Mode = "explore"
        say_mode ()
        return
    else
        BroadcastPlugin (99, "town")
        Mode = "town"
        say_mode ()
        return
    end

end -- ChangeMode


]]>
</script>
</muclient>

The reason for the separate plugin is this will be used to turn on and off all my plugins as I update them.

I have a macro to turn it on and off and I turn it off at the beginning of my speedwalk alias.
[Go to top] top

Posted by Arismis   (2 posts)  [Biography] bio
Date Reply #5 on Wed 07 Oct 2009 05:14 AM (UTC)
Message
Hey, I love this plugin, but trying to figure out a few things:

1. How do i get this to work with quests and gquests? I tried adding additional triggers off of the quest and gquest match strings still referencing the original alias for adding mobs to cp list, but it doesn't seem to do anything. Do i need to change anything else?

2. How do i build in a way to see which keywords belong in certain lists in order to remove them? for example, if one of my characters is in a campaign but the other is not, there's currently no way for me to remove all cp keywords, mobs still come up randomly in red

Thanks much in advance, Great job on this plugin by the way!!
[Go to top] top

Posted by Arismis   (2 posts)  [Biography] bio
Date Reply #6 on Wed 07 Oct 2009 05:00 PM (UTC)
Message
I'm so confused... How does the script below know which is the correct mob to remove from the database...??? if you look at the database portion of the code all it does is remove all entries with Cgr = "campaign" if you kill ANY campaign mobs... yet somehow it works. Am i missing something here?

--adds the campaign mobs to the keywords table
function campaignTrigger (name, line, wildcards)

if wildcards[1] == "false" or wildcards[1] == nil then
return
end

if wildcards[1] == "Congratulations" then
KeywordColour ("rem", "", "", "campaign")
end

sAct = "add"
sKey = wildcards[1]:lower():match("^(.*) %(.+%)$")
sCol = CampaignColour
sCgr = "campaign"
KeywordColour (sAct, sKey, sCol, sCgr)

end --campaignTigger
[Go to top] top

Posted by Blainer   (191 posts)  [Biography] bio
Date Reply #7 on Thu 08 Oct 2009 12:51 AM (UTC)

Amended on Thu 08 Oct 2009 12:52 AM (UTC) by Blainer

Message
I've never been happy with this script it does too many things and all of them poorly.

Having read your post I think a script to handle the scan window with keywords is probably the way to go. I'll post a link to it here when it's done.
[Go to top] top

Posted by Blainer   (191 posts)  [Biography] bio
Date Reply #8 on Sat 10 Oct 2009 06:44 AM (UTC)
Message
Ok, I've re-written it. I removed all the look and whois stuff and made an easier command line for adding and removing keywords. All the database functions are in the plugin so it's stand alone.

You'll have to make your own triggers for global quests but hopefully it'll be simple now.

Post any questions or suggestions on the new plugins thread.
[Go to top] top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


29,542 views.

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at HostDash]