Request: members Invite Script for Bot
 
Post new topic   Reply to topic    Hawkee.com Forum Index -> mIRC Snippet Requests
 
Punx69  -  Tue Jul 03, 2012 4:08 am Reply with quote
hey im searching for a invite scirpt for my bot to put people on a list so they can join the members channel
i use my bot for omerta a text based mmorpg
i tried it to make it myself but it aint working well

i like to use the following commands

!allow (name) - allow someone on the invite list
!invite - check if the person is on the invite list if he is is send a invite if not tell him he is not on the list
!remove (namme) - delete perseon from the invite list
!allowlist - show all the people in the invitelist
and i would like to a invite at join if someone is on the list

i maked the following script myself but it aint working and i cant find the problem so if someone can help me out i will be really greatful

i tried to put it in code but he is putting everything in one line so i just post it as it is

INVITE SYSTEM

:Allowlist
on *:text:!allowlist:#Vaticano:{ if ($nick isop $chan ) /play $nick allowlist.vaticano.txt 100 }

::Allow
on *:text:!allow*:#Vaticano:{
if ($read(allowlist.vaticano.txt, w, $address($nick,2)) != $null) { /msg $chan $2 is already in the database | halt }
if ($nick isop $chan) { write allowlist.vaticano.txt $address($2,2) | /msg $chan $2 is added to the database }
}


::Invite
on *:text:!invite:#Vaticano:{ if ($read(allowlist.vaticano.txt, w, $address($nick,2)) != $null) { /invite $nick #vaticano.members | /msg $chan invite send to $nick | /notice $nick Invite sent for #vaticano.members
}
}
:Remove
on *:text:!remove*:#Vaticano:{
if ($nick isop $chan) { write -ds $address($2,2) allowlist.vaticano.txt | /msg $chan $2 is removed from the database }
}
Jethro  -  Tue Jul 03, 2012 11:07 am Reply with quote

Code

 
Punx69  -  Tue Jul 03, 2012 12:46 pm Reply with quote
thanks for your work but how u did it he dousnt do enything it is not responding off any of the commands

if you still want to help me out and come to #punx on irc i will preciated it

IRC Server: irc.barafranca.com
Ports: 6667, 8080
SSL Port: +6679
Jethro  -  Tue Jul 03, 2012 6:06 pm Reply with quote
My example works for me just fine. What mIRC version are you running?
Punx69  -  Wed Jul 04, 2012 7:20 am Reply with quote
i run my bot in the romote of TraScript mIRC 6.35
Jethro  -  Wed Jul 04, 2012 9:56 am Reply with quote
Ok, I'll make it simple and basic based on what you have above.

Code

 
Punx69  -  Thu Jul 05, 2012 12:51 pm Reply with quote
hey i tried it and got the same problems with my own script im just a basic scripten but i heard somethind that you can do with if than else that
concluds

%host = $address($2,2)
%check = invite.txt
%invite = $read(%check, w, %host)

not sure really how that stuff works i know if's and else but im not formilier with the %name= thing

can you try to help me houd that way thnx in advance
Jethro  -  Thu Jul 05, 2012 2:16 pm Reply with quote
What you've shown me is best known as variables. A variable comes in two flavors, both as local or global..depending on the usage. What a variable does is assign the value of an identifier or object to a temporary storage for you to refer to later. It's good when you have many iterations to be made within a code.

I don't get why you keep saying my latest example doesn't respond nor work when in fact it does upon my own testing. Confused
Punx69  -  Thu Jul 05, 2012 2:25 pm Reply with quote
i will explain what the problem is some people that not in the datbase he said they already add he refused to remove some persons and refused to invite some persons who are on the allowlist but its al random so i dont really see where the mistake is
MoMy  -  Fri Jul 06, 2012 5:55 am Reply with quote
Why use $nick identifier?
$nick = the person sending the command !invite, !allow and !remove.
$1 = the command (!invite, !allow and !remove)
$2 = user wants to indicate that the commands provided in one of these common chan.

Quote

if ($read(allowlist.vaticano.txt,wn,$address($nick,2)) != $null) {

example:
If MoMy writes !allow knife `s, address will be written so many times because using $nick as an identifier ($address($nick,2)) is not equal to address knife `s

Quote

/write allowlist.vaticano.txt $address($2,2)


$address($nick,2) = address of MoMy
$address($2,2) = address of knife `s

The !invite command, I think I need a wildcard. Best & of *.
I think to be corrected by replacing $nick with $2 (in all three events on text).
I hope I explained.
Display posts from previous:   
Post new topic   Reply to topic    Hawkee.com Forum Index -> mIRC Snippet Requests All times are GMT - 7 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.