<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.runerealm.org/index.php?action=history&amp;feed=atom&amp;title=Module%3ATestGetTotalQuestPoints</id>
	<title>Module:TestGetTotalQuestPoints - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.runerealm.org/index.php?action=history&amp;feed=atom&amp;title=Module%3ATestGetTotalQuestPoints"/>
	<link rel="alternate" type="text/html" href="https://wiki.runerealm.org/index.php?title=Module:TestGetTotalQuestPoints&amp;action=history"/>
	<updated>2026-05-05T17:37:03Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.41.1</generator>
	<entry>
		<id>https://wiki.runerealm.org/index.php?title=Module:TestGetTotalQuestPoints&amp;diff=35189&amp;oldid=prev</id>
		<title>Alex: Created page with &quot;local p = {}  -- create a new module table  function p.countQuestPoints(frame)     local args = frame:getParent().args      return p._countQuestPoints(args) end  -- create a function in the module function p._countQuestPoints(args) 	 	local html = require(&#039;Module:Mw.html extension&#039;) 	local pageHtml = mw.getCurrentFrame():preprocess(&#039;{{:{{FULLPAGENAME}}}}&#039;) 	local parsed = html.parse(pageHtml)  	local dpl = require( &#039;Module:DPLlua&#039; )  	local a, b = dpl.ask( { 			namespace...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.runerealm.org/index.php?title=Module:TestGetTotalQuestPoints&amp;diff=35189&amp;oldid=prev"/>
		<updated>2024-10-16T23:13:16Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;local p = {}  -- create a new module table  function p.countQuestPoints(frame)     local args = frame:getParent().args      return p._countQuestPoints(args) end  -- create a function in the module function p._countQuestPoints(args) 	 	local html = require(&amp;#039;Module:Mw.html extension&amp;#039;) 	local pageHtml = mw.getCurrentFrame():preprocess(&amp;#039;{{:{{FULLPAGENAME}}}}&amp;#039;) 	local parsed = html.parse(pageHtml)  	local dpl = require( &amp;#039;Module:DPLlua&amp;#039; )  	local a, b = dpl.ask( { 			namespace...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;local p = {}  -- create a new module table&lt;br /&gt;
&lt;br /&gt;
function p.countQuestPoints(frame)&lt;br /&gt;
    local args = frame:getParent().args&lt;br /&gt;
&lt;br /&gt;
    return p._countQuestPoints(args)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- create a function in the module&lt;br /&gt;
function p._countQuestPoints(args)&lt;br /&gt;
	&lt;br /&gt;
	local html = require(&amp;#039;Module:Mw.html extension&amp;#039;)&lt;br /&gt;
	local pageHtml = mw.getCurrentFrame():preprocess(&amp;#039;{{:{{FULLPAGENAME}}}}&amp;#039;)&lt;br /&gt;
	local parsed = html.parse(pageHtml)&lt;br /&gt;
&lt;br /&gt;
	local dpl = require( &amp;#039;Module:DPLlua&amp;#039; )&lt;br /&gt;
&lt;br /&gt;
	local a, b = dpl.ask( {&lt;br /&gt;
			namespace = &amp;#039;&amp;#039;,&lt;br /&gt;
			uses = &amp;#039;{Infobox Quest},{Quest rewards}&amp;#039;,&lt;br /&gt;
			order = &amp;#039;ascending&amp;#039;,&lt;br /&gt;
			category = &amp;#039;Free-to-play quests&amp;#039;,&lt;br /&gt;
			notcategory = &amp;#039;Future content&amp;#039;,&lt;br /&gt;
			ignorecase = true&lt;br /&gt;
		},{&lt;br /&gt;
			namespace = &amp;#039;&amp;#039;,&lt;br /&gt;
			uses = &amp;#039;Template:Recipe&amp;#039;,&lt;br /&gt;
			count = 1,&lt;br /&gt;
			include = &amp;#039;{Recipe},{Infobox Item}&amp;#039;,&lt;br /&gt;
			ignorecase = true&lt;br /&gt;
		} )&lt;br /&gt;
  &lt;br /&gt;
	mw.logObject(a)&lt;br /&gt;
	-- mw.logObject(b)&lt;br /&gt;
	&lt;br /&gt;
    -- get the content of the page&lt;br /&gt;
    local content = mw.title.getCurrentTitle():getContent()&lt;br /&gt;
&lt;br /&gt;
    -- initialize a counter for the quest points&lt;br /&gt;
    local totalQuestPoints = 0&lt;br /&gt;
    &lt;br /&gt;
    --local testContent = &lt;br /&gt;
&lt;br /&gt;
    -- iterate over each line in the content&lt;br /&gt;
    for line in content:gmatch(&amp;quot;[^\r\n]+&amp;quot;) do&lt;br /&gt;
        -- check if the line is a table row&lt;br /&gt;
        --if line:find(&amp;quot;&amp;lt;tr&amp;gt;&amp;quot;) then&lt;br /&gt;
            -- extract the quest points from the row&lt;br /&gt;
            -- local questPoints = tonumber(line:match(&amp;quot;&amp;lt;td&amp;gt;(%d+)&amp;lt;/td&amp;gt;&amp;quot;))&lt;br /&gt;
            -- if quest points were found, add them to the total&lt;br /&gt;
            --if questPoints then&lt;br /&gt;
            --    totalQuestPoints = totalQuestPoints + questPoints&lt;br /&gt;
            --end&lt;br /&gt;
        --end&lt;br /&gt;
        totalQuestPoints = totalQuestPoints + 1&lt;br /&gt;
        &lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    -- return the total quest points&lt;br /&gt;
    return parsed&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p  -- return the module table&lt;/div&gt;</summary>
		<author><name>Alex</name></author>
	</entry>
</feed>