Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 07-26-2001, 01:42 AM
Louis_one Louis_one is offline
Registered User
Join Date: Jun 2001
Location: Alabama and France
Posts: 113
Louis_one is on a distinguished road
Send a message via ICQ to Louis_one Send a message via AIM to Louis_one Send a message via Yahoo to Louis_one
News Sign

ok once more ....

i have made a lame script :

// NPC made by #Louis (Lame Script)

message News;

if (playerchats&&strequals(#g,guildname)) {

message #n: #c;}

# 1 : first my script is lame ok ....

#2 : i dunno how to use tokenize

So how can i display the chat message in the sign ?

( not in a message over the sign )
__________________

Reply With Quote
  #2  
Old 07-26-2001, 01:53 AM
Torankusu_Fugitive Torankusu_Fugitive is offline
Registered User
Join Date: May 2001
Posts: 8
Torankusu_Fugitive is on a distinguished road
//NPC Modified by Merlin (WIZAD)
if (playerenters) {message News;
}
if (playerchats&&strequals(#g,guildname)) {
setstring server.news,#c;
}
if (playertouchsme) {
message #s(server.news);
}
Reply With Quote
  #3  
Old 07-26-2001, 01:59 AM
grim_squeaker_x grim_squeaker_x is offline
Retired Oldbie
grim_squeaker_x's Avatar
Join Date: Mar 2001
Posts: 3,084
grim_squeaker_x will become famous soon enough
NPC Code:
// NPC made by Lady Midnight
if (created) {
this.maxlinelength=32;
this.lettersusedonline=0;
}
if (playerchats&&strequals(#g,guild)&&startswith(setn ews,#c)) {
tokenize #c;
for (i=1;i<tokenscount;i++) setstring server.news,#t(i);
}
if (playertouchsme) {
setstring player.readingpage,0;
setstring sign.readstring,;
tokenize #s(server.news);
this.lettersusedonline=0;
for (this.i=0;this.i<tokenscount;this.i++) {
this.lettersusedonline+=strlen(#t(this.i))+1;
if (this.lettersusedonline>this.maxlinelength) {
setstring sign.readstring,#s(sign.readstring)" "#t(this.i);
this.lettersusedonline=0+strlen(#t(this.i));
}
else if (this.i==0) setstring sign.readstring,"#t(this.i);
else setstring sign.readstring,#s(sign.readstring) #t(this.i);
}
tokenize #s(sign.readstring);
setstring sign.pages,#v(int((tokenscount-1)/3));
say2 #t(strtofloat(#s(player.readingpage))*3)
#b#t(strtofloat(#s(player.readingpage))*3+1)
#b#t(strtofloat(#s(player.readingpage))*3+2);
}
if (playerendsreading) {
setstring player.readingpage,#v(strtofloat(#s(player.reading page))+1);
if (strtofloat(#s(player.readingpage))<=strtofloat(#s (sign.pages))) {
say2 #t(strtofloat(#s(player.readingpage))*3)
#b#t(strtofloat(#s(player.readingpage))*3+1)
#b#t(strtofloat(#s(player.readingpage))*3+2);
}
}

Is the whole script needed if you want to display an actual sign...
__________________


Last edited by grim_squeaker_x; 07-26-2001 at 02:04 AM..
Reply With Quote
  #4  
Old 07-26-2001, 01:59 AM
Merlin Merlin is offline
Banned
Merlin's Avatar
Join Date: Jul 2001
Location: Merlin - U S A Malak - United Kingdom
Posts: 2,543
Merlin is on a distinguished road
Send a message via ICQ to Merlin Send a message via AIM to Merlin
Why do you need such huge complex scripts if one as simple as mine should work?
Reply With Quote
  #5  
Old 07-26-2001, 02:00 AM
Merlin Merlin is offline
Banned
Merlin's Avatar
Join Date: Jul 2001
Location: Merlin - U S A Malak - United Kingdom
Posts: 2,543
Merlin is on a distinguished road
Send a message via ICQ to Merlin Send a message via AIM to Merlin
Oh duh i forgot about the breaks
Reply With Quote
  #6  
Old 07-26-2001, 02:00 AM
grim_squeaker_x grim_squeaker_x is offline
Retired Oldbie
grim_squeaker_x's Avatar
Join Date: Mar 2001
Posts: 3,084
grim_squeaker_x will become famous soon enough
Quote:
Originally posted by Merlin
Why do you need such huge complex scripts if one as simple as mine should work?
Because my huge complex script doesn't display it as chat.
__________________

Reply With Quote
  #7  
Old 07-26-2001, 02:16 AM
Louis_one Louis_one is offline
Registered User
Join Date: Jun 2001
Location: Alabama and France
Posts: 113
Louis_one is on a distinguished road
Send a message via ICQ to Louis_one Send a message via AIM to Louis_one Send a message via Yahoo to Louis_one
wwwwwooow

lol lady midnight

i will test it online but if i say : setnews bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh

did it break lign ?
__________________

Reply With Quote
  #8  
Old 07-26-2001, 02:24 AM
grim_squeaker_x grim_squeaker_x is offline
Retired Oldbie
grim_squeaker_x's Avatar
Join Date: Mar 2001
Posts: 3,084
grim_squeaker_x will become famous soon enough
Re: wwwwwooow

Quote:
Originally posted by Louis_one
lol lady midnight

i will test it online but if i say : setnews bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh bleh

did it break lign ?
Yes it will then automattically add line breaks to what you said, just test it if you're wondering.
__________________

Reply With Quote
  #9  
Old 07-26-2001, 02:26 AM
Louis_one Louis_one is offline
Registered User
Join Date: Jun 2001
Location: Alabama and France
Posts: 113
Louis_one is on a distinguished road
Send a message via ICQ to Louis_one Send a message via AIM to Louis_one Send a message via Yahoo to Louis_one
héhé

you rules !

thks =D
__________________

Reply With Quote
  #10  
Old 07-26-2001, 04:41 AM
General General is offline
Banned
Join Date: Apr 2001
Location: Station Square
Posts: 984
General is on a distinguished road
Send a message via ICQ to General Send a message via AIM to General Send a message via Yahoo to General
what if you say blehblehblehblehblehblehblehblehblehblehblehblehbl ehblehblehblehblehblehblehblehblehblehblehblehbleh blehblehblehblehblehblehblehblehblehblehblehblehbl ehblehblehblehblehblehblehblehblehblehblehblehbleh blehblehblehblehblehblehblehblehblehblehblehblehbl ehblehblehblehblehblehblehblehblehblehblehblehbleh blehblehblehblehblehblehblehblehblehblehblehblehbl ehblehblehblehblehblehblehblehblehblehblehblehbleh blehblehblehblehblehblehblehblehblehblehblehblehbl ehblehblehblehblehblehblehblehblehblehblehblehbleh blehblehblehblehblehblehblehblehblehblehblehblehbl ehblehblehblehblehblehblehblehblehblehblehblehbleh blehblehblehblehblehblehblehblehblehblehblehblehbl ehblehblehblehblehblehblehblehblehblehblehblehbleh blehblehblehblehblehblehblehblehblehblehblehblehbl ehblehblehblehblehblehblehblehblehblehblehblehbleh blehblehblehblehblehblehblehblehblehblehblehblehbl ehblehblehblehblehblehblehblehblehblehblehblehbleh blehblehblehblehblehblehblehblehblehblehblehblehbl ehblehblehblehblehblehblehblehblehblehblehblehbleh blehblehblehblehblehblehblehblehblehblehblehblehbl ehblehblehblehblehblehblehblehblehblehblehblehbleh blehblehblehblehblehblehblehbleh, then you'd be scrwed
Reply With Quote
  #11  
Old 07-26-2001, 08:38 PM
ownerofbabylon ownerofbabylon is offline
Lord Helmut
ownerofbabylon's Avatar
Join Date: Jun 2001
Location: Gainesville FL
Posts: 1,763
ownerofbabylon is on a distinguished road
Send a message via ICQ to ownerofbabylon Send a message via AIM to ownerofbabylon
Heh, Lady Midnight. How long did it take you to learn all this??
__________________


Warrior of Light

WWW.BABYLONSERVER.COM
Reply With Quote
  #12  
Old 07-26-2001, 08:46 PM
grim_squeaker_x grim_squeaker_x is offline
Retired Oldbie
grim_squeaker_x's Avatar
Join Date: Mar 2001
Posts: 3,084
grim_squeaker_x will become famous soon enough
Quote:
Originally posted by General
what if you say [Whole lot of bleh's], then you'd be scrwed
Yes it does screw up if you use a word of more then 32 letters, I've never got to build in a security for that.
Quote:
Originally posted by ownerofbabylon
Heh, Lady Midnight. How long did it take you to learn all this??
No idea, I don't usually keep track of such things.
__________________

Reply With Quote
  #13  
Old 07-26-2001, 11:07 PM
ownerofbabylon ownerofbabylon is offline
Lord Helmut
ownerofbabylon's Avatar
Join Date: Jun 2001
Location: Gainesville FL
Posts: 1,763
ownerofbabylon is on a distinguished road
Send a message via ICQ to ownerofbabylon Send a message via AIM to ownerofbabylon
God, you know like everything and answer everyones post. Jeeze. SOrry I was just wondering if you have been working on graal script since version .0001 or somthing or if you started at like 1.28 and just got good fast.
__________________


Warrior of Light

WWW.BABYLONSERVER.COM
Reply With Quote
  #14  
Old 07-26-2001, 11:49 PM
konidias konidias is offline
Old Bee
konidias's Avatar
Join Date: Jul 2001
Location: Orlando, FL
Posts: 7,222
konidias will become famous soon enough
Send a message via AIM to konidias
Hey LM, I made something really similar to that for my auction stage! =)

I made a sign wear auctioneers could post what is being auctioned for everyone to read. I like it because you can use the image message code and post images like the front picture of a bomy so you could put something like

NPC Code:

Bomy Naifets 0 for auction: <pic>
Initial Bid: 1500 gralat



I can't figure the 32 character thing out either but if anyone is using a 32 character word than they aren't supposed to be posting there lol.
__________________

Put this image in your sig if you support Bomy Island! (g2k1 revision)
play bomberman while you wait!


Reply With Quote
  #15  
Old 07-26-2001, 11:51 PM
grim_squeaker_x grim_squeaker_x is offline
Retired Oldbie
grim_squeaker_x's Avatar
Join Date: Mar 2001
Posts: 3,084
grim_squeaker_x will become famous soon enough
Quote:
Originally posted by ownerofbabylon
God, you know like everything and answer everyones post. Jeeze. SOrry I was just wondering if you have been working on graal script since version .0001 or somthing or if you started at like 1.28 and just got good fast.
Well I did start in 1.40...
__________________

Reply With Quote
  #16  
Old 07-27-2001, 01:00 AM
General General is offline
Banned
Join Date: Apr 2001
Location: Station Square
Posts: 984
General is on a distinguished road
Send a message via ICQ to General Send a message via AIM to General Send a message via Yahoo to General
I started in 1.41...
Reply With Quote
  #17  
Old 08-10-2001, 01:53 PM
Skatche Skatche is offline
Registered User
Join Date: Aug 2001
Location: Gehennom
Posts: 353
Skatche is on a distinguished road
Send a message via AIM to Skatche
Lady Midnight, can I use your script, or at least the theory of your script, for a Book NPC? Oh by the way, you are an awesome scripter. I thought I had a good mind for programming languages (although I never really was great at Graalscript). Do you program proffessionally?
__________________
Skatche, head priest of the Cult of Duckduck.
Praise Duckduck!
Reply With Quote
  #18  
Old 08-10-2001, 05:42 PM
Guest
Posts: n/a
Probably she's learning npc scripting while we're spending time online on servers....
and she probably have a lot of free time
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 02:50 PM.


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