Accueil > > > SCRIPT DE PICKUP
SCRIPT DE PICKUP
Information sur la source
Description
Un script de pickup pour jeux en ligne (Cs...), 5 contre 5. Il gère tous les évènements qui interfèrent dans le pickup: part, quit, kick, changement de nick (malgrés un petit bug là dessus que je n'ai pas corrigé il faut que je cherche; il faut que la fenêtre active lors d'un !add sois celle du salon en question)... Utilisation des variables et des hashs tables.
Source
- on *:join:%chan:{
- if (%pickok == on) {
- notice $nick Un pickup est en cours sur %chan pour y participer tappez !add
- }
- }
- on *:text:pass*:?:{
- if ($nick isop %chan) {
- set %pass $$2
- msg $nick Ok, pass du serveur enregistré: %pass
- }
- else {
- msg $nick Erreur ! Vous n'êtes pas opérateur de %chan
- }
- }
- on *:text:!pickup*:#:{
- if ($nick isop $chan) {
- set %chan $chan
- set %map $$2
- set %serveur $3
- set %stopic $chan($chan).topic
- set %pickok on
- topic $chan Pickup Lancé - Team A: En attente de joueurs tappez !add - Team B: En attente de joueurs tappez !add - Serveur: %serveur - Map: %map
- notice $nick Définissez le mot de pass sur le serveur puis tappez /msg $me pass LeMotDePass
- msg %chan Pickup lancé en attente de joueurs tappez !add pour y participer
- }
- }
- on *:text:!stop:#:{
- if ($nick isop $chan) {
- msg $chan Pickup annulé.
- topic $chan %stopic
- hfree -sw *team*
- set %pickok off
- unset %team*
- unset %pass
- unset %serveur
- }
- }
- alias stop {
- hfree -sw *team*
- set %pickok off
- unset %team*
- unset %pass
- unset %serveur
- }
-
- on *:text:!add:#:{
- if (%pickok == on) {
- if (($hget(teama,0).item < 5) && ($hfind(teama,$nick,0) == 0)) {
- hadd -m teama $nick
- mode $chan +v $nick
- msg $chan $nick ajouté à la team A
- var %a = $hget(teama,0).item, %i = 1
- while (%i <= %a) {
- set %teama %teama $hget(teama,%i).item
- inc %i
- }
- topic %chan Pickup Lancé - Team A: %teama - Team B: %teamb - Serveur: %serveur - Map: %map
- }
- else {
- if (($hget(teama,0).item < 5) && ($hfind(teama,$nick,0) == 0) && ($hfind(teamb,$nick,0) == 0)) {
- hadd -m teamb $nick
- mode $chan +v $nick
- msg $chan $nick ajouté à la team B
- var %a = $hget(teamb,0).item, %i = 1
- while (%i <= %a) {
- set %teamb %teamb $hget(teamb,%i).item
- inc %i
- }
- topic %chan Pickup Lancé - Team A: %teama - Team B: %teamb - Serveur: %serveur - Map: %map
- }
- else {
- if (($hget(teama,0).item == 5) && ($hget(teamb,0).item == 5)) {
- msg $chan Pickup complet sur %serveur les participants vont recevoir le mot de pass en privé.
- topic %chan %stopic
- send.pass
- stop
- }
- }
- }
- }
- else {
- msg $chan Désolé pas de pickup en cours.
- }
- }
-
-
- on *:text:!remove:#:{
- if ($hfind(teama,$nick,0) != 0) {
- hdel -s teama $nick
- msg $chan $nick à été retiré du pickup.
- mode $chan -v $nick
- set %teama $replace(%teama, $nick, $chr(0))
- }
- elseif ($hfind(teamb,$nick,0) != 0) {
- hdel -s teamb $nick
- msg $chan $nick à été retiré du pickup.
- mode $chan -v $nick
- set %teamb $replace(%teamb, $nick, $chr(0))
- }
- else {
- msg $chan $nick vous n'êtes pas dans le pickup en cours.
- }
- }
- on *:part:%chan:{
- if ($hfind(teama,$nick,0) != 0) {
- hdel -s teama $nick
- set %teama $replace(%teama, $nick, $chr(0))
- msg $chan $nick à été retiré du pickup.
- }
- elseif ($hfind(teamb,$nick,0) != 0) {
- hdel -s teamb $nick
- set %teamb $replace(%teamb, $nick, $chr(0))
- msg $chan $nick à été retiré du pickup.
- }
- }
-
- on *:quit:%chan:{
- if ($hfind(teama,$nick,0) != 0) {
- hdel -s teama $nick
- set %teama $replace(%teama, $nick, $chr(0))
- msg $chan $nick à été retiré du pickup.
- }
- elseif ($hfind(teamb,$nick,0) != 0) {
- hdel -s teamb $nick
- set %teamb $replace(%teamb, $nick, $chr(0))
- msg $chan $nick à été retiré du pickup.
- }
- }
- on *:kick:%chan:{
- if ($hfind(teama,$knick,0) != 0) {
- hdel -s teama $nick
- set %teama $replace(%teama, $nick, $chr(0))
- msg $chan $knick à été retiré du pickup.
- }
- elseif ($hfind(teamb,$knick,0) != 0) {
- hdel -s teamb $nick
- set %teamb $replace(%teamb, $nick, $chr(0))
- msg $chan $knick à été retiré du pickup.
- }
- }
- on *:NICK:{
- if ($active != Status Window) {
- if ($hfind(teama,$nick,0) != 0) {
- hdel -s teama $nick
- hadd -m teama $newnick
- set %teama $replace(%teama, $nick, $chr(0))
- set %teama %teama $newnick
- msg %chan Pseudo de $nick changé en $newnick dans le pickup.
- }
- elseif ($hfind(teamb,$nick,0) != 0) {
- hdel -s teamb $nick
- hadd -m teamb $newnick
- set %teamb $replace(%teamb, $nick, $chr(0))
- set %teamb %teamb $newnick
- msg %chan Pseudo de $nick changé en $newnick dans le pickup.
- }
- }
- else {
- msg %chan /!\Attention/!\ veuillez modfifier la fenêtre en cours qui est: $active
- }
- }
-
- alias send.pass {
- var %a = $hget(teama,0).item, %i = 1
- while (%i <= %a) {
- msg $hget(teama,%i).item Le pickup va commencer, ip: %serveur Pass: %pass Gogogo !
- inc %i
- }
- var %a = $hget(teamb,0).item, %i = 1
- while (%i <= %a) {
- msg $hget(teamb,%i).item Le pickup va commencer, ip: %serveur Pass: %pass Gogogo !
- inc %i
- }
- }
on *:join:%chan:{
if (%pickok == on) {
notice $nick Un pickup est en cours sur %chan pour y participer tappez !add
}
}
on *:text:pass*:?:{
if ($nick isop %chan) {
set %pass $$2
msg $nick Ok, pass du serveur enregistré: %pass
}
else {
msg $nick Erreur ! Vous n'êtes pas opérateur de %chan
}
}
on *:text:!pickup*:#:{
if ($nick isop $chan) {
set %chan $chan
set %map $$2
set %serveur $3
set %stopic $chan($chan).topic
set %pickok on
topic $chan Pickup Lancé - Team A: En attente de joueurs tappez !add - Team B: En attente de joueurs tappez !add - Serveur: %serveur - Map: %map
notice $nick Définissez le mot de pass sur le serveur puis tappez /msg $me pass LeMotDePass
msg %chan Pickup lancé en attente de joueurs tappez !add pour y participer
}
}
on *:text:!stop:#:{
if ($nick isop $chan) {
msg $chan Pickup annulé.
topic $chan %stopic
hfree -sw *team*
set %pickok off
unset %team*
unset %pass
unset %serveur
}
}
alias stop {
hfree -sw *team*
set %pickok off
unset %team*
unset %pass
unset %serveur
}
on *:text:!add:#:{
if (%pickok == on) {
if (($hget(teama,0).item < 5) && ($hfind(teama,$nick,0) == 0)) {
hadd -m teama $nick
mode $chan +v $nick
msg $chan $nick ajouté à la team A
var %a = $hget(teama,0).item, %i = 1
while (%i <= %a) {
set %teama %teama $hget(teama,%i).item
inc %i
}
topic %chan Pickup Lancé - Team A: %teama - Team B: %teamb - Serveur: %serveur - Map: %map
}
else {
if (($hget(teama,0).item < 5) && ($hfind(teama,$nick,0) == 0) && ($hfind(teamb,$nick,0) == 0)) {
hadd -m teamb $nick
mode $chan +v $nick
msg $chan $nick ajouté à la team B
var %a = $hget(teamb,0).item, %i = 1
while (%i <= %a) {
set %teamb %teamb $hget(teamb,%i).item
inc %i
}
topic %chan Pickup Lancé - Team A: %teama - Team B: %teamb - Serveur: %serveur - Map: %map
}
else {
if (($hget(teama,0).item == 5) && ($hget(teamb,0).item == 5)) {
msg $chan Pickup complet sur %serveur les participants vont recevoir le mot de pass en privé.
topic %chan %stopic
send.pass
stop
}
}
}
}
else {
msg $chan Désolé pas de pickup en cours.
}
}
on *:text:!remove:#:{
if ($hfind(teama,$nick,0) != 0) {
hdel -s teama $nick
msg $chan $nick à été retiré du pickup.
mode $chan -v $nick
set %teama $replace(%teama, $nick, $chr(0))
}
elseif ($hfind(teamb,$nick,0) != 0) {
hdel -s teamb $nick
msg $chan $nick à été retiré du pickup.
mode $chan -v $nick
set %teamb $replace(%teamb, $nick, $chr(0))
}
else {
msg $chan $nick vous n'êtes pas dans le pickup en cours.
}
}
on *:part:%chan:{
if ($hfind(teama,$nick,0) != 0) {
hdel -s teama $nick
set %teama $replace(%teama, $nick, $chr(0))
msg $chan $nick à été retiré du pickup.
}
elseif ($hfind(teamb,$nick,0) != 0) {
hdel -s teamb $nick
set %teamb $replace(%teamb, $nick, $chr(0))
msg $chan $nick à été retiré du pickup.
}
}
on *:quit:%chan:{
if ($hfind(teama,$nick,0) != 0) {
hdel -s teama $nick
set %teama $replace(%teama, $nick, $chr(0))
msg $chan $nick à été retiré du pickup.
}
elseif ($hfind(teamb,$nick,0) != 0) {
hdel -s teamb $nick
set %teamb $replace(%teamb, $nick, $chr(0))
msg $chan $nick à été retiré du pickup.
}
}
on *:kick:%chan:{
if ($hfind(teama,$knick,0) != 0) {
hdel -s teama $nick
set %teama $replace(%teama, $nick, $chr(0))
msg $chan $knick à été retiré du pickup.
}
elseif ($hfind(teamb,$knick,0) != 0) {
hdel -s teamb $nick
set %teamb $replace(%teamb, $nick, $chr(0))
msg $chan $knick à été retiré du pickup.
}
}
on *:NICK:{
if ($active != Status Window) {
if ($hfind(teama,$nick,0) != 0) {
hdel -s teama $nick
hadd -m teama $newnick
set %teama $replace(%teama, $nick, $chr(0))
set %teama %teama $newnick
msg %chan Pseudo de $nick changé en $newnick dans le pickup.
}
elseif ($hfind(teamb,$nick,0) != 0) {
hdel -s teamb $nick
hadd -m teamb $newnick
set %teamb $replace(%teamb, $nick, $chr(0))
set %teamb %teamb $newnick
msg %chan Pseudo de $nick changé en $newnick dans le pickup.
}
}
else {
msg %chan /!\Attention/!\ veuillez modfifier la fenêtre en cours qui est: $active
}
}
alias send.pass {
var %a = $hget(teama,0).item, %i = 1
while (%i <= %a) {
msg $hget(teama,%i).item Le pickup va commencer, ip: %serveur Pass: %pass Gogogo !
inc %i
}
var %a = $hget(teamb,0).item, %i = 1
while (%i <= %a) {
msg $hget(teamb,%i).item Le pickup va commencer, ip: %serveur Pass: %pass Gogogo !
inc %i
}
}
Conclusion
Pour l'utiliser: !pickup map serveur puis /msg NomDuBot pass LeMotDePassDuServeur !add pour s'ajouter à une équipe !stop pour arrêter le pickup
Sources du même auteur
Sources de la même categorie
Commentaires et avis
|
Derniers Blogs
UNE JOLIE-HORLOGE ET PAS QU'UN PEU !UNE JOLIE-HORLOGE ET PAS QU'UN PEU ! par neodante
Pour les possesseurs d'iPhone, ça y est Bijin Tokei - qui se traduit littéralement en Français par " Jolie Horloge " - est arrivé et GRATUITEMENT s'il vous plaît ! Après la version Tokyo, Hokkaido, night club, racing, Gal, "pour les mademoiselles'", . voi...
Cliquez pour lire la suite de l'article par neodante TECHDAYS PARIS 2010 : CONNECTEZ VOS DONNéES à SHAREPOINT 2010 AVEC LES BUSINESS CONNECTIVITY SERVICESTECHDAYS PARIS 2010 : CONNECTEZ VOS DONNéES à SHAREPOINT 2010 AVEC LES BUSINESS CONNECTIVITY SERVICES par ROMELARD Fabrice
Animé par: Gaetan Bouveret et Julien Chomarat Business Connectivity Services (BCS) est dans SharePoint 2010 la version 2 de Business Data Catalog (BDC dans SharePoint 2007). Il s'agit de la solution permettant de visualiser des données provenan...
Cliquez pour lire la suite de l'article par ROMELARD Fabrice [DIVERS] SUIVRE VOS SéRIES PRéFéRéS SUR LA TOILE[DIVERS] SUIVRE VOS SéRIES PRéFéRéS SUR LA TOILE par orion
Comme de nombreux geek, je suis un grand amateur de série TV et je rate régulièrement des épisodes de mes séries préférés. Une solution s'offre à vous avec ce merveilleux site : Tv Gorge - www.tvgorge.com Moteur de recherche à l'appui, vous pouvez ...
Cliquez pour lire la suite de l'article par orion TECHDAYS PARIS 2010 : LA BI DANS SHAREPOINT 2010TECHDAYS PARIS 2010 : LA BI DANS SHAREPOINT 2010 par ROMELARD Fabrice
Animé par: Vincent Bellet et Baptiste Giraudier La BI dans SharePoint 2010, Les nouveaux services d'application dans SP2010 et SQL Server Reporting services 2008 R2. La BI dans SharePoint est généralisée pour tous afin de permettre à tous les coll...
Cliquez pour lire la suite de l'article par ROMELARD Fabrice
Forum
RE : ON RAWMODERE : ON RAWMODE par WorldDMT
Cliquez pour lire la suite par WorldDMT AVERTISSMENT ET KIKKAVERTISSMENT ET KIKK par mouhcine951990
Cliquez pour lire la suite par mouhcine951990
Logiciels
DB-MAIN (9.1.0)DB-MAIN (9.1.0)DB-MAIN is a data-modeling and data-architecture tool. It is designed to help developers and anal... Cliquez pour télécharger DB-MAIN Xilisoft DPG Convertisseur (5.1.37.0120)XILISOFT DPG CONVERTISSEUR (5.1.37.0120)Xilisoft DPG Convertisseur offre aux fans de Nintendo DS une bonne solution leur permettant de dé... Cliquez pour télécharger Xilisoft DPG Convertisseur GraphicsGale (2.01.01)GRAPHICSGALE (2.01.01)GraphicsGale est un logiciel de PixelArt avec de nombreuse fonctionnalités permettant de réalisé ... Cliquez pour télécharger GraphicsGale Architecte 3D (Platinum 2010)ARCHITECTE 3D (PLATINUM 2010)Architecte 3D Platinium vous permet de concevoir facilement les plans votre future maison, de l'é... Cliquez pour télécharger Architecte 3D TeamViewer 5 (TeamViewer 5)TEAMVIEWER 5 (TEAMVIEWER 5)Dépanner un ami,expliquer une manipulation devient un jeu d'enfant.
Prise en main d'un autre ord... Cliquez pour télécharger TeamViewer 5
|