User contributions for Alex

A user with 47,390 edits. Account created on 10 October 2024.
Jump to navigation Jump to search
Search for contributionsshowhide
⧼contribs-top⧽
⧼contribs-date⧽
(newest | oldest) View ( | ) (20 | 50 | 100 | 250 | 500)

11 October 2024

  • 23:3723:37, 11 October 2024 diff hist +2,013 N Module:CoinsCreated page with "-- <pre> -- Implements {{Coins}} -- Original source: http://runescape.wiki/w/Module:Coins?action=history local p = {} local function amount(a) -- convert used globals to locals where possible to improve performance local math = math local string = string local table = table local mw = mw local expr = mw.ext.ParserFunctions.expr local ret = {'<span class="coins coins-', true, true, true, '</span>'} -- strip commas from input -- @example '123,456,789'..." current
  • 23:3623:36, 11 October 2024 diff hist +196 N Module:Addcommas/docCreated page with "{{documentation}} {{Helper module|name=Addcommas |fname1=_add(arg) |ftype1=Number |fuse1=Formats the number arg with commas |fname2=_strip(arg) |ftype2=Number |fuse2=Removes all commas from arg }}" current
  • 23:3623:36, 11 October 2024 diff hist +1,124 N Module:AddcommasCreated page with "--[[ {{Helper module|name=Addcommas |fname1=_add(arg) |ftype1=Number |fuse1=Formats the number arg with commas |fname2=_strip(arg) |ftype2=Number |fuse2=Removes all commas from arg }} --]] -- <nowiki> -- -- Implements {{Addcommas}} -- local p = {} -- -- main function -- keep public so it can be used in other modules -- function p._add( arg ) local lang = mw.language.getContentLanguage() local z = tostring( arg ) local y = mw.text.split( z, '[%-–]' ) l..." current
  • 23:3523:35, 11 October 2024 diff hist +19,254 N Module:Skill calcCreated page with "local p = {} local helpers = require(string.format('%s/Helpers', mw.getCurrentFrame():getTitle())) local commas = require('Module:Addcommas')._add local coins = require('Module:Coins')._amount local gePrices = mw.loadJsonData('Module:GEPrices/data.json') local farmingCTS = { ['Potato'] = { 101, 180 }, ['Onion'] = { 105, 180 }, ['Cabbage'] = { 107, 180 }, ['Tomato'] = { 112, 180 }, ['Sweetcorn'] = { 88, 180 }, ['Strawberry'] = { 103, 180 }, ['Watermelon'] = { 126..." current
  • 23:3023:30, 11 October 2024 diff hist +5,301 N RuneScape:LuaCreated page with "{{External|rs|rsc}} '''Lua''' is a programming language that is integrated into ''{{SITENAME}}'' with Scribunto. Lua source code is run from Modules in their own namespace, and invoked with <code><nowiki>{{#invoke:Module|function}}</nowiki></code>; this should done with a wrapper template. For example, if we have a module named "foo", then we should have a template called "Template:Foo" consisting of <code><nowiki>{{#invoke:Foo|main}}</nowiki><..." current
  • 23:2823:28, 11 October 2024 diff hist +5,106 N Module:Trailblazer RegionCreated page with "local p = {} local lang = mw.getContentLanguage() local regions = { misthalin = true, karamja = true, asgarnia = true, desert = true, fremennik = true, kandarin = true, morytania = true, tirannwn = true, wilderness = true, kourend = true, varlamore = true, } function p._main(region, note, link, global_highlight, league) if region == nil or string.lower(region) == "no" then return "None" end local ret = {} for value in string.gmatch(region, "[^,]+") do..."
  • 23:2823:28, 11 October 2024 diff hist +751 N Module:Sandbox/docCreated page with "{{Documentation}} '''This is the general purpose sandbox for lua modules.''' It can be used to test changes to existing modules, prototype new modules, experimenting with lua features, or for any other purpose. Much like RuneScape:Sandbox, this page is free to edit for all - if you want to use code personally or for long periods without others editing it, make a personal module sandbox at <code>Module:Sandbox/User:{{USERNAME}}</code> or subpages of that. Invocation..." current
  • 23:2823:28, 11 October 2024 diff hist +2,241 N Module:SandboxCreated page with "local tb = require('Module:Trailblazer Region')._badge local p = {} function p.main(frame) local args = frame:getParent().args local orRegions = args['or'] or 'No' local regions = {'misthalin', 'karamja', 'asgarnia', 'desert', 'fremennik', 'kandarin', 'morytania', 'tirannwn', 'wilderness', 'kourend'} local ret = mw.html.create('tr') mw.log(args[1]) if args['incompletable'] == 'Yes' then ret:tag('th'):wikitext(args[1]):addClass('table-bg-red') else ret:tag(..." current
  • 23:2723:27, 11 October 2024 diff hist +1,608 N Template:Invokes/docCreated page with "{{Documentation}} This template should be put near the beginning of a template or module's documentation page to link to a module that the template invokes, or a template that invokes the module (respectively). <pre> {{Invokes|ModuleName}} or {{Invokes|TemplateName}} </pre> ==Parameters== ===(1)=== On a template documentation page, this parameter should be supplied with the page title for a module that the template invokes (without the "Module:" namespace prefix).<br>..."
  • 23:2723:27, 11 October 2024 diff hist +538 N Template:InvokesCreated page with "<includeonly>{{#ifeq:{{NAMESPACE}}|Module|<div class="seealso">'''''{{#replace:{{FULLPAGENAME}}|/doc}}''' is invoked by [[{{{page|Template:{{{1}}}}}}]].{{#ifeq:{{lc:{{{category}}}}}|no||{{#ifeq:{{SUBPAGENAME}}|doc||Category:Template invoked modules}}}}''</div>|<div class="seealso">'''''{{#replace:{{FULLPAGENAME}}|/doc}}''' invokes [[Module:{{{1}}}]] using Lua.{{#ifeq:{{lc:{{{category}}}}}|no||{{#ifeq:{{SUBPAGENAME}}|doc||Category:Lua-based templat..." current
  • 23:2523:25, 11 October 2024 diff hist +582 N Module:Top icons/docCreated page with "{{documentation}} This module is used in Template:External to generate the top icons. It can also be called from other modules using its helper function. {{Helper module |name=Top icons |fname1 = _main(args) |ftype1 = String |fuse1 = Returns a string that adds top icons to the page. <code>args</code> must be a table of arguments. Numbered arguments must have values of <code>rs</code>, <code>rsc</code>, <code>meta</code> or <code>wp</code>. To provide a specific pag..." current
  • 23:2523:25, 11 October 2024 diff hist +1,586 N Module:Top iconsCreated page with "--<nowiki> local p = {} local sites = { rs = { params = { 'rs' }, interwiki = 'rsw', wikiname = 'The RuneScape Wiki', }, rsc = { params = { 'rsc' }, interwiki = 'classicrsw', wikiname = 'The RuneScape Classic Wiki', }, meta = { params = { 'meta' }, interwiki = 'meta', wikiname = 'The Meta Weird Gloop Wiki', }, wp = { params = { 'wp' }, interwiki = 'wikipedia', wikiname = 'Wikipedia', }, } local order = { 'rs', 'rsc', 'meta', 'wp' } loc..." current
  • 23:2523:25, 11 October 2024 diff hist +1,909 N Template:External/docCreated page with "{{External|rs|rsc}} {{Documentation}} The '''External''' template adds links to the RuneScape Wiki, the RuneScape Classic Wiki, Meta Weird Gloop Wiki, and Wikipedia beside the "Discussion" tab above an article's title. The links are not added to the mobile skin. ==Usage== External can be used with either unnamed parameters or named parameters. Parameter order does not matter - the order the buttons are shown in will alwa..."
  • 23:2423:24, 11 October 2024 diff hist +84 N Template:ExternalCreated page with "<includeonly>{{#invoke:Top icons|main}}</includeonly><noinclude>{{/doc}}</noinclude>" current
  • 23:2323:23, 11 October 2024 diff hist +6,763 N Abyssal whipCreated page with "{{External|rs}} {{Infobox Item |name = Abyssal whip |image = File:Abyssal whip.png |release = 15 February 2005 |update = Ghosts Ahoy and Slayer Update |members = Yes |quest = No |tradeable = Yes |placeholder = Yes |equipable = Yes |stackable = No |noteable = Yes |options = Wield, Drop |examine = A weapon from the Abyss. |value = 120001 |weight = 0.453 |exchange = Yes |id = 4151 }} 130px|left The '''abyssal whip''' is a one-han..." current
  • 23:1823:18, 11 October 2024 diff hist +1,142 N Template:TemplateData/docCreated page with "{{Documentation}} This template should be used on other templates' documentation pages when adding template data using Extension:TemplateData. This template accepts one unnamed parameter, which should be the the whole <code>templatedata</code> text. Also adds Category:Templates using TemplateData to pages. {{TemplateData|nocat=yes| <templatedata> { "description": "Used on template docs to enclose the templatedata parser tag", "params..."
  • 23:1723:17, 11 October 2024 diff hist +583 N Template:TemplateDataCreated page with "<includeonly>{{#if:{{{noheader|}}}||==Template data==}} <table class="templatedata mw-collapsible mw-collapsed" style="text-align:center" data-expandtext="show" data-collapsetext="hide"> <tr><th style="min-width:400px">Show/hide template's data</th></tr> <tr><td> '''The following information is used by extensions and applications, such as VisualEditor, to help users implement this template onto pages. Please ensure that it is up-to-date.''' {{{1|}}} </td></tr> </table>..."
  • 23:1723:17, 11 October 2024 diff hist +87 N Template:CombatStylesCreated page with "<includeonly>{{#invoke:CombatStyles|main}}</includeonly><noinclude>{{/doc}}</noinclude>" current
  • 23:1623:16, 11 October 2024 diff hist +21,530 N Module:CombatStylesCreated page with "local p = {} local paramTest = require('Module:Paramtest') local CombatOptionLink = { ['Melee'] = 'Combat Options#Melee weapons', ['Ranged'] = 'Combat Options#Ranged weapons', ['Magic'] = 'Combat Options#Magic weapons', ['Multiple'] = 'Combat Options', ['None'] = '', } -- Combat type -- Weapon Style -- Weapon Style -- Experience gained -- Invisible boost local WeaponStyles = { ['Magic'] = { ['Accurate'] = { -- Trident only ['Weapon Style'] = 'Accurat..." current
  • 23:1423:14, 11 October 2024 diff hist +2,157 N Template:CombatStyles/docCreated page with "{{Documentation}} ==Usage== <pre> {{CombatStyles | <!-- The first unnamed parameter determines the combat style of a weapon. --> |speed = <!-- The base attack speed of a weapon. This value is identical to the one used in {{Infobox Bonuses}}. --> |attackrange = <!-- The base attack range of a weapon. This value is identical to the one used in {{Infobox Bonuses}}. --> }} </pre> ==Quick copy== <code><nowiki>{{CombatStyles||speed=|attackra..." current
  • 23:1223:12, 11 October 2024 diff hist +81 N Template:CtgCreated page with "{{{{{|safesubst:}}}#invoke:Category handler|main}}<noinclude>{{/doc}}</noinclude>" current
  • 23:1223:12, 11 October 2024 diff hist +5,411 N Module:Category handlerCreated page with "--[=[ <pre> -- Implements [Template:Ctg] -- Sorts pages into a category more appropriately than pagename alone -- Default and custom rules are outlined at Template:Category handler/doc --]=] local p = {} local ucf = require('Module:Paramtest').ucfirst local curpage = mw.title.getCurrentTitle() function p.main(frame) local ns = curpage.namespace -- Just don't bother unless we're in content namespaces if not (ns == 0 or ns == 120 or ns == 116) then return ''..."
  • 23:1023:10, 11 October 2024 diff hist +82 N Template:APIDocCreated page with "<includeonly>{{#invoke:APIDoc|main}}</includeonly> <noinclude>{{/doc}}</noinclude>" current
  • 23:0923:09, 11 October 2024 diff hist +1,105 N Module:Map/docCreated page with "{{Documentation}} {{APIDoc |funcName = map |funcDesc = The main entry point for templates and pages. Should only be called via <code>{{#invoke}}</code> outside of a module. |arg1 = frame |type1 = [https://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#frame-object frame object] |desc1 = The frame object automatically passed via <code>{{#invoke}}</code>. |returnType = string |returnDesc = A fully rendered map. }} {{APIDoc |funcName = buildMap |funcDesc =..."
  • 23:0923:09, 11 October 2024 diff hist +26,968 N Module:MapCreated page with "local hc = require('Module:Paramtest').has_content -- Package local p = {} -- Feature functions local feat = {} local zoomRatios = { { 3, 8 }, { 2, 4 }, { 1, 2 }, { 0, 1 }, { -1, 1/2 }, { -2, 1/4 }, { -3, 1/8 } } -- Default arg values local defaults = { -- Map options type = 'mapframe', width = 300, height = 300, zoom = 2, mapID = 0, -- RuneScape surface x = 3233, -- Lumbridge lodestone y = 3222, plane = 0, align = 'center', -- Feat..." current
  • 23:0823:08, 11 October 2024 diff hist +1,829 N Module:LocLineCreated page with "local p = {} local editBtn = '<small>' .. require('Module:Edit button')() .. '</small>' local yesno = require('Module:Yesno') local isEmpty = require('Module:Paramtest').is_empty local hc = require('Module:Paramtest').has_content local buildMap = require('Module:Map').buildMap local membscol = { [true] = 'link=Members|alt=Members', [false] = 'link=Free-to-play|alt=Free-to-play', } function p.main(frame) local..." current
  • 23:0823:08, 11 October 2024 diff hist +103 N Template:No documentationCreated page with "{{Documentation}} This template should be used when there is no documentation for a Module or Template."
  • 23:0723:07, 11 October 2024 diff hist +103 N Module:T/docCreated page with "{{Documentation}} This template should be used when there is no documentation for a Module or Template."
  • 23:0723:07, 11 October 2024 diff hist +1,499 N Module:TCreated page with "-- <nowiki> -- Template:T -- local p = {} function p.main(frame) local args = frame:getParent().args return p._main(args) end function p._main(args) local link = args[1] local uri local targs = {} local ns local i = 1 -- strip transclusion modifiers (mw:Help:Magic words#Transclusion modifiers) link = link :gsub('safesubst:', '') :gsub('subst:', '') :gsub('int:', '') :gsub('msg:', '')..." current
  • 23:0723:07, 11 October 2024 diff hist +648 N Template:T/docCreated page with "{{Documentation}} A template link with a variable number of parameters. ===Use=== To use this for templates, use :{{T|T|<nowiki>parameter 1|parameter 2|parameter 3|...|parameter 20</nowiki>}}<!-- self-referential examples! --> To use other namespaces, use the namespace as prefix, for example :{{T|T|User:Example}} And to show transclusions of mainspace pages, use :{{T|T|:Bucket}} ===Example=== <code><nowiki>{{T|Stub}}</nowiki></code> :{{T|Stub}} <code><nowiki>{{T|Stub..." current
  • 23:0623:06, 11 October 2024 diff hist +108 N Template:TCreated page with "<includeonly><span class="plainlinks">{{#invoke:T|main}}</span></includeonly><noinclude>{{/doc}}</noinclude>" current
  • 23:0423:04, 11 October 2024 diff hist +272 N Module:Edit button/docCreated page with "{{Documentation}} {{Helper module |name=Edit button |fname1=(text, page) |ftype1=string, string |fuse1=Creates an edit button for <code>page</code>. <code>page</code> defaults to the current page that the module is invoked on<br><br><code>text</code> defaults to "edit" }}" current
  • 23:0323:03, 11 October 2024 diff hist +487 N Module:Edit buttonCreated page with "-- {{Helper module|name=Edit button|fname1=(text)|ftype1=string|fuse1=Creates an edit button for the current page that the module is invoked on<br><br><code>text</code> defaults to "edit"}} -- Creates a link that opens the editor screen for whatever page this module is invoked on return function(text, page) local page_title = page or mw.title.getCurrentTitle().fullText local url = tostring(mw.uri.fullUrl(page_title,'action=edit')) return '['..url..' '..(text or 'edi..." current
  • 23:0323:03, 11 October 2024 diff hist +88 N Template:Tooltip textCreated page with "<includeonly>{{#invoke:Tooltip|div}}</includeonly><noinclude>{{Tooltip/doc}}</noinclude>" current
  • 23:0223:02, 11 October 2024 diff hist +8,151 N Template:Tooltip/docCreated page with "{{Documentation|Template:Tooltip}} Template:Tooltip and Template:Tooltip text are templates is for generating clickable tooltips to show additional information. They are to be used together. These tooltips '''require JavaScript''', so should only be used for non-essential additional information only. They will not show at all in the mobile skin or if the user has JavaScript disabled. The script powering these tooltips is located at MediaWiki:Gadget-tooltips.js..." current
  • 23:0223:02, 11 October 2024 diff hist +82 N Template:TooltipCreated page with "<includeonly>{{#invoke:Tooltip|span}}</includeonly><noinclude>{{/doc}}</noinclude>" current
  • 23:0123:01, 11 October 2024 diff hist +1,592 N Module:TooltipCreated page with "local p = {} local yn = require('Module:Yesno') local hc = require('Module:Paramtest').has_content -- module access point for div p._div = function(args) local name = args.name if not hc(name) then error('Name is required!') end local content = args.content local hasarrow = yn(args.arrow or 'yes', true) local arrowsize = tonumber(args.arrowsize) or 10 local limitwidthbool = yn(args.limitwidth or 'yes', true) local style = args.style local div = mw.ht..." current
  • 23:0023:00, 11 October 2024 diff hist +4,464 N Module:DPLlua/docCreated page with "{{Documentation}} Uses Template:DPLlua helper to make it possible to include all parameters of a template while maintaining good performance. {{Helper module|name=DPLlua |fname1 = ask( ... ) |ftype1 = tables |fuse1 = <code>ask</code> takes a series of tables each containing the settings for a DPL query; it will return the same number of result tables as input tables. All formatting settings are stripped from the config. If the config does not contains <co..." current
  • 23:0023:00, 11 October 2024 diff hist +16,313 N Module:DPLluaCreated page with "-- <nowiki> local dpl = {} local libraryUtil = require( 'libraryUtil' ) local hasContent = require( 'Module:Paramtest' ).has_content local checkType = libraryUtil.checkType local checkTypeForNamedArg = libraryUtil.checkTypeForNamedArg dpl.pipe = '¦' local dataContentMarker = '`#@@#`' local allIncludedParamNames = {} -- Custom function for splitting a string because mw.text.split() is waaay too slow local function split( str, pattern, plain ) local res = {} local con..."
  • 23:0023:00, 11 October 2024 diff hist +686 N Module:Paramtest/docCreated page with "{{documentation}} {{Helper module |name=Paramtest |fname1 = is_empty(arg) |ftype1 = String |fuse1 = Returns true if arg is not defined or contains only whitespace |fname2 = has_content(arg) |ftype2 = String |fuse2 = Returns true if arg exists and does not only contain whitespace |fname3 = default_to(arg1,arg2) |ftype3 = String, Any value |fuse3 = If arg1 exists and does not only contain whitespace, the function returns arg1, otherwise returns arg2 |fname4 = defaults{ {ar..." current
  • 23:0023:00, 11 October 2024 diff hist +2,055 N Module:ParamtestCreated page with "--[[ {{Helper module |name=Paramtest |fname1 = is_empty(arg) |ftype1 = String |fuse1 = Returns true if arg is not defined or contains only whitespace |fname2 = has_content(arg) |ftype2 = String |fuse2 = Returns true if arg exists and does not only contain whitespace |fname3 = default_to(arg1,arg2) |ftype3 = String, Any value |fuse3 = If arg1 exists and does not only contain whitespace, the function returns arg1, otherwise returns arg2 |fname4 = defaults{ {arg1,arg2},...}..." current
  • 22:5922:59, 11 October 2024 diff hist +314 N Module:Yesno/docCreated page with "{{documentation}} {{Helper module|name=Yesno |fname1=(arg) |ftype1=Any value |fuse1=Reads arg for yes/no and returns the appropriate boolean or nil |fname2=(arg1,arg2) |ftype2=Any value, Any value |fuse2=Reads arg1 for yes/no and returns the appropriate boolean; returns arg2 if arg1 was not an applicable value }}" current
  • 22:5922:59, 11 October 2024 diff hist +871 N Module:YesnoCreated page with "--[[ {{Helper module|name=Yesno |fname1=(arg) |ftype1=Any value |fuse1=Reads arg for yes/no and returns the appropriate boolean or nil |fname2=(arg1,arg2) |ftype2=Any value, Any value |fuse2=Reads arg1 for yes/no and returns the appropriate boolean; returns arg2 if arg1 was not an applicable value }} --]] -- <pre> -- Used to evaluate args to booleans where applicable -- -- Based on <https://en.wikipedia.org/wiki/Module:Yesno> -- see page history there for contributors --..." current
  • 22:5922:59, 11 October 2024 diff hist +17,696 N Module:Array/docCreated page with "{{Documentation}} {{Helper module |name = Array |fname1 = <nowiki>all( arr, [fn] )</nowiki> |ftype1 = <samp>arr: any[]</samp><br><samp>fn?: any</samp><br><samp>-> boolean</samp> |fuse1 = Behaviour depends on the value of <code>fn</code>: * <code>nil</code> - Checks that the array doesn't contain any '''false''' elements. * <code>fun(elem: any, i?: integer): boolean</code> - Returns '''true''' if <code>fn</code> returns '''true''' for every element. * <code>nu..." current
  • 22:5822:58, 11 October 2024 diff hist +30,679 N Module:ArrayCreated page with "local libraryUtil = require('libraryUtil') local checkType = libraryUtil.checkType local checkTypeMulti = libraryUtil.checkTypeMulti ---Returns the length of the array but it also works on proxy arrays ---@param arr any[] ---@return integer local function len(arr) local l = #arr if l == 0 then if arr[1] ~= nil then -- Exponential search to find length of proxy table local low = 1 local high = 1 local ceil = math.ceil while arr[high] ~= nil do high..." current
  • 22:5622:56, 11 October 2024 diff hist +1,967 N Module:Clean image2Created page with "-- Removes 'File:' prefix, just in case -- Replace {{!}} with | instead of preprocessing -- Turn into a nice wiki file link local p = {} local defaultMaxSize = { h = 300, w = 300 } p.main = function(frame) return p.clean(frame:getParent().args) end p.clean = function(args) local file = args.file if not file or (file and (file:lower() == 'no' or file == '')) then return nil end if not file:find('%[%[File:.-%]%]') then return nil end local fileRaw = file fil..." current
  • 22:5622:56, 11 October 2024 diff hist +24,436 N Module:DependencyListCreated page with "local p = {} local libraryUtil = require( 'libraryUtil' ) local arr = require( 'Module:Array' ) local yn = require( 'Module:Yesno' ) local param = require( 'Module:Paramtest' ) local dpl = require( 'Module:DPLlua' ) local tooltip = require( 'Module:Tooltip' ) local moduleIsUsed = false local COLLAPSE_LIST_LENGTH_THRESHOLD = 5 local MAX_DYNAMIC_REQUIRE_LIST_LENGTH = 30 local dynamicRequireListQueryCache = {} local builtins = { ["libraryUtil"] = { link = "mw:S..."
  • 22:5522:55, 11 October 2024 diff hist +107 N Module:Documentation/docCreated page with "{{External|meta|rs|rsc}} {{Documentation}} Implements Template:Documentation for templates and modules." current
  • 22:5522:55, 11 October 2024 diff hist +3,741 N Module:DocumentationCreated page with "-- <nowiki> local dependencyList = require( 'Module:DependencyList' ) local yn = require( 'Module:Yesno' ) local p = {} function p.doc( frame ) local title = mw.title.getCurrentTitle() local args = frame:getParent().args local page = args[1] or mw.ustring.gsub( title.fullText, '/doc$', '' ) local addDependencyList = yn( args.DependencyList or true ) local ret, cats, ret1, ret2, ret3 local onModule = title.namespace == 828 -- subpage head..." current
  • 22:5522:55, 11 October 2024 diff hist +1,010 N Template:Documentation/docCreated page with "{{External|meta|rs|rsc}} {{Documentation}} {{Invokes|Documentation}} <code><nowiki>{{Documentation}}</nowiki></code> is transcluded in template/module documentation pages. This template should only be used on subpages titled "doc". This is '''not''' the template of the same name from Wikipedia and it is not used in the same way. ==Usage== Place {{t|documentation}} at the top of the documentation page, then transclude <code><nowiki>{{/doc}}</nowiki></code> directly from..."
(newest | oldest) View ( | ) (20 | 50 | 100 | 250 | 500)