mIRC Homepage
Posted By: homeless Script don't work - 30/08/04 08:48 PM
menu channel,menubar,query {
[Friend List]
.$iif($dialog(mp),$style(2)) [Open]:dialog -md fla fla
.[Set on/off]
..[on]: unset %stop | echo -a on
..[off]: set %stop A | echo -a off
}
dialog fla {
title "Friends List"
size -1 -1 84 122
option dbu
edit "", 1, 2 14 80 10, autohs
box "Enter NickName", 2, 0 5 84 23
button "Add", 3, 2 30 80 8, flat
button "Remove", 4, 2 101 80 9, flat
box "Friend List", 5, 0 40 84 59
button "Done", 7, 2 112 80 9, flat ok
list 8, 2 49 80 47, size vsbar
}
ON *:LOAD {
hmake fdlist 15
set %nuy 0
}
ON *:DIALOG:fla:init:0:{
var %nug 1
while ( %nug <= %nuy ) {
did -a fla 8 $hget(fdlist,%nug).item
inc %nug
}
unset %nug
}
ON *:DIALOG:fla:sclick:3:{
if ( $did(1) == $null ) { return }
else {
auser 5 $did(1)
hadd -m fdlist $did(1) %nuy
inc %nuy
did -r fla 8,1
var %nug 1
while ( %nug <= %nuy ) {
did -a fla 8 $hget(fdlist,%nug).item
inc %nug
}
unset %nug
}
}
ON *:DIALOG:fla:sclick:4:{
if ( $did(8).sel == $null) { return }
else {
ruser $did(8).seltext
set %ugf $did(8).seltext
did -d fla 8 $did(8).sel
hdel -sw fdlist %ugf
dec %nuy
unset %ugf
}
}
ON *:DIALOG:fla:sclick:7: {
.hsave -so fdlist $scripdir $+ fdlist.mrc
}
on 1:OPEN:?:*: {
if ( %stop == A ) { return }
else {
msg $nick Hallo $nick ask to talk to me in a channel . I am not accepting private massages from you .
echo -a 4,1 < $+ $nick $+ >  8,1 $1-
close -m $nick }
}
on 5:OPEN:?:*: {
if ( %stop == A ) { return }
else { return }
}
ON *:START {
hmake fdlist 15
.hload -s fdlist $scriptdir $+ fdlist.mrc
}
ON *:UNLOAD {
hfree fdlist
}
Posted By: MTec89 Re: Script don't work - 30/08/04 08:51 PM
Code:
menu channel,menubar,query {
[Friend List]
.$iif($dialog([color:red]mp[/color]),$style(2)) [Open]:dialog -md fla fla
.[Set on/off]
..[on]: unset %stop | echo -a on
..[off]: set %stop A | echo -a off
}

should probably be
Code:
menu channel,menubar,query {
[Friend List]
.$iif($dialog([color:red]fla[/color]),$style(2)) [Open]:dialog -md fla fla
.[Set on/off]
..[on]: unset %stop | echo -a on
..[off]: set %stop A | echo -a off
}
Posted By: homeless Re: Script don't work - 30/08/04 09:20 PM
Soory but don't work again.
I try to make a script that send a private msg to users that are not on friend list when the user send to me a private msg.

Please help me
Posted By: homeless Re: Script don't work - 30/08/04 09:21 PM
How can receive query message only from my friend list?
For example:
I have a list of my friends and when these friends send to me a query i receive regular, of course from option on dialog on off.
With this option in on i receive only message query from these friends on the list, the other users received on query " Sorry but im busy!"
With this option in off i receive message query from everyone.

Thanks a lot
Homeless
Posted By: NightChillz Re: Script don't work - 01/09/04 02:55 AM
You can do something like this:

on *:open:?:*:{
if (!$IsFriend($nick) && $AcceptFromFriendsOnly) {
query $nick Sorry $nick $+ , But I'm Busy ATM!
close -m $nick
}
}

$IsFriend would be your alias to return if the nick who queried you is a friend or not bassed on the passed in nickname.

$AcceptFromFriendsOnly would be your alias to return if your options to ignore others is enabled or not.

The above statement checks to see if:

A: The nick is not a friend,

And

B: The Option To Ignore Queries From Non-Friends Is Enabled

If so, the user is sent a message, and the query window closed!

It is up to you to create those aliases accordingly to your requirement, or you may choose to do it a totaly different way!


Hope it helps

- Chris
Posted By: Iori Re: Script don't work - 01/09/04 05:19 AM
Err, in that case you should use
Code:
on [color:red]^[/color]*:open:?:{ 
  if (!$IsFriend($nick) &amp;&amp; $AcceptFromFriendsOnly) { 
    [color:red].msg[/color] $nick Sorry $nick $+ , But I'm Busy ATM! 
    [color:red]halt[/color]
  }
}
to stop the window opening completely, rather than opening/closing it.
Posted By: Iori Re: Script don't work - 01/09/04 05:31 AM
Code:
on ^*:open:?:{ 
  if %stop == A &amp;&amp; !$hget(fdlist,$nick) { 
    if !$eval($+(%,query.,$site),2) {
      .msg $nick Hallo $nick ask to talk to me in a channel. I'm not accepting private massages from you
 
      ; this var simply limits your auto-message to the same user to once every 15 seconds
      inc -u15 %query. $+ %site
    }
    halt
  }
}
© mIRC Discussion Forums