mIRC Home    About    Download    Register    News    Help

Print Thread
#165354 25/11/06 06:40 PM
Joined: Nov 2006
Posts: 1
D
disci Offline OP
Mostly harmless
OP Offline
Mostly harmless
D
Joined: Nov 2006
Posts: 1
Hi all.... totaly new here en kinda new on irc. Forgive my bad english if i typ something wrong smirk

My Q is:

I´m looking for a script that uses 2 rooms. In room A jou give the command. In room B the command wil change. Script wil be used on a bot.

Example:

In room A you give the command.
Room A:
!disci 100

In room B the user can use a command like !Shots disci If the do, they gets a pm/notice with the next text.
Disci has shoot a total of 100 people.

To explain a bit more, how it wil be on a chat room

#roomA
(00:04) <Disci> !disci 150
(00:05) <Bot> Shots changed for Disci

#roomB
(00:06) <Anyone> !shots disci
(00:07) <Bot> Disci has shoot a total of 150 people.

I hope that you understand mij question en explanation and that someone could help me.

Iff i use it in just one room, al the users wil abuse the command. And the command(s) must be for more than one "shooter". So my idea was to use a extra room for input of the commands.


Greetzzz
Disci

#165355 26/11/06 06:38 PM
Joined: Oct 2003
Posts: 313
S
Fjord artisan
Offline
Fjord artisan
S
Joined: Oct 2003
Posts: 313
Something like:

Code:
on *:text:!*:#roomA: {
  if ($1 == !disci) {
    hadd -m Shots $nick $$2
    msg $chan Shots for $nick raised to $$2
  } 
  if ($1 == !command2) {
    ... 
  }
  ...
}

on *:text:!*:#roomB: {
  if ($1 == !shots) {
    if ($hget(Shots,$$2)) {
      msg $chan $$2 has $v1 shots.
    }
    else {
      msg $chan Sorry - no shots recorded for $$2
    }
  } 
  if ($1 == !command2) {
    ;; etc
  }
  ;; etc
}


I actually assume that you want something more like
> !set_shots <nick> <value>
rather than !<nick> <value>, so you may have to adjust my code accordingly.


Sais

Link Copied to Clipboard