Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 03-08-2002, 07:40 AM
Deadly_Killer Deadly_Killer is offline
Registered User
Join Date: Feb 2002
Posts: 227
Deadly_Killer is on a distinguished road
Post 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;
}
}

__________________
- Zidane / Zidaya
Reply With Quote
  #2  
Old 03-08-2002, 07:49 AM
screen_name screen_name is offline
is watching you
Join Date: Mar 2002
Location: The 3rd Dimension
Posts: 2,160
screen_name is on a distinguished road
Send a message via AIM to screen_name Send a message via MSN to screen_name
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
__________________
[signature]insert here[/signature]
Reply With Quote
  #3  
Old 03-08-2002, 08:00 AM
Deadly_Killer Deadly_Killer is offline
Registered User
Join Date: Feb 2002
Posts: 227
Deadly_Killer is on a distinguished road
how would i work this?
__________________
- Zidane / Zidaya
Reply With Quote
  #4  
Old 03-08-2002, 10:18 AM
Gohan43331 Gohan43331 is offline
Registered User
Join Date: Jan 2002
Posts: 87
Gohan43331 is on a distinguished road
Send a message via AIM to Gohan43331
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...
Reply With Quote
  #5  
Old 03-08-2002, 10:53 AM
Python523 Python523 is offline
Banned
Join Date: Aug 2001
Location: Illinois
Posts: 3,498
Python523 is on a distinguished road
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)
Reply With Quote
  #6  
Old 03-08-2002, 03:11 PM
neomaximus2k neomaximus2k is offline
Registered User
Join Date: Feb 2002
Location: UK
Posts: 324
neomaximus2k is on a distinguished road
Send a message via ICQ to neomaximus2k
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
__________________
Beware of thy Inner self
NPC Code:

_.,.__
((o\\o\))
.-. ` \\``
__( )___.o"".,___
=== ~~~~~~~~
==
= Neo

Reply With Quote
  #7  
Old 03-08-2002, 10:18 PM
Saga2001 Saga2001 is offline
Wishing he had 3 feet
Join Date: Aug 2001
Location: Basement
Posts: 1,565
Saga2001 is on a distinguished road
Send a message via ICQ to Saga2001 Send a message via AIM to Saga2001 Send a message via Yahoo to Saga2001
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 .
__________________

!Wan ( 11:27:55 AM):
can i c ur scripts please?
Zorg (RC): If I hear NPC Server call Ne0, Past Austin or Brent sexy one more time im disconnecting it
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 07:37 AM.


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