yvesman
Messages postés13Date d'inscriptionsamedi 17 janvier 2004StatutMembreDernière intervention24 décembre 2007 8 déc. 2007 à 12:19
voila
bonjour
j'ai essaye de reprendre le script en mettant tout en readini
le probleme est que si il ecrit bien le writeini il le lis mal ou inversement bref c'est pas encore au point
je suis pret a toute remarque pour ameliorations
( niveau : c'est mon tout 1er remote )
if ( $login($address($nick,2),*!* ) !isin ( $readini barmanlogin.ini,PSEUDO,$login($address($nick),*!*))) {
.writeini -n barmanlogin.ini PSEUDO $login($address($nick,2),*!*))
.writeini -n barmanlogin.ini THUNES $nick %argent 500
.writeini -n barmanlogin.ini ON-OFF $ok $login($address($nick,2),*!*)) == ON
.notice $nick tu as été enregistré(e) à l'adresse : $mask($nick) tu as été accredité(e) de %argent euros
.notice $nick les commandes generales sont !aboire !amanger !autre !selogguer
}
else { /notice $nick en panne << ! >> }
}
On *:text:*!login*:#test: {
if ( $readini(barmanonoff.ini,ON-OFF,$ok $login($address($nick,2),*!*)) == ON ) { .notice $nick ERREUR tu es deja loggué(e) | /return }
if ( $readini(barmanlogin.ini,PSEUDO,$login($address($nick,2),*!*)) == $null ) { .notice $nick ERREUR tu n'es pas enregistré(e) tape !recording pour t'enregistrer | /return }
elseif ( $readini(barmanlogin.ini,ON-OFF,$ok $login($address($nick,2),*!*)) == OFF ) {
.writeini -n barmanlogin.ini ON-OFF $ok $login($address($nick,2),*!*)) == ON
.notice $nick tu maintenant loggué(e) amuse toi bien :) }
}
on *:text:*!logout:#test:{
if ( readini(barmanlogin.ini,PSEUDO,$login($address($nick,2),*!*)) != $null ) { .notice $nick ERREUR tu n'es pas loggué(e) | /return }
if ( readini(barmanlogin.ini,ON-OFF,$ok $login($address($nick,2),*!*)) == ON ) {
.remini armanlogin.ini ON-OFF $ok$login($address($nick,2),*!*)) == ON )
.writeini barmanonoff.ini ON-OF F $ok $login($address($nick,2),*!*)) == OFF }
if ( $readini(barmanonlogin.ini,ON-OFF,$ok $login($address($nick,2),*!*)) == OFF ) .notice $nick Vous n'êtes plus identifié }
}
on *:part:#test:{
if ($readini(barmalogin.ini,ON-OFF,$ok $login($address($nick,2),*!*)) == OFF ) { /return }
if ( $readini(barmanonlogin.ini,ON-OFF,$ok $login($address($nick,2),*!*)) == ON ) {
.remini armanlogin.ini ON-OFF $ok $login($address($nick,2),*!*)) == ON )
.writeini barmanlogin.ini ON-OFF $ok $login($address($nick,2),*!*)) == OFF ) .notice $nick Vous n'êtes plus identifié a $me
}
On *:text:*!aide*:#test:{
.notice $nick les commandes sont regroupées dans !aboire !amanger !autres !selogguer
}
On *:text:*!aboire*:#test:{
.notice $nick les commandes sont !eau !biere !vin !vodka !whisky
}
On *:text:*!amanger*:#test:{
.notice $nick les commandes sont !sandwich !pizza !mms !gateau !glace
}
On *:text:*!autre*:#test:{
.notice $nick les commandes sont !chance !donner
}
On *:text:*!selogguer*:#test:{
.notice $nick les commandes sont !register !login !logout !money
}
on *:text:*!money:#test:{
.notice $nick $nick il te reste %argent sur ton compte
}
on *:text:*!coca:#test:{
if ( $readini barmanlogin.ini,ON-OFF,$ok $login($address($nick,2),*!*)) == OFF ) { .notice $nick ERREUR tu n'es pas loggué(e) tape /login pour te logguer | /return }
if ( $readini barmanlogin.ini,THUNES,$nick,%argent < 5 ) { .notice $nick ERREUR tu n'es pas assez riche | /return }
else { .writeini barmanlogin.ini,THUNES,$nick,%argent -5
.msg #test donne à $nick un coca bien frais
.notice $nick ce coca coute la somme de 5 euros qui seront prélevés sur ton compte
}
}
}
RCA ArKanis
Messages postés1287Date d'inscriptionmercredi 21 avril 2004StatutMembreDernière intervention21 février 2009 8 déc. 2007 à 13:41
.remini armanlogin.ini ON-OFF $ok$login($address($nick,2),*!*)) == ON )
.writeini barmanonoff.ini ON-OF F $ok $login($address($nick,2),*!*)) == OFF }
if ( $readini(barmanonlogin.ini,ON-OFF,$ok $login($address($nick,2),*!*)) == OFF ) .notice $nick Vous n'êtes plus identifié }
vire la } à la fin
le $ok, c'est quoi ? j'suis pratiquement sûr que tu peux l'enlever ...
le $login également, et idem pour == ...
utilise 1 au lieu de ON et 0 au lieu de OFF
ces lignes deviennent :
.remini armanlogin.ini ON-OFF $address($nick,2) 1
.writeini barmanonoff.ini ON-OFF $address($nick,2) 0
if (!$readini(barmanonlogin.ini,ON-OFF,$address($nick,2))) .notice $nick Vous n'êtes plus identifié
tu refais ceci pour tout ce qui y ressemble, ça devrait déjà mieux fonctionner
tu as une } en trop à la fin du code
renvoie le code une fois modifié
Vous n’avez pas trouvé la réponse que vous recherchez ?
yvesman
Messages postés13Date d'inscriptionsamedi 17 janvier 2004StatutMembreDernière intervention24 décembre 2007 8 déc. 2007 à 23:40
On *:text:*!register*:#test: {
if ($readini(barmanlogin.ini,PSEUDO,($address $nick))) .notice $nick ERREUR tu est deja enregistré(e)
if (! $readini(barmanlogin.ini,PSEUDO,($address $nick)))
.writeini -n barmanlogin.ini PSEUDO ($address($nick,2))
.writeini -n barmanlogin.ini THUNES $nick %argent == 500
.writeini -n barmanlogin.ini ON-OFF ($address($nick,2)) 1
.notice $nick tu as été enregistré(e) à l'adresse : $address($nick,2) tu as été accredité(e) de %argent euros
.notice $nick les commandes generales sont !aboire !amanger !autre !selogguer
}
else /notice $nick en panne << ! >>
}
On *:text:*!login*:#test: {
if ($readini(barmanonoff.ini,ON-OFF,$address($nick,2))) .notice $nick ERREUR tu es deja loggué(e) | /return
if (!$readini(barmanlogin.ini,PSEUDO,$address($nick,2))) .notice $nick ERREUR tu n'es pas enregistré(e) tape !recording pour t'enregistrer | /return
elseif (!$readini(barmanlogin.ini,ON-OFF,$address($nick,2)))
.writeini -n barmanlogin.ini ON-OFF ($address($nick,2)) 1
.notice $nick tu maintenant loggué(e) amuse toi bien :)
}
on *:text:*!logout:#test:{
if (!$readini(barmanlogin.ini,ON-OFF,$address($nick,2))) .notice $nick ERREUR tu n'es pas loggué(e) | /return
if ($readini(barmanlogin.ini,ON-OFF,$address($nick,2)))
.remini barmanlogin.ini ON-OFF $address($nick,2) 1
.writeini barmanlogin.ini ON-OFF $address($nick,2) 0
if (! $readini(barmanonlogin.ini,ON-OFF,$address($nick,2))) .notice $nick Vous n'êtes plus identifié(e)
}
on *:part:#test:{
if (!$readini(barmalogin.ini,ON-OFF,$address($nick,2),*!*))) /return
if ($readini(barmanonlogin.ini,ON-OFF,$address($nick,2)))
.remini armanlogin.ini ON-OFF $address($nick,2) 1
.writeini barmanlogin.ini ON-OFF $address($nick,2) 0
.notice $nick Vous n'êtes plus identifié a $me
}
On *:text:*!aide*:#test:{
.notice $nick les commandes sont regroupées dans !aboire !amanger !autres !selogguer
}
On *:text:*!aboire*:#test:{
.notice $nick les commandes sont !eau !biere !vin !vodka !whisky
}
On *:text:*!amanger*:#test:{
.notice $nick les commandes sont !sandwich !pizza !mms !gateau !glace
}
On *:text:*!autre*:#test:{
.notice $nick les commandes sont !chance !donner
}
On *:text:*!selogguer*:#test:{
.notice $nick les commandes sont !register !login !logout !money
}
on *:text:*!money:#test:{
.notice $nick $nick il te reste %argent sur ton compte
}
on *:text:*!coca:#test:{
if ($readini barmanlogin.ini,ON-OFF $address($nick,2)) .notice $nick ERREUR tu n'es pas loggué(e) tape /login pour te logguer | /return
if ($readini barmanlogin.ini,THUNES,$nick,%argent < 5 ) .notice $nick ERREUR tu n'es pas assez riche | /return
else .writeini barmanlogin.ini THUNES,$nick %argent -5
.msg #test donne à $nick un coca bien frais
.notice $nick ce coca coute la somme de 5 euros qui seront prélevés sur ton compte
}