SHARE
TWEET

Untitled

a guest Jun 29th, 2019 59 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE MudletPackage>
  3. <MudletPackage version="1.001">
  4.     <AliasPackage>
  5.         <Alias isActive="yes" isFolder="no">
  6.             <name>download package</name>
  7.             <script>local URL = matches[2]
  8. local saveto = getMudletHomeDir()..'/'..matches[3]..'.xml'
  9.  
  10. registerAnonymousEventHandler(
  11.   "sysDownloadDone",
  12.   function(_, filename)
  13.     if filename ~= saveto then
  14.       return true -- keep the event handler since this was not our file
  15.     end
  16.         cecho('&lt;white&gt;Installing package as '..saveto..'!')
  17.     installPackage(saveto)
  18.     os.remove(b)
  19.   end,
  20.   true
  21. )
  22.  
  23. downloadFile(saveto, URL)
  24. cecho('&lt;white&gt;Downloading package as &lt;green&gt;'..matches[3]..'!')
  25. </script>
  26.             <command></command>
  27.             <packageName></packageName>
  28.             <regex>^dlp (\S+) (\S+)$</regex>
  29.         </Alias>
  30.     </AliasPackage>
  31. </MudletPackage>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top