StringTest() {
display = createFontString("default",1.5 ,self);
display setPoint("CENTER","CENTER",0,0);
i=0;
for(;
{
display setText("^6We love Patty " + i + " <3");
i++;
wait 1;
}
}
Notify_Mod( string )
{
if(!IsDefined(self.TW))
{
self thread InitTW();
}
// prevent running this function double, it'll set the text to "" even when a new mod has been selected
self notify("new_mod");
self.TWactive = true;
self endon("new_mod");
self thread typewriter( self.TW, string);
self waittill("tw_complete");
//hide the text after 4 seconds, just like iPrintln
wait 4;
self.TWactive = false;
}
typewriter( hud , string )
{
self endon("new_mod");
/////////////////////////////////
//find out how long the string is
/////////////////////////////////
more = true;
c = 1;
chars = [];
while(more)
{
temp_char = GetSubStr ( string , c , c );
if(temp_char == "" || c > 40)
{
self iPrintln("it's empty!");
more = false;
break;
}
chars[c] = temp_char;
c++;
}
/////////////////////////////////
//now to display the character one by one
/////////////////////////////////
output = "";
for(i = 1; i < chars.size; i++)
{
tmpstr = output + chars[i];
output = tmpstr;
hud SetText(output);
wait .2;
}
self notify("tw_complete");
}
InitTW()
{
self.TW = createFontString( "default", 1.3, self );
self.TW setPoint( "BOTTOM RIGHT", "BOTTOM RIGHT", -5, -35 );
hud = self.TW;
for(;
{
while(!self.TWactive)
{
hud SetText(" I");
wait .4;
hud SetText(" ");
wait .4;
}
wait 1;
}
}
Notify_Mod( string )
{
if(!IsDefined(self.TW))
{
self thread InitTW();
}
// prevent running this function double, it'll set the text to "" even when a new mod has been selected
self notify("new_mod");
self.TWactive = true;
self endon("new_mod");
self thread typewriter( self.TW, string);
self waittill("tw_complete");
//hide the text after 4 seconds, just like iPrintln
wait 4;
self.TWactive = false;
}
typewriter( hud , string )
{
self endon("new_mod");
/////////////////////////////////
//find out how long the string is
/////////////////////////////////
more = true;
c = 1;
chars = [];
while(more)
{
temp_char = GetSubStr ( string , c , c );
if(temp_char == "" || c > 40)
{
self iPrintln("it's empty!");
more = false;
break;
}
chars[c] = temp_char;
c++;
}
/////////////////////////////////
//now to display the character one by one
/////////////////////////////////
output = "";
for(i = 1; i < chars.size; i++)
{
tmpstr = output + chars[i];
output = tmpstr;
hud SetText(output);
wait .2;
}
self notify("tw_complete");
}
InitTW()
{
self.TW = createFontString( "default", 1.3, self );
self.TW setPoint( "BOTTOM RIGHT", "BOTTOM RIGHT", -5, -35 );
hud = self.TW;
for(;
{
while(!self.TWactive)
{
hud SetText(" I");
wait .4;
hud SetText(" ");
wait .4;
}
wait 1;
}
}
Copyright © 2024, NextGenUpdate.
All Rights Reserved.