Log in

View Full Version : Need Help Finishing mIRC Dice Bot Please



E9S
07-18-2012, 06:55 AM
So what you see below is what we have done so far. It all works fine and it rolls for a 2 6-sided dice. The only problem we have is that it cannot run more than 1 dice duel at a time. I am willing to do ANYTHING for someone to help me fix this. It would mean the world to me. Thanks for checking it out guys. FYI, I am willing to pay you



on *:text:!dd *:#GeGamblerz: {
if ($nick isvoice #GeGamblerz || $nick isreg #GeGamblerz) { msg $nick 0,1 Sorry, you don't have permission for that. | return }
if ($2 !ison $chan) { msg 0,1 $nick $2 is not a valid nick. | halt }
if ($3 !ison $chan) { msg 0,1 $nick $3 is not a valid nick. | halt }
if (!$4) { msg $nick 0,1 Invalid format. Use: !dd nick1 nick2 reward | halt }
set %dd $2 $3 $4
msg $chan 0,1 Dice duel between $2 and $3 ; Type !roll.
.timerDD 1 300 EndDD
}
on *:text:!roll:#GeGamblerz: {
if (!%dd) { msg $chan No duel in progress. | halt }
if (!$istok(%dd,$nick,32)) { msg $chan 0,1 You are not one of the duelists. | halt }
if ($($+(%,ddr.,$nick),2)) { msg $chan 0,1 You have already rolled. | halt }
var %r = $rand(2,12), %d1 = $gettok(%dd,1,32), %d2 = $gettok(%dd,2,32), %p = $gettok(%dd,3,32)
set %ddr. $+ $nick %r
msg $chan 0,1 $nick rolled a %r $+ .
var %r1 = $($+(%,ddr.,$gettok(%dd,1,32)),2), %r2 = $($+(%,ddr.,$gettok(%dd,2,32)),2)
if (%r1 && %r2) {
if (%r1 > %r2) { msg $chan 0,1 %d1 won the %p pot with a %r1 $+ -vs- $+ %r2 $+ . }
elseif (%r2 > %r1) { msg $chan 0,1 %d2 won the %p pot with a %r2 $+ -vs- $+ %r1 $+ . }
else { msg $chan 0,1 %d1 and %d2 tied with a %r1 $+ -vs- $+ %r2 $+ . }
unset %dd
unset %ddr.*
.timerDD off
}
}
on *:text:!end *:#GeGamblerz: {
if ($nick isvoice #GeGamblerz || $nick isreg #GeGamblerz) { msg $nick 0,1 Sorry, you don't have permission for that. | return }
if ($2 !ison $chan) { msg 0,1 $nick $2 is not a valid nick. | halt }
if ($3 !ison $chan) { msg 0,1 $nick $3 is not a valid nick. | halt }
if (!$4) { msg $nick 0,1 Invalid format. Use: !end nick1 nick2 reward | halt }
unset %dd $2 $3 $4
unset %ddr.*
msg $chan 0,1 The dice duel between $2 and $3 has been ended by an admin;
}
alias EndDD {
msg $chan 0,1 The duel ran out of time and has been ended.
unset %dd
unset %ddr.*
}

E9S
07-18-2012, 10:13 AM
Can anyone help me please...

djr33
07-19-2012, 02:01 AM
Some advice about getting replies:
1. Be patient. Bumping your thread after 4 hours (which happens to be during the middle of the night for many users here) is a good way to be ignored because that's rude.
2. What language is this? Is the language actually 'mIRC'? I'm not familiar with that (although I know what IRC is). If this isn't a language that is used frequently here (basically HTML, CSS, JS, PHP, maybe ASP, maybe Java, maybe C++) you probably won't get a reply because no one here knows the answer. It's worth finding a forum that specializes in the language(s) you're working with.
3. If you want paid help, you should post in the paid work requests section. You're welcome to wait to see if someone wants to do it for free, but you're also welcome to post in that area whenever you'd like if you think that's worth it for your project.
4. Your code is messy and hard to read. I realize that's because there's a lot of math involved, but making your code nice and easy to read would be helpful and encouraging (help others help you!). For the moment, I will put it in [code] tags so it's a little easier to read.
5. Note that the 'views' for a thread can be very misleading-- the majority of these are always bots (like search engine spiders), and many others may be members looking to see if they can answer your post who realize they cannot, or moderators who want to check the content to be sure there isn't spam or anything like that.

bernie1227
07-19-2012, 07:33 AM
Sorry buddy, but as Daniel said, you won't be able to get much help here, as the forum is mainly based on web based languages, and very few of our members are able to understand IRC software. You may have more luck with your request at this (http://forums.mirc.com/ubbthreads.php)mIRC forum.