Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Poster (https://forums.graalonline.com/forums/showthread.php?t=19719)

pimpiroth 12-27-2001 08:41 AM

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?

jeff335 12-27-2001 08:59 AM

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 ;'( )

pimpiroth 12-27-2001 09:02 AM

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 :(

pimpiroth 12-27-2001 09:06 AM

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;

LordMatt 12-27-2001 12:31 PM

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

LilNiglet 12-27-2001 10:29 PM

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;
}


Androk2k1 12-27-2001 10:33 PM

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?

pimpiroth 12-28-2001 12:44 AM

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

Faheria_GP2 12-28-2001 12:52 AM

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;


pimpiroth 12-28-2001 12:54 AM

erm
 
still dont work

Faheria_GP2 12-28-2001 01:31 AM

Did you say
Quote:

Post: "Text"
Did you set the guild right?

pimpiroth 12-28-2001 02:46 AM

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

TDO2000 12-28-2001 08:16 AM

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 :)


All times are GMT +2. The time now is 09:06 PM.

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