Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?xml version="1.0" encoding="iso-8859-1"?>
- <!DOCTYPE muclient>
- <!-- Saved on Sunday, March 17, 2019, 2:43 AM -->
- <!-- MuClient version 5.06-pre -->
- <!-- Plugin "DemonMUSH_Auction" generated by Plugin Wizard -->
- <muclient>
- <plugin
- name="DemonMUSH_Auction"
- author="Soth"
- id="c2d74453d9e1ec38be0633f2"
- language="Lua"
- purpose="Send bidding info to the 'demonauc' channel and track auction earnings/spendings"
- date_written="2019-03-15 23:10:57"
- requires="4.92"
- save_state = "y"
- version="1.1"
- >
- </plugin>
- <!-- Get our standard constants -->
- <include name="constants.lua"/>
- <!-- Triggers -->
- -- Please wait until the auction closes on the current item.
- <triggers>
- <trigger
- enabled="y"
- match="(* gold paid to the mud for auctioning fees)"
- send_to="12"
- sequence="100"
- >
- <send>fee = %1
- feesTotal = feesTotal + fee
- SetVariable("feesTotalSave", feesTotal)
- playerAuctioned = true
- SaveState()</send></trigger>
- <trigger
- enabled="y"
- match="Auction house fee is *. You receive * gold coins!"
- send_to="12"
- sequence="100"
- >
- <send>fee = %1
- feesTotal = feesTotal + fee
- SetVariable("feesTotalSave", feesTotal)
- playerAuctioned = true
- SaveState()</send></trigger>
- <trigger
- enabled="y"
- match="Item sold for * gold coins."
- send_to="12"
- sequence="100"
- >
- <send>goldGain = %1
- goldEarned = goldEarned + goldGain
- SetVariable("goldEarnedSave", goldEarned)
- SaveState()</send></trigger>
- <trigger
- enabled="y"
- match="(auction) Starting bid on '*' at * gold."
- omit_from_output="y"
- send_to="12"
- sequence="100"
- >
- <send>itemString = "%1"
- if playerAuctioned == true then
- playerAuctioned = false
- if itemInsult ~= "null" and itemInsult ~= nil then
- itemStartBid = %2
- attemptedEarn = attemptedEarn + itemStartBid
- SetVariable("attemptedEarnSave", attemptedEarn)
- if playerTitle ~= "default" then
- SendNoEcho("demonauc "..playerTitle.." Started the bidding on item '%1' at '%2' gold.")
- else
- SendNoEcho("demonauc Started the bidding on item '%1' at '%2' gold.")
- end
- itemInsult = "null"
- SaveState()
- end
- end</send></trigger>
- <trigger
- enabled="y"
- match="Current bid is * gold coins for '*'."
- send_to="12"
- sequence="100"
- >
- <send>itemString = "%2"</send></trigger>
- <trigger
- enabled="y"
- match="* gold coins put up in escrow."
- send_to="12"
- sequence="100"
- >
- <send>if itemBidAmt ~= "null" and itemBidAmt ~= nil then
- if playerTitle ~= "default" then
- SendNoEcho("demonauc "..playerTitle.." Placed a bid of '"..itemBidAmt.."' gold on item "..itemString..".")
- else
- SendNoEcho("demonauc Placed a bid of '"..itemBidAmt.."' gold on item "..itemString..".")
- end
- itemBidAmt = "null"
- end</send></trigger>
- <trigger
- enabled="y"
- match="* tells you, 'badge *'"
- omit_from_output="y"
- send_to="14"
- keep_evaluating="y"
- sequence="100"
- >
- <send>checkName = "%1"
- if checkName == "Soth" or checkName == "Carver" or checkName == "A terrible winged Demon" then
- if "%2" == "badge" then
- playerTitle = "%3"
- SetVariable("playerTitleSave", playerTitle)
- print("")
- ColourNote("ghostwhite", "indigo", "You have been awarded the "..playerTitle.." badge for the demonauc channel!")
- SaveState()
- else
- ColourNote("cyan","black", "%1 tells you, '%2 %3'")
- end
- else
- ColourNote("cyan","black", "%1 tells you, '%2 %3'")
- end</send></trigger>
- <trigger
- enabled="y"
- match="cuadFight string: *"
- omit_from_output="y"
- send_to="12"
- sequence="100"
- >
- <send>opponent = "%1"</send></trigger>
- </triggers>
- <!-- Aliases -->
- <aliases>
- <alias
- match="auction *"
- enabled="y"
- send_to="12"
- sequence="100"
- >
- <send>itemInsult = "%1"
- SendNoEcho("auction %1")
- DoAfterSpecial(2, "itemInsult = 'null'", sendto.script)</send></alias>
- <alias
- match="bid *"
- enabled="y"
- send_to="12"
- sequence="100"
- >
- <send>itemBidAmt = "%1"
- SendNoEcho("bid %1")
- DoAfterSpecial(3, "itemBidAmt = 'null'", sendto.script)</send></alias>
- <alias
- match="challenge *"
- enabled="y"
- send_to="12"
- sequence="100"
- >
- <send>opponent = "%1"
- SendNoEcho("fin "..opponent.." |prefix cuad|grep Fight")
- DoAfterSpecial(2, "if opponent ~= nil then SendNoEcho('demonauc Challenges '..opponent..' to a bidding war!') end", sendto.script)</send></alias>
- <alias
- match="brag ledger"
- enabled="y"
- send_to="12"
- sequence="100"
- >
- <send>Execute("brag say ledger")</send></alias>
- <alias
- match="show ledger"
- enabled="y"
- send_to="12"
- sequence="100"
- >
- <send>Execute("show my ledger")</send></alias>
- <alias
- match="* * ledger"
- enabled="y"
- send_to="12"
- ignore_case="y"
- sequence="100"
- >
- <send>userInput = "%1 %2"
- goldEarnedTotal = goldEarned - feesTotal
- if userInput == "brag %2" then
- Send("%2 I have attempted to earn '"..attemptedEarn.."' gold coins from Auction, profited '"..goldEarnedTotal.."' gold coins, and paid '"..feesTotal.."' gold coins in auctioning fees. ")
- elseif userInput == "show my" then
- print("")
- ColourNote ("darkviolet", "black", "You have attempted to earn '"..attemptedEarn.."' gold coins from Auction, profited '"..goldEarnedTotal.."' gold coins, and paid '"..feesTotal.."' gold coins in auctioning fees. ")
- end</send></alias>
- <alias
- match="demon auc* *"
- enabled="y"
- send_to="12"
- ignore_case="y"
- sequence="100"
- >
- <send>userInput = "%2"
- if userInput == "clear" then
- SetVariable("goldEarnedSave", 0)
- SetVariable("attemptedEarnSave", 0)
- SetVariable("feesTotalSave", 0)
- print("")
- ColourNote ("ghostwhite", "indigo", "Your Demon Auction ledger has been cleared.")
- elseif userInput == "help" then
- print("")
- ColourNote("ghostwhite", "indigo", "Demon Auction Manual")
- print("")
- ColourNote ("ghostwhite", "indigo", "Main commands")
- ColourNote ("darkviolet", "black", " 'demon auction help'- Shows this help file.")
- ColourNote ("darkviolet", "black", " 'show ledger' - Shows your current auction statistics.")
- ColourNote ("darkviolet", "black", " 'brag ledger' - Brags your current auction statistics to room.")
- ColourNote ("darkviolet", "black", " 'brag <channel> ledger' - Brags your current auction statistics to specified channel.")
- ColourNote ("darkviolet", "black", " 'demon auction clear'- Clears your Demon Auction ledger (Please use with care).")
- --ColourNote ("darkviolet", "black", " 'challenge <player>' - Challenges a player to a bidding war on the demonauc channel.")
- print("")
- ColourNote("ghostwhite", "indigo", "Important Notice:")
- -- ^ ^
- ColourNote ("darkviolet", "black", " The main purpose of Demon Auction is to remove anonymity from buying, selling, ")
- ColourNote ("darkviolet", "black", " and bidding on the auction channel by sending that information to the demonauc ")
- ColourNote ("darkviolet", "black", " channel. Demon Auction users may regain their privacy by disabling the auction ")
- ColourNote ("darkviolet", "black", " channel. Additionally, this plugin keeps track of your auction statistics for ")
- ColourNote ("darkviolet", "black", " bragging rights and as a learning tool for up and coming auctioneers. Enjoy! ")
- else
- ColourNote ("red", "black", " Demon Auction command '"..userInput.."' not found. Type 'demon auction help' to learn basic usage.")
- end
- </send></alias>
- <alias
- match="cv auc"
- enabled="y"
- send_to="12"
- ignore_case="y"
- sequence="100"
- >
- <send>
- ColourNote ("darkviolet", "black", "***^._.^*** | Auction ANALYSIS: ----------------------------- | ***^._.^***")
- print(" | itemInsult : ",itemInsult)
- print(" | itemString : ",itemString)
- print(" | itemStartBid : ",itemStartBid)
- print(" | itemBidAmt : ",itemBidAmt)
- print(" | playerTitle : ",GetVariable('playerTitleSave'))
- print(" | playerAuctioned : ",playerAuctioned)
- print(" | opponent : ",opponent)
- print(" | goldEarned : ",GetVariable('goldEarnedSave'))
- print(" | attemptedEarn : ",GetVariable('attemptedEarnSave'))
- print(" | feesTotal : ",GetVariable('feesTotalSave'))
- ColourNote ("darkviolet", "black", "***^._.^*** | --------------------------------------------- | ***^._.^***")</send></alias>
- </aliases>
- <!-- Script -->
- <script>
- <![CDATA[
- ----------------------------------------------------------------------------------------
- -- Functions
- ----------------------------------------------------------------------------------------
- function OnPluginInstall()
- ColourNote ("white", "indigo", "DemonMUSH_Auction has been installed. Type 'demon auction help' to learn more.")
- end
- if GetVariable("playerTitleSave") ~= nil then
- playerTitle = GetVariable("playerTitleSave")
- else
- playerTitle = "default"
- end
- if GetVariable("goldEarnedSave") ~= nil then
- goldEarned = GetVariable("goldEarnedSave")
- else
- goldEarned = 0
- end
- if GetVariable("attemptedEarnSave") ~= nil then
- attemptedEarn = GetVariable("attemptedEarnSave")
- else
- attemptedEarn = 0
- end
- if GetVariable("feesTotalSave") ~= nil then
- feesTotal = GetVariable("feesTotalSave")
- else
- feesTotal = 0
- end
- ----------------------------------------------------------------------------------------
- -- Global Variables
- ----------------------------------------------------------------------------------------
- itemInsult = "null"
- itemString = "default"
- playerAuctioned = false
- goldEarnedTotal = 0
- ]]>
- </script>
- </muclient>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement