Disons que son nom est clair , c'est mon premier bébé script !
Comment l'ameliorer ?
copier le tout ds remote , et taper F7 , et c parti =)
pour ceux qui veule utiliser un son, ajouter un fichier alarme.wav dans le repertoire sounds de votre mirc.
voilou have fun
PS : merci ZL qui ne vera jms ceci mais c lintention qui compte
Source / Exemple :
;----------------------------Anti Pv System-----------------------------
dialog apv {
title "Anti Pv System"
size -1 -1 520 300
option pixels
check "Activer le systeme d'anti-pv", 100, 44 19 250 17
button "Ok", 50, 421 26 65 25, ok
radio "Bloquer tout les pvs", 1, 45 45 246 17
check "Afficher une fenetre contenant le message du pv", 4, 60 71 273 17
check "Message d'indication de bloquage", 9, 60 96 200 17
edit %bmsg, 99, 264 96 212 20, autohs
radio "Me demander ce que je veux faire", 2, 45 123 252 17
check "Afficher un message d'attente :", 5, 60 148 173 17
edit %wamsg, 55, 264 148 212 20, autohs
check "Message si accepter :", 6, 60 172 173 17
edit %wacc, 66, 264 172 212 20
check "Message si refuser :", 7, 60 195 173 17
edit %wref, 77, 264 195 212 20, autohs
radio "Autoriser tout les pvs", 3, 46 227 207 17
check "Jouer un son a l'ouverture ", 15, 60 249 193 17
edit %pvsnd, 1515, 264 244 212 20,read autohs
check "Afficher un message de bienvenue :", 8, 60 269 195 17
edit %wmsg, 88, 264 269 212 20, autohs
box "Anti Pv System", 150, 4 1 513 295
}
dialog -l pv {
title "Message"
size -1 -1 373 177
option pixels
text %a t'envoi ce message :, 1, 40 24 170 17
text %b, 2, 39 49 294 78
button "Accepter", 3, 84 137 65 25,ok
button "Refuser", 4, 201 136 65 25,cancel
box "Message :", 10, 5 6 361 165
}
on *:dialog:*:*:*: {
if ($dname == pv) {
if ($devent == init) { unset %a | unset %b }
if ($devent == sclick) {
if ($did == 3) { if (%wacc) { msg %a %wacc } | unset %a | unset %b }
if ($did == 4) { if (%wref) { msg %a %wref } | close -m %a | unset %a | unset %b }
}
}
if ($dname == apv) {
if ($devent == init ) {
if (%apc) { did -c apv 100 | did -c apv %apc } | else { did -b apv 1,2,3 }
if (%apvw) { did -c apv 4 }
if (%wamsg) { did -c apv 5 }
if (%wacc) { did -c apv 6 }
if (%wref) { did -c apv 7 }
if (%wmsg) { did -c apv 8 }
if (%bmsg) { did -c apv 9 }
if (%pvsnd) { did -c apv 15 }
}
if ($devent == sclick) {
if ($did == 100) { if ($did(100).state) { did -e apv 1,2,3 } | elseif (!$did(100).state) { did -b apv 1,2,3 | unset %apc } }
if ($did == 4) { if ($did(4).state) { set %apvw 1 } | elseif (!$did(4).state) { unset %apvw } }
if ($did == 15) { if ($did(15).state) { set %pvsnd $sfile(c:\) | did -c apv 15 } | elseif (!$did(15).state) { unset %pvsnd | did -u apv 15 } }
if ($did == 1) { set %apc 1 }
if ($did == 2) { set %apc 2 }
if ($did == 3) { set %apc 3 }
}
if ($devent == edit) {
if ($did == 55) { set %wamsg $did(55) }
if ($did == 66) { set %wacc $did(66) }
if ($did == 77) { set %wref $did(77) }
if ($did == 88) { set %wmsg $did(88) }
if ($did == 99) { set %bmsg $did(99) }
}
}
}
alias F7 { dialog -m apv apv }
;-----------------------------On open------------------------
on *:open:?:*: {
if (%apc) {
if (%apc == 1) { haltdef | if (%blok) { msg $nick %blok } | if (%apvw) { window @apv | echo @apv 9,1 $+ $nick a dit $1- } | close -m $nick }
if (%apc == 2) { haltdef | msg $nick %wamsg | set %a $nick | set %b $strip($1-,burc) | dialog -m pv pv }
if (%apc == 3) { msg $nick %wmsg | if (%pvsnd) { splay %pvsnd } }
}
}
;---------------------------------EnD---------------------------------
Conclusion :
Merci a ceux qui le testeront !
Vous n'êtes pas encore membre ?
inscrivez-vous, c'est gratuit et ça prend moins d'une minute !
Les membres obtiennent plus de réponses que les utilisateurs anonymes.
Le fait d'être membre vous permet d'avoir un suivi détaillé de vos demandes et codes sources.
Le fait d'être membre vous permet d'avoir des options supplémentaires.