mIRC Home    About    Download    Register    News    Help

Print Thread
Page 1 of 2 1 2
Help me.. #3242 23/12/02 08:23 PM
Joined: Dec 2002
Posts: 477
Deep3D Offline OP
Fjord artisan
OP Offline
Fjord artisan
Joined: Dec 2002
Posts: 477
I did make a simpel auto voice system, if i type .gaz <nick>
in the channel, then it "/set %gaz. $+ $nick" that works fine.

But the on join, it voices everybody. is it somthing wrong
whit the "if $nick == %gaz. $+ $nick"?

if $chan == #gazstation.no {
if $nick == %gaz. $+ $nick {
/mode $chan +v $nick
}
}

Re: Help me.. #3243 23/12/02 10:25 PM
Joined: Dec 2002
Posts: 1,922
O
Online Offline
Hoopy frood
Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,922
Try one of these:

1. %gaz. [ $+ [ $nick ] ]
2. $eval($+(%,gaz,$nick),2)

Re: Help me.. #3244 23/12/02 11:58 PM
Joined: Dec 2002
Posts: 477
Deep3D Offline OP
Fjord artisan
OP Offline
Fjord artisan
Joined: Dec 2002
Posts: 477
ohh, thanks..

Re: Help me.. #3245 24/12/02 12:26 AM
Joined: Dec 2002
Posts: 477
Deep3D Offline OP
Fjord artisan
OP Offline
Fjord artisan
Joined: Dec 2002
Posts: 477
i scripted a new one, mutch better.. grin

if $chan == #gazstation.no {
if $nick == $read(gaz.txt, w, * $+ $nick $+ *) {
/mode $chan +v $nick
}
}

Re: Help me.. #3246 24/12/02 02:01 AM
Joined: Dec 2002
Posts: 1,321
H
Hammer Offline
Hoopy frood
Offline
Hoopy frood
H
Joined: Dec 2002
Posts: 1,321
About your original post:
Code:

on @*:JOIN:#gazstation.no: if ($+(%,gaz.,$nick)) mode $chan +v $nick

The reason this works is that it will check to see if that variable has been set (doesn't matter what its value is): if so, voice them.


DALnet: #HelpDesk and #m[color:#FF0000]IR[color:#EEEE00]C
Re: Help me.. #3247 24/12/02 02:33 AM
Joined: Dec 2002
Posts: 477
Deep3D Offline OP
Fjord artisan
OP Offline
Fjord artisan
Joined: Dec 2002
Posts: 477
Can you help whit this config dialog? In my dialog you can write your nick, name, user id and bla bla. But how to get it to set the nick and everything when i click done?

Code:
  
dialog config {
  title "The Reactor Script - Configure"
  size -1 -1 164 58
  option dbu
  edit "", 1, 34 2 35 10, limit 9
  text "Nick Name:", 2, 3 3 28 8
  text "Alternative:", 3, 3 14 30 8
  edit "", 4, 34 13 35 10, limit 9
  text "Away Nick:", 5, 3 25 28 8
  edit "", 6, 34 24 35 10, limit 9
  text "Real Name:", 7, 3 36 28 8
  edit "", 8, 34 35 35 10, limit 9
  text "User ID:", 9, 3 47 22 8
  edit "", 10, 34 46 35 10, limit 9
  box "Undernet CService", 11, 72 2 90 34
  text "Username:", 12, 77 12 28 8
  text "Password:", 13, 77 23 25 8
  edit "", 14, 108 11 48 10
  edit "", 15, 108 22 48 10, pass
  button "Done", 17, 74 42 40 10, flat ok
  button "Cancle", 20, 120 42 40 10, flat cancel
}

Re: Help me.. #3248 24/12/02 02:42 AM
Joined: Dec 2002
Posts: 1,321
H
Hammer Offline
Hoopy frood
Offline
Hoopy frood
H
Joined: Dec 2002
Posts: 1,321
Since your OK button is ID number 17, you would use:
Code:

on *:DIALOG:config:sclick:17:{
  ;  Save all your data in here however you like:
  ;    %variables using /set
  ;    flat file  using /write
  ;    INI file   using /writeini
  ;    hash table using /hadd
  ;
  ;  For example:
  set %config.Nickname $did($dname,1)
  set %config.Alternative $did($dname,4)
  set %config.AwayNick $did($dname,6)
  set %config.RealName $did($dname,8)
  set %config.UserID $did($dname,10)
  set %config.Undernet.CService.Username $did($dname,14)
  set %config.Undernet.CService.Password $did($dname,15)
}


Last edited by Hammer; 24/12/02 03:14 AM.

DALnet: #HelpDesk and #m[color:#FF0000]IR[color:#EEEE00]C
Re: Help me.. #3249 24/12/02 02:43 AM
Joined: Dec 2002
Posts: 477
Deep3D Offline OP
Fjord artisan
OP Offline
Fjord artisan
Joined: Dec 2002
Posts: 477
nice, thanks alot.. grin

Re: Help me.. #3250 24/12/02 02:51 AM
Joined: Dec 2002
Posts: 477
Deep3D Offline OP
Fjord artisan
OP Offline
Fjord artisan
Joined: Dec 2002
Posts: 477
humm, i feel kind of stupid.. but, i dident get it to work.. blush

Code:
 on *:DIALOG:config:sclick:17: {
  /set $nick &lt;what here?&gt;
} 

Re: Help me.. #3251 24/12/02 02:53 AM
Joined: Dec 2002
Posts: 3,138
C
Collective Offline
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,138
1. You can't set $nick
2. If you wanted to save the value of edit box 10 you would do /set %variablename $did(10)

Re: Help me.. #3252 24/12/02 02:59 AM
Joined: Dec 2002
Posts: 477
Deep3D Offline OP
Fjord artisan
OP Offline
Fjord artisan
Joined: Dec 2002
Posts: 477
like, $did(2) since .."Nick Name:", 2.. or? ohh god, am not got at dialog. this is the first time am really trying to make a dialog.. am using dstudio..

Code:
on *:DIALOG:config:sclick:17: {
  /set %dag $did(2)
}

Re: Help me.. #3253 24/12/02 03:04 AM
Joined: Dec 2002
Posts: 3,138
C
Collective Offline
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,138
If you wanted to save the value of the box next to "Nick Name:" to the variable %dag you would use:
Code:
on *:DIALOG:config:sclick:17:{  
  set %dag $did(1)
}


Since in your dialog the edit box next to "Nick Name:" is id 1.

Re: Help me.. #3254 24/12/02 03:13 AM
Joined: Dec 2002
Posts: 477
Deep3D Offline OP
Fjord artisan
OP Offline
Fjord artisan
Joined: Dec 2002
Posts: 477
Omg, i dont get it to work.... are there somthing wrong?! or what.. i dont get this..

Re: Help me.. #3255 24/12/02 03:16 AM
Joined: Dec 2002
Posts: 3,138
C
Collective Offline
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,138
What I just posted works, I tested it. Put it iin your remotes, open the dialog, type something into the box next to the text "Nick Name:" and click the button labled "Done".

Whatever you put into the text box has now been saved as the variable %dag.

Re: Help me.. #3256 24/12/02 03:18 AM
Joined: Dec 2002
Posts: 477
Deep3D Offline OP
Fjord artisan
OP Offline
Fjord artisan
Joined: Dec 2002
Posts: 477
Ok, i type /dialog -m name config and write somthing in all the box's, and click done. Then nothing happens.. i don't know whats wrong..

Re: Help me.. #3257 24/12/02 03:24 AM
Joined: Dec 2002
Posts: 3,138
C
Collective Offline
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,138
All that script does is save a variable, what you do with that variable is up to you. E.g you could make it
Code:
on *:DIALOG:config:sclick:17:{
  set %dag $did(1)
  nick %dag
}

to make it change your name to whatever you put in the Nick Name edit box.

Re: Help me.. #3258 24/12/02 03:28 AM
Joined: Dec 2002
Posts: 477
Deep3D Offline OP
Fjord artisan
OP Offline
Fjord artisan
Joined: Dec 2002
Posts: 477
it don't work... I open the variable window, and %dag it remains empty..

%dag

nothing...

Re: Help me.. #3259 24/12/02 03:29 AM
Joined: Dec 2002
Posts: 3,138
C
Collective Offline
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,138
Make sure you put something into the text box, because it works fine for me.

Re: Help me.. #3260 24/12/02 03:32 AM
Joined: Dec 2002
Posts: 477
Deep3D Offline OP
Fjord artisan
OP Offline
Fjord artisan
Joined: Dec 2002
Posts: 477
yes, am put somthing in to all the text box, i testet it on normal mirc 6.03 and my script that runs at 6.03.. nothing happens.. it dont work over here..

Re: Help me.. #3261 24/12/02 03:34 AM
Joined: Dec 2002
Posts: 3,138
C
Collective Offline
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,138
I have just noticed, you will need to type /dialog -m config config for it to work.

Page 1 of 2 1 2