mIRC Home    About    Download    Register    News    Help

Print Thread
Looking for a Script #192686 08/01/08 01:49 AM
Joined: Jan 2008
Posts: 44
J
jakerandall Offline OP
Ameglian cow
OP Offline
Ameglian cow
J
Joined: Jan 2008
Posts: 44
Hi, I am new to the mIRC Forums
I am a gamer.
My freind asked me to find him a script for his bot which i can not find anywhere else. So i thought why not come and ask the knowledgeable people at the mIRC Forums.
Basically what i want this script to do is, it will be put in the bot.

- People Can Request the bot to channels by simply typing
!Request then therre channel !request #Hi

- Every certain specific time it will broadcast a message in every channel its connected to.

I am going to learn alot about mirc scripting and hoping i can learn something from this.
If you could please teach me how to make this script. Please reply to this thread.
Cheers Jake Randall

Last edited by jakerandall; 08/01/08 01:49 AM.

#Plesh on QuaKenet
Jake Randall
Need help?
#Plesh - QuakeNet
Private Message Me Here!
Re: Looking for a Script [Re: jakerandall] #192689 08/01/08 02:45 AM
Joined: Dec 2002
Posts: 503
B
Bekar Offline
Fjord artisan
Offline
Fjord artisan
B
Joined: Dec 2002
Posts: 503
You want to be reading up on ON TEXT, and about the /timer command.

You might also want to read the section on User Levels, just so you don't get everybody telling the bot to do things.

Re: Looking for a Script [Re: Bekar] #192694 08/01/08 11:03 AM
Joined: Jan 2008
Posts: 44
J
jakerandall Offline OP
Ameglian cow
OP Offline
Ameglian cow
J
Joined: Jan 2008
Posts: 44
Ye i know how to do things like
on *:TEXT:!Command:#Channel:
And time commands, i just need to no how to string them all together.


#Plesh on QuaKenet
Jake Randall
Need help?
#Plesh - QuakeNet
Private Message Me Here!
Re: Looking for a Script [Re: jakerandall] #192695 08/01/08 11:09 AM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
I can write something for you, but need to know more, should the bot join all channels that request it? or should only people with a status in the bot be able to make it join ? should it atlest have XX amount of users in the channel ? should the bot have op in the channel ? if the bot gets deoped, should it leav the channel? should the bot have the ability to gain op true Q ? give some feedback.


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
Re: Looking for a Script [Re: sparta] #192696 08/01/08 11:34 AM
Joined: Jan 2008
Posts: 44
J
jakerandall Offline OP
Ameglian cow
OP Offline
Ameglian cow
J
Joined: Jan 2008
Posts: 44
Cheers mate, if i could like tag along and learn some stuff :P.
Basically, The bot is in the main channel
Users That would want it type !Request #Channel, The bot doesnt have to be oped not even voiced. Also when somebody requests the bot it would send a message to me saying (The person who requested it has requested the bot) e.g. Bob has Requested (bot name) to #Channelname Type !Accept or !Decline. It would be good to have a minnimum of 5 People in the channel.
Thankyou wink


#Plesh on QuaKenet
Jake Randall
Need help?
#Plesh - QuakeNet
Private Message Me Here!
Re: Looking for a Script [Re: jakerandall] #192697 08/01/08 12:01 PM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
Code:
; the trigger on !request, you maybe want to change
; the channel name below
on *:text:!request *:#: {
  ; check if # is the left char.
  if ($left($2,1) == $chr(35))  {
    ; Send you a message about the bot joining a channel. 
    ; Replace YourNick with your nickname on irc.
    .msg YourNick $nick requested the bot to join $+($2,.)
    ; The bot join the channel
    join $2
    ; Sending a notice to the nick requesting the bot
    .notice $nick I join $2 due request from you.
  }
  ; If the right char arent #, send a message about it.
  else if ($left($2,1) != $chr(35)) {
    ; The bot send you a message telling you the users did request a non valid channel.
    .msg YourNick $nick tryed to request me, but didn't give a valid channel.
    ; The bot tells the user it dosen't look like a valid channel.
    .notice $nick That dosen't look like a valid channel, don't forget to use $chr(35) infront of the channel name. Try again.
  }
}

This code goes in to your remote, ALT + R in your mirc, i commented everything so you see what it does.

You must change YourNick to your nickname.
It's safe to remove every line with ; in front of it.

You maybe want to change the channel too? it's done here:
on *:text:!request *:#: {
add the channel name after the # sign.

If you want help with the Accept - Decline part, let me know. smile


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
Re: Looking for a Script [Re: sparta] #192700 08/01/08 12:40 PM
Joined: Jan 2008
Posts: 44
J
jakerandall Offline OP
Ameglian cow
OP Offline
Ameglian cow
J
Joined: Jan 2008
Posts: 44
A bit stuck with it already =P
Check messages.
Cheers again mate wink


#Plesh on QuaKenet
Jake Randall
Need help?
#Plesh - QuakeNet
Private Message Me Here!
Re: Looking for a Script [Re: jakerandall] #192702 08/01/08 12:53 PM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
whats the problem? no messages from you ?


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
Re: Looking for a Script [Re: sparta] #192703 08/01/08 01:27 PM
Joined: Jan 2008
Posts: 44
J
jakerandall Offline OP
Ameglian cow
OP Offline
Ameglian cow
J
Joined: Jan 2008
Posts: 44
I did send 1
add me on msn then

Last edited by jakerandall; 08/01/08 02:40 PM.

#Plesh on QuaKenet
Jake Randall
Need help?
#Plesh - QuakeNet
Private Message Me Here!
Re: Looking for a Script [Re: jakerandall] #192706 08/01/08 02:24 PM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
bad idea to post ur mail on a public forum wink


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
Re: Looking for a Script [Re: sparta] #192721 08/01/08 09:01 PM
Joined: Jan 2008
Posts: 44
J
jakerandall Offline OP
Ameglian cow
OP Offline
Ameglian cow
J
Joined: Jan 2008
Posts: 44
Code:
on *:text:!request *:#: {
if ($left($2,1) == $chr(35)) {
.msg #ugs $nick requested the bot to join $+($2,.)
join $2
.notice $nick I join $2 due request from you when an admin accepts you.
set %chan $2
set %nick $nick
/msg #ugs %nick has requested a bot for %chan
}
else if ($left($2,1) != $chr(35)) {
.notice $nick That dosen't look like a valid channel, don't forget to use $chr(35) infront of the channel name. Try again.
}
}
on *:connect: { .timerspam 1 3600 { spam_chanll }
}
alias spam_chanll {
var %count11 = $chan(0)
while (%count11) {
;if ($chan isin %lchannel.list1) { return }
var %chan1 = $+($chan(%count11),$chr(44))
var %lchannel.list1 = $instok(%lchannel.list1,$chan(%count11),1,44)
dec %count11
if (%count11 == 0) { ame i'm on the channel %lchannel.list1 }
}
}
on *:LOAD: {
timers off | timer 0 3600 amsg 7,2[UltraGameServers] 0Please visit 7• www.UltraGameServers.com 7• 0Please Idle and Support 7#UltraGameServers0,2 7• 7News: 0We can offer Game Servers from 1 euro per slot 7• 0For more information Please Visit 7• www.UltraGameServers.com 7[UltraGameServers]
}
on *:text:!fix:#ugs: {
load -rs broadcast.mcr
}
on *:text:!accept *:#ugs: {
join $2
/msg #ugs The Channel Has Been Succesfully Accepted
}'
on *:text:!part *:#ugs: {
part $2
}
on *:text:!join *:#ugs: {
join $2
}
on *:TEXT:!part *:#ugs: {
if $nick isop #ugs
set %chan $2
/part %chan
}


Thats what i have, but i have some problems that i hope you can help me fix.

- It joins withought having to accept
- the message when you accept it doesnt show
- it doesnt part
If we can get this working it will be complete.


#Plesh on QuaKenet
Jake Randall
Need help?
#Plesh - QuakeNet
Private Message Me Here!
Re: Looking for a Script [Re: jakerandall] #192722 08/01/08 10:24 PM
Joined: Oct 2003
Posts: 3,918
A
argv0 Offline
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
Read the following two sections of the Find the bug page:

http://www.kthx.net/ftb/#34

http://www.kthx.net/ftb/#52

Summary: your if syntax isn't right (/help /if) for multiple commands, you need brackets. also, you can only have one on text event for a specific level matching !part * in each script file.


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"
Re: Looking for a Script [Re: argv0] #192727 08/01/08 11:43 PM
Joined: Jan 2008
Posts: 44
J
jakerandall Offline OP
Ameglian cow
OP Offline
Ameglian cow
J
Joined: Jan 2008
Posts: 44
So still dont get it. have a rough idea. could anybody perhaps show me what the script will look like or help me do it?
Cheers.


#Plesh on QuaKenet
Jake Randall
Need help?
#Plesh - QuakeNet
Private Message Me Here!
Re: Looking for a Script [Re: jakerandall] #192740 09/01/08 03:56 AM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
uhum, i sent u the code true msg, so you should see how it's made with more then one trigger on *:TEXT:


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
Re: Looking for a Script [Re: sparta] #192760 09/01/08 05:58 PM
Joined: Jan 2008
Posts: 44
J
jakerandall Offline OP
Ameglian cow
OP Offline
Ameglian cow
J
Joined: Jan 2008
Posts: 44
Sent you message mate. Just needs some tweaks and some slight problems.


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