mIRC Home    About    Download    Register    News    Help

Topic Options
#256977 - 06/03/16 11:47 AM Not sure how to make this..
HHPN Offline
Nutrimatic drinks dispenser

Registered: 06/03/16
Posts: 7
Hey all. I have an idea and I'd appreciate your help making this.

I want to be able to use say something like

!A var1 var2 var3

and then when I say

!B, it'll output "var1 var2 var3 - last updated 10 seconds ago"

The variables will be constantly changing/updating as whoever can do a !A command. Is this possible?

Top
#256987 - 07/03/16 10:03 AM Re: Not sure how to make this.. [Re: HHPN]
Iyou Offline
Nutrimatic drinks dispenser

Registered: 02/03/16
Posts: 6
Loc: Germany
must the user type !A "Hello world you" ?

Top
#257002 - 07/03/16 07:23 PM Re: Not sure how to make this.. [Re: Iyou]
westor Offline
Hoopy frood

Registered: 27/12/08
Posts: 1511
Loc: Greece
Please give some examples to make us understand better of what's var1/var2 you really mean, do you mean global variabls?, your description is poor.
_________________________
Need Online mIRC help or an mIRC Scripting Freelancer? -> http://westor.ucoz.com/contact <-

Top
#257009 - 08/03/16 08:04 AM Re: Not sure how to make this.. [Re: HHPN]
HHPN Offline
Nutrimatic drinks dispenser

Registered: 06/03/16
Posts: 7
I want to be able to input something like...

Me: !place 52 10 degrees store

and then someone can say

Someone: !location

and it'll output

Output: 52 10 degrees store

Top
#257012 - 08/03/16 09:10 AM Re: Not sure how to make this.. [Re: HHPN]
westor Offline
Hoopy frood

Registered: 27/12/08
Posts: 1511
Loc: Greece
Use this code:

Code:
ON *:TEXT:*:#: {
  tokenize 32 $strip($1-)
  if ($1 == !place) {
    if (!$2) { .msg $chan ( $+ $nick $+ ): Please specify a text! | return }
    if (%place == $2-) { .msg $chan ( $+ $nick $+ ): Please specify an other text, it is the same as set now! | return }
    set %place $2-
    .msg $chan ( $+ $nick $+ ): Your place has been set as $qt($2-) $+ .
  }
  if ($1 == !location) {
    if (!%place) { .msg $chan ( $+ $nick $+ ): There is NOT any place set yet! }
    elseif (%place) { .msg $chan ( $+ $nick $+ ): The location is $qt(%place) $+ . }
  }
}
_________________________
Need Online mIRC help or an mIRC Scripting Freelancer? -> http://westor.ucoz.com/contact <-

Top
#257080 - 13/03/16 06:11 PM Re: Not sure how to make this.. [Re: westor]
HHPN Offline
Nutrimatic drinks dispenser

Registered: 06/03/16
Posts: 7
Any way to have this loop (in addition to calling it manually) every 10 seconds?

Top
#257082 - 13/03/16 07:31 PM Re: Not sure how to make this.. [Re: HHPN]
westor Offline
Hoopy frood

Registered: 27/12/08
Posts: 1511
Loc: Greece
What exactly you mean? give some examples..
_________________________
Need Online mIRC help or an mIRC Scripting Freelancer? -> http://westor.ucoz.com/contact <-

Top
#257090 - 14/03/16 08:20 AM Re: Not sure how to make this.. [Re: westor]
HHPN Offline
Nutrimatic drinks dispenser

Registered: 06/03/16
Posts: 7
Your code works great. I want it to also be able to output the latest input every 10 seconds..

So like..

Manually call it with

Me: !place store
and then Someone can do

Someone: !location

Bot: store

Your script does this, but I want it to output "!location" every 10 seconds automatically without manually calling it. So after 10 seconds, it'll output

Bot: store
then 10 seconds later again

Bot: store

and then I can do !place job

and then 10 seconds later again it'll do

Bot: job

so on and so forth..

Top
#257091 - 14/03/16 09:16 AM Re: Not sure how to make this.. [Re: HHPN]
westor Offline
Hoopy frood

Registered: 27/12/08
Posts: 1511
Loc: Greece
Use this code:

Code:
ON *:TEXT:*:#: {
  tokenize 32 $strip($1-)
  if ($1 == !place) {
    if (!$2) { .msg $chan ( $+ $nick $+ ): Please specify a text! | return }
    if (%place == $2-) { .msg $chan ( $+ $nick $+ ): Please specify an other text, it is the same as set now! | return }
    set %place $2-
    .msg $chan ( $+ $nick $+ ): Your place has been set as $qt($2-) $+ .
    .timer[PLACE_SAY] 0 10 .msg $chan The location is $qt(%place) $+ .
  }
  if ($1 == !location) {
    if (!%place) { .msg $chan ( $+ $nick $+ ): There is NOT any place set yet! }
    elseif (%place) { .msg $chan ( $+ $nick $+ ): The location is $qt(%place) $+ . }
  }
}
_________________________
Need Online mIRC help or an mIRC Scripting Freelancer? -> http://westor.ucoz.com/contact <-

Top
#257101 - 14/03/16 10:03 PM Re: Not sure how to make this.. [Re: westor]
HHPN Offline
Nutrimatic drinks dispenser

Registered: 06/03/16
Posts: 7
Now with multiple "!place"'s in which the !location can output them all. As again, on a 10 second timer and also can be called manually whenever.

Input
!place outside
!store gap
!color blue

!location
outside
gap
blue

Top
#257200 - 20/03/16 12:58 PM Re: Not sure how to make this.. [Re: HHPN]
richie Offline
Mostly harmless

Registered: 20/03/16
Posts: 1
Need login of mirc

Top