mIRC Home    About    Download    Register    News    Help

Print Thread
#268805 02/05/21 01:52 PM
Joined: May 2021
Posts: 3
C
Self-satisfied door
OP Offline
Self-satisfied door
C
Joined: May 2021
Posts: 3
Hello
im trying to create new script and cant do it alone because my knowlege is ... weak wink

Code
  if (!test isin $1-) {
    if ($kanaly) {
      var %array.1 = 8,5-- 111 --
      var %array.2 = 8,5-- 222 --
      var %array.3 = 8,5-- 333 --
      var %array.4 = 8,5-- 444 --
      var %array.5 = 8,5-- 555 --
      var %array.6 = 8,5-- 666 --
      var %array.7 = 8,5-- 777 --
      var %x = $rand(1,7)
      msg $chan $nick,$+($chan,$rand(1,$nick($chan,0),a,o) %array. [ $+ [ %x ] ]
    }
  }


i grab code after msg $chan from others on this forum and try many many things and failed

i need a random answer to random nick from nicklist in mIRC after someone type !test(command will change later and answers)

i will be really helpful if someone put here some code wink

Last edited by ColdPower; 02/05/21 03:38 PM.
Joined: May 2021
Posts: 3
C
Self-satisfied door
OP Offline
Self-satisfied door
C
Joined: May 2021
Posts: 3
my friend found sollution

msg $chan $nick($chan, $rand(1, $nick($chan,0))) %array. [ $+ [ %x ] ]

or

msg $chan %array. [ $+ [ %x ] ] $nick($chan, $rand(1, $nick($chan,0)))

if someone want random answer first

and script work for me perfect

Last edited by ColdPower; 07/05/21 07:15 PM.
Joined: May 2021
Posts: 3
C
Self-satisfied door
OP Offline
Self-satisfied door
C
Joined: May 2021
Posts: 3
sorry for multiposting but i think it could be helpful

i found another options to create random nick wherever you want in answers

Code
on *:text:*:#:{
  var %randnick = $nick($chan, $rand(1, $nick($chan,0)))
  if (!test isin $1-) {
    if ($kanaly) {
      var %array.1 = test %randnick
      var %array.2 = %randnick test2
      var %array.3 = test3 %randnick test3
      var %array.4 = -- 444 --
      var %array.5 = -- 555 --
      var %array.6 = -- 666 --
      var %array.7 = -- 777 --
      var %x = $rand(1,2)
    msg $chan %array. [ $+ [ %x ] ]    
    }
  }
}


Link Copied to Clipboard