Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Text Writer! (https://forums.graalonline.com/forums/showthread.php?t=25262)

Deadly_Killer 03-08-2002 07:40 AM

Text Writer!
 
I have a text writer. Can someone fix it and take tokenize and put something else in like strings?
NPC Code:

if (playerenters) {toweapons Text Writer;
}
if (strequals(#c,Text on)) {set text;
if (text) {setplayerprop#c,;
tokenize #s(server.text);
showimg 555,@verdana@#c,50,500;
changeimgvis 555,6;
changeimgzoom 555,0.65;
}
}


screen_name 03-08-2002 07:49 AM

use this variables

and it doesnt even seem like you are using the tokens produced by tokenize, so why dont you just take it out

Deadly_Killer 03-08-2002 08:00 AM

how would i work this?

Gohan43331 03-08-2002 10:18 AM

NPC Code:

timereverywhere;
if (playertouchsme) {
toweapons Text npc;
timeout = .05;
this.on=0;
}
if (playerchats && startswith(text:,#c) && this.on==1) {
setstring this.newtext,#n:#e(1,-1,#c);
setplayerprop #c,;
}
if (timeout && this.on=1) {
showimg 555,@Arial@cb@#s(this.newtext),(screenwidth/2-40),(screenheight/2-60);
}
if (weaponfired) {
if (this.on=1) {
this.on=0;
hideimg 555;
} else if (this.on=0) this.on=1;
}


Might work, but then again, might not...

Python523 03-08-2002 10:53 AM

I'm not going to bother testing that but you forgot to set the drawing height, it wont show up on the screen without (by on the screen I mean using screen heights and widths)

neomaximus2k 03-08-2002 03:11 PM

Quote:

Originally posted by Python523
I'm not going to bother testing that but you forgot to set the drawing height, it wont show up on the screen without (by on the screen I mean using screen heights and widths)
neither of your versions work, i shall script one when i get back from work :D

Saga2001 03-08-2002 10:18 PM

Ahhhhh, I am bored, all you want it to do is broadcast it to all players? or just the player who says it? I'll do it as though you want everyone to see it.
NPC Code:

if (playertouchsme) toweapons -Server Broadcast;
if (playerenters) timeout=.05;
if (playerchats&&strtofloat(client.admin)>0) {
if (strequals(#c,Text on)&&!text) set text;
else if (streuqals(#c,Text off)&&text) unset text;
else setstring server.text,#a: #c;
}
if (timeout) {
if (strlen(#s(server.text))>0) {
showimg 750,@#s(server.text),5,100;
changeimgvis 750,4;
} else hideimg 750;
timeout=.05;
}



There, all better?
LOL you probably didn't even want it to do that, but oh well I thought you did, so :p.


All times are GMT +2. The time now is 03:48 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.