begin process at 2010 03 14 15:59:53
  Trouver un code source :
 
dans
 
Accueil > 

Code

 > 

Divers

 > STATISTIQUES D'UN SALON

STATISTIQUES D'UN SALON


 Information sur la source

Note :
5,8 / 10 - par 5 personnes
5,80 / 10

  • 1

  • 2

  • 3

  • 4

  • 5

  • 6

  • 7

  • 8

  • 9

  • 10
Catégorie :Divers Niveau :Débutant Date de création :07/03/2004 Vu :4 237

Auteur : ReMi34

Ecrire un message privé
Site perso
Commentaire sur cette source (15)
Ajouter un commentaire et/ou une note

 Description

Il s'agit d'un dialog qui vous montre les différentes statistiques du salon actif.
Vous avez le choix entre une version avec ou sans MDX.

Source

  • ;-----------------------------
  • ; - Statistiques d'un salon -
  • ; By Re[M]i_34
  • ; Version Avec MDX
  • ;-----------------------------
  • dialog stat {
  • title "- Statistiques - Re[M]i_34"
  • size -1 -1 149 136
  • option dbu
  • list 1, 3 8 62 112, size
  • box "Nicks présents :", 2, 1 0 67 134
  • text "Nb de Ops :", 3, 72 9 33 8, center
  • edit "", 4, 107 8 39 10, read center
  • text "Pourcentage :", 5, 68 20 38 8, center
  • edit "", 6, 107 19 39 10, read center
  • text "Nb de Voices :", 7, 71 39 37 8, center
  • edit "", 8, 109 38 39 10, read center
  • text "Pourcentage :", 9, 70 50 38 8, center
  • edit "", 10, 109 49 39 10, read center
  • edit "", 12, 108 68 39 10, read center
  • text "Nb de Halfops :", 11, 70 69 37 8, center
  • edit "", 14, 108 79 39 10, read center
  • text "Pourcentage :", 13, 69 80 38 8, center
  • text "Total :", 15, 6 123 22 8, center
  • edit "", 16, 31 122 29 10, read
  • button "- Fermer -", 17, 110 122 36 12, ok
  • button "- Actualiser -", 18, 71 122 36 12
  • edit "", 19, 108 98 39 10, read center
  • text "Pourcentage :", 20, 69 110 38 8, center
  • edit "", 21, 108 109 39 10, read center
  • text "Réguliers :", 22, 70 99 37 8, center
  • }
  • alias stats dialog -m stat stat
  • alias yahoo { if (!$1) { halt } | var %a = 0, %aa = $nick($1,0) | while (%aa > %a) { inc %a 1 | did -a stat 1 $nick($1,%a) } }
  • on *:dialog:stat:*:*:{
  • if $devent == init {
  • did -a stat 4 $nick($active,0,o)
  • did -a stat 6 $calc($nick($active,0,o) / $nick($active,0) * 100) $+ %
  • did -a stat 8 $nick($active,0,v)
  • did -a stat 10 $calc($nick($active,0,v) / $nick($active,0) * 100) $+ %
  • did -a stat 12 $nick($active,0,h)
  • did -a stat 14 $calc($nick($active,0,h) / $nick($active,0) * 100) $+ %
  • did -a stat 16 $nick($active,0)
  • did -a stat 19 $nick($active,0,r)
  • did -a stat 21 $calc($nick($active,0,r) / $nick($active,0) * 100) $+ %
  • yahoo $active
  • dll mdx.dll SetMircVersion $version
  • dll mdx.dll MarkDialog stat
  • dll mdx.dll SetDialog stat bgcolor $rgb(255,255,255)
  • dll mdx.dll SetColor stat 2,4,6,8,10,12,14,16,19,21 background $rgb(255,255,255)
  • dll mdx.dll SetColor stat 4,6,8,10,12,14,16,19,21 textbg $rgb(255,255,255)
  • dll mdx.dll SetColor stat 3,5,7,9,11,13,15,20,22 background $rgb(255,255,255)
  • dll mdx.dll SetColor stat 3,5,7,9,11,13,15,20,22 textbg $rgb(255,255,255)
  • }
  • if $devent == sclick {
  • if $did == 18 { dialog -x stat | dialog -m stat stat }
  • }
  • }
  • ;-----------------------------
  • ; - Statistiques d'un salon -
  • ; By Re[M]i_34
  • ; Version Sans MDX
  • ;-----------------------------
  • dialog stat {
  • title "- Statistiques - Re[M]i_34"
  • size -1 -1 149 136
  • option dbu
  • list 1, 3 8 62 112, size
  • box "Nicks présents :", 2, 1 0 67 134
  • text "Nb de Ops :", 3, 72 9 33 8, center
  • edit "", 4, 107 8 39 10, read center
  • text "Pourcentage :", 5, 68 20 38 8, center
  • edit "", 6, 107 19 39 10, read center
  • text "Nb de Voices :", 7, 71 39 37 8, center
  • edit "", 8, 109 38 39 10, read center
  • text "Pourcentage :", 9, 70 50 38 8, center
  • edit "", 10, 109 49 39 10, read center
  • edit "", 12, 108 68 39 10, read center
  • text "Nb de Halfops :", 11, 70 69 37 8, center
  • edit "", 14, 108 79 39 10, read center
  • text "Pourcentage :", 13, 69 80 38 8, center
  • text "Total :", 15, 6 123 22 8, center
  • edit "", 16, 31 122 29 10, read
  • button "- Fermer -", 17, 110 122 36 12, ok
  • button "- Actualiser -", 18, 71 122 36 12
  • edit "", 19, 108 98 39 10, read center
  • text "Pourcentage :", 20, 69 110 38 8, center
  • edit "", 21, 108 109 39 10, read center
  • text "Réguliers :", 22, 70 99 37 8, center
  • }
  • alias stats dialog -m stat stat
  • alias yahoo { if (!$1) { halt } | var %a = 0, %aa = $nick($1,0) | while (%aa > %a) { inc %a 1 | did -a stat 1 $nick($1,%a) } }
  • on *:dialog:stat:*:*:{
  • if $devent == init {
  • did -a stat 4 $nick($active,0,o)
  • did -a stat 6 $calc($nick($active,0,o) / $nick($active,0) * 100) $+ %
  • did -a stat 8 $nick($active,0,v)
  • did -a stat 10 $calc($nick($active,0,v) / $nick($active,0) * 100) $+ %
  • did -a stat 12 $nick($active,0,h)
  • did -a stat 14 $calc($nick($active,0,h) / $nick($active,0) * 100) $+ %
  • did -a stat 16 $nick($active,0)
  • did -a stat 19 $nick($active,0,r)
  • did -a stat 21 $calc($nick($active,0,r) / $nick($active,0) * 100) $+ %
  • yahoo $active
  • }
  • if $devent == sclick {
  • if $did == 18 { dialog -x stat | dialog -m stat stat }
  • }
  • }
;-----------------------------
;  - Statistiques d'un salon -
;       By Re[M]i_34
;     Version Avec MDX
;-----------------------------
dialog stat {
  title "- Statistiques - Re[M]i_34"
  size -1 -1 149 136
  option dbu
  list 1, 3 8 62 112, size
  box "Nicks présents :", 2, 1 0 67 134
  text "Nb de Ops :", 3, 72 9 33 8, center
  edit "", 4, 107 8 39 10, read center
  text "Pourcentage :", 5, 68 20 38 8, center
  edit "", 6, 107 19 39 10, read center
  text "Nb de Voices :", 7, 71 39 37 8, center
  edit "", 8, 109 38 39 10, read center
  text "Pourcentage :", 9, 70 50 38 8, center
  edit "", 10, 109 49 39 10, read center
  edit "", 12, 108 68 39 10, read center
  text "Nb de Halfops :", 11, 70 69 37 8, center
  edit "", 14, 108 79 39 10, read center
  text "Pourcentage :", 13, 69 80 38 8, center
  text "Total :", 15, 6 123 22 8, center
  edit "", 16, 31 122 29 10, read
  button "- Fermer -", 17, 110 122 36 12, ok
  button "- Actualiser -", 18, 71 122 36 12
  edit "", 19, 108 98 39 10, read center
  text "Pourcentage :", 20, 69 110 38 8, center
  edit "", 21, 108 109 39 10, read center
  text "Réguliers :", 22, 70 99 37 8, center
}
alias stats dialog -m stat stat
alias yahoo { if (!$1) { halt } | var %a = 0, %aa = $nick($1,0) | while (%aa > %a) { inc %a 1 | did -a stat 1 $nick($1,%a) } }
on *:dialog:stat:*:*:{
  if $devent == init {
    did -a stat 4 $nick($active,0,o)
    did -a stat 6 $calc($nick($active,0,o) / $nick($active,0) * 100) $+ %
    did -a stat 8 $nick($active,0,v)
    did -a stat 10 $calc($nick($active,0,v) / $nick($active,0) * 100) $+ %
    did -a stat 12 $nick($active,0,h)
    did -a stat 14 $calc($nick($active,0,h) / $nick($active,0) * 100) $+ %
    did -a stat 16 $nick($active,0)
    did -a stat 19 $nick($active,0,r)
    did -a stat 21 $calc($nick($active,0,r) / $nick($active,0) * 100) $+ %
    yahoo $active
    dll mdx.dll SetMircVersion $version
    dll mdx.dll MarkDialog stat
    dll mdx.dll SetDialog stat bgcolor $rgb(255,255,255) 
    dll mdx.dll SetColor stat 2,4,6,8,10,12,14,16,19,21 background $rgb(255,255,255) 
    dll mdx.dll SetColor stat 4,6,8,10,12,14,16,19,21 textbg $rgb(255,255,255)
    dll mdx.dll SetColor stat 3,5,7,9,11,13,15,20,22 background $rgb(255,255,255)
    dll mdx.dll SetColor stat 3,5,7,9,11,13,15,20,22 textbg $rgb(255,255,255)
  }
  if $devent == sclick { 
    if $did == 18 { dialog -x stat | dialog -m stat stat }
  }
}

;-----------------------------
;  - Statistiques d'un salon -
;       By Re[M]i_34
;     Version Sans MDX
;-----------------------------
dialog stat {
  title "- Statistiques - Re[M]i_34"
  size -1 -1 149 136
  option dbu
  list 1, 3 8 62 112, size
  box "Nicks présents :", 2, 1 0 67 134
  text "Nb de Ops :", 3, 72 9 33 8, center
  edit "", 4, 107 8 39 10, read center
  text "Pourcentage :", 5, 68 20 38 8, center
  edit "", 6, 107 19 39 10, read center
  text "Nb de Voices :", 7, 71 39 37 8, center
  edit "", 8, 109 38 39 10, read center
  text "Pourcentage :", 9, 70 50 38 8, center
  edit "", 10, 109 49 39 10, read center
  edit "", 12, 108 68 39 10, read center
  text "Nb de Halfops :", 11, 70 69 37 8, center
  edit "", 14, 108 79 39 10, read center
  text "Pourcentage :", 13, 69 80 38 8, center
  text "Total :", 15, 6 123 22 8, center
  edit "", 16, 31 122 29 10, read
  button "- Fermer -", 17, 110 122 36 12, ok
  button "- Actualiser -", 18, 71 122 36 12
  edit "", 19, 108 98 39 10, read center
  text "Pourcentage :", 20, 69 110 38 8, center
  edit "", 21, 108 109 39 10, read center
  text "Réguliers :", 22, 70 99 37 8, center
}
alias stats dialog -m stat stat
alias yahoo { if (!$1) { halt } | var %a = 0, %aa = $nick($1,0) | while (%aa > %a) { inc %a 1 | did -a stat 1 $nick($1,%a) } }
on *:dialog:stat:*:*:{
  if $devent == init {
    did -a stat 4 $nick($active,0,o)
    did -a stat 6 $calc($nick($active,0,o) / $nick($active,0) * 100) $+ %
    did -a stat 8 $nick($active,0,v)
    did -a stat 10 $calc($nick($active,0,v) / $nick($active,0) * 100) $+ %
    did -a stat 12 $nick($active,0,h)
    did -a stat 14 $calc($nick($active,0,h) / $nick($active,0) * 100) $+ %
    did -a stat 16 $nick($active,0)
    did -a stat 19 $nick($active,0,r)
    did -a stat 21 $calc($nick($active,0,r) / $nick($active,0) * 100) $+ %
    yahoo $active
  }
  if $devent == sclick { 
    if $did == 18 { dialog -x stat | dialog -m stat stat }
  }
}

 Conclusion

Voilà, dites moi ce que vous en pensez, je l'ai réalisé seul.
/stats pour l'ouvrir

PS: Je me suis permis d'emprunter l'alias yahoo de SornDrixer (J'espère que tu ne m'en voudras pas trop :))


 Sources du même auteur

Source avec Zip JEU DE LETTRES : TROUVEREZ-VOUS LE MOT JUSTE ?
Source avec Zip Source avec une capture MULTISOCK V2.0
Source avec Zip [TUTORIEL] SOCKETS TCP - LES BASES
Source avec Zip LES BOUCLES WHILE
TESTER SA BANDE PASSANTE

 Sources de la même categorie

AVOIR UNE LISTE D'UTILISATEUR EN COULEURS SELON LEURS SEXE P... par WorldDMT
COMMANDES FANTAISIES ( OP DEOP , VOICE DEVOICE ) ORIGINALES par Orona
Source avec Zip Source avec une capture CORRECTEUR par Orona
Source avec Zip Source avec une capture [DLL] DESSINER COMME LES PICWINS SUR UNE DIALOGBOX (BONUS: J... par uaip
Source avec Zip Source avec une capture [DLL] AJOUT D'UN CONTRÔLE RICHEDIT SCINTILLA SUR LES DIALOG... par uaip

Commentaires et avis

Commentaire de SornDrixer le 07/03/2004 10:42:11 administrateur CS

PS: Je me suis permis d'emprunter l'alias yahoo de SornDrixer (J'espère que tu ne m'en voudras pas trop :))

lol j'avais fais l'alias à la base pour vesparo, nimporte qui a le droit de l'utiliser, c'est rien de bien complexe :P

Dans ton code, je comprends pas pourquoi tu as fait 2 fois le même dialog, un seul aurait suffit, il t'aurait suffit de faire apparaître un input où l'utilisateur choisit si il veut ou non une version avec mdx, puis à l'init du dialog, tu vérifies son choix, et en fonction de ça, tu appliques les commandes /dll .

Rajoute peut-être aussi la possibilité d'actualiser automatiquement.(avec un petit timer, qui se produit toutes les X secondes, où X est choisit par l'utilisateur)

Problème détecté : si on ouvre ton dialog ailleur que dans un channel ? $active ne sera donc pas un channel, et ton code va planter.

un if $left($active,1) != $chr(35) { halt } serait le bienvenue
En clair : si le 1er caractère du title de la fenêtre !active est différent d'un #, alors on halt le script.

Voila, bah sinon c'est bien codé :)

Commentaire de ReMi34 le 07/03/2004 10:56:46

Ok SornDrixer je prends note de tes commentaires que j'appliqueraient plus tard, en raison d'un rapport de stage à faire :'(

Commentaire de Naza le 07/03/2004 14:24:21

Oué c'est pas mal, j'aime bien.
Par contre wé tu aurais dû mettre juste un dialog dans ta source
celle sans mdx.
7/10

Commentaire de t0nt0n le 07/03/2004 14:56:15

He, vous savez quoi les amis? t0nt0n le pro scripteur (joke lol) reprends du service :)!
Bien ta source Remi, mais comme tout le monde te l'a dit et te le dira, un seul dialog aurait suffit! Sinon c'est bien scripter, et ça peut être utile, bravo :)
8/10

Commentaire de ReMi34 le 07/03/2004 15:09:36

Yééééé t0nt0n !

Ben vous avez le choix entre les deux c'est bien nan ?
Lol, sinon merci pour la note :)

Commentaire de deliriumtribu le 07/03/2004 15:37:28

Ca aurai pu etre appronfondi avec systeme d affichage sur le chan etc etc :)

Commentaire de ReMi34 le 07/03/2004 15:47:32

A quoi ça sert de pouvoir le dire aux autres ?

Commentaire de Kerrigan le 07/03/2004 18:49:52

ce qui serait bien ça serait un peu de developpement par que c'est bien mais tu ne vas pas assez au fond des choses
d'ailleur c'est le problème de pas mal de tes sources, on sens que tu peux faire des choses géniales mais a chaque fois il manque un petit truc. Developpe ça un peu rajoute des options...

Commentaire de ReMi34 le 07/03/2004 19:08:28

Merci c'est sympa, en fait je sais que je peut faire plus, mais j'arrive pas !

Sinon, quelles options je pourrais rajouter ?

Commentaire de ChAnG-Fu le 10/03/2004 01:54:37

c basique, élarige le syteme avec des stats de text, mot et sondage

Commentaire de juki_webmaster le 10/03/2004 17:20:12

Eye merci Remi ! avec toi je vien de me faire mon premier dialogue !
Frachement merci !
Sinon pas mal ton dialogue ! frachement pas mal !
Manque : topic et mode .
Sinon pas mal 7/10.

Commentaire de juki_webmaster le 10/03/2004 18:01:46

Voila ma petite version :)


dialog stat {
  title "Info"
  size -1 -1 48 65
  option dbu
  text "OPs :", 1, 2 2 37 8,
  edit "", 2, 25 1 22 9, read center
  text "HOPs :", 3, 2 13 37 8,
  edit "", 4, 25 11 22 9, read center
  text "Voice :", 5, 2 24 37 9,
  edit "", 6, 25 22 22 9, read center
  text "Normal :", 7, 2 35 37 8,
  edit "", 8, 25 33 22 9, read center
  text "Total :", 9, 2 46 37 8,
  edit "", 10, 25 44 22 9, read center
  text "Mode :", 11, 2 57 37 8,
  edit "", 12, 25 55 22 9, read center
  button "- Fermer -", 17, 110 122 36 12, ok
  button "- Actualiser -", 18, 71 122 36 12
}
alias stats dialog -m stat stat
on *:dialog:stat:*:*:{
  if $devent == init {
    did -a stat 2 $nick($active,0,o)
    did -a stat 6 $nick($active,0,v)
    did -a stat 4 $nick($active,0,h)
    did -a stat 10 $nick($active,0)
    did -a stat 8 $nick($active,0,r)
    did -a stat 12 $chan($active).mode
  }
  if $devent == sclick {
    if $did == 18 { dialog -x stat | dialog -m stat stat }
  }
}

Realiser à la main :p

Commentaire de juki_webmaster le 10/03/2004 18:03:10

Excuser moi j'ais oublier de fixer les boutons :p

Commentaire de Diabl0 le 10/03/2004 18:06:23

:)

Commentaire de griffondorr le 09/03/2009 12:20:44

moi j'ai voulu mettre la remote de la source dans mon tglobe et quand je tape /stats sa me marque les stats de mon réseau internet et quand j'essaye de le fermer, sa ferme mon mirc :s

 Ajouter un commentaire




Nos sponsors


Appels d'offres

Sondage...

Comparez les prix

CalendriCode

Mars 2010
LMMJVSD
1234567
891011121314
15161718192021
22232425262728
293031    

Consulter la suite du CalendriCode

Photothèque

 
Développement réalisé par Nicolas SOREL (Nix) avec l'aide de : Cyril DURAND et Emmanuel (EBArtSoft), Merci à Vincent pour ses précieux conseils.
CodeS-SourceS.com© Toute reproduction même partielle est interdite sauf accord écrit du Webmaster
CodeS-SourceS.com© est une marque déposée tous droits réservés

Google Coop CodeS-SourceS Google Coop CodeS-SourceS
Temps d'éxécution de la page : 0,874 sec (3)

Nous contacter | Annoncer sur CodeS-SourceS | Mentions légales