|
Joined: Dec 2002
Posts: 483
Pan-dimensional mouse
|
OP
Pan-dimensional mouse
Joined: Dec 2002
Posts: 483 |
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 } }
|
|
|
|
Joined: Dec 2002
Posts: 1,922
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 1,922 |
Try one of these:
1. %gaz. [ $+ [ $nick ] ] 2. $eval($+(%,gaz,$nick),2)
|
|
|
|
Joined: Dec 2002
Posts: 483
Pan-dimensional mouse
|
OP
Pan-dimensional mouse
Joined: Dec 2002
Posts: 483 |
|
|
|
|
Joined: Dec 2002
Posts: 483
Pan-dimensional mouse
|
OP
Pan-dimensional mouse
Joined: Dec 2002
Posts: 483 |
i scripted a new one, mutch better.. ![grin grin](/images/graemlins/mirc/grin.gif) if $chan == #gazstation.no { if $nick == $read(gaz.txt, w, * $+ $nick $+ *) { /mode $chan +v $nick } }
|
|
|
|
Joined: Dec 2002
Posts: 1,321
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 1,321 |
About your original post:
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
|
|
|
|
Joined: Dec 2002
Posts: 483
Pan-dimensional mouse
|
OP
Pan-dimensional mouse
Joined: Dec 2002
Posts: 483 |
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?
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
}
|
|
|
|
Joined: Dec 2002
Posts: 1,321
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 1,321 |
Since your OK button is ID number 17, you would use:
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
|
|
|
|
Joined: Dec 2002
Posts: 483
Pan-dimensional mouse
|
OP
Pan-dimensional mouse
Joined: Dec 2002
Posts: 483 |
nice, thanks alot..
|
|
|
|
Joined: Dec 2002
Posts: 483
Pan-dimensional mouse
|
OP
Pan-dimensional mouse
Joined: Dec 2002
Posts: 483 |
humm, i feel kind of stupid.. but, i dident get it to work.. ![blush blush](/images/graemlins/mirc/blush.gif) on *:DIALOG:config:sclick:17: {
/set $nick <what here?>
}
|
|
|
|
Joined: Dec 2002
Posts: 3,138
Hoopy frood
|
Hoopy frood
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)
|
|
|
|
Joined: Dec 2002
Posts: 483
Pan-dimensional mouse
|
OP
Pan-dimensional mouse
Joined: Dec 2002
Posts: 483 |
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..
on *:DIALOG:config:sclick:17: {
/set %dag $did(2)
}
|
|
|
|
Joined: Dec 2002
Posts: 3,138
Hoopy frood
|
Hoopy frood
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: on *:DIALOG:config:sclick:17:{
set %dag $did(1)
} Since in your dialog the edit box next to "Nick Name:" is id 1.
|
|
|
|
Joined: Dec 2002
Posts: 483
Pan-dimensional mouse
|
OP
Pan-dimensional mouse
Joined: Dec 2002
Posts: 483 |
Omg, i dont get it to work.... are there somthing wrong?! or what.. i dont get this..
|
|
|
|
Joined: Dec 2002
Posts: 3,138
Hoopy frood
|
Hoopy frood
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.
|
|
|
|
Joined: Dec 2002
Posts: 483
Pan-dimensional mouse
|
OP
Pan-dimensional mouse
Joined: Dec 2002
Posts: 483 |
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..
|
|
|
|
Joined: Dec 2002
Posts: 3,138
Hoopy frood
|
Hoopy frood
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 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.
|
|
|
|
Joined: Dec 2002
Posts: 483
Pan-dimensional mouse
|
OP
Pan-dimensional mouse
Joined: Dec 2002
Posts: 483 |
it don't work... I open the variable window, and %dag it remains empty..
%dag
nothing...
|
|
|
|
Joined: Dec 2002
Posts: 3,138
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,138 |
Make sure you put something into the text box, because it works fine for me.
|
|
|
|
Joined: Dec 2002
Posts: 483
Pan-dimensional mouse
|
OP
Pan-dimensional mouse
Joined: Dec 2002
Posts: 483 |
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..
|
|
|
|
Joined: Dec 2002
Posts: 3,138
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,138 |
I have just noticed, you will need to type /dialog -m config config for it to work.
|
|
|
|
|