alias rainbow {
var %a = 01 03 05 07 09 12 14
return $regsubex($1-,/([^ ])/g,$+($chr(3),$gettok(%a,$iif($calc(\\n % $numtok(%a,32)),$v1,$numtok(%a,32)),32),\\1))
}
sry for double posting but hawkee\'s comment system removes slashes, because in php \n would be a new line, but I don\'t see why he would need to remove slashes but anyways, repost \'escaping\' my slashes
// Same as what I described in the introduction to the snippet, but for the \"slower\" people, here it is all the way done.
function getStats($n) {
$d = file_get_contents(\"http://hiscore.runescape.com/lang/en/aff/runescape/hiscorepersonal.ws?user1=\".$n);
preg_match_all(\"/<td align=\\\"left\\\">(.*?)<\\/tr>/s\",$d,$m);
$u = array(\"\\n\",\"\\r\");
$g = array(\'/^\\s+/\',\'/\\s{2,}/\');
$o = array(\'\',\' \');
$s = array();
foreach ($m[1] as $v) {
$ta = explode(\" \",preg_replace($g,$o,str_replace($u,\' \',strip_tags($v))));
$line .= $ta[2];
$s[$ta[0]] = array(\'Rank\' => $ta[1],\'Level\' => $ta[2],\'Exp\' => $ta[3]);
}
return (($s[\'Overall\'][\'Level\'] == \"does\")? \"false\":$s);
}
$variable = getStats($_GET[\'rsn\']);
foreach ($variable as $skill => $v) {
$line = $skill;
foreach ($variable[$skill] as $aspect => $data) {
$line .= \" \".$aspect.\": \".$data;
}
echo $line.\"\\n\";
}
This is a php snippet, first of all. As if it\'s that hard to tell by the title, aswell as the section of this site that the snippet resides.. second of all, I explained how to view the stats, it\'s meant for expansion. Not to do everything for you, it gets the skills into a readable, workable, usable array. Meaning working with and using the function is easy and simple. Next comment by me will be an example of a stat parser using my function.
on :TEXT:!jumble :#:{
var %a = 1
while (%a < $0) {
inc %a
var %word = $($+($chr(36),%a),2), %line = %line $randomize($spaceitout(%word))
}
msg $chan %line
}
alias -l spaceitout {
var %a = 0
while (%a < $len($1)) {
inc %a
var %word = %word $mid($1,%a,1)
}
return %word
}
alias -l randomize {
var %b = 0
var %fnl = $gettok($1,1,32) $gettok($1,$numtok($1,32),32), %mid = $deltok($deltok($1,$numtok($1,32),32),1,32), %lawl = $deltok($deltok($1,$numtok($1,32),32),1,32)
while (%b < $numtok(%lawl,32)) {
inc %b
var %rand = $r(1,$numtok(%mid,32)), %tok = $gettok(%mid,%rand,32), %line = %line $+ %tok, %mid = $deltok(%mid,%rand,32)
}
return $iif($len($1) < 3,$1,$gettok(%fnl,1,32) $+ %line $+ $gettok(%fnl,2,32))
}
I actually made a market script also :) except mine works a bit differently, it sockets to my server, but I kind of sell it to people so you would have to have your own file on my server to use it, but its a rather nice script (yours also) :) saw this snippet title and i was like OH YAH! COMPETITION! really nice script (didn\'t try it but is pretty long(length doesn\'t make it better just assuming it was done right)) :) GOOD LUCK!
it doesn\'t scramble 2 and 3 letter words, because the concept of this script is to only scramble letters inside the first and last letter for example: omfg it will \'attempt\' to scramble up \"mf\" however, \"mf\" doesn\'t have very many different combinations so sometimes the 4 letter word stays the same, however \"street\" it will attempt to scramble \"tree\" and there is 4 letters there so there \'should\' be 16 combinations so its less likely to still be \"street\" after the script scrambles the word. for example: \"street\" would/might return \"sretee\" because the first letter: s and the last letter: e remain first and last letters, so a 3 letter word will not change because say \"one\" the \"n\" is the only letter inside the word so it doesn\'t attempt to scramble this word because even if it did it wouldn\'t change, and \"it\" is ONLY the first and last letters there arn\'t any in between so it skips 2 letter words also, it works the way it was intended to work, but thanks for the comments and the scores guys appreciate it :)
\"elseif $1 == !del:{\" suspicious :o and more on that note pretty sure won\'t trigger, I know if statements trigger without () but process faster with them so there is less prediction needed for the client to process, and I would have to press the fact that, hash shouldn\'t be used really for long term storing of data, it could, butt it shouldn\'t because it uses RAM which you prolly have alot of but some people JUST BARELY have enough RAM to keep their operating system good, and Therefore I use them only for sockets and such where its opened and closed within seconds, and, as a alternative to hash tables, I really like ini, and I kinda find them to work better, and they are way more organised, I say that because hash never stays in order, the item name may stay the same but when you loop through a table it will NEVER stay the same order UNLESS its a smaller scale table, and even still you can\'t be too certain, but ini is better in that department. $ini == $readini\'s lil counterpart and together you can incorperate awesome amounts of data into scripts which might require that much. hope Any of my advice helps :s
heh, I\'d say thats rediculous, because now the pattern is pretty much known,
$regex(%pass,/[a-z]\d.+\d\D.+\d[g-z].+\d[a-g]\d.+/Si) :x
But other then the never changing pattern dats a cool script :D
You could actually pass through a random number a random amount of times the amount of times would be the length of the outcome string, while each random number will represent either numeric or alphabetic, which would ouput a COMPLETELY random password thus being much more hard to steal
menu channel,nicklist {
get da masks:getemya $network $active
}
alias getemya {
if (!$window(@addresses)) window -a @addresses
else clear @addresses
var %a = 0
while (%a < $nick($2,0)) {
inc %a
var %c = 0
while (%c <= 9) {
aline @addresses $+($nick($2,%a),:) addressType: %c Address: $address($nick($2,%a),%c)
inc %c
}
}
}
Sorry bout the double post ^^ Thats the right one, :x
hey umm, sorry but the script is pretty redundant, this script could be at MOST like 30 lines, as a matter of fact here I just made one:
menu channel,nicklist {
get da masks:getemya $network $active
}
alias getemya {
if (!$window(@assresses)) window -a @addresses
else clear @addresses
var %a = 0
while (%a < $nick($2,0)) {
inc %a
var %c = 0
while (%c <= 9) {
aline @addresses $+($nick($2,%a),:) addressType: %c Address: $address($nick($2,%a),%c)
inc %c
}
}
}