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 02-05-2002, 08:34 PM
mhermher mhermher is offline
galase galase!
mhermher's Avatar
Join Date: Jun 2001
Location: Sweden, Stockholm.
Posts: 2,012
mhermher is on a distinguished road
Send a message via ICQ to mhermher Send a message via AIM to mhermher Send a message via Yahoo to mhermher
Help me please.

hi, how can i make a NPC like a sign... if my acc say news <news here>

adn if i thouch the sign after it says the news...
i can do that btu i need to knwo how to do like
that the text will fit in the sing so it uses #b adn also if i say news testing rox
it will check how many tokencounts i use... well can i get any help? that if i saw news <news here> it will make the sign say what i sad if someone thouch it

PS: I remember lady midnight or Grim post about this
__________________
Donate money for my trip to Germany

Adiarde Manager
Reply With Quote
  #2  
Old 02-05-2002, 08:57 PM
btedji btedji is offline
bryan986
btedji's Avatar
Join Date: Apr 2001
Location: Force 10
Posts: 1,153
btedji is on a distinguished road
Send a message via ICQ to btedji Send a message via AIM to btedji Send a message via Yahoo to btedji
//if you account is <account>
if(strequals(#a,<account>)){do this}

I dont have time to explain posting thing right now but maybe later
Reply With Quote
  #3  
Old 02-05-2002, 09:12 PM
mhermher mhermher is offline
galase galase!
mhermher's Avatar
Join Date: Jun 2001
Location: Sweden, Stockholm.
Posts: 2,012
mhermher is on a distinguished road
Send a message via ICQ to mhermher Send a message via AIM to mhermher Send a message via Yahoo to mhermher
Quote:
Originally posted by btedji
//if you account is <account>
if(strequals(#a,<account>)){do this}

I dont have time to explain posting thing right now but maybe later
lol thats the easyest script ever.. i know that already but how to do abotu that posting that the text comes to the sign?adn if the text is long enough for the sign use #b how to do that?
__________________
Donate money for my trip to Germany

Adiarde Manager
Reply With Quote
  #4  
Old 02-05-2002, 10:00 PM
btedji btedji is offline
bryan986
btedji's Avatar
Join Date: Apr 2001
Location: Force 10
Posts: 1,153
btedji is on a distinguished road
Send a message via ICQ to btedji Send a message via AIM to btedji Send a message via Yahoo to btedji
You could use make wordwrap then show the sign like this

for(i=0;i<tokenscount;i++){
setstring news,#s(news)#b#t(i);
}

say2 #s(news);

dont know if that would work
Reply With Quote
  #5  
Old 02-05-2002, 10:39 PM
mhermher mhermher is offline
galase galase!
mhermher's Avatar
Join Date: Jun 2001
Location: Sweden, Stockholm.
Posts: 2,012
mhermher is on a distinguished road
Send a message via ICQ to mhermher Send a message via AIM to mhermher Send a message via Yahoo to mhermher
Quote:
Originally posted by Kaimetsu
Hmm. Normally wraptext would be used, but signs require just a single string to be passed to them. I shrug. Personally, I'd advise you not to use say2.
Well hwo shall i make ti?
Can you help
And whast wraptext?
__________________
Donate money for my trip to Germany

Adiarde Manager
Reply With Quote
  #6  
Old 02-05-2002, 10:52 PM
TDK_RC6 TDK_RC6 is offline
Registered User
TDK_RC6's Avatar
Join Date: Jan 2002
Location: Earth
Posts: 0
TDK_RC6 is on a distinguished road
setstring trunicates #b
__________________
Staff on Renegade


email: [email protected]
aim: papivicente
Reply With Quote
  #7  
Old 02-06-2002, 12:01 AM
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
Wel there are many ways, all of which suck. Since if a string contains #b it does not parse it in signs, so instead it shows #b, kinda like with a few things in java. So what I suggest is 2 things:
1.) String arrays. Like you could make multiple news posts...not too sure about that.
2.) Use #e(start,end,string) with showimg, like so
NPC Code:

// The maximum characters per line:
this.linesize = 25;
// The news string size:
this.max = strlen(#s(server.news))
// The number of lines:
this.lines = this.max/this.linesize;
for (i=0; i<this.lines; i++; ) {
showimg i+500,@#e(i*this.linesize,(i*this.linesize)+this.l inesize),5,100+(i*10);
changeimgvis i+500,4;
changeimgzoom i+500,.5;
}



its retarded and stuff, but it works...
__________________

!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
  #8  
Old 02-06-2002, 12:06 AM
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
Could u make ur profile on the left smaller? Its making me crazy at school with my 640X480 Screen...
__________________

!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
  #9  
Old 02-06-2002, 03:59 AM
btedji btedji is offline
bryan986
btedji's Avatar
Join Date: Apr 2001
Location: Force 10
Posts: 1,153
btedji is on a distinguished road
Send a message via ICQ to btedji Send a message via AIM to btedji Send a message via Yahoo to btedji
It probably would be best to use showimg
Reply With Quote
  #10  
Old 02-06-2002, 04:22 AM
TDK_RC6 TDK_RC6 is offline
Registered User
TDK_RC6's Avatar
Join Date: Jan 2002
Location: Earth
Posts: 0
TDK_RC6 is on a distinguished road
what is this warptext thing you speak of
__________________
Staff on Renegade


email: [email protected]
aim: papivicente
Reply With Quote
  #11  
Old 02-06-2002, 05:56 AM
btedji btedji is offline
bryan986
btedji's Avatar
Join Date: Apr 2001
Location: Force 10
Posts: 1,153
btedji is on a distinguished road
Send a message via ICQ to btedji Send a message via AIM to btedji Send a message via Yahoo to btedji
Quote:
Originally posted by TDK_RC6
what is this warptext thing you speak of
New feature,

take a look in newfeatures2001.txt
Reply With Quote
  #12  
Old 02-06-2002, 06:35 AM
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
ooh, *looks at newfeatures2001.txt*
__________________

!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
  #13  
Old 02-06-2002, 08:59 AM
TDK_RC6 TDK_RC6 is offline
Registered User
TDK_RC6's Avatar
Join Date: Jan 2002
Location: Earth
Posts: 0
TDK_RC6 is on a distinguished road
i knew i forgot to do something :S
__________________
Staff on Renegade


email: [email protected]
aim: papivicente
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 11:47 PM.


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