mIRC Homepage
Posted By: Zaine on TEXT scripting help - 12/11/07 02:40 AM
hey, i was wondering if there was a way for

1. putting a delay in to where there is like say a 5 secind wait before it sends the message. like
Code:
on 1:TEXT:*command*:#: {
  <delay goes here>
  /msg $chan <message>
}


and

2. on the text comand, if there was a for me to be able to change nick but the command still work when you type the nick in the command.. like
Code:
on 1:TEXT:*hi <nick>*:#: {
  /msg $chan <message>
}


any help would be great.. been racking my brain for a week on this and cant seem to figure it out.
Posted By: Bekar Re: on TEXT scripting help - 12/11/07 02:45 AM
1) Look at the /timer command.

2)
Code:
ON *:TEXT:$(* $+ hi $me $+ *):#: {
  msg # Hi $nick! :)
}


This will work when someone says 'Hi <yournickname>'.

This method is documented under /help $(...) from memory.

(Edit: fixed missing } and added the '...' to the help item name)
Posted By: Zaine Re: on TEXT scripting help - 12/11/07 03:49 AM
how would i get him to do a describe?
Posted By: deegee Re: on TEXT scripting help - 12/11/07 04:05 AM
Change "msg" to "describe"
Code:
  describe # <message>
Posted By: Zaine Re: on TEXT scripting help - 12/11/07 04:41 AM
tried that and it didnt work

ok i was trying to something it didnt like.. it does work.. im trying to get it to where like if you say get <someones name> <bot nick> then the bot will respond with some message.
Posted By: deegee Re: on TEXT scripting help - 12/11/07 05:05 AM
Hmmm, something lie this?
Code:
on *:text:$(get & $me):#:{
  if $2 ison # { describe # pokes $2 }
}
Posted By: Zaine Re: on TEXT scripting help - 12/11/07 05:18 AM
no that didnt work


sorry it did work
Posted By: Zaine Re: on TEXT scripting help - 12/11/07 11:49 PM
so how do i get a delay in between the trigger and the message?
Posted By: nomer2007 Re: on TEXT scripting help - 13/11/07 03:21 AM
use timer
/help /timer
Posted By: Zaine Re: on TEXT scripting help - 13/11/07 03:29 AM
that isnt what i was lookin for.
Posted By: RusselB Re: on TEXT scripting help - 13/11/07 04:11 AM
then you're going to have to clarify what it is you're wanting, as /timer is the only command in mIRC that matches your request so far. Here's the code that you have said works, but altered to include a 5 second delay

Code:
on *:text:$(get & $me):#:{
  if $2 ison # { .timer 1 5 describe !$chan pokes !$2 }
}
Posted By: Zaine Re: on TEXT scripting help - 13/11/07 04:59 AM
that was what i was looking for.. thanks
© mIRC Discussion Forums