Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Help me please. (https://forums.graalonline.com/forums/showthread.php?t=23111)

mhermher 02-05-2002 08:34 PM

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

btedji 02-05-2002 08:57 PM

//if you account is <account>
if(strequals(#a,<account>)){do this}

I dont have time to explain posting thing right now but maybe later

mhermher 02-05-2002 09:12 PM

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?

btedji 02-05-2002 10:00 PM

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

mhermher 02-05-2002 10:39 PM

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?

TDK_RC6 02-05-2002 10:52 PM

setstring trunicates #b

Saga2001 02-06-2002 12:01 AM

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...

Saga2001 02-06-2002 12:06 AM

Could u make ur profile on the left smaller? Its making me crazy at school with my 640X480 Screen...

btedji 02-06-2002 03:59 AM

It probably would be best to use showimg

TDK_RC6 02-06-2002 04:22 AM

what is this warptext thing you speak of

btedji 02-06-2002 05:56 AM

Quote:

Originally posted by TDK_RC6
what is this warptext thing you speak of
New feature,

take a look in newfeatures2001.txt

Saga2001 02-06-2002 06:35 AM

ooh, *looks at newfeatures2001.txt*

TDK_RC6 02-06-2002 08:59 AM

i knew i forgot to do something :S


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

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