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 10-03-2001, 05:30 AM
freddyfox freddyfox is offline
Banned
freddyfox's Avatar
Join Date: Mar 2001
Posts: 6,705
freddyfox is on a distinguished road
Using my really really limited NPC scripting skills, I made a sign chat NPC.

NPC Code:

if (playerenters) {
toweapons Sign Chatting;
}
if(playerchats){
say2 #c;
}



Look at how long it took me to put that together.
Reply With Quote
  #2  
Old 10-03-2001, 05:32 AM
Metal-Slug Metal-Slug is offline
!_!
Metal-Slug's Avatar
Join Date: Jun 2001
Posts: 2,421
Metal-Slug is on a distinguished road
omg, the day freddy surpases us all in scrpting abilities, *kills self*

no, just kidding, hehehehe
Reply With Quote
  #3  
Old 10-03-2001, 05:58 AM
IceHawk IceHawk is offline
Jenseits von Gut und Böse
IceHawk's Avatar
Join Date: Mar 2001
Location: Vancouver BC, Canada
Posts: 4,704
IceHawk will become famous soon enough
Send a message via AIM to IceHawk
merlinerereR:
as a npcw it would only be local
so try

if (playerchats) {
if (tokenscount<12) {
setstring level.chat,#t(0) #t(1) #t(2);
setstring level.chat2 #t(3) #t(4) #t(5);
setstring level.chat3 #t(6) #t(7) #t(8);
setstring level.chat4 #t(9) #t(10) #t(11);
timeout = .2;
elseif (tokenscount>11) {
say2 Text was too big!;
}
}
if (timeout) {
say2 #s(level.chat)#b
#s(level.chat2)#b
#s(level.chat3)#b
#s(level.chat4)#b
}

i'm sure there's a better way to do it, though ;/
__________________
Reply With Quote
  #4  
Old 10-03-2001, 06:01 AM
freddyfox freddyfox is offline
Banned
freddyfox's Avatar
Join Date: Mar 2001
Posts: 6,705
freddyfox is on a distinguished road
Quote:
Originally posted by IceHawk


if (playerchats) {
if (tokenscount<12) {
setstring level.chat,#t(0) #t(1) #t(2);
setstring level.chat2 #t(3) #t(4) #t(5);
setstring level.chat3 #t(6) #t(7) #t(8);
setstring level.chat4 #t(9) #t(10) #t(11);
timeout = .2;
elseif (tokenscount>11) {
say2 Text was too big!;
}
}
if (timeout) {
say2 #s(level.chat)#b
#s(level.chat2)#b
#s(level.chat3)#b
#s(level.chat4)#b
}
I use local because NPCServer scripting is alien to me.
Reply With Quote
  #5  
Old 10-03-2001, 09:58 AM
entravial entravial is offline
Registered User
entravial's Avatar
Join Date: Mar 2001
Posts: 825
entravial is on a distinguished road
Send a message via ICQ to entravial Send a message via AIM to entravial Send a message via Yahoo to entravial
~AlphaFlame~

Hi kiddies. Here's the ultimate lag-your-server script. Enjoy.

NPC Code:

if (created && strtofloat(#s(server.msgbrd))=0){
setstring server.msgbrd,0;
}

if (playerchats && startswith(post:,#c)){
this.length=0;
this.l2=0;
tokenize #c;
setstring this.post,#a: ;
this.length+=strlen(#a)+2;
for (this.t=1;this.t<tokenscount;this.t++){
setstring this.post,#s(this.post) #t(this.t);
this.length+=strlen(#t(this.t));
}
this.startpage=strtofloat(#s(server.msgbrd));
this.pages=int(this.length/32+1)+this.startpage;
for (this.page=this.startpage;this.page<this.pages;thi s.page++){
setstring server.page#v(this.pages),#e(this.l2,32,#s(this.po st));
this.l2+=32;
}
setstring server.msgbrd,#v(strtofloat(#s(msgbrd))+this.pages )
}
if (playerchats && strequals(#c,read board)){
this.readpage=3;
say2 #s(server.page#v(this.readpage-2))
#b#s(server.page#v(this.readpage-1))
#b#s(server.page#v(this.readpage));
}
if (playerendsreading && this.readpage<strtofloat(#s(server.msgbrd))){
this.readpage+=3;
say2 #s(server.page#v(this.readpage-2))
#b#s(server.page#v(this.readpage-1))
#b#s(server.page#v(this.readpage));
}




And nobody raise hell over how its scripted...
__________________


If the post says ~AlphaFlame~, that's who's posting. If not, it's Entravial (owner)
Reply With Quote
  #6  
Old 10-03-2001, 07:13 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
hahaha thats funny
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 04:22 PM.


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