SCDudeDark

SCDudeDark

Joined
Mar 22, 2015

Activity Stream

SCDudeDark   -  Apr 09, 2015

So I have a personal bot for my Twitch channel and I wanted to add a kind of coliseum minigame to the channel that you enter using earned points a set entry fee basically So I have edited a raffle script and I think that my Idea is sound but it definitely doesnt work and I have no Idea how to keep track of the pot and how to award it afterwords still kinda new to scripting so any advice or help would be appreciated (work in progress have to head to bed for work so I will be changing it a bit more myself as well)
on :TEXT:!Battle &:#:{
if (%open == 1) {
if ($2 < 11) {
var %i = 0
var %count = $2
var %topic = $+(#,.,$nick)
var %user = $readini(Points.ini,%topic,Points)
var %final = 50
%count
var %remove = %user - %final
if (%remove > 0) {
writeini -n Points.ini %topic Points %remove
while (%i < %count) {
write arena.txt $nick
%i = %i + 1
}
msg $chan $nick $+ , has entered the ThunderDome spending %final Scars! Wish them luck!
}
if (%remove < 0) {
msg $chan Sorry $nick but you don't have enough Scars to Enter!
}
}
}
}
on :TEXT::#:{
if ($nick isop #) {
if ($1 == !Arena) {
if ($2 == open) {
msg $chan The gates to the ThunderDome have opened Lets get ready to ROCK!! Type !Battle to enter. Remember only one man leaves
set %open 1
write -c arena.txt
echo -a arena Started
}
if ($2 == close) {
msg $chan The Gates have closed!
set %open 0
write -c arena.txt
echo -a arena Closed
}
}
if ($1 == !Fight) {
if (%open == 1) {
var %user = $read(arena.txt,n)
write -c arena.txt
set %open 0
msg $chan %user $+ Has mutilated the opposition!!
echo -a arena Closed
}
}
}
if ($1 == !) {Thunderdome
if (%open == 1) {
msg $chan There are currently $lines(arena.txt) Contenders!
}
}
}

 Respond  
SCDudeDark   -  Mar 22, 2015

Ok, so I'm new here and new to coding stuff. But based off of many things I have read I have started to make my own chat bot I currently have a points system working and working well but I've been trying raffle systems currently this is the most common one I have found but for some reason my bot won't even respond after I put in the commands any Ideas?

on TEXT:!Skulls $:#:{
if (%raffle = 1) {
if ($2 > 10) {
msg $chan Sorry $nick but you can only get up to 10 skulls!
}
if ($2 < 11) {
var %i = 0
var %ticket = $2
var %topic = $+(#,.,$nick)
var %user = $readini (Points.ini,%topic,Points)
var %end = 10
%ticket
var %delete = %user - %end
if (%delete > 0) {
writeini -n Points.ini %topic Points %delete
while (%i < %ticket) {
write Raffle.txt $nick
%i = %i + 1
}
msg $chan $nick you have bought %ticket skulls with %end Scars.
}
}
}
if (%raffle == 0) {
msg $chan No skulls for sale at this time!
}
}
on :TEXT:!openbag:#:{
if ($nick isop #) {
if (%raffle == 0) {
msg $chan Buy some !skulls and throw them in my bag Ill pick one and its owner will win!!!
set %raffle 1
write -c Raffle.txt
}
}
}
on
:TEXT:!closebag:#:{
if ($nick isop #) {
if ($raffle == 1) {
msg $chan The Bag has been closed!!
set %raffle 0
write -c Raffle.txt
}
}
}
on *:TEXT:!pick:#:{
if ($nick isop #) {
if (%raffle == 1) {
var %user = $read(Raffle.txt, n)
msg $chan /me Reaches into bag digs around
.timerOne 1 1 msg $chan /me 5!
.timerTwo 1 2 msg $chan /me 4!
.timerThree 1 3 msg $chan /me 3!
.timerFour 1 4 msg $chan /me 2!
.timerFive 1 5 msg $chan /me 1!
.timerSix 1 6 msg $chan AND THE WINNER IS:
.timerSeven 1 7 msg $chan %user
set %raffle 0
write -c Raffle.txt
}
}
}

Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.