It's great to have this online, however Wiz made this years ago (except the removing of html , which has been around as $nohtml for a long time) : https://github.com/ds--/CodeArchive/blob/22708365d4c6a6d58b8d2188f22b23c5c0461c60/mSL/net/html2unicode.mrc
Besides, using goto and pipe '|' isn't a good idea (also better to use iswm rather than isin but that's minor), it could make the code significantly slower if used a lot consecutively.
I rewrote wiz's alias to be compatible with mIRC 6.x and to handle unicode in a seperate way : https://dl.dropboxusercontent.com/u/4249275/html2unicode.mrc
It uses an hash table to handle the associated characters to speed up further lookup, use $html2ascii().unicode to enable the unicode support, or just $html2ascii().
It could be a good idea to rewrite it as two version, one for mIRC 7.x and one for mIRC 6.x to speed up the processing even more
So i played with Glowball, noticed some things:
-We have no idea of the rules being applied to the player, we just see the pawns moving on the board, you should perhaps adds some messages to what is happening cause right now it's really just a click game :p
-At the end, Glowball needed a 5 to win, he got a 1 and won anyway,
Awesome Syko! I'd love to try it with you, you should finish it :)
@Hawkee Adding a comment (starting a thread) from my phone didn't work and the UI is very not responsive
Hello there!!
I have been working on this game a lot since i released it, everything has been made better, from the dialog to the game itself.
Here are some new videos showing the game being played with 5-6 players:
http://www.zone-script.net/pacman/pac5.wmv (replace 5 with 1, 2, 3, or 4 for more videos)
If you enjoy the videos, join and try it for yourself,
Here is a complete changelog since the last version:
Panel:
-Complete rewrite, now dispaying pacman on the left and ghosts on the right
-Pacmans now have a color assigned to them, just like ghosts (same colors)
-The number of pellet eaten per pacman, and a score per pacman (# of pellet eaten and the total score) is also displayed.
-Added a little dot on each pacman (of their color) to indicate which nickname is which pacman.
-Added a stopwatch
Game:
-Can now play with 6 pacmans and 6 ghosts at the same time
-Added some fruits, giving you points
-Added internal teleporter, for pacmans only
-Added bonuses for pacmans: one more live, and an hyper speed.
-Ghosts now go back home (spawning area) following a path when eaten by pacmans, added a sprite for this, some little eyes
-Added cpus, I worked a lot on this, it now works very well, but the A* algorithm is still very slow on mIRC, causing freeze for long paths while playing.
-Added a sprite 'game aborted', now handling situations where the game should be aborted
-Can now pause the game (only the owner of the server, use shift f5)
Others:
-Fixed various bugs
-Removed some tabs and moved things into a 'settings' tab
-Improved the editboxes
-Improved the code in general, much faster than before.
-Improved input, the client now remember which key you are holding while playing, if you hold the right key and then the left key, releasing the left key will make you go on the right again, this helps a lot fighting the lag.
-Can now select the keyboard keys used to play.
-Nicknames are now remembered.
-Can now select the duration of a power-pellet in the editor.
@Hawkee So, I sent you a message the 20 Oct 2011 08:14 am, reporting a problem, you didn't bother answering nor anything has been fixed, I figured posting here would help.
And I quote:
"Hello, I recently posted my pacman game here, but the website seems to be broken, [...] http://www.hawkee.com/mirc/scripts/ list my game (or http://www.hawkee.com/scripts/user/66287/ ) and allow (download button) people to download the zip for the v3, which is outdated. I can't remove that; however the 'visit website' button correctly redirect you to my website to a .mrc file, an installer."
Could you please remove any zip file for that game?
Also, I'm unable to delete comments.
I was playing that game too on a calculator, but there were no powerup!
What do you mean "provide RAM" for the game?
At one point, it lagged. It did not continue scrolling, I just sat there rolling around on the bottom of the screen for a momentIt's not a bug, it's a feature, look at the description of the game :)
Any idea for a new powerup?
Thanks for the comments everyone
In this game, you are the red dot and you need be fast to fall as low as possible. Some kind of powerups are there to help you: 3 purple = 2 holes per line for 6 seconds 3 blue = a pause of 5 seconds 2 green = faster for 5 seconds 2 orange = no floor for 8 seconds 1 grey = smaller hole for 6 seconds
he already did (although '\v' shouldn't be included there)Indeed! I quickly pasted something from wikipedia, but it was about POSIX character class, my bad, here is a quote from pcre.txt:
For compatibility with Perl, \s does not match the VT character (code
11). This makes it different from the the POSIX "space" class. The \s
characters are HT (9), LF (10), FF (12), CR (13), and space (32). If
"use locale;" is included in a Perl script, \s may match the VT charac-
ter. In PCRE, it never does.
Sure, but the question wasn't specific to that regex Dean.
Jethro: it was sarcastic, and the truth, i've read enough posts to know that
Note that you answered my post by saying the same mistake again "use \s to indicate a space", again if people want a space, they should use a space, there's no "I like to", everyone likes to use the proper code they need lol
??
I don't feel uncomfortable with anything here and i use a space to indicate a space, \s isn't a space.
Someone asked what was \s in regex, someone else said it was the space character, this is simply not true and i'm correcting what the person said before anyone start believing it, you know, you guys are too busy to show to hawkee's users who knows more than the other :)
this is because mirc is now (since 7.x) an unicode application, internally, $chr(130) get translated to utf8 (the way mirc is representing unicode internally) and as you can guess, in utf8, $chr(130) is represented by two bytes whose value are 194 and 130, regex are handled with a library which work, by default, 'per character':
$regex($chr(130),/./g) is 2 because mirc pass the internal (utf8) value of the character which is in fact two bytes.
To solve the problem, you can tell the regex engine to interpret the input string as utf8 before matching by adding (UTF8) as the first thing to match in the pattern:
$regex($chr(130),/(UTF8)./g) is 1
alias get_chars return $regsubex($1-,/(*UTF8)(.)/g,$!chr( $+ $asc(\t) $+ ) $!+ $+ $chr(32)) :)
Some way to improve this:
-you should use $wildsite inside events instead of $address($nick,2)
-you shouldn't halt the raws everytime, i don't want your script to disable any message.
-$hfind is slow, here $hfind(pnick,$+(!@,$4),1,n) is simply $hget(pnick,$+(!@,$4)) but i would remove that condition and add to the table every information from the /who, because actually it's not really storing every possible information (you are not using on text either to store information about the nick talking), i think you should
-the on start event has a problem, it /hload everytime, whatever if the table exists and whatever if the file exists
-you don't need to halt in the previous alias, why are you halting there?
-on *:join:#: who # < if a netsplit occurs, everyone using your code will be disconnected if used on some big channels, you should /who when $nick == $me only, and otherwise store the information
Not at all lol, re read the code you posted, it doesn't make sense to whois $2 if $2 doesn't 'exist'.
As to your original question, yes! Checking if the parameter is a channel doesn't make sense because indeed you cannot whois a channel, however, making a condition to finally doing the same thing is useless and that's a different thing, WorldDMT was pointing out that the same thing is done whatever the condition, he wasn't saying it doesn't make sense to whois a channel :p
ans what if $1- contain a '^' :) ? The same problem exist with his $chr(96) anyway but this already has been said.
What hasn't:
-you are using sockwrite -n even when -n isn't necessary with this super-useless tokenize command.
-there's no point in making (trying to make actually) everything possible not to get the same socket name if at the end, if the same socket name is used (it's possible), you'll close the socket, why not just var %b = $sock(bw,0) + 1,%name = bw $+ %b | sockopen %name for example?
-checking if the socket is opened before closing it because you're going to open isn't necessary, just close it, mirc handle the fact that is doesn't exist for you
-you should have one connection and keep it alive, then use it for each new request, that would avoid the opening of the connection (= much faster)
-Using unset %1 is not really a safe thing to do.
That script is unusable as it is anyway, it would freeze mirc depending on the size of the text file and the activity of the channel..
your logic doesn't make sense, if you didn't want 'hello' to be seen as 'hell' you would have used ( |$) the same way you used (^| ), \b is still better to use here to match words boundaries, but use it on both side, that's what jaytea meant.
However, about the list including wildcards, \Q\E handles them.
err ? the broswer has nothing to do with the problem, a socket is a socket and you are responsible for what you read and what you write to it: what you get from the socket is the same as what the browser get and what OP's script get, he was using $nohtml for a reason :p.
I also think that rewritting every code that are posted on this website is not necessary, giving advice is better than giving a whole new code and saying "use it", users can't learn that way. You also cannot do that on large script, which is why giving advice on the methods used (sockmark for example) is preferable imo :)