mIRC Home    About    Download    Register    News    Help

Print Thread
Command #195061 16/02/08 06:09 PM
Joined: Jan 2008
Posts: 44
J
jakerandall Offline OP
Ameglian cow
OP Offline
Ameglian cow
J
Joined: Jan 2008
Posts: 44
Right, i am looking for the correct command to actually stop the script to make it so it wasnt even there.


Code:
on *:TEXT:!Stop:#channel:{
topic $chan  15,1[14± 0Welcome To #Sharrock, Currently  Running 5on5 IRC Cups, Please Idle And Support #Sharrock  14±15]
(command to stop script)
msg $chan 15,1[14± 0The Bot Has Now Been Stopped, All Cups Are Terminated. Please Continue To Idle #sharrock For Further Cups 14±15]


Also When the script is stoped, you havew to load it; again just need the command to load it.

Code:
on *:TEXT:!Start:#Channel:{
(command To Load Script)
msg $chan 15,1[14± 0The Cup Bot Has Now Started, Please Type !Commands For A List Of Commands 14±15]


Its for a irc gaming bot.

Thankyou guys


#Plesh on QuaKenet
Jake Randall
Need help?
#Plesh - QuakeNet
Private Message Me Here!
Re: Command [Re: jakerandall] #195062 16/02/08 06:13 PM
Joined: Jun 2007
Posts: 933
5
5618 Offline
Hoopy frood
Offline
Hoopy frood
5
Joined: Jun 2007
Posts: 933
I'm not 100% sure what you mean, but you can probably use the "load -rs C:\...\script.mrc" and "unload -rs C:\..." command. See /help /load.
But what's maybe easier is just setting a variable to "on" or "off" depending on !start or !stop. Then you can just make the game script check to what value the variable is set. But both work.

Re: Command [Re: jakerandall] #195065 16/02/08 06:18 PM
Joined: Apr 2006
Posts: 464
O
OrionsBelt Offline
Fjord artisan
Offline
Fjord artisan
O
Joined: Apr 2006
Posts: 464
Yeah a variable should be easier I think...

Code:
on *:TEXT:!Stop:#channel:{
  if (%bot.status == off) { msg $chan Bot is already stopped. }
  else {
    topic $chan  15,1[14± 0Welcome To #Sharrock, Currently  Running 5on5 IRC Cups, Please Idle And Support #Sharrock  14±15]
    set %bot.status off
    msg $chan 15,1[14± 0The Bot Has Now Been Stopped, All Cups Are Terminated. Please Continue To Idle #sharrock For Further Cups 14±15]
  }
}


on *:TEXT:!Start:#Channel:{
  if (%bot.status == on) { msg $chan Bot has already started. }
  else {
    set %bot.status on
    msg $chan 15,1[14± 0The Cup Bot Has Now Started, Please Type !Commands For A List Of Commands 14±15]
  }
}

Re: Command [Re: OrionsBelt] #195070 16/02/08 07:56 PM
Joined: Aug 2003
Posts: 144
M
Miguel_A Offline
Vogon poet
Offline
Vogon poet
M
Joined: Aug 2003
Posts: 144
Hi

But don´t forget that you need to put thoses cods lines in other file... Not in th file that you will unload/load.

Re: Command [Re: Miguel_A] #195077 17/02/08 02:13 AM
Joined: Jan 2008
Posts: 44
J
jakerandall Offline OP
Ameglian cow
OP Offline
Ameglian cow
J
Joined: Jan 2008
Posts: 44
Code:
on *:join:#plesh2: { 
  .notice $nick 15,1[14± 0Welcome $nick To #sharrock, Please Type !Commands for a list of all my commands 14±15]
}
on *:text:!Commands:#plesh2: {
  if (%bot.status == on)
  .notice $nick 15,1[14± 0My Current Commands Are As Follows: !Admin - !Time - !ADD (Team name) ServerON/Off - !Prize - !Map - !Teams - !Status. ( !Help2 For A List Of Admin Commands) 14±15]

}  
on *:TEXT:!setadmin &:#:{
  if (%bot.status == on)
  if ($nick isop $chan) {
    mode $chan -o %admin
    set %admin $2
    mode $chan +o %admin
    msg $chan 15,1[14±0 The Admin Is now %admin 14±15]
  }
}
on *:TEXT:!setprize *:#:{
  if (%bot.status == on)
  if ($nick == %admin) {
    set %prize $2-
    msg $chan 15,1[14±0 The Prize Is now %prize 14±15]
  }
}
on *:TEXT:!setmap *:#:{
  if (%bot.status == on)
  if ($nick == %admin) {
    set %map $2-
    msg $chan 15,1[14±0 The map Is now %Map 14±15]
  }
}
on *:text:!admin:#plesh2: { if (%bot.status == on) msg $chan 15,1[14± 0The Admin Is %Admin 14±15] }
on *:text:!prize:#plesh2: if (%bot.status == on) { msg $chan 15,1[14± 0The Prize Is %Prize 14±15] }
on *:text:!time:#plesh2 { if (%bot.status == on) msg $chan 15,1[14± 0Time: $time(hh:nn:sstt) 14±15] }
on *:text:!map:#plesh2: if (%bot.status == on) { msg $chan 15,1[14± 0The Map Is %Map 14±15] }
on *:TEXT:!startcup:#plesh2:{
  if (%bot.status == on)
  msg $chan 15,1[14± 0A 5on5 Cup has Been Started Please Type !Add / Teamname / Server On/Off To sign up 14±15]
  if ($nick isop $chan) {
    set %admin $nick
    topic $chan 15,1[14± 0A 5on5 Cup has Been Started Please Type !Add / Teamname / Server On/Off To sign up 14±15]
  } 
}
on *:TEXT:!Start:#Plesh2:{
  if ($nick isop $chan) {
    if (%bot.status == on) { notice $nick Bot has already started. }
    else {
      set %bot.status on
      msg $chan 15,1[14± 0The Cup Bot Has Now Started, Please Type !Commands For A List Of Commands 14±15]
    }
  }
}
on *:TEXT:!Stop:#Plesh2:{
  if ($nick isop $chan) {
    if (%bot.status == off) { notice $nick Bot is already stopped. }
    else {
      topic $chan  15,1[14± 0Welcome To #Sharrock, Currently  Running 5on5 IRC Cups, Please Idle And Support #Sharrock  14±15]
      set %bot.status off
      msg $chan 15,1[14± 0The Bot Has Now Been Stopped, All Cups Are Terminated. Please Continue To Idle #sharrock For Further Cups 14±15]
    }
  }
}

on *:TEXT:!help2:#plesh2:{
  if (%bot.status == on)
  if ($nick == %admin) {
    notice %admin The Current Admin Commands Are !Setadmin <nick> , !Setmap <mapname>, !Setprize <prize name>, !Start (Starts The Script) and !Stop (Stops The Script)
  }
}

Thats all of the script, but the thing is, when the bot is !start meaning On, it still wont show the commands.


#Plesh on QuaKenet
Jake Randall
Need help?
#Plesh - QuakeNet
Private Message Me Here!
Re: Command [Re: jakerandall] #195078 17/02/08 03:31 AM
Joined: Oct 2005
Posts: 1,741
G
genius_at_work Offline
Hoopy frood
Offline
Hoopy frood
G
Joined: Oct 2005
Posts: 1,741
Change the

if (%bot.status == on)

to

if (%bot.status != on) return


EXCEPT in the !start and !stop commands.

-genius_at_work

Re: Command [Re: genius_at_work] #195140 18/02/08 01:22 PM
Joined: Jan 2008
Posts: 44
J
jakerandall Offline OP
Ameglian cow
OP Offline
Ameglian cow
J
Joined: Jan 2008
Posts: 44
Thankyou alot it works fine now,
Really thats only half of the script

The real part is the add team bit, im a little confused on where to start, bascially

- To add you need to type !Add Teamname / Server On or Off / Submitted By Person Who Adds It. e.g. !Add siber / Server On / Jake
Then onfore it says; Team Siber Has Been added 1/8 Spots Remaining Type !Add Teamname / Server On or Off / To Add Your Team. Then so on and so till the full 8 teams are added.

When All Spots Are Filled 8/8 and people go to add it warns them saying The Cup Is Full. ALso It will Mention **Remember To Record Personal Demos** When The Cup is full the bot randomizes wich team plays which, then sends to the channel the teams
e.g.
siber vs 4k
so and on so on
And then who added the oposite team e.g.
!Add siber / Server On / By Jake
!Add 4k / Server On / By Andy
The Bot messages Both Jake and Andy because they are playing eachother, it sends them a message Please exchange server details so the games can be started.

Also this needs to be linked with !Startcup

Code:
on *:TEXT:!startcup:#plesh2:{
  if (%bot.status == on) && ($nick isop $chan) && (%cup == off) {
    msg $chan 15,1[14± 0A 5on5 Cup has Been Started Please Type !Add / Teamname / Server On/Off To sign up 14±15]
    set %admin $nick
    set %cup on
    topic $chan 15,1[14± 0A 5on5 Cup has Been Started Please Type !Commands. Cup Started By %admin 14±15]
  }
  elseif (%bot.status == on) && ($nick isop $chan) && (%cup == on) { .notice $nick There is already a cup started! }
  else { .notice $nick The Bot Is Currently Offline! }
}

e.g. !Startcup 16, the bot would start a 16 slot team cup, where 16 people can add there teams.

Its a Big job i just dont no where to start. Anyone fancy helping?
Thankyou
Jake



#Plesh on QuaKenet
Jake Randall
Need help?
#Plesh - QuakeNet
Private Message Me Here!
Re: Command [Re: jakerandall] #195145 18/02/08 03:08 PM
Joined: Jan 2008
Posts: 44
J
jakerandall Offline OP
Ameglian cow
OP Offline
Ameglian cow
J
Joined: Jan 2008
Posts: 44
Or just give me the where abouts to start? :P not very good at this thing but im tempted to give it a bash.


#Plesh on QuaKenet
Jake Randall
Need help?
#Plesh - QuakeNet
Private Message Me Here!
Re: Command [Re: jakerandall] #195156 18/02/08 10:14 PM
Joined: Jan 2008
Posts: 44
J
jakerandall Offline OP
Ameglian cow
OP Offline
Ameglian cow
J
Joined: Jan 2008
Posts: 44
I made the bot do all of it, but i have it into a massive state, wounderd if anybody could help clear it up.
Code:
on *:join:#plesh2: { 
  .notice $nick 15,1[14± 0Welcome $nick To #siber, I Am The IRC Cup Bot Made By siber|plesh and bobz. Please Type !Commands for a list of all my commands 14±15]
  if ($nick == siber|plesh) || ($nick == sharrock) { mode $chan +o $nick }
}
on *:text:!Commands:#plesh2:{
  if (%bot.status == on) { .notice $nick 15,1[14± 0My Current Commands Are As Follows: !Admin - !Time - !ADD (Team name) ServerON/Off - !Prize - !Map - !Teams - !Status. ( !Help2 For A List Of Admin Commands) 14±15] }  
  else { .notice $nick The Bot Is Currently Offline! }
}
on *:TEXT:!setadmin &:#:{
  if (%bot.status == on) {
    if ($nick == %admin) {
      if ($nick isop $chan) {
        mode $chan -o %admin
        set %admin $2
        mode $chan +o %admin
        msg $chan 15,1[14±0 The Admin Is now %admin 14±15]
      }
      else { .notice $nick The Bot Is Currently Offline! }
    }
  }
}
on *:TEXT:!setprize *:#:{
  if (%bot.status == on) { 
    if ($nick == %admin) {
      set %prize $2-
      msg $chan 15,1[14±0 The Prize Is now %prize 14±15]
    }
  }
  else { .notice $nick The Bot Is Currently Offline! }
}
on *:TEXT:!setmap *:#:{
  if (%bot.status == on) {
    if ($nick == %admin) {
      set %map $2-
      msg $chan 15,1[14±0 The map Is now %Map 14±15]
    }
  }
  else { .notice $nick The Bot Is Currently Offline! }
}
on *:text:!admin:#plesh2:{ 
  if (%bot.status == on) {
    msg $chan 15,1[14± 0The Admin Is %Admin 14±15] 
  }
  else { .notice $nick The Bot Is Currently Offline! }
}
on *:text:!prize:#plesh2:{ 
  if (%bot.status == on) { msg $chan 15,1[14± 0The Prize Is %Prize 14±15] 
  }
  else { .notice $nick The Bot Is Currently Offline! }
}
on *:text:!time:#plesh2:{ 
  if (%bot.status == on) { msg $chan 15,1[14± 0Time: $time(hh:nn:sstt) 14±15]
  }
  else { .notice $nick The Bot Is Currently Offline! }
}
on *:text:!map:#plesh2:{
  if (%bot.status == on) { msg $chan 15,1[14± 0The Map Is %Map 14±15] 
  }
  else { .notice $nick The Bot Is Currently Offline! }
}
on *:TEXT:!Start:#Plesh2:{
  if ($nick isop $chan) {
    if (%bot.status == on) { notice $nick Bot has already started. }
    else {
      set %bot.status on
      set %cup off
      msg $chan 15,1[14± 0The Cup Bot Has Now Started, Please Type !Commands For A List Of Commands 14±15]
    }
    else { .notice $nick The bot is currently offline! }
  }
}
on *:TEXT:!Stop:#Plesh2:{
  if ($nick isop $chan) {
    if (%bot.status == off) { notice $nick Bot is already stopped. }
    elseif (%bot.status == on) && (%cup == off) { .notice $nick There is currently no cup active! }
    else {
      topic $chan  15,1[14± 0Welcome To #siber, Currently  Running 5on5 IRC Cups, Please Idle And Support #siber  14±15]
      set %bot.status off
      set %cup off
      msg $chan 15,1[14± 0The Bot Has Now Been Stopped, All Cups Are Terminated. Please Continue To Idle #siber For Further Cups 14±15]
    }
    else { .notice $nick The bot is currently offline! }
  }
}
 
on *:TEXT:!help2:#plesh2:{
  if (%bot.status == on) {
    if ($nick == %admin) {
      notice %admin The Current Admin Commands Are !Setadmin <nick> , !Setmap <mapname>, !Setprize <prize name>, !Start (Starts The Script) and !Stop (Stops The Script), !Startcup (Starts The 5on5 Cup)
    }
  }
  else { .notice $nick The Bot Is Currently Offline! }
}
on *:TEXT:!startcup*:#: {
  if ($nick isop $chan ) {
    if (!$istok(2 4 8 16 32,$2,32)) { notice $nick Invalid syntax! | notice $nick Syntax: !startcup 2/4/8/16/32 | halt }
    set %cup.teams $2
    set %cup.admin $nick
    set %cup.status ON
    set %cup.chan $chan
    if ($2 == 2) {
      set %cup.type 1v1
    }
    elseif ($2 == 4) { set %cup.type 2v2 }
    elseif ($2 == 8) { set %cup.type 4v4 }
    elseif ($2 == 16) { set %cup.type 8v8 }
    topic $chan A cup has started! Teams: %cup.teams - Admin: %cup.admin
  }
}
 
on *:TEXT:!add *:#: {
  if (%cup.teams == %cup.joins) { notice $nick Cup is FULL! | halt }
  if (!$2) { notice $nick Syntax: !add <team> serv on/off | halt }
  if (!$istok(servon servoff,$3,32)) { notice $nick Valid options are ServOn and ServOff | halt }
  inc %cup.joins
  set %team $+ %cup.joins $2
  notice $nick Your team has been added!
  topic %cup.chan A cup is on! Teams signed up %cup.joins $+ / $+ %cup.teams
}
 
alias calcteams {
  var %x = $rand(1,%cup.teams)
  var %y = $rand(1,%cup.teams)
}
 
alias check {
  if (%cup.joins == %cup.teams) {
    if (%y == %x) { CALCTEAM }
    if (%cup.teams == 4) {
      set %match1 %team $+ %x vs %team $+ %y
      var %q = $regsubex(%team $+ %x,/\D/g,)
      var %w = $regsubex(%team $+ %y,/\D/g,)
    }
  }
}
 
on *:TEXT:!teams:#: {
  if (%cup.teams == 2) { msg $chan Current teams in cup: %team1 $+ / $+ %team2 }
  if (%cup.teams == 4) { msg $chan Current teams in cup: %team1 $+ / $+ %team2 $+ / $+ %team3 $+ / $+ %team4 }
  if (%cup.teams == 8) { msg $chan Current teams in cup: %team1 $+ / $+ %team2 $+ / $+ %team3 $+ / $+ %team4 $+ / $+ %team5 $+ / $+ %team6 $+ / $+ %team7 $+ / $+ %team8 }
  if (%cup.teams == 16) { msg $chan Current teams in cup: %team1 $+ / $+ %team2 $+ / $+ %team3 $+ / $+ %team4 $+ / $+ %team5 $+ / $+ %team6 $+ / $+ %team7 $+ / $+ %team8 $+ / $+ %team9 $+ / $+ %team10 $+ / $+ %team11 $+ / $+ %team12 $+ / $+ %team13 $+ / $+ %team14 $+ / $+ %team15 $+ / $+ %team16 }
}




#Plesh on QuaKenet
Jake Randall
Need help?
#Plesh - QuakeNet
Private Message Me Here!