Heyas and good eve
totally new to this coding scene have had some small experience in ruby and php but c++ seems a task id like to try
at the moment i am reshaping or trying to, an irc game bot to run solely under c++, as we all know irc (mirc) is pretty much well... yer
would like to ask a huge question if this could be done and if so would someone be able to push me in a direction of some kind
below is an mirc script snippet .. it reads from a txt file and sets the read
line (random i may add) as a variable
then does a calculation to create an odds result from those values.
below that is completed line displayed in mirc.
# mirc remote snippet #
alias greyracing {
# set variable to turn race on/off
%thegreyraces = off
# sets variable and reads txt file randomly and chooses box number
%boxthatwon = * $+ $read(dogbox.txt) $+ *
# sets variable to display winning box number
%boxthatwins = $remove(%boxthatwon,*,Box)
# reads from txt file name of greyhound to race
%greyhound = $read(%greyhnames)
# makes random odd result
%oddspaid = $rand(2,5) $+ . $+ $rand(0,9)
# messages channel with result of race details
msg #channelname Greyhound Race %greyhoundracenumber result from %trackraced $+ ! %greyhound wins from Box %boxthatwins Paying $ $+ %oddspaid $+ . .... Winning Margin was $read(%winningdist)
}
# Output display from mirc #
<RacingGreyhound> Race 17 result from Broadmeadows! Kilty Lad wins from Box 1 Paying $3.1. Winning Margin was 6 Lengths.
so my question being can this be rewritten in c++ somehow to work more efficient?
or am i struggling with an outcome i wont be able to achieve
thanking for any replies in advance