mIRC Home    About    Download    Register    News    Help

Print Thread
Page 1 of 2 1 2
Joined: Jun 2015
Posts: 34
C
copman Offline OP
Ameglian cow
OP Offline
Ameglian cow
C
Joined: Jun 2015
Posts: 34
i need help on my script it does not work
this need to change every 30 min but it does not work


on *:text:!autohost*:#:{
if ($nick isop #) {
if ($2 == on) {
msg # /me Auto Hosting is now enabled.
.timerSelect 0 10 msg # searching for a channel to host.
var %NowHosting $read(NowHosting.txt)
.timerWho 0 13 msg # /me Now Hosting, %NowHosting
.timerHost 0 14 msg # /host %NowHosting
}
else if ($2 == off) {
msg # /me Auto Hosting is now disabled.
.timer 1 2 msg # /unhost
.timerSelect off
.timerWho off
.timerHost off
}
}
}

Joined: Jun 2014
Posts: 248
B
Fjord artisan
Offline
Fjord artisan
B
Joined: Jun 2014
Posts: 248
Uhh. There is quite a bit of stuff that is just wrong.

To start with, do you really want this to message your channel every 10 second -- Searching for a channel to host?

Joined: Jun 2015
Posts: 34
C
copman Offline OP
Ameglian cow
OP Offline
Ameglian cow
C
Joined: Jun 2015
Posts: 34
that was for a test

Joined: May 2015
Posts: 249
Fjord artisan
Offline
Fjord artisan
Joined: May 2015
Posts: 249
What exactly doesnt work?


Dont give a fish - teach to fish!
Joined: Jun 2015
Posts: 34
C
copman Offline OP
Ameglian cow
OP Offline
Ameglian cow
C
Joined: Jun 2015
Posts: 34
When i type !autohost it does nothing

Joined: May 2015
Posts: 249
Fjord artisan
Offline
Fjord artisan
Joined: May 2015
Posts: 249
Code:
on *:text:!autohost*:#:{
    if ($istok(%owners,$nick,32)) {
      if (($2 == on) && (!$timer(.hostON))) {
        msg # /me Auto Hosting is now enabled.
        searchhost $chan
        .timer.hostON 0 1800 searchhost
        ;0 10 msg # searching for a channel to host.
        ;var %NowHosting $read(NowHosting.txt)
        ;.timerWho 0 13 msg # /me Now Hosting, %NowHosting
        ;.timerHost 0 14 msg # /host %NowHosting
      }
      else if ($2 == off) && ($timer(.hostON)) {
        msg # /me Auto Hosting is now disabled.
        .timer.hostON off
        msg # /unhost
      }
    }
}

alias searchhost {
  var %nowhosting = $read(NowHosting.txt)
  var %chan = $1
  msg %chan /me Now hosting $qt(%nowhosting)
  msg %chan /host %nowhosting
}


p.s.: %owners nick1 nick2 nick3


Dont give a fish - teach to fish!
Joined: Jun 2015
Posts: 34
C
copman Offline OP
Ameglian cow
OP Offline
Ameglian cow
C
Joined: Jun 2015
Posts: 34
i still can't get it to work i type !autohost in and it dose not work frown

thanks

Joined: May 2015
Posts: 249
Fjord artisan
Offline
Fjord artisan
Joined: May 2015
Posts: 249
1. Read Help about $istok
2. Add "checker":
Code:
on *:text:!autohost*:#:{
  echo -agt THIS IS TRIGGERING AT LEAST
  if ($istok(%owners,$nick,32)) {


Dont give a fish - teach to fish!
Joined: Jun 2015
Posts: 34
C
copman Offline OP
Ameglian cow
OP Offline
Ameglian cow
C
Joined: Jun 2015
Posts: 34
this is what it says THIS IS TRIGGERING AT LEAST but still no host frown

Joined: May 2015
Posts: 249
Fjord artisan
Offline
Fjord artisan
Joined: May 2015
Posts: 249
Then check 1.


Dont give a fish - teach to fish!
Joined: Jun 2015
Posts: 34
C
copman Offline OP
Ameglian cow
OP Offline
Ameglian cow
C
Joined: Jun 2015
Posts: 34
how do i check 1 ??

Joined: Dec 2008
Posts: 1,515
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2008
Posts: 1,515
1. Try to put the code into a new file
2. Check if the %owners global variable exists (via Alt +r -> Variables) , if not exists use: /set %owners NICK1 NICK2

Last edited by westor; 13/06/15 10:06 AM.

Need Online mIRC help or an mIRC Scripting Freelancer? -> https://irc.chathub.org <-
Joined: Jun 2015
Posts: 34
C
copman Offline OP
Ameglian cow
OP Offline
Ameglian cow
C
Joined: Jun 2015
Posts: 34
i see %owners in variables
thanks for the help smile

but still no host

Last edited by copman; 13/06/15 10:14 AM.
Joined: May 2015
Posts: 249
Fjord artisan
Offline
Fjord artisan
Joined: May 2015
Posts: 249
Not just "%owners", it has to be "%owners copman splinny westor" - contain SPACE separated nicks.


Dont give a fish - teach to fish!
Joined: Jun 2015
Posts: 34
C
copman Offline OP
Ameglian cow
OP Offline
Ameglian cow
C
Joined: Jun 2015
Posts: 34
ok let me try that like this %owners alaskastatetrooper64

Last edited by copman; 13/06/15 10:19 AM.
Joined: Jun 2015
Posts: 34
C
copman Offline OP
Ameglian cow
OP Offline
Ameglian cow
C
Joined: Jun 2015
Posts: 34
still no host

Joined: May 2015
Posts: 249
Fjord artisan
Offline
Fjord artisan
Joined: May 2015
Posts: 249
Ok, you want to tell that your nick is "alaskastatetrooper64", you typed "!autohost on" in channel where you bot is and nothing happened?
btw, change:
Code:
.timer.hostON 0 1800 searchhost

to
Code:
.timer.hostON 0 1800 searchhost $chan

Lines starting with ";" can be deleted.

Last edited by splinny; 13/06/15 10:31 AM.

Dont give a fish - teach to fish!
Joined: Jun 2015
Posts: 34
C
copman Offline OP
Ameglian cow
OP Offline
Ameglian cow
C
Joined: Jun 2015
Posts: 34
ok

yes nothing happens
and my twitch name is alaskastatetrooper64

Last edited by copman; 13/06/15 10:31 AM.
Joined: May 2015
Posts: 249
Fjord artisan
Offline
Fjord artisan
Joined: May 2015
Posts: 249
and what about "!autohost off"?


Dont give a fish - teach to fish!
Joined: Jun 2015
Posts: 34
C
copman Offline OP
Ameglian cow
OP Offline
Ameglian cow
C
Joined: Jun 2015
Posts: 34
this is my code and host yet


on *:text:!autohost*:#:{
echo -agt THIS IS TRIGGERING AT LEAST
if ($istok(%owners,$nick,32)) {
if (($2 == on) && (!$timer(.hostON))) {
msg # /me Auto Hosting is now enabled.
searchhost $chan
.timer.hostON 0 1800 searchhost $chan
;0 10 msg # searching for a channel to host.
;var %NowHosting $read(NowHosting.txt)
;.timerWho 0 13 msg # /me Now Hosting, %NowHosting
;.timerHost 0 14 msg # /host %NowHosting
}
else if ($2 == off) && ($timer(.hostON)) {
msg # /me Auto Hosting is now disabled.
.timer.hostON off
msg # /unhost
}
}
}

alias searchhost {
var %nowhosting = $read(NowHosting.txt)
var %chan = $1
msg %chan /me Now hosting $qt(%nowhosting)
msg %chan /host %nowhosting
}

Page 1 of 2 1 2

Link Copied to Clipboard