Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ MUSHclient ➜ Tips and tricks ➜ Aardwolf Quest Tracker Plugin

Aardwolf Quest Tracker Plugin

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


Posted by BarkinMad   (2 posts)  Bio
Date Wed 21 Sep 2016 04:17 PM (UTC)
Message
I made a plugin to track quest results on aardwolf after turn-in in a easy to see way, why not give it a try?

Simply copy and paste all the code below into notepad or your text editor and save the file as quest_tracker.xml
into your MUSHclient folder/worlds/plugins/BarkinMad (create new folder called BarkinMad) NOTE it is IMPORTANT you save with the .xml file extension because this is how MUSHclient uses plugins.

Load up MUSHclient if it's not already running, go to the file drop-down menu at the top of MUSHclient and choose 'plugins' click ADD in the bottom left, find the plugin and either select it and hit enter, double click it or click open in the bottom right.

Happy Mudding :)



<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE muclient>

<muclient>

<plugin
   name="Quest_Tracker"
   author="Barkinmad"
   id="567409338ac6761832559240"
   language="Lua"
   save_state="y"
   date_written="2016-09-21 11:25:45"
   requires="4.98"
   version="1.0"
   >
</plugin>

<aliases>
  <alias
   match="quest report"
   enabled="y"
   sequence="100"
   send_to="12"
   script="quest_reporter"
  >
  </alias>
</aliases>

<script>

<![CDATA[

function OnPluginBroadcast (msg, id, name, text)
	if (id == '3e7dedbe37e44942dd46d264') then
		if (text == "char.stats" or text == "char.maxstats" or text == "char.vitals" or text == "char.worth" or text == "char.status") then
			res, gmcparg = CallPlugin("3e7dedbe37e44942dd46d264","gmcpval","char") --- We just want the gmcp.char section.
			luastmt = "gmcpdata = " .. gmcparg
			assert (loadstring (luastmt or "")) ()
		end
	end
	
	if (text == "comm.quest") then

		res, gmcparg = CallPlugin("3e7dedbe37e44942dd46d264", "gmcpval", "comm")
		luastmt = "gmcpdata = " .. gmcparg
		assert (loadstring (luastmt or "")) ()
		local action = gmcpval("quest.action")
			if (action == "comp") then
				last_quest_base = tonumber (gmcpval("quest.qp"))
				if tonumber (gmcpval("quest.tierqp")) == nil then last_quest_tier = tonumber (0)
					else last_quest_tier = tonumber (gmcpval("quest.tierqp"))
				end
				if tonumber (gmcpval("quest.pracs")) == nil then last_quest_practices = tonumber (0)
					else last_quest_practices = tonumber (gmcpval("quest.pracs"))
				end
				if tonumber (gmcpval("quest.trains")) == nil then last_quest_trains = tonumber (0)
					else last_quest_trains = tonumber (gmcpval("quest.trains"))
				end
				if tonumber (gmcpval("quest.tp")) == nil then last_quest_tp = tonumber (0)
					else last_quest_tp = tonumber (gmcpval("quest.tp"))
				end
				last_quest_mccp = tonumber (gmcpval("quest.mccp"))
				if tonumber (gmcpval("quest.lucky")) == nil then last_quest_lucky = tonumber (0)
					else last_quest_lucky = tonumber (gmcpval("quest.lucky"))
				end
				if tonumber (gmcpval("quest.double")) == nil then last_quest_double = tonumber (0)
					else last_quest_double = tonumber (gmcpval("quest.double"))
				end
				last_quest_total = tonumber (gmcpval("quest.totqp"))
				last_quest_gold = tonumber (gmcpval("quest.gold"))
				ColourNote ("yellow", "red", "QUEST TRACKER")
				ColourNote ("yellow", "red", "TOTAL QP : " .. last_quest_total)
				ColourNote ("green", "", "base qp : " .. last_quest_base)
				ColourNote ("green", "", "tier bonus : " .. last_quest_tier)
				ColourNote ("green", "", "practices : " .. last_quest_practices)
				ColourNote ("green", "", "trains : " .. last_quest_trains)
				ColourNote ("green", "", "tp : " .. last_quest_tp)
				ColourNote ("green", "", "MCCP : " .. last_quest_mccp)
				ColourNote ("green", "", "lucky : " .. last_quest_lucky)
				ColourNote ("green", "", "double : " .. last_quest_double)
				ColourNote ("green", "", "gold : " .. last_quest_gold)
				qp_quest_base = qp_quest_base + last_quest_base
			end
	end
	
end -- function onpluginbroadcast

require "gmcphelper" -- this line is necessary for us to be able to use the gmcpval helper function defined in gmcphelper.lua

function quest_reporter ()
	Note ("QP base total : " .. qp_quest_base)
end -- function quest reporter

function OnPluginInstall ()
  
OnPluginEnable ()  -- do initialization stuff
  
end -- OnPluginInstall

function OnPluginEnable ()
	qp_quest_base = GetVariable ("qp_quest_base")
	if qp_quest_base == nil then
		SetVariable ("qp_quest_base", tonumber(0))
	end
	qp_quest_base = GetVariable ("qp_quest_base")
end -- OnPluginEnable

function OnPluginSaveState ()
  SetVariable ("qp_quest_base", qp_quest_base)
end -- OnPluginSaveState

]]>

</script>

</muclient>

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.


9,491 views.

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

Go to topic:           Search the forum


[Go to top] top

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