sorry for so many posts buttt.. here is a scrolling message code
it does like this
Hello
Ello H
llo He
lo Hel
and so on. .
you say setscrolltext whatever here
then u say setscrollshow whatever
and setscrollspeed whatever
its used on Unholy Nation so you cant use this code. but you can learn always off of it
NPC Code:
// NPC made by LiquidIce
//only use in Unholy Nation
//SCROLL BOOK!
//variables
//max ammount of chars.
this.charmax=30;
//end variables
if (timeout) {
this.charshow=strtofloat(#s(charshow));
if (this.charloc+this.charshow>strlen(#s(scrolltext)) ) {
this.newbegin=this.charshow-(strlen(#s(scrolltext))-(this.charloc));
setplayerprop #c,#e(this.charloc,strlen(#s(scrolltext))-(this.charloc),#s(scrolltext)) #e(0,this.newbegin,#s(scrolltext));
}
else {
setplayerprop #c,#e(this.charloc,this.charshow,#s(scrolltext));
}
this.charloc+=1;
if (this.charloc>strlen(#s(scrolltext))) { this.charloc=0; }
if (this.enabled=1) { timeout=strtofloat(#s(scrollspeed))*.1; }
}
if (playerenters) {
show;
}
if (playertouchsme) {
toweapons Chat-Scroll;
setstring charshow,10;
setstring scrollspeed,1;
}
if (playerchats&&startswith(setscrollshow,#c)) {
tokenize #c;
if (strtofloat(#t(1))>0&&strtofloat(#t(1))=<25) {
setstring charshow,#T(#t(1));
}
}
if (playerchats&&startswith(setscrollspeed,#c)) {
tokenize #c;
if (strtofloat(#t(1))>0&&strtofloat(#t(1))=<20) {
setstring scrollspeed,#t(1);
}
}
if (weaponfired&&strlen(#s(scrolltext))>0) {
if (this.enabled=0) {
this.enabled=1;
this.charloc=0;
timeout=.05;
}
else {
this.enabled=0;
}
}
if (playerchats&&startswith(setscrolltext,#c)) {
tokenize #c;
if (tokenscount>1) {
setstring scrolltext,#T(#e(14,30,#c));
//trims
this.charloc=0;
this.enabled=0;
}
}