How to enable a trigger on specific nick
 
Post new topic   Reply to topic    Hawkee.com Forum Index -> mIRC Scripting
 
RIcko  -  Fri Jun 29, 2012 2:47 pm Reply with quote
Let's say i have a !quit command for my bot and i want this command to work on my nick only so no one else can use it, how to add a specific line that may work for for every trigger in the future?

because some commands are meant to be for the bot owner only , i'll appreciate a proper help


Last edited by RIcko on Fri Jun 29, 2012 3:56 pm; edited 1 time in total
Jethro  -  Fri Jun 29, 2012 2:59 pm Reply with quote
Just add an if statement to check like so:

Code

 
To find out your host, enter:

Code

 
on your own mIRC channel window. Then replace *!*@host.com with the echo print result on your bot's.
RIcko  -  Fri Jun 29, 2012 3:58 pm Reply with quote
thanks Jethro, i got another few questions though

1) how to make !b bans a user and !-b unbans that user, note that those 2 can be used by my host only.
2) how to make a command for the bot like !say <chan> <words> that will say the specific words when the user who typed the command have a specific level like & or ~

also, "if ($wildsite == *!*@Ricko.users) { " seems not working since i tried to typ the commands via another bot and it was still working :/


that's it for now, i'll be glad for any answer
Jethro  -  Sat Jun 30, 2012 11:26 am Reply with quote
Does your bot and your own client share the same host?
RIcko  -  Sun Jul 01, 2012 8:14 am Reply with quote
Nope, my host is @Ricko.users and my bot's host is @Pyro.users, i also tried if ($nick == Ricko) and if ($nick == me) but there is probably something wrong with the way i typed them that made these commands working for everyone and not only me.

Last edited by RIcko on Mon Jul 02, 2012 4:26 pm; edited 1 time in total
cofvempire  -  Sun Jul 01, 2012 8:37 am Reply with quote

Code

 

thats for a specified nick
for ur nick:

Code

 

should work normally
[/code]


Last edited by cofvempire on Sun Jul 01, 2012 1:08 pm; edited 1 time in total
Jethro  -  Sun Jul 01, 2012 12:59 pm Reply with quote
I spot a code typo in the input event itself. You have an extra colon there, cofvempire.
cofvempire  -  Sun Jul 01, 2012 1:09 pm Reply with quote
edited
RIcko  -  Mon Jul 02, 2012 4:29 pm Reply with quote
Thanks both cofvempire and Jethro!
Display posts from previous:   
Post new topic   Reply to topic    Hawkee.com Forum Index -> mIRC Scripting 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.