Advertisement
williamtarends

Gear - Aardwolf hyperlink inventory

May 25th, 2011
688
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 29.13 KB | None | 0 0
  1. <?xml version="1.0" encoding="iso-8859-1"?>
  2. <!DOCTYPE muclient>
  3. <!-- Saved on Sunday, August 29, 2010, 3:35 PM -->
  4. <!-- MuClient version 4.56 -->
  5.  
  6. <!-- Plugin "aard_inv_capture" generated by Plugin Wizard -->
  7.  
  8. <muclient>
  9. <plugin
  10.   name="Gear"
  11.   author="Moshu(William Arends), Multiple"
  12.   id="8e3032045952b7736f263d5d"
  13.   language="Lua"
  14.   purpose="Powerful hyperlinked based inventory plugin written by william arends. "
  15.   date_written="2010-12-2 15:35:02"
  16.   requires="4.56"
  17.   version="1.0"
  18.   save_state="y"
  19.   >
  20.  
  21. <description trim="y">
  22.  
  23. Aardwolf Hyperlink Inventory Plugin.
  24.  
  25. Feel free to use this for any purpose on any MUD, but I'd appreciate an email if you improve
  26. something -- wolf@aardwolf.com (lasher) williamtarends@hotmail.com (moshu)
  27.  
  28. </description>
  29.  
  30. </plugin>
  31.  
  32.  
  33. <!--  Triggers  -->
  34.  
  35. <triggers>
  36.  
  37.   <trigger
  38.   enabled="y"
  39.   match="*{invdata *}"
  40.   script="inv_redirect"
  41.   omit_from_output="y"
  42.   name="inv_start2"
  43.   sequence="100"
  44.  >
  45.   </trigger>
  46.  
  47.  
  48.   <trigger
  49.   enabled="y"
  50.   match="*{invdata}"
  51.   script="inv_redirect"
  52.   omit_from_output="y"
  53.   name="inv_start"
  54.   sequence="100"
  55.  >
  56.   </trigger>
  57.  
  58.   <trigger
  59.   enabled="n"
  60.   match="*,*,*,*,*,*,*,*"
  61.   script="inv_redirect"
  62.   name="multi_line_inv"
  63.   omit_from_output="y"
  64.   sequence="10"
  65.  >
  66.   </trigger>
  67.  
  68. <!--    <trigger
  69.   enabled="n"
  70.   match="*,,*,*,*,*,*,*"
  71.   script="inv_redirect"
  72.   name="multi_line_inv_no_flags"
  73.   omit_from_output="y"
  74.   sequence="10"
  75.  >
  76.  </trigger> -->
  77.  
  78.   <trigger
  79.   enabled="y"
  80.   match="{/invdata}"
  81.   script="inv_redirect"
  82.   omit_from_output="y"
  83.   name="inv_end"
  84.   sequence="5"
  85.  >
  86.   </trigger>
  87.  
  88. </triggers>
  89.  
  90. <aliases>
  91.   <alias
  92.   match="load invcap"
  93.   enabled="y"
  94.   send_to="12"
  95.   sequence="100"
  96.  >
  97.   <send>CallPlugin("8e3032045952b7736f263d5d", "LoadInvCap", "")</send>
  98.   </alias>
  99.  
  100.  
  101.  
  102.   <alias
  103.   match="reload inv"
  104.   enabled="y"
  105.   send_to="12"
  106.   sequence="100"
  107.  >
  108.   <send>
  109.   ReloadPlugin("8e3032045952b7736f263d5d")
  110.   Note("Reloaded Inventory Capture")
  111.   </send>
  112.   </alias>
  113.  
  114. <!--
  115.  <alias
  116.   match="disable invcap"
  117.   enabled="y"
  118.   send_to="12"
  119.   sequence="100"
  120.  >
  121.  <send>EnablePlugin("8e3032045952b7736f263d5d", 1)
  122.  Note("Disabled Inventory Capture")
  123.  </send>
  124.  </alias>
  125. -->
  126.  
  127.   <!-- Show Sell -->
  128.    <alias
  129.   match="invshow sell on"
  130.   enabled="y"
  131.   send_to="12"
  132.   sequence="100"
  133.  >
  134.   <send>
  135.  
  136.     showSell = "true"
  137.     Note("Show Sell Hyperlink = On")
  138.   </send>
  139.   </alias>
  140.  
  141.    <alias
  142.   match="invshow sell off"
  143.   enabled="y"
  144.   send_to="12"
  145.   sequence="100"
  146.  >
  147.   <send>
  148.  
  149.     showSell = "false"
  150.   Note("Show Sell Hyperlink = Off")
  151.   </send>
  152.   </alias>
  153.  
  154.   <!-- Show Id -->
  155.    <alias
  156.   match="invshow id on"
  157.   enabled="y"
  158.   send_to="12"
  159.   sequence="100"
  160.  >
  161.   <send>
  162.  
  163.     showId = "true"
  164.     Note("Show Id Hyperlink = On")
  165.   </send>
  166.   </alias>
  167.  
  168.    <alias
  169.   match="invshow id off"
  170.   enabled="y"
  171.   send_to="12"
  172.   sequence="100"
  173.  >
  174.   <send>
  175.  
  176.     showId = "false"
  177.   Note("Show Id Hyperlink = Off")
  178.   </send>
  179.   </alias>
  180.  
  181.    <!-- Show Drop -->
  182.    <alias
  183.   match="invshow drop on"
  184.   enabled="y"
  185.   send_to="12"
  186.   sequence="100"
  187.  >
  188.   <send>
  189.  
  190.     showDrop = "true"
  191.     Note("Show Drop Hyperlink = On")
  192.   </send>
  193.   </alias>
  194.  
  195.    <alias
  196.   match="invshow drop off"
  197.   enabled="y"
  198.   send_to="12"
  199.   sequence="100"
  200.  >
  201.   <send>
  202.  
  203.     showDrop = "false"
  204.   Note("Show Drop Hyperlink = Off")
  205.   </send>
  206.   </alias>
  207.  
  208.  
  209.    <!-- Show Unique-->
  210.    <alias
  211.   match="invshow u on"
  212.   enabled="y"
  213.   send_to="12"
  214.   sequence="100"
  215.  >
  216.   <send>
  217.  
  218.     showU = "true"
  219.     Note("Show Unique Hyperlink = On")
  220.   </send>
  221.   </alias>
  222.  
  223.    <alias
  224.   match="invshow u off"
  225.   enabled="y"
  226.   send_to="12"
  227.   sequence="100"
  228.  >
  229.   <send>
  230.  
  231.     showU = "false"
  232.   Note("Show Unique Hyperlink = Off")
  233.   </send>
  234.   </alias>
  235.  
  236.    <!-- Show Flags -->
  237.    <alias
  238.   match="invshow flags on"
  239.   enabled="y"
  240.   send_to="12"
  241.   sequence="100"
  242.  >
  243.   <send>
  244.  
  245.     showFlags = "true"
  246.     Note("Show Flags = On")
  247.   </send>
  248.   </alias>
  249.  
  250.    <alias
  251.   match="invshow flags off"
  252.   enabled="y"
  253.   send_to="12"
  254.   sequence="100"
  255.  >
  256.   <send>
  257.  
  258.     showFlags = "false"
  259.   Note("Show Flags = Off")
  260.   </send>
  261.   </alias>
  262.  
  263.  
  264.    <!-- Show Comp -->
  265.    <alias
  266.   match="invshow comp on"
  267.   enabled="y"
  268.   send_to="12"
  269.   sequence="100"
  270.  >
  271.   <send>
  272.  
  273.     showComp = "true"
  274.     Note("Show Compare Hyperlink = On")
  275.   </send>
  276.   </alias>
  277.  
  278.    <alias
  279.   match="invshow comp off"
  280.   enabled="y"
  281.   send_to="12"
  282.   sequence="100"
  283.  >
  284.   <send>
  285.  
  286.     showComp = "false"
  287.   Note("Show Compare Hyperlink = Off")
  288.   </send>
  289.   </alias>
  290.  
  291.    <!-- Show Look In -->
  292.    <alias
  293.   match="invshow lookin on"
  294.   enabled="y"
  295.   send_to="12"
  296.   sequence="100"
  297.  >
  298.   <send>
  299.  
  300.     showLookIn = "true"
  301.     Note("Show Look In Hyperlink = On")
  302.   </send>
  303.   </alias>
  304.  
  305.    <alias
  306.   match="invshow lookin off"
  307.   enabled="y"
  308.   send_to="12"
  309.   sequence="100"
  310.  >
  311.   <send>
  312.  
  313.     showLookIn= "false"
  314.   Note("Show Look In Hyperlink = Off")
  315.   </send>
  316.   </alias>
  317.  
  318.   <!-- ENCHANTS -->
  319.  
  320.    <!-- Show Resonate -->
  321.    <alias
  322.   match="invshow res on"
  323.   enabled="y"
  324.   send_to="12"
  325.   sequence="100"
  326.  >
  327.   <send>
  328.  
  329.     showRes = "true"
  330.     Note("Show Resonate Hyperlink = On")
  331.   </send>
  332.   </alias>
  333.  
  334.    <alias
  335.   match="invshow res off"
  336.   enabled="y"
  337.   send_to="12"
  338.   sequence="100"
  339.  >
  340.   <send>
  341.  
  342.     showRes = "false"
  343.   Note("Show Resonate Hyperlink = Off")
  344.   </send>
  345.   </alias>
  346.  
  347.    <!-- Show Illuminate -->
  348.    <alias
  349.   match="invshow ill on"
  350.   enabled="y"
  351.   send_to="12"
  352.   sequence="100"
  353.  >
  354.   <send>
  355.  
  356.     showIll = "true"
  357.     Note("Show Illuminate Hyperlink = On")
  358.   </send>
  359.   </alias>
  360.  
  361.    <alias
  362.   match="invshow ill off"
  363.   enabled="y"
  364.   send_to="12"
  365.   sequence="100"
  366.  >
  367.   <send>
  368.  
  369.     showIll = "false"
  370.   Note("Show Illuminate Hyperlink = Off")
  371.   </send>
  372.   </alias>
  373.  
  374.    <!-- Show Solidify -->
  375.    <alias
  376.   match="invshow sol on"
  377.   enabled="y"
  378.   send_to="12"
  379.   sequence="100"
  380.  >
  381.   <send>
  382.  
  383.     showSol = "true"
  384.     Note("Show Solidify Hyperlink = On")
  385.   </send>
  386.   </alias>
  387.  
  388.    <alias
  389.   match="invshow sol off"
  390.   enabled="y"
  391.   send_to="12"
  392.   sequence="100"
  393.  >
  394.   <send>
  395.  
  396.     showSol = "false"
  397.   Note("Show Solidify Hyperlink = Off")
  398.   </send>
  399.   </alias>
  400.  
  401.  
  402.    <!-- Show ITEM TYPE -->
  403.    <alias
  404.   match="invshow type on"
  405.   enabled="y"
  406.   send_to="12"
  407.   sequence="100"
  408.  >
  409.   <send>
  410.  
  411.     showType = "true"
  412.     Note("Show Type Hyperlink = On")
  413.   </send>
  414.   </alias>
  415.  
  416.    <alias
  417.   match="invshow type off"
  418.   enabled="y"
  419.   send_to="12"
  420.   sequence="100"
  421.  >
  422.   <send>
  423.  
  424.     showType = "false"
  425.   Note("Show Type Hyperlink = Off")
  426.   </send>
  427.   </alias>
  428.  
  429.      <!-- Show Add Note-->
  430.    <alias
  431.   match="invshow note on"
  432.   enabled="y"
  433.   send_to="12"
  434.   sequence="100"
  435.  >
  436.   <send>
  437.  
  438.     showNote = "true"
  439.     Note("Show Item Note Hyperlink = On")
  440.   </send>
  441.   </alias>
  442.  
  443.    <alias
  444.   match="invshow note off"
  445.   enabled="y"
  446.   send_to="12"
  447.   sequence="100"
  448.  >
  449.   <send>
  450.  
  451.     showNote = "false"
  452.   Note("Show Item Note Hyperlink = Off")
  453.   </send>
  454.   </alias>
  455.  
  456.   <!-- Read Note alias-->
  457.    <alias
  458.   match="ReadItemNote *"
  459.   enabled="y"
  460.   send_to="12"
  461.   sequence="100"
  462.  >
  463.   <send>
  464.   local x = GetVariable("note" .. %1)
  465.   if x == nil or x == "" then
  466.         Note("No note set for this item.")
  467.           local result = ""
  468.           if GetVariable("note" .. %1) == nil then
  469.             result = utils.editbox("This is where you can create a note for a item inside your inventory. This is useful for tagging gear you have enchanted or portals that are not of type portal like the devils hand its a weapon that is a portal. You could put a note on devils hand, ex:This is portal also is a weapon. I enchanted it with resonate","Enter a note for this item", "I enchanted this item. Change the default message here with ItemNoteDef = value", "Courier", "9")
  470.           end
  471.          
  472.           if result ~= nil then
  473.             --ColourNote("white","red",result)
  474.             ColourTell("white","black","##Note added to item " .. %1 .. result)
  475.             assert(SetVariable("note" .. %1, result))
  476.             --Note(GetVariable("note" .. %1))
  477.             Execute("invdata")
  478.           else
  479.             ColourTell("white","black","##Note returned with no result.")
  480.           end
  481.   else
  482.     ColourTell("white","black","Note" .. %1 .. " " .. x .. "")
  483.   end
  484.  
  485.   </send>
  486.   </alias>
  487.  
  488.  
  489.   <!-- Add Note alias-->
  490.    <alias
  491.   match="AddItemNote *"
  492.   enabled="y"
  493.   send_to="12"
  494.   sequence="100"
  495.  >
  496.   <send>
  497.   local result = ""
  498.           if GetVariable("note" .. %1) == nil then
  499.             result = utils.editbox("This is where you can create a note for a item inside your inventory. This is useful for tagging gear you have enchanted or portals that are not of type portal like the devils hand its a weapon that is a portal. You could put a note on devils hand, ex:This is portal also is a weapon. I enchanted it with resonate","Enter a note for this item", "I enchanted this item. Change the default message here with ItemNoteDef = value", "Courier", "9")
  500.           end
  501.          
  502.           if GetVariable("note" .. %1) ~= nil then
  503.                     result = utils.editbox("This is where you can create a note for a item inside your inventory. This is useful for tagging gear you have enchanted or portals that are not of type portal like the devils hand its a weapon that is a portal. You could put a note on devils hand, ex:This is portal also is a weapon. I enchanted it with resonate","Enter a note for this item","" .. GetVariable("note" .. %1) .. "", "Courier", "9")
  504.           end
  505.  
  506.   if result ~= nil then
  507.     ColourTell("white","black","##Note added to item " .. %1 .. result)
  508.     assert(SetVariable("note" .. %1, result))
  509.     SendNoEcho("invdata")
  510.   else
  511.     ColourTell("white","black","##Note returned with no result.")
  512.   end
  513.   </send>
  514.   </alias>
  515.  
  516.  
  517.   <!-- Delete Note alias-->
  518.    <alias
  519.   match="DeleteItemNote *"
  520.   enabled="y"
  521.   send_to="12"
  522.   sequence="100"
  523.  >
  524.   <send>
  525.   SetVariable("note" .. %1,"")
  526.   SendNoEcho("invdata")
  527.   </send>
  528.   </alias>
  529.  
  530.     <!-- Set Note alias-->
  531.    <alias
  532.   match="SetItemNote * *"
  533.   enabled="y"
  534.   send_to="12"
  535.   sequence="100"
  536.  >
  537.   <send>
  538.  
  539.   SetVariable(%1,%2)
  540.   Note(GetVariable(%1))
  541.   --local result = utils.editbox("Enter a note for this item", "I enchanted this item(Change the default message here with ItemNoteDef = value", "booa", "Courier", 9)
  542.   ColourNote("Yellow","Green","NOTE ADDED: Click the N hyperlink to view the note for a given item.")
  543.   </send>
  544.   </alias>
  545.  
  546.  
  547.     <!-- Set Note alias-->
  548.    <alias
  549.   match="GetItemNote *"
  550.   enabled="y"
  551.   send_to="12"
  552.   sequence="100"
  553.  >
  554.   <send>
  555.  
  556.   Print(GetVariable(%1))
  557.   ColourNote("Yellow","Green","NOTE PRINTED: You have just opened note for this item.")
  558.   </send>
  559.   </alias>
  560.  
  561.  
  562.     <!-- Set Id Command alias-->
  563.    <alias
  564.   match="id = *"
  565.   enabled="y"
  566.   send_to="12"
  567.   sequence="100"
  568.  >
  569.   <send>
  570.  
  571.   SetVariable("idCommand",%1)
  572.   ColourNote("Blue","black","Id hyperlink set to: " .. %1 .. "\r*Set this to something like id, lore, and etc to change the id method.\r*Also you can make the ? hyperlink so what every command you set it to. (Hope to make each link work this way also")
  573.   </send>
  574.   </alias>
  575.  
  576.     <!-- Plugin Options -->
  577.    <alias
  578.   match="copyid *"
  579.   enabled="y"
  580.   script=""
  581.   send_to="12"
  582.   sequence="100"
  583.  >
  584.   <send>
  585.     SetClipboard(%1)
  586.     print("!!##Item id copied to clipboard for use with other game commands.")
  587.   </send>
  588.   </alias>
  589.  
  590.       <!-- Plugin Options -->
  591.    <alias
  592.   match="Gear"
  593.   enabled="y"
  594.   script=""
  595.   send_to="12"
  596.   sequence="100"
  597.  >
  598.   <send>
  599.     SendNoEcho("invdata")
  600.    
  601.   </send>
  602.   </alias>
  603.      <alias
  604.   match="gear"
  605.   enabled="y"
  606.   script=""
  607.   send_to="12"
  608.   sequence="100"
  609.  >
  610.   <send>
  611.     SendNoEcho("invdata")
  612.    
  613.   </send>
  614.   </alias>
  615.  
  616.   <!-- Hud Off alias-->
  617.    <alias
  618.   match="hud off"
  619.   enabled="y"
  620.   send_to="12"
  621.   sequence="100"
  622.  >
  623.   <send>
  624.   WindowShow(Win, false)
  625.   </send>
  626.   </alias>
  627.  
  628.    
  629.   <!-- Hud On alias-->
  630.    <alias
  631.   match="hud on"
  632.   enabled="y"
  633.   send_to="12"
  634.   sequence="100"
  635.  >
  636.   <send>
  637.   WindowShow(Win, true)
  638.   </send>
  639.   </alias>
  640.  
  641.   <!-- Plugin Options -->
  642.    <alias
  643.   match="gear options"
  644.   enabled="y"
  645.   script="OptionsTrigger"
  646.   send_to="12"
  647.   sequence="100"
  648.  >
  649.   <send>
  650.  
  651.   </send>
  652.   </alias>
  653.  
  654.  
  655.  
  656.   <alias
  657.   match="disable inv"
  658.   enabled="y"
  659.   send_to="12"
  660.   sequence="100"
  661.  >
  662.   <send>EnablePlugin("8e3032045952b7736f263d5d", 1)
  663.   Note("Disabled Inventory Capture")
  664.   </send>
  665.   </alias>
  666. </aliases>
  667.  
  668. <script>
  669. <![CDATA[
  670. -- functions for handling Aardwolf color codes
  671. dofile (GetPluginInfo (GetPluginID(), 20) .. "aardwolf_colors.lua")
  672. --dofile (GetPluginInfo (GetPluginID(), 20) .. "aardwolf_colors.lua")
  673. Win = "0a" .. GetPluginID()
  674. inv_lines = {}
  675. --coord_data= {}
  676. show_inv = 0
  677. itemType = ""
  678. idCommand = "id "
  679. ColorToggle = 0 --This will flip from 1 to 0 and is used to color everyother item in the inventory differently.
  680.  
  681.  
  682. showAll = "false"
  683. showNone = "false" -- Toggle show all and show none to true and function will turn on/off all shows then turn its self to false again. So it only fires once
  684. showType = "true"
  685. showId = "true"
  686. showDrop = "true"
  687. showSell = "true"
  688. showLookIn = "true"
  689. showWear = "true"
  690. showComp = "true"
  691. showRes = "true"
  692. showIll = "true"
  693. showSol = "true"
  694. showRecite = "true"
  695. showFlags = "true"
  696. showTimer = "true"
  697. showU = "true"--Show unique item info
  698. --Note show variables
  699. showNoNoteLinks = "false"
  700. showNote = "true"
  701. showAddNote = "true"
  702. showClearNote = "true"
  703. counter = 0
  704. clickedBag = 0;
  705. ColorCodedLine = ""
  706.  
  707. function inv_redirect (name, line, wildcards, styles)
  708.  
  709.     EnableTrigger ("multi_line_inv", true)  -- capture subsequent lines
  710.     if name == "inv_start" or name == "inv_start2" then   --- Setup the window.
  711.         inv_lines = {} --reset ready for new scan
  712.         counter = 0
  713.     elseif name == "inv_end" then
  714.        EnableTrigger ("multi_line_inv", false)  -- no more lines to go
  715.     else
  716.         if name == "multi_line_inv" then
  717.  
  718.             objid = assert(GetTriggerWildcard (name, "1"))
  719.             flags = assert(GetTriggerWildcard (name, "2"))
  720.             name = assert(GetTriggerWildcard (name, "3"))
  721.  
  722.         end
  723.  
  724.         if objid ~= nil then
  725.             local itemId = wildcards[5]--Item Type
  726.             GetTypeFromId(tonumber(itemId))--This will set variable itemType to be used in plugin after this point
  727.             NoteStyle(3)
  728.             --ColourTell("white", "Black", "[")
  729.             if ColorToggle == 1 then
  730.                 if counter < 10 then
  731.                     ColourTell("white","black","0" .. counter)
  732.                 else
  733.                     ColourTell("white","black",counter)
  734.                 end
  735.                
  736.                 ColorToggle = 0
  737.             else
  738.                 if counter < 10 then
  739.                     ColourTell("gray","black","0" .. counter)
  740.                 else
  741.                     ColourTell("gray","black",counter)
  742.                 end
  743.                 ColorToggle = ColorToggle + 1
  744.             end    
  745.             --ID item
  746.             if showId == "true" then
  747.                         if objid == nil then
  748.                     --do nada
  749.                 else
  750.                     ColourTell("white", "Black", "|")
  751.                     Hyperlink (GetVariable("action1")  .. objid,"?",
  752.                     "ID this item",
  753.                     "red", "black", 0)
  754.                 end
  755.             end
  756.  
  757.            
  758.  
  759.            
  760.             if showDrop == "true" then
  761.                 if objid == nil then
  762.                     --do nada
  763.                 else
  764.                     ColourTell("white", "Black", "|")
  765.                     Hyperlink ("drop "  .. objid .. ";invdata","X",
  766.                     "Drop this item",
  767.                     "yellow", "black", 0)
  768.                 end
  769.             end
  770.  
  771.             local wearLoc = wildcards[8]
  772.             local unique = wildcards[6]
  773.             --if itemType == "Weapon" or itemType == "Armor" or itemType == "Portal" or itemType == "Treasure" or itemType == "Container" then
  774.             if wearLoc == "-1" then
  775.                 -- ColourTell("white", "Black", "|")
  776.                 -- Hyperlink ("wear "  .. objid,"W",
  777.                 -- "Wear this item",
  778.                 -- "green", "black", 0)
  779.             else
  780.                 ColourTell("white", "Black", "|")
  781.                 if objid ~= nil then
  782.                     Hyperlink ("wear "  .. objid,"W",
  783.                     "Wear this item",
  784.                     "green", "black", 0)
  785.                 end
  786.             end
  787.            
  788.             if showSell == "true" and objid ~= nil then
  789.                 ColourTell("white", "Black", "|")
  790.                 Hyperlink ("sell "  .. objid,"$",
  791.                 "Sell this item",
  792.                 "yellow", "black", 0)
  793.             end
  794.            
  795.             if showComp == "true" and objid ~= nil then    
  796.                 ColourTell("white", "Black", "|")
  797.                 Hyperlink ("compare "  .. objid,"%",
  798.                 "Compare this item",
  799.                 "red", "black", 0)
  800.             end
  801.            
  802.             if showRes == "true" and objid ~= nil then
  803.                 ColourTell("white", "Black", "|")
  804.                 Hyperlink ("c resonate  "  .. objid,"!",
  805.                 "Cast enchant [Resonate] on this item",
  806.                 "yellow", "black", 0)
  807.             end
  808.  
  809.             if showIll == "true" and objid ~= nil then     
  810.                 ColourTell("white", "Black", "|")
  811.                 Hyperlink ("c illuminate "  .. objid,"*",
  812.                 "Cast enchant [Illuminate] on this item",
  813.                 "red", "black", 0)
  814.             end
  815.            
  816.             if showSol == "true" and objid ~= nil then
  817.                 ColourTell("white", "Black", "|")
  818.                 Hyperlink ("c solidify "  .. objid,"#",
  819.                 "Cast enchant [Solidify] on this item",
  820.                 "yellow", "black", 0)
  821.  
  822.             end
  823.                 ColourTell("white", "Black", "|")          
  824.            
  825.  
  826.                     --If it is a container give look in command
  827.             if wildcards[5] == "11" and showLookIn == "true" and objid ~= nil then
  828.                
  829.                 Hyperlink ("look in "  .. objid,"~",
  830.                 "Look inside this item",
  831.                 "white", "black", 0)
  832.                 ColourTell("white", "Black", "|")
  833.             end
  834.              
  835.             NoteStyle(3)
  836.            
  837.             --when they click the item name this picks action depending on type
  838.             commandStr = ""
  839.             messageStr = ""
  840.             if itemType == "Furniture" then
  841.                 commandStr = "drop " .. objid .. ";sleep " .. objid .. ";"
  842.                 messageStr = "Click to DROP and sleep on " .. strip_colours(name) .. ". MAKE SURE TO PICK IT UP."
  843.             end
  844.             if itemType == "Light" then
  845.                 commandStr = "wear "
  846.                 messageStr = "Click to eat " .. strip_colours(name) .. "."
  847.             end
  848.             if itemType == "Food" then
  849.                 commandStr = "eat "
  850.                 messageStr = "Click to eat " .. strip_colours(name) .. "."
  851.             end
  852.             if itemType == "Drink Container" then
  853.                 commandStr = "drink "
  854.                 messageStr = "Click to drink from " .. strip_colours(name) .. "."
  855.             end
  856.             if itemType == "Pill" then
  857.                 commandStr = "eat "
  858.                 messageStr = "Click to eat the pill " .. strip_colours(name) .. "."
  859.             end
  860.             if itemType == "Portal" then
  861.                 commandStr = "remove second;wear " .. objid .. ";enter;"
  862.                 messageStr = "Click to enter the portal " .. strip_colours(name) .. "."
  863.             end
  864.             if itemType == "Container" then
  865.                 commandStr = "Look in "
  866.                 messageStr = "Click to look into " .. strip_colours(name) .. "."
  867.             end
  868.             if itemType == "Armor" then
  869.                 commandStr = "wear "
  870.                 messageStr = "Click to wear " .. strip_colours(name) .. "."
  871.             end
  872.             if itemType == "Weapon" then
  873.                 commandStr = "wield "
  874.                 messageStr = "Click to wield " .. strip_colours(name) .. "."
  875.             end
  876.            
  877.             if itemType == "Scroll" then
  878.                 commandStr = "recite "
  879.                 messageStr = "Click to recite " .. strip_colours(name) .. "."
  880.             end
  881.                        
  882.             if itemType == "Potion" then
  883.                 commandStr = "quaff "
  884.                 messageStr = "Click to quaff " .. strip_colours(name) .. "."
  885.             end
  886.            
  887.             if commandStr == "" then
  888.                 commandStr = "id "
  889.             end
  890.            
  891.             if messageStr == "" then
  892.                 messageStr = "Click to Id "
  893.             end
  894.                
  895.             if ColorToggle == 1 then
  896.                 Hyperlink (commandStr .. objid,strip_colours(name),
  897.                     messageStr,
  898.                     "yellow", "black", 0)
  899.             else
  900.                 --Tell(counter)
  901.                 Hyperlink (commandStr .. objid,strip_colours(name),
  902.                     messageStr,
  903.                     "red", "black", 0)
  904.             end
  905.             counter = counter + 1
  906.            
  907.             if itemType == "Weapon" then
  908.                 Hyperlink ("dual " .. objid, "[D]", "Click to dual wield " .. strip_colours(name),
  909.                 "purple","black", 0)
  910.             end
  911.            
  912.             if itemType == "Container" then
  913.                 Hyperlink ("get all " .. objid, "[G]", "Click to get all items in " .. strip_colours(name),
  914.                 "purple","black", 0)
  915.             end
  916.            
  917.             if itemType == "Container" then
  918.                 Hyperlink ("put all " .. objid, "[P]", "Click to put all items in " .. strip_colours(name),
  919.                 "purple","black", 0)
  920.             end
  921.            
  922.             if itemType == "Drink Container" then
  923.                 Hyperlink ("fill " .. objid .. " fountain", "[F]", "Click to fill " .. strip_colours(name),
  924.                 "purple","black", 0)
  925.             end
  926.            
  927.             if showRecite == "true" and itemType == "Scroll" and objid ~= nil then
  928.                
  929.                 Hyperlink ("recite "  .. objid .. ";invdata","[R]",
  930.                 "Recite scroll",
  931.                 "cyan", "black", 0)
  932.                 --ColourTell("white", "Black", "|")
  933.             end    
  934.            
  935.             if showFlags == "true" and wildcards[2] ~= "" then
  936.                 ColourTell("white", "Black", "[" .. wildcards[2] .. "]")
  937.             end
  938.            
  939.            
  940.             --Show item type of item Weapons, Armor, Potion, Key, etc...
  941.             if showType == "true" then
  942.                 ColourTell("white", "Black", " [" .. itemType .. "]")
  943.             end
  944.            
  945.             --This will print the unique hyperlink that if item is unique
  946.             if showU == "true" then
  947.                 if unique == "0" then
  948.                     --Not unique
  949.                 else
  950.                     if unique == "1" and objid ~= nil then
  951.                         ColourTell("white", "Black", " [")
  952.                         Hyperlink (idCommand  .. objid,"Unique",
  953.                         "Id this item. This item might be enchanted or a clan item for it is unique.",
  954.                         "Yellow", "black", 0)
  955.                         ColourTell("white", "Black", "]")
  956.                     end
  957.                 end
  958.             end
  959.            
  960.             ColourTell("white", "Black", " |")
  961.            
  962.             --Read a note on item
  963.            
  964.             if GetVariable("note" .. objid) == nil then
  965.                 Hyperlink ("ReadItemNote " .. objid,"N",
  966.                 "Create note for this item.",
  967.                 "Yellow", "black", 0)
  968.             else
  969.                 Hyperlink ("ReadItemNote " .. objid,"N",
  970.                 "Item Note: " .. GetVariable("note" .. objid),
  971.                 "Yellow", "black", 0)
  972.             end
  973.            
  974.             --ColourTell("white", "Black", "]")
  975.             ColourTell("white", "Black", "|")
  976.            
  977.             --Add a note to item
  978.             Hyperlink ("AddItemNote " .. objid,"+",
  979.             "Add/Change note for this item.",
  980.             "Yellow", "black", 0)
  981.            
  982.             --ColourTell("white", "Black", "]")
  983.             ColourTell("white", "Black", "|")
  984.            
  985.             --Delete note on a item
  986.             Hyperlink ("DeleteItemNote " .. objid,"-",
  987.             "Delete note for this item.",
  988.             "Yellow", "black", 0)
  989.             ColourTell("white", "Black", "|")
  990.            
  991.             --Delete note on a item
  992.             Hyperlink ("copyid " .. objid,"C",
  993.             "Copy item id to clipboard.",
  994.             "Yellow", "black", 0)
  995.             ColourTell("white", "Black", "| ")
  996.  
  997.             --Timer, this doesn't work for invdata maybe eqdata??
  998.             if showTimer == "true" and wildcards[8] ~= "-1" and wildcards[8] ~= nil then
  999.                 ColourTell("white","black","[Timer:")
  1000.                 ColourTell("Red","black",wildcards[8])
  1001.                 ColourTell("white","black","]")
  1002.             end
  1003.             Note("\r")
  1004.         end
  1005.        
  1006.         NoteStyle(3)
  1007.         --Note(wildcards[8])       
  1008.         --Note(wearLoc)
  1009.     end
  1010. end -- function map_redirect
  1011.  
  1012. function OptionsTrigger()
  1013.    --Header
  1014.     ColourTell("white","red","--------*Moshu's Inven Plugin Options*--------")
  1015.     Note("\n")
  1016.     ColourTell("red","black","\r---->   Hyperlinks Settings\r")
  1017.     Note("\n")
  1018.     --Show Id
  1019.     --Note("")
  1020.     ColourTell("white","black","Show Id:[")
  1021.     Hyperlink ("invshow id on"," TRUE ",
  1022.     "Toggle Show Id On.",
  1023.     "Green", "black", 0)   
  1024.     ColourTell("white","black","|")
  1025.     Hyperlink ("invshow id off"," FALSE ",
  1026.     "Toggle Show Id Off.",
  1027.     "Red", "black", 0) 
  1028.     ColourTell("white","black","] Current Value:" .. showId .. "\r")
  1029.  
  1030.        
  1031.     --Show Type
  1032.     Note("")
  1033.     ColourTell("white","black","Show Type:[")
  1034.     Hyperlink ("invshow type on"," TRUE ",
  1035.     "Toggle Show Item Type On.",
  1036.     "Green", "black", 0)   
  1037.     ColourTell("white","black","|")
  1038.     Hyperlink ("invshow type off"," FALSE ",
  1039.     "Toggle Show Item Type Off.",
  1040.     "Red", "black", 0) 
  1041.     ColourTell("white","black","] Current Value:" .. showType .. "\r")
  1042.        
  1043.        
  1044.     --Show Drop
  1045.     Note("")
  1046.     ColourTell("white","black","Show Drop:[")
  1047.     Hyperlink ("invshow drop on"," TRUE ",
  1048.     "Toggle Show Drop On.",
  1049.     "Green", "black", 0)   
  1050.     ColourTell("white","black","|")
  1051.     Hyperlink ("invshow drop off"," FALSE ",
  1052.     "Toggle Show Drop Off.",
  1053.     "Red", "black", 0) 
  1054.     ColourTell("white","black","] Current Value:" .. showDrop .. "\r")
  1055.    
  1056.            
  1057.     --Show Sell
  1058.     Note("")
  1059.     ColourTell("white","black","Show Sell:[")
  1060.     Hyperlink ("invshow sell on"," TRUE ",
  1061.     "Toggle Show Sell On.",
  1062.     "Green", "black", 0)   
  1063.     ColourTell("white","black","|")
  1064.     Hyperlink ("invshow sell off"," FALSE ",
  1065.     "Toggle Show Sell Off.",
  1066.     "Red", "black", 0) 
  1067.     ColourTell("white","black","] Current Value:" .. showSell .. "\r")
  1068.    
  1069.            
  1070.     --Show Look In
  1071.     Note("")
  1072.     ColourTell("white","black","Show Look In:[")
  1073.     Hyperlink ("invshow lookin on"," TRUE ",
  1074.     "Toggle Show Look In On.",
  1075.     "Green", "black", 0)   
  1076.     ColourTell("white","black","|")
  1077.     Hyperlink ("invshow lookin off"," FALSE ",
  1078.     "Toggle Show Look In Off.",
  1079.     "Red", "black", 0) 
  1080.     ColourTell("white","black","] Current Value:" .. showLookIn .. "\r")
  1081.    
  1082.            
  1083.     --Show Comp
  1084.     Note("")
  1085.     ColourTell("white","black","Show Compare:[")
  1086.     Hyperlink ("invshow comp on"," TRUE ",
  1087.     "Toggle Show Comp On.",
  1088.     "Green", "black", 0)   
  1089.     ColourTell("white","black","|")
  1090.     Hyperlink ("invshow comp off"," FALSE ",
  1091.     "Toggle Show Comp Off.",
  1092.     "Red", "black", 0) 
  1093.     ColourTell("white","black","] Current Value:" .. showComp .. "\r")
  1094.    
  1095.            
  1096.     --Show Resonate
  1097.     Note("")
  1098.     ColourTell("white","black","Show Resonate:[")
  1099.     Hyperlink ("invshow res on"," TRUE ",
  1100.     "Toggle Show Resonate On.",
  1101.     "Green", "black", 0)   
  1102.     ColourTell("white","black","|")
  1103.     Hyperlink ("invshow res off"," FALSE ",
  1104.     "Toggle Show Resonate Off.",
  1105.     "Red", "black", 0) 
  1106.     ColourTell("white","black","] Current Value:" .. showRes .. "\r")
  1107.    
  1108.     --Show Illuminate
  1109.     Note("")
  1110.     ColourTell("white","black","Show Illuminate:[")
  1111.     Hyperlink ("invshow ill on"," TRUE ",
  1112.     "Toggle Show Illuminate On.",
  1113.     "Green", "black", 0)   
  1114.     ColourTell("white","black","|")
  1115.     Hyperlink ("invshow ill off"," FALSE ",
  1116.     "Toggle Show Illuminate Off.",
  1117.     "Red", "black", 0) 
  1118.     ColourTell("white","black","] Current Value:" .. showIll .. "\r")
  1119.    
  1120.     --Show Solidify
  1121.     Note("")
  1122.     ColourTell("white","black","Show Solidify:[")
  1123.     Hyperlink ("invshow sol on"," TRUE ",
  1124.     "Toggle Show Solidify On.",
  1125.     "Green", "black", 0)   
  1126.     ColourTell("white","black","|")
  1127.     Hyperlink ("invshow sol off"," FALSE ",
  1128.     "Toggle Show Solidify Off.",
  1129.     "Red", "black", 0) 
  1130.     ColourTell("white","black","] Current Value:" .. showSol .. "\r")
  1131.    
  1132.     --Show Flags
  1133.     Note("")
  1134.     ColourTell("white","black","Show Flags:[")
  1135.     Hyperlink ("invshow flags on"," TRUE ",
  1136.     "Toggle Show Flags On.",
  1137.     "Green", "black", 0)   
  1138.     ColourTell("white","black","|")
  1139.     Hyperlink ("invshow flags off"," FALSE ",
  1140.     "Toggle Show Flags Off.",
  1141.     "Red", "black", 0) 
  1142.     ColourTell("white","black","] Current Value:" .. showFlags .. "*Not a hyperlink\r")
  1143.    
  1144.     --Show Unique
  1145.     Note("")
  1146.     ColourTell("white","black","Show Unique:[")
  1147.     Hyperlink ("invshow u on"," TRUE ",
  1148.     "Toggle Show Unique On.",
  1149.     "Green", "black", 0)   
  1150.     ColourTell("white","black","|")
  1151.     Hyperlink ("invshow u off"," FALSE ",
  1152.     "Toggle Show Unique Off.",
  1153.     "Red", "black", 0) 
  1154.     ColourTell("white","black","] Current Value:" .. showU .. "\r")
  1155.  
  1156.     Note("")--end line
  1157. end
  1158.  
  1159. function Display_Line (line, styles)
  1160.    local id = font_id
  1161.  
  1162.    -- first 2 lines in bold
  1163.    if line < 3 then
  1164.      id = font_id_bold
  1165.    end
  1166.  
  1167.    local left = 10
  1168.    local top =  (line - 1) * font_height + 5
  1169.  
  1170.    for _, v in ipairs (styles) do
  1171.        left = left + WindowText (win, id, v.text,
  1172.                               left, top, 0, 0, v.textcolour)
  1173.    end -- for each style run                
  1174. end -- Display_Line
  1175.  
  1176.  
  1177. function LoadInvCap()
  1178.    LoadPlugin ("C:/Users/Moshu/Documents/Aardwolf-Mud-MUSHclient/MUSHclient/worlds/plugins/aard_inv_capture")
  1179.     Note("**Loaded Inventory Capture Plugin")
  1180. end
  1181.  
  1182. function GetTypeFromId(id)
  1183.  
  1184.     if id == 1 then
  1185.       itemType = "Light"
  1186.     end
  1187.  
  1188.     if id == 2 then
  1189.       itemType = "Scroll"
  1190.     end
  1191.  
  1192.     if id == 3 then
  1193.       itemType = "Wand"
  1194.     end
  1195.     if id == 4 then
  1196.       itemType = "Stave"
  1197.     end
  1198.     if id == 5 then
  1199.       itemType = "Weapon"
  1200.     end
  1201.     if id == 6 then
  1202.       itemType = "Treasure"
  1203.     end
  1204.     if id == 7 then
  1205.       itemType = "Armor"
  1206.     end
  1207.     if id == 8 then
  1208.       itemType = "Potion"
  1209.     end
  1210.     if id == 9 then
  1211.       itemType = "Furniture"
  1212.     end
  1213.     if id == 10 then
  1214.       itemType = "Trash"
  1215.     end
  1216.     if id == 11 then
  1217.       itemType = "Container"
  1218.     end
  1219.     if id == 12 then
  1220.       itemType = "Drink Container"
  1221.     end
  1222.     if id == 13 then
  1223.       itemType = "Key"
  1224.     end
  1225.     if id == 14 then
  1226.       itemType = "Food"
  1227.     end
  1228.     if id == 15 then
  1229.       itemType = "Boat"
  1230.     end
  1231.     if id == 16 then
  1232.       itemType = "Mob Corpse"
  1233.     end
  1234.     if id == 17 then
  1235.       itemType = "Player Corpse"
  1236.     end
  1237.     if id == 18 then
  1238.       itemType = "Fountain"
  1239.     end
  1240.     if id == 19 then
  1241.       itemType = "Pill"
  1242.     end
  1243.     if id == 20 then
  1244.       itemType = "Portal"
  1245.     end
  1246.     if id == 21 then
  1247.       itemType = "Beacon"
  1248.     end
  1249.     if id == 22 then
  1250.       itemType = "Gift Card"
  1251.     end
  1252.     if id == 23 then
  1253.       itemType = "Unused"
  1254.     end
  1255.     if id == 24 then
  1256.       itemType = "Raw Material"
  1257.     end
  1258.     if id == 25 then
  1259.       itemType = "CampFire"
  1260.     end
  1261.     --Note(itemType)
  1262. end
  1263.  
  1264.  
  1265. --=================================================================================
  1266. -- Called when plugin is first installed, including when Mush first starts.
  1267. -- This is the place to initialize stuff you need in the main plugin.
  1268. --=================================================================================
  1269. function OnPluginInstall()
  1270.   ColourTell("yellow", "black", "GEAR has been installed. Type Gear or gear to use it. Written by Moshu.\n")
  1271.   --- Get a unique name for main window
  1272.   win = GetPluginID ()  -- get a unique name
  1273.   assert(SetVariable("action1", "id "))
  1274. end
  1275.  
  1276.  
  1277. ]]>
  1278.  
  1279.  
  1280. </script>
  1281.  
  1282. </muclient>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement