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 12-27-2001, 08:41 AM
pimpiroth pimpiroth is offline
Registered User
Join Date: Dec 2001
Posts: 29
pimpiroth is on a distinguished road
Send a message via AIM to pimpiroth Send a message via Yahoo to pimpiroth
Poster

Ok Im working on a poster for practise. Oh and I must give creidt for the idea, its from Andor.



Well anyways heres the part that goes in the staff room or whatever.


// NPC made by yahgrown
//posting script
//post part only for owner or other people who will post.


if (playerchats && strequals(#c,post)) {
tokenize #c;
if (strequals(#t(0),post)) {
setstring server.post,#t(1);
}
}


=====================================
Heres the part that goes in the player system


// NPC made by yahgrown
//posting script
//post part only for owner or other people who will post.


if (playerchats && strequals(#c,post)) {
tokenize #c;
if (strequals(#t(0),post)) {
setstring server.post,#t(1);
}
}
==============================================

I know there somthing wrong with the staff weapon. Because when I do it manually, open flags and type in "server.post=finally up, thanks for the support" It will disply it. Can someone help?
Reply With Quote
  #2  
Old 12-27-2001, 08:59 AM
jeff335 jeff335 is offline
Registered User
Join Date: Oct 2001
Posts: 605
jeff335 is on a distinguished road
Put the part you want your #t(1) to be in quotes. I know, I made one of these for my Classic house (no, it's not up ;'( )
__________________

Quote:
Some people like standing around talking to idiots in the real world, and some don't. Neither choice is inherently better than the other.

-Kaimetsu
Reply With Quote
  #3  
Old 12-27-2001, 09:02 AM
pimpiroth pimpiroth is offline
Registered User
Join Date: Dec 2001
Posts: 29
pimpiroth is on a distinguished road
Send a message via AIM to pimpiroth Send a message via Yahoo to pimpiroth
you mean like...

// NPC made by yahgrown
//posting script
//post part only for owner or other people who will post.


if (playerchats && strequals(#c,post)) {
tokenize #c;
if (strequals(#t(0),post)) {
setstring server.post,"#t(1)";
}
}



what it doesnt work
Reply With Quote
  #4  
Old 12-27-2001, 09:06 AM
pimpiroth pimpiroth is offline
Registered User
Join Date: Dec 2001
Posts: 29
pimpiroth is on a distinguished road
Send a message via AIM to pimpiroth Send a message via Yahoo to pimpiroth
opps i mixxed it up >.< the scripts are



This is what goes in the staff thing


// NPC made by yahgrown
//posting script
//post part only for owner or other people who will post.


if (playerchats && strequals(#c,post)) {
tokenize #c;
if (strequals(#t(0),post)) {
setstring server.post,#t(1);
}
}





This is what goes in the player system



// NPC made by yahgrown

//Reciving Part Goes in players system
//Updater Script For Cosmo Canyon
//Scripted By Owner (SirMiz,Blitz,hourZ,Phenomena)

//Varibles
$font = "Verdana";
//

//Get Post




showimg 204,@#s(server.post),screenwidth-693,60;
changeimgvis 204,4;
Reply With Quote
  #5  
Old 12-27-2001, 12:31 PM
LordMatt LordMatt is offline
V Avatar
LordMatt's Avatar
Join Date: Jun 2001
Location: Texas
Posts: 954
LordMatt is on a distinguished road
Send a message via AIM to LordMatt
Quote:
Originally posted by pimpiroth
opps i mixxed it up >.< the scripts are



This is what goes in the staff thing


// NPC made by yahgrown
//posting script
//post part only for owner or other people who will post.


if (playerchats && strequals(#c,post)) {
tokenize #c;
if (strequals(#t(0),post)) {
setstring server.post,#t(1);
}
}





This is what goes in the player system



// NPC made by yahgrown

//Reciving Part Goes in players system
//Updater Script For Cosmo Canyon
//Scripted By Owner (SirMiz,Blitz,hourZ,Phenomena)

//Varibles
$font = "Verdana";
//

//Get Post




showimg 204,@#s(server.post),screenwidth-693,60;
changeimgvis 204,4;
wish I could test it
__________________
-Matt
Reply With Quote
  #6  
Old 12-27-2001, 10:29 PM
LilNiglet LilNiglet is offline
Registered User
Join Date: Jun 2001
Posts: 3,178
LilNiglet is on a distinguished road
Thats all wrong.

NPC Code:

if (playerchats){
tokenize #c;
if (strequals(#t(0),post:)){
setstring message,#c;
}}
if (playerenters||timeout){
message #s(message);
timeout = .05;
}

Reply With Quote
  #7  
Old 12-27-2001, 10:33 PM
Androk2k1 Androk2k1 is offline
Banned
Androk2k1's Avatar
Join Date: Dec 2001
Posts: 1,336
Androk2k1 is on a distinguished road
I allready made something like that a while ago...
Mah script:
--- Start ---
// NPC made by Jaguar
// Edited by Androk
if (created) {
message Latest AN News;
}
if (playerchats&&startswith(AN News:,#c)&&strequals(#g,Androk's Network)) {
setstring this.AN_Sign1,#e(00,30,#c);
setstring this.AN_Sign2,#e(030,30,#c);
setstring this.AN_Sign3,#e(060,30,#c);
setstring this.AN_Sign4,#e(090,30,#c);
setstring this.AN_Sign5,#e(120,30,#c);
setstring this.AN_Sign6,#e(150,30,#c);
}
if (playertouchsme) {
say2 #s(this.AN_Sign1)#b#s(this.AN_Sign2)#b#s(this.AN_S ign3)#b#s(this.AN_Sign4)#b#s(this.AN_Sign5)#b#s(th is.AN_Sign6)#b;
}
--- End ---
I that what ya needed?
Reply With Quote
  #8  
Old 12-28-2001, 12:44 AM
pimpiroth pimpiroth is offline
Registered User
Join Date: Dec 2001
Posts: 29
pimpiroth is on a distinguished road
Send a message via AIM to pimpiroth Send a message via Yahoo to pimpiroth
NPC Code:

if (playerchats){
tokenize #c;
if (strequals(#t(0),post){
setstring message,#c;
}}
if (playerenters||timeout){
message #s(message);
timeout = .05;
}




doesnt work sir
Reply With Quote
  #9  
Old 12-28-2001, 12:52 AM
Faheria_GP2 Faheria_GP2 is offline
Banned
Faheria_GP2's Avatar
Join Date: Oct 2001
Posts: 1,177
Faheria_GP2 is on a distinguished road
oh good god you *****s

NPC Code:

//News Poster by Supersonic & shitz
//Don't use this online unless you have my permission
if (created) {
setimg radio.gif; //Change this to whatever the hell you want
}
if (playerenters) {
if (strequals(#g,Posters)) { //Change guild name
//toweapons -Post;
//Uncomment line for porta-posting
}
}
if (playerchats) {
tokenize #c;
if (strequals(#c,Post: "#t(1)")) {
if (strequals(#g,Posters)) { //Change Guild Name
setstring server.post,#t(1);
}else{
setplayerprop #c,(not authorized to post);
}
}
}



This may be buggy as hell, because I haven't tested it, in another NPC do this code

NPC Code:

message #s(server.post);
timeout=.05;

Reply With Quote
  #10  
Old 12-28-2001, 12:54 AM
pimpiroth pimpiroth is offline
Registered User
Join Date: Dec 2001
Posts: 29
pimpiroth is on a distinguished road
Send a message via AIM to pimpiroth Send a message via Yahoo to pimpiroth
erm

still dont work
Reply With Quote
  #11  
Old 12-28-2001, 01:31 AM
Faheria_GP2 Faheria_GP2 is offline
Banned
Faheria_GP2's Avatar
Join Date: Oct 2001
Posts: 1,177
Faheria_GP2 is on a distinguished road
Did you say
Quote:
Post: "Text"
Did you set the guild right?
Reply With Quote
  #12  
Old 12-28-2001, 02:46 AM
pimpiroth pimpiroth is offline
Registered User
Join Date: Dec 2001
Posts: 29
pimpiroth is on a distinguished road
Send a message via AIM to pimpiroth Send a message via Yahoo to pimpiroth
Ok fixxed one prob now the next

Admin Part:

NPC Code:

if (playerchats){
tokenize #c;
if (strequals(#t(0),News)
{

setstring server.post,#c; }}



Player Part:

NPC Code:

// NPC made by yahgrown

//Reciving Part Goes in players system
//Updater Script For Cosmo Canyon
//Scripted By Owner (SirMiz,Blitz,hourZ,Phenomena)

//Varibles
$font = "Verdana";
//

//Get Post


timeout=.1;


if (timeout) {
showimg 204,@#s(server.post),screenwidth-693,60;
changeimgvis 204,4;
}



Ok now when I type something real long like this "

Ok, big news theres a new quest up and we hired a few gps. Please do not ask to be GP. We will be hiring FAQs Soon so go around the server or read about the quests items and other stuff on the Cosmo Canyon website because you have to know alot to be FAQ. Thanks -SirMix
"

it keeps printing with out returning... like it keeps going....
oh any how do you change the size? thanks for ya help btw
Reply With Quote
  #13  
Old 12-28-2001, 08:16 AM
TDO2000 TDO2000 is offline
Registered User
TDO2000's Avatar
Join Date: Jul 2001
Location: Germany
Posts: 655
TDO2000 is on a distinguished road
changeimgzoom

but systems like this need something like a breaking in it so if the text is to long it's in the next line:

example:
if(playerenters){
this.lenght=int(screenwidth/16)-10;
this.lines=int(strlen(#s(server.chat))/this.lenght);
this.actlenght=0;
this.actline=1;
for(this.i=0;this.i <= this.lines;this.i++){
showimg 201+this.i,@#e(this.actlenght,this.actlenght+this. lenght,#s(server.chat)),30,80+(this.actline*15);
changeimgvis 201+this.i,4;
this.actlenght+=this.lenght;
this.actline++;
}
}

now write something veeeeeeeeerrrrrrryyyyyyy long in the server.chat-string like

server.chat=hiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiM MMMMMMMMMMMMYYYYYYYYYYYYYNNNNNNNNAAAAAAAAAAAMMMMMM MMMMMMMEEEEEEEEEIIIIIIIIIIIIISSSSSSSSSSSSSSSSSSTTT TTTTTTTTDDDDDDDDDDDOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOO

the other thin is changeimgzoom... but it's only enabled for pay servers

so it will be in multiple lines
__________________
No Webhost at the moment
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 01:48 AM.


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