ItemEvents.tooltip(event=>{
    let colorfulnames=[
        {
            id:'magnatas_original:boson_magnata',
            name:"Boson Magnata",
            nodes:[[255,255,0],[0,255,255],[255,0,255]],
            length:5,
            time:1
        }
    ]
    for(let i=0;i<colorfulnames.length;i++){
        let cname=colorfulnames[i];
        event.addAdvanced(cname.id, (item, advanced, text) => {
            let offset=Math.floor(Client.player.age/cname.time)%(cname.nodes.length*cname.length);
            let namearray=cname.name.split("");
            let coloredname=[];
            for(let j=0;j<namearray.length;j++){
                let pos=(j+offset)%(cname.nodes.length*cname.length)
                let newcolor=0;
                for(let k=0;k<3;k++){
                    newcolor+=(Math.pow(256,2-k)*
                    (
                        cname.nodes[Math.floor(pos/cname.length)%cname.nodes.length][k]+
                        Math.floor(
                            ((cname.nodes[(Math.floor(pos/cname.length)+1)%cname.nodes.length][k]-
                            cname.nodes[Math.floor(pos/cname.length)%cname.nodes.length][k])/cname.length)
                            *(pos%cname.length)
                        )
                    )
                    )
                }
                coloredname.push(Text.of(namearray[j]).color(newcolor))
            }
        text.set(0,coloredname);
        })
    }
})
ItemEvents.tooltip(event=>{
    let colorfulnames=[
        {
            id:'magnatas_original:essencia_magnata',
            name:"Essencia Magnata",
            nodes:[[255,255,0],[0,255,255],[255,0,255]],
            length:5,
            time:1
        }
    ]
    for(let i=0;i<colorfulnames.length;i++){
        let cname=colorfulnames[i];
        event.addAdvanced(cname.id, (item, advanced, text) => {
            let offset=Math.floor(Client.player.age/cname.time)%(cname.nodes.length*cname.length);
            let namearray=cname.name.split("");
            let coloredname=[];
            for(let j=0;j<namearray.length;j++){
                let pos=(j+offset)%(cname.nodes.length*cname.length)
                let newcolor=0;
                for(let k=0;k<3;k++){
                    newcolor+=(Math.pow(256,2-k)*
                    (
                        cname.nodes[Math.floor(pos/cname.length)%cname.nodes.length][k]+
                        Math.floor(
                            ((cname.nodes[(Math.floor(pos/cname.length)+1)%cname.nodes.length][k]-
                            cname.nodes[Math.floor(pos/cname.length)%cname.nodes.length][k])/cname.length)
                            *(pos%cname.length)
                        )
                    )
                    )
                }
                coloredname.push(Text.of(namearray[j]).color(newcolor))
            }
        text.set(0,coloredname);
        })
    }
})
ItemEvents.tooltip(event=>{
    let colorfulnames=[
        {
            id:'magnatas_original:fragmento_magnata',
            name:"Fragmento Magnata",
            nodes:[[255,255,0],[0,255,255],[255,0,255]],
            length:5,
            time:1
        }
    ]
    for(let i=0;i<colorfulnames.length;i++){
        let cname=colorfulnames[i];
        event.addAdvanced(cname.id, (item, advanced, text) => {
            let offset=Math.floor(Client.player.age/cname.time)%(cname.nodes.length*cname.length);
            let namearray=cname.name.split("");
            let coloredname=[];
            for(let j=0;j<namearray.length;j++){
                let pos=(j+offset)%(cname.nodes.length*cname.length)
                let newcolor=0;
                for(let k=0;k<3;k++){
                    newcolor+=(Math.pow(256,2-k)*
                    (
                        cname.nodes[Math.floor(pos/cname.length)%cname.nodes.length][k]+
                        Math.floor(
                            ((cname.nodes[(Math.floor(pos/cname.length)+1)%cname.nodes.length][k]-
                            cname.nodes[Math.floor(pos/cname.length)%cname.nodes.length][k])/cname.length)
                            *(pos%cname.length)
                        )
                    )
                    )
                }
                coloredname.push(Text.of(namearray[j]).color(newcolor))
            }
        text.set(0,coloredname);
        })
    }
})
ItemEvents.tooltip(event=>{
    let colorfulnames=[
        {
            id:'magnatas_original:manuscrito_magnata',
            name:"Manuscrito Magnata",
            nodes:[[255,255,0],[0,255,255],[255,0,255]],
            length:5,
            time:1
        }
    ]
    for(let i=0;i<colorfulnames.length;i++){
        let cname=colorfulnames[i];
        event.addAdvanced(cname.id, (item, advanced, text) => {
            let offset=Math.floor(Client.player.age/cname.time)%(cname.nodes.length*cname.length);
            let namearray=cname.name.split("");
            let coloredname=[];
            for(let j=0;j<namearray.length;j++){
                let pos=(j+offset)%(cname.nodes.length*cname.length)
                let newcolor=0;
                for(let k=0;k<3;k++){
                    newcolor+=(Math.pow(256,2-k)*
                    (
                        cname.nodes[Math.floor(pos/cname.length)%cname.nodes.length][k]+
                        Math.floor(
                            ((cname.nodes[(Math.floor(pos/cname.length)+1)%cname.nodes.length][k]-
                            cname.nodes[Math.floor(pos/cname.length)%cname.nodes.length][k])/cname.length)
                            *(pos%cname.length)
                        )
                    )
                    )
                }
                coloredname.push(Text.of(namearray[j]).color(newcolor))
            }
        text.set(0,coloredname);
        })
    }
})
ItemEvents.tooltip(event=>{
    let colorfulnames=[
        {
            id:'magnatas_original:runa_magnata',
            name:"Runa Magnata",
            nodes:[[255,255,0],[0,255,255],[255,0,255]],
            length:5,
            time:1
        }
    ]
    for(let i=0;i<colorfulnames.length;i++){
        let cname=colorfulnames[i];
        event.addAdvanced(cname.id, (item, advanced, text) => {
            let offset=Math.floor(Client.player.age/cname.time)%(cname.nodes.length*cname.length);
            let namearray=cname.name.split("");
            let coloredname=[];
            for(let j=0;j<namearray.length;j++){
                let pos=(j+offset)%(cname.nodes.length*cname.length)
                let newcolor=0;
                for(let k=0;k<3;k++){
                    newcolor+=(Math.pow(256,2-k)*
                    (
                        cname.nodes[Math.floor(pos/cname.length)%cname.nodes.length][k]+
                        Math.floor(
                            ((cname.nodes[(Math.floor(pos/cname.length)+1)%cname.nodes.length][k]-
                            cname.nodes[Math.floor(pos/cname.length)%cname.nodes.length][k])/cname.length)
                            *(pos%cname.length)
                        )
                    )
                    )
                }
                coloredname.push(Text.of(namearray[j]).color(newcolor))
            }
        text.set(0,coloredname);
        })
    }
})
ItemEvents.tooltip(event=>{
    let colorfulnames=[
        {
            id:'magnatas_original:grimorio_magnata',
            name:"Grimorio Magnata",
            nodes:[[255,255,0],[0,255,255],[255,0,255]],
            length:5,
            time:1
        }
    ]
    for(let i=0;i<colorfulnames.length;i++){
        let cname=colorfulnames[i];
        event.addAdvanced(cname.id, (item, advanced, text) => {
            let offset=Math.floor(Client.player.age/cname.time)%(cname.nodes.length*cname.length);
            let namearray=cname.name.split("");
            let coloredname=[];
            for(let j=0;j<namearray.length;j++){
                let pos=(j+offset)%(cname.nodes.length*cname.length)
                let newcolor=0;
                for(let k=0;k<3;k++){
                    newcolor+=(Math.pow(256,2-k)*
                    (
                        cname.nodes[Math.floor(pos/cname.length)%cname.nodes.length][k]+
                        Math.floor(
                            ((cname.nodes[(Math.floor(pos/cname.length)+1)%cname.nodes.length][k]-
                            cname.nodes[Math.floor(pos/cname.length)%cname.nodes.length][k])/cname.length)
                            *(pos%cname.length)
                        )
                    )
                    )
                }
                coloredname.push(Text.of(namearray[j]).color(newcolor))
            }
        text.set(0,coloredname);
        })
    }
})
ItemEvents.tooltip(event=>{
    let colorfulnames=[
        {
            id:'magnatas_original:cristal_magnata',
            name:"Cristal Magnata",
            nodes:[[255,255,0],[0,255,255],[255,0,255]],
            length:5,
            time:1
        }
    ]
    for(let i=0;i<colorfulnames.length;i++){
        let cname=colorfulnames[i];
        event.addAdvanced(cname.id, (item, advanced, text) => {
            let offset=Math.floor(Client.player.age/cname.time)%(cname.nodes.length*cname.length);
            let namearray=cname.name.split("");
            let coloredname=[];
            for(let j=0;j<namearray.length;j++){
                let pos=(j+offset)%(cname.nodes.length*cname.length)
                let newcolor=0;
                for(let k=0;k<3;k++){
                    newcolor+=(Math.pow(256,2-k)*
                    (
                        cname.nodes[Math.floor(pos/cname.length)%cname.nodes.length][k]+
                        Math.floor(
                            ((cname.nodes[(Math.floor(pos/cname.length)+1)%cname.nodes.length][k]-
                            cname.nodes[Math.floor(pos/cname.length)%cname.nodes.length][k])/cname.length)
                            *(pos%cname.length)
                        )
                    )
                    )
                }
                coloredname.push(Text.of(namearray[j]).color(newcolor))
            }
        text.set(0,coloredname);
        })
    }
})
ItemEvents.tooltip(event=>{
    let colorfulnames=[
        {
            id:'magnatas_original:circuito_magnata',
            name:"Circuito Magnata",
            nodes:[[255,255,0],[0,255,255],[255,0,255]],
            length:5,
            time:1
        }
    ]
    for(let i=0;i<colorfulnames.length;i++){
        let cname=colorfulnames[i];
        event.addAdvanced(cname.id, (item, advanced, text) => {
            let offset=Math.floor(Client.player.age/cname.time)%(cname.nodes.length*cname.length);
            let namearray=cname.name.split("");
            let coloredname=[];
            for(let j=0;j<namearray.length;j++){
                let pos=(j+offset)%(cname.nodes.length*cname.length)
                let newcolor=0;
                for(let k=0;k<3;k++){
                    newcolor+=(Math.pow(256,2-k)*
                    (
                        cname.nodes[Math.floor(pos/cname.length)%cname.nodes.length][k]+
                        Math.floor(
                            ((cname.nodes[(Math.floor(pos/cname.length)+1)%cname.nodes.length][k]-
                            cname.nodes[Math.floor(pos/cname.length)%cname.nodes.length][k])/cname.length)
                            *(pos%cname.length)
                        )
                    )
                    )
                }
                coloredname.push(Text.of(namearray[j]).color(newcolor))
            }
        text.set(0,coloredname);
        })
    }
})
ItemEvents.tooltip(event=>{
    let colorfulnames=[
        {
            id:'magnatas_original:magnata_supremo',
            name:"MAGNATA SUPREMO",
            nodes:[[255,255,0],[0,255,255],[255,0,255]],
            length:5,
            time:1
        }
    ]
    for(let i=0;i<colorfulnames.length;i++){
        let cname=colorfulnames[i];
        event.addAdvanced(cname.id, (item, advanced, text) => {
            let offset=Math.floor(Client.player.age/cname.time)%(cname.nodes.length*cname.length);
            let namearray=cname.name.split("");
            let coloredname=[];
            for(let j=0;j<namearray.length;j++){
                let pos=(j+offset)%(cname.nodes.length*cname.length)
                let newcolor=0;
                for(let k=0;k<3;k++){
                    newcolor+=(Math.pow(256,2-k)*
                    (
                        cname.nodes[Math.floor(pos/cname.length)%cname.nodes.length][k]+
                        Math.floor(
                            ((cname.nodes[(Math.floor(pos/cname.length)+1)%cname.nodes.length][k]-
                            cname.nodes[Math.floor(pos/cname.length)%cname.nodes.length][k])/cname.length)
                            *(pos%cname.length)
                        )
                    )
                    )
                }
                coloredname.push(Text.of(namearray[j]).color(newcolor))
            }
        text.set(0,coloredname);
        })
    }
})