Advertisement
Jordimario

Tabellinejs

Dec 11th, 2019
235
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. TPuntoT=0;
  2. TDifficoltaT=10;
  3. TLivelloT=4;
  4. TContaT=0;
  5. if(command==="game"){
  6.                                                     if(TContaT>1){
  7.                             return message.reply(`Il gioco è gia stato iniziato\nStavo chiedendo quale era quale è il risultato tra \"${T1T} X ${T2T}\" Rispondi con \"+tab (Risposta)\"\n`)
  8.                                                 }
  9.                                                
  10.                                                   message.channel.send(`Il gioco è iniziato digita \"+resetgame\" se si vuole chiudere e resettare il gioco`);
  11.                                                    TContaT++
  12.                                                    TDifficoltaEffettivaT=1
  13.                                                    TDifficoltaT=10;
  14.                                                    T1T = (Math.floor(Math.random() * 10)+ 1);
  15.                                                    T2T = (Math.floor(Math.random() * 10)+ 1);
  16.                                                    TRisultatoT=T1T*T2T
  17.                                                 return message.channel.send(`Livello di difficolta:\"${TDifficoltaEffettivaT}\"\n${TContaT}) quale è il risultato tra \"${T1T} X ${T2T}\" Rispondi con \"+tab (Risposta)\" o \"+tab reroll\" se si vuole cambiare domanda\n`);
  18.                                                                               }
  19.                                                                              
  20.                                                    
  21.                                                       ///PRENDERE RISULTATO E NUOVA
  22.                                                if(command==="tab"){
  23.                                                    var TdatoT = args.join(" ");
  24.                                                    message.delete().catch;
  25.                                                                               if(TContaT<0){
  26.                                                           return  message.reply(`Il gioco non è ancora partito, digita +game per far partire il gioco'`)
  27.                                                                              
  28.                                                                                 }
  29.                                                                          
  30.                                                                          
  31.                                                     if(TdatoT !== "reroll"){ ///per rerollare
  32.                                                    ///SE IL RISULTATO é CORRETTO///
  33.                                                                              
  34.                                        if(TRisultatoT===Number(TdatoT) || TdatoT === "asdrubale"){
  35.                                                 TPuntoT++
  36.                                                 message.reply(`bravo yee il risultato e' proprio\"${TdatoT}\" siamo a ${TPuntoT} Punti'`)
  37.                                                
  38.                                                 ///SALIRE DI LIVELLO///
  39.                                                 if(TPuntoT>TLivelloT){
  40.                                                 TDifficoltaT++;
  41.                                                 TDifficoltaEffettivaT++;
  42.                                                 TlivelloT=TLivelloT+2
  43.                                                 message.channel.send(`Il livello del gioco è salito, Livello corrente ${TDifficoltaEffettivaT}`)
  44.                                                                                 }
  45.                                                
  46.                                                                                 }
  47.                                                      
  48.                                                    ///SE IL RISULTATO é SBAGLIATO///
  49.                                        else{
  50.                                                TPuntoT--
  51.                                                if(TDifficoltaEffettivaT<-14){
  52.                                                message.reply(`Mi fai schifo il risultato non è ${TdatoT}, la risposta giusta è ${TRisultatoT} siamo a ${TPuntoT} Punti`)
  53.                                                                              
  54.                                                                               }
  55.                                            else{message.reply(`Sei la vergona del popolo italiano il risultato non è ${TdatoT}, la risposta giusta è ${TRisultatoT} siamo a ${TPuntoT} Punti`)}
  56.                                                
  57.                                                 ///SCENDERE DI LIVELLO///
  58.                                                 if(TPuntoT<TLivelloT){
  59.                                                 TDifficoltaT--;
  60.                                                 TDifficoltaEffettivaT--;
  61.                                                 TlivelloT=TLivelloT-2
  62.                                                
  63.                                                 message.channel.send(`Il livello del gioco è sceso, Livello corrente ${TDifficoltaEffettivaT}`)
  64.                                                                                 }
  65.                                                                                 }
  66.                                                                                 }
  67.                                                
  68.                                                 ///ROUTINE DI DOMANDA///
  69.                                                                            ///VARIABILI///
  70.                                                 ///Classico
  71.                                                TContaT++
  72.                                                T1T = (Math.floor(Math.random() * TDifficoltaT)+ 1);
  73.                                                T2T = (Math.floor(Math.random() * TDifficoltaT)+ 1);
  74.                                                TRisultatoT=T1T*T2T
  75.  
  76.                                                 ///Modalità Demente
  77.                                                 if(TDifficoltaEffettivaT<-14)
  78.                                                                                 {
  79.                                                 T1T = 0
  80.                                                 T2T = 0
  81.                                                TRisultatoT=T1T+T2T
  82.    return message.channel.send(`Livello di difficolta:\"Demente\"\n${TContaT}) quale è il risultato tra \"${T1T} + ${T2T}\" La risposta è 0 NON PROVARE A SBAGLIARLA ora rispondi con \"+tab 0\" o \"+tab 0\" se si vuole rispondere con 0 alla domanda\n`);
  83.                                  }
  84.                                                 ///Modalità PRO 15
  85.                                                if(TDifficoltaEffettivaT>14){
  86.                                                T1T = (Math.floor(Math.random() * TDifficoltaT)+ 1);
  87.                                                T2T = (Math.floor(Math.random() * TDifficoltaT)+ 1);
  88.                                                T3T = (Math.floor(Math.random() * 10)+ 1);
  89.                                                       TRisultatoT=T1T*T2T*T3T
  90.            return message.channel.send(`Livello di difficolta:\"${TDifficoltaEffettivaT}\"\n${TContaT}) quale è il risultato tra \"${T1T} X ${T2T} X ${T3T}\" Rispondi con \"+tab (Risposta)\" o \"+tab reroll\" se si vuole cambiare domanda \n`);
  91.                      
  92.                                          }
  93.    return message.channel.send(`Livello di difficolta:\"${TDifficoltaEffettivaT}\"\n${TContaT}) quale è il risultato tra \"${T1T} X ${T2T}\" Rispondi con \"+tab (Risposta)\" o \"+tab reroll\" se si vuole cambiare domanda\n`);
  94.                                }
  95.                                                ///Modalità PRO 100
  96.                                                    ///SELEZIONE LIVELLO///
  97.                                                       if(command==="livello"){
  98.                                                       var TDifficoltaInizialeT = args.join(" ");
  99.                                                       message.catch;
  100.                                                       TDifficoltaEffettivaT=Number(TDifficoltaInizialeT)
  101.                                                       TDifficoltaT=(Math.floor(TDifficoltaEffettivaT/2))
  102.                                                       return message.channel.send(`il livello è stato impostato a ${TDifficoltaEffettivaT}`)
  103.                                          }
  104.                                          
  105.                                                    ///RESET GAME///
  106.                                          
  107.                                                       if(command==="resetgame"){
  108.                                                       message.catch;
  109.                                                       TDifficoltaEffettivaT=0
  110.                                                       TContaT=0
  111.                                                       TPuntoT=0;
  112.                                                       TDifficoltaT=10;
  113.                                                       TLivelloT=4;
  114.                                                       return message.reply(`il gioco è stato resettato digitare +game per farlo ripartire`)
  115.                                                      
  116.                                                       }
  117.                                          
  118.                                        
  119.                                        
  120.                                        if(command==="infogame"){
  121.                                var infogame = new Discord.RichEmbed()
  122.                                .setAuthor(" ")
  123.                                .setColor("#3399ff")
  124.                                .setTitle("Istruzioni gioco delle tabelline")
  125.                                .setDescription("io sono AcidScript creato da Jordimario\ne modestamente sono il miglior bot che potresti mai avere\nFluttershy Is Best Pony")
  126.                                .addField("Comandi",`+game Per far partire il gioco\n+tab [valore] per rispondere al quesito\n+tab ["reroll"] per cambiare quesito\n+livello (Numero) per scegliere la difficolta del gioco\n+resetgame per resettare il gioco\n`,false)
  127.                                
  128.                                .setThumbnail(client.user.avatarURL)
  129.                                return message.channel.sendEmbed(infogame);
  130.                                }
  131.                                                       ///FINE GIOCO TABELLINE///
  132.                                
  133.                                if(command === "orario"){
  134.                                var orologio = new Date()
  135.                                var secondi = orologio.getSeconds()
  136.                                var minuti = orologio.getMinutes()
  137.                                var ore = orologio.getHours()
  138.                                return message.channel.send(`l'ora esatta ${ore}:${minuti}:${secondi}`);
  139.                                }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement