Not sure on the bug, but check line 72. Everywhere else the dialog is referenced using "mp3player," but in this one line you have just "mp3."
Also, I see under the alias randomsong you're setting global variables when you could get by using the temporary /var function. %mp3.num and %mp3.ran2 can be set with a var instead, since they aren't ever used outside the alias and only set up data for the next script line.
I would find this more interesting to use in your example for a game or something if it wasn't forcing the $ on the beginning. Maybe have some variable to set what character(s) you want pre- or suffixed to the number? Like you could have the $12,345 by default, or you could make it use the Euro symbol, or say 12,345GP for those good ol' medieval style games.
It would also be interesting to be able to make this output WITHOUT commas. Let's say someone uses a command called !givegold Ted, which gives user Ted some amount of their gold in a game script. This snippet would allow the someone to go !givegold Ted 2k, and have it automatically give 2000 gold to Ted, instead of having to type it out.
Just some thoughts.
Yeah, I noticed the diagonal movement. Seems like bullets travel a little faster in those directions, too. I'll just have to do something to compensate and even it all out.
I did the herding, also, running an octagon-like pattern around the edge then pulling off to one corner of the map and firing like mad.
Think about it though, it's kinda like having a square and running a diagonal line through the square. The square is 3 inches on all side. When you travel in a cardinal direction, you're traveling 3 inches to the next point. But when you travel the diagonal, you're actually traveling about 4.24 inches from one point to the next. Ah, back to basic geometry, but this is the same principle showing up in the game.
Update coming soon.
Things completed in the update:
Invincibility Pickup (not only gives you invincibility for a short time, but zombie attacks HEAL you while invincible. Rare pickup.)
Pickups now flash when they are about to disappear.
Slight modification to the rarity of a machinegun pickup. When I played my full round, after building up over 2500 bullets for the machinegun and not being able to get rid of them faster than I could find them, I figured I should balance this out. I may also implement a maximum ammo capacity.
Working on:
Hit "zones." Instead of checking every bullet against every zombie to see if there's a hit, the bullet will now only check zombies within the "zone" it is in. I'm working out the bugs on zombies standing on a borderline between two zones, where a hit doesn't register, and the lag induced by having many zombies onscreen with this setup. However, bullet updates don't seem to affect performance so much now :D
@Kiddo96: After making my previous comment here, I decided to have a play.
I playtested this quite a bit, but I used a lot of hash table manipulation and whatnot to shortcut myself to possible scenarios, and otherwise just played through maybe 250 zombies in a semi-legitimate game. I had never, EVER sat down for a serious session, where I just started it, left the script and hashtable alone, and just tried to honestly see how far I could SERIOUSLY go, rather than just testing for a while and giving up.
Results:
Got a bit bored after a while because I have other things on my mind, and stopped picking up health. Otherwise, who knows how far I would have gone :P
Eye-candy suggestion: For the mode where it just shows hours and minutes, have the colon separating them alternate between lit and unlit states, like a watch does.
As for one-upping with the scrollbars, I just did that because I figured it would be a bit easier for the average user to pick up and use. Slide it, and see the result immediately, rather than having to type numbers in to fine-tweak lol. Good knowledge on the did -c :D +1 for that.
Very nicely done. Doing the numbers in-script rather than having to grab more files makes this much more user-friendly, very grab-n-go.
As for the colors, here's my take. It's nowhere near perfect, I'm still tinkering with it. Also I can figure out how to give a scrollbar a value when initializing a dialog... so it's bugged in a way. But works? I dunno.
alias clock {
if (%clock.colors == $null) set %clock.colors 0 255 0
set %startclock clock $1
if (!$toolbar(clocksep)) toolbar -is clocksep
if (!$window(@clock)) window -nBj2kpw0 +f @clock 0 0 117 23
if (!$toolbar(clock)) toolbar -aux clock "" @clock 0 0 $iif($1 == 12,111,82) 17
clear @clock
set -l %time $asctime($iif($1 == 12,hhcnncsstt,HHcnncss))
set -l %num 1
while ($mid(%time,%num,1) != $null) {
if ($mid(%time,1,1) != 0) || (%num != 1) || ($1 != 12) numbers $mid(%time,%num,1) $gettok(0 12 24 29 41 53 58 70 $iif($1 == 12,87 99),%num,32)
inc %num
}
toolbar -pu clock @clock 0 0 $iif($1 == 12,111,82) 17
toolbar -l clock "/clockchange"
.timerclock -m 0 1000 clock $iif($1 == 12,$v1)
}
alias clockchange { clock $iif($timer(clock).com == clock 12,,12) }
alias clockoff {
unset %startclock
.timerclock off
toolbar -d clocksep
toolbar -d clock
window -c @clock
}
on *:start: if (%startclock) { .timerclock 1 1 %startclock | unset %startclock }
alias numbers {
var %a = $1, %b = $2
tokenize 32 %clock.colors
if (%i == c) {
drawline -r @clock 1264139 1 $calc(%b + 1) 3 $calc(%b + 4) 3
drawline -r @clock 1264139 1 $calc(%b + 1) 5 $calc(%b + 4) 5
drawline -r @clock 1264139 1 $calc(%b + 1) 11 $calc(%b + 4) 11
drawline -r @clock 1264139 1 $calc(%b + 1) 13 $calc(%b + 4) 13
drawline -r @clock $rgb($1,$2,$3) 3 $calc(%b + 2) 4 $calc(%b + 2) 4
drawline -r @clock $rgb($1,$2,$3) 3 $calc(%b + 2) 12 $calc(%b + 2) 12
return
}
drawline -r @clock $iif(%a isin ap02356789,$rgb($1,$2,$3),1264139) 1 $calc(%b + 2) 1 $calc(%b + 10) 1
drawline -r @clock $iif(%a isin ap02356789,$rgb($1,$2,$3),1264139) 1 $calc(%b + 3) 2 $calc(%b + 9) 2
drawline -r @clock $iif(%a isin apm045689,$rgb($1,$2,$3),1264139) 1 $calc(%b + 1) 2 $calc(%b + 1) 7
drawline -r @clock $iif(%a isin apm045689,$rgb($1,$2,$3),1264139) 1 $calc(%b + 2) 3 $calc(%b + 2) 8
drawline -r @clock $iif(%a isin apm0268,$rgb($1,$2,$3),1264139) 1 $calc(%b + 1) 10 $calc(%b + 1) 15
drawline -r @clock $iif(%a isin apm0268,$rgb($1,$2,$3),1264139) 1 $calc(%b + 2) 9 $calc(%b + 2) 14
drawline -r @clock $iif(%a isin 023568,$rgb($1,$2,$3),1264139) 1 $calc(%b + 2) 15 $calc(%b + 10) 15
drawline -r @clock $iif(%a isin 023568,$rgb($1,$2,$3),1264139) 1 $calc(%b + 3) 14 $calc(%b + 9) 14
drawline -r @clock $iif(%a isin apm01234789,$rgb($1,$2,$3),1264139) 1 $calc(%b + 10) 2 $calc(%b + 10) 7
drawline -r @clock $iif(%a isin apm01234789,$rgb($1,$2,$3),1264139) 1 $calc(%b + 9) 3 $calc(%b + 9) 8
drawline -r @clock $iif(%a isin am013456789,$rgb($1,$2,$3),1264139) 1 $calc(%b + 10) 10 $calc(%b + 10) 15
drawline -r @clock $iif(%a isin am013456789,$rgb($1,$2,$3),1264139) 1 $calc(%b + 9) 9 $calc(%b + 9) 14
drawline -r @clock $iif(%a isin ap2345689,$rgb($1,$2,$3),1264139) 3 $calc(%b + 4) 8 $calc(%b + 7) 8
if (%a == m) {
tokenize 32 %clock.colors
drawline -r @clock $rgb($1,$2,$3) 1 $calc(%b + 2) 1 $calc(%b + 4) 1
drawline -r @clock $rgb($1,$2,$3) 1 $calc(%b + 3) 2 $calc(%b + 5) 2
drawline -r @clock $rgb($1,$2,$3) 1 $calc(%b + 4) 3 $calc(%b + 8) 3
drawline -r @clock $rgb($1,$2,$3) 1 $calc(%b + 5) 4 $calc(%b + 7) 4
drawline -r @clock $rgb($1,$2,$3) 1 $calc(%b + 7) 2 $calc(%b + 9) 2
drawline -r @clock $rgb($1,$2,$3) 1 $calc(%b + 8) 1 $calc(%b + 10) 1
}
}
alias clockcolor { dialog -m clock_colors clock_colors }
dialog clock_colors {
title "Clock Colors"
size -1 -1 96 41
option dbu
scroll "", 1, 2 4 92 8, range 1 32 horizontal bottom
scroll "", 2, 2 17 92 8, range 1 32 horizontal bottom
scroll "", 3, 2 30 92 8, range 1 32 horizontal bottom
}
on *:dialog:clock_colors:*:*: {
if ($devent == scroll) set %clock.colors $calc(($did($dname,1).sel * 8) - 1) $calc(($did($dname,2).sel * 8) - 1) $calc(($did($dname,3).sel * 8) - 1)
}
Use /clockcolors to open the color selection script. The three bars adjust the RGB values of the lit "LEDs," as you move them. There are 32 intensities for each colours channel.
Like I said, my work on custom colors needs (quite a bit) of work. You can either stem off of what I have so far here, or well use your imagination! Having customization is a love of mine, and I would like to see this script have more options in the future. ^_^