Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Level-Wide Strings (https://forums.graalonline.com/forums/showthread.php?t=45012)

Pokilty 05-22-2003 03:39 AM

Level-Wide Strings
 
Is there a way to create a level-wide string in a local NPC? I tried leaving the entire NPC serverside and just setting the string [if (created) setstring head,head0.png], shouldn't everybody in the level now be able to access and change the contents of the string? When I tried it online, the string acted clientside and if another player changed the string I couldn't see it change.

An example of this is if you have a level you want to allow and disallow people, an npctest usually. I want to be able to say "add <player>" and it will add the player account to the level-wide string. I tried doing a script like this with the latest version of graal but in the end I was stuck with serverside variables. It's very peculiar, it's worked in the past for me... :)

Pokilty 05-22-2003 04:58 AM

Quote:

Originally posted by Kaimetsu
Does the string need to be accessible to the client?
yes, to all the clients in the level. the only way i found around it was a timeout and with(players[i]) setstring client.string,#s(levelstring) type of thing but then the player gets filled with a bunch of client.strings that are unwanted.

Python523 05-22-2003 05:04 AM

if done serverside
setstring head,whatever;
is saving to the client who the npc is currently accessing

and arent heads #3? #3(index) gets the head of the player with that index

you can use gani attributes but it will lag if they are too big

Pokilty 05-22-2003 05:15 AM

well not just heads i mean like... take the script i mentioned earlier. if i wanted to make a level i can allow and disallow people in by saying "add <account>" and "remove <account>", is there a way to create a string that all the clients can access in that level simultaneously that's not server-wide?

Pokilty 05-22-2003 02:00 PM

so that... they can't get in the level? if other clients can't access the information it's useless, the only person i would be able to block is myself.

Tseng 05-22-2003 04:55 PM

...you know, if you have an npc that checks:

if (playerenters) {

it executes for every player that enters the level.

And surprisingly enough, this NPC can read its own strings/variables.

Think about it.

Pokilty 05-22-2003 10:31 PM

that's not what i'm trying to do kai & tseng. bah, nvm x.X

Pokilty 05-23-2003 02:02 AM

Quote:

Originally posted by Kaimetsu
IT SHOULD BE.
Kai is mean wahh

Pokilty 05-23-2003 02:41 AM

Now we're all hurt :( See what happens when I ask questions?

Alexander 05-23-2003 02:59 AM

Quote:

Originally posted by Pokilty
Now we're all hurt :( See what happens when I ask questions?
Yea you get no answer.

CheeToS2 05-23-2003 03:05 AM

Quote:

Originally posted by Alexander

Yea you get no answer.

You just contradicted yourself by answering ;o

Pokilty 05-23-2003 05:21 AM

Quote:

Originally posted by CheeToS2

You just contradicted yourself by answering ;o

I did get an answer, he means I didn't get the answer i was lookin for :p

Falados 05-23-2003 02:37 PM

Quote:

Originally posted by Pokilty
I did get an answer, he means I didn't get the answer i was lookin for :p
The answer you are looking will be found when you seek the magical scripting fairies. Only when you obtain the magical pixie dust of script making, will you be able to produce anything you so desire.

Tseng 05-23-2003 04:47 PM

Quote:

Originally posted by Falados


The answer you are looking will be found when you seek the magical scripting fairies. Only when you obtain the magical pixie dust of script making, will you be able to produce anything you so desire.

And don't forget; he also has to answer the riddle of the magical scripting fairies before he can acquire the dust. :p

Falados 05-23-2003 07:44 PM

Quote:

Originally posted by Tseng


And don't forget; he also has to answer the riddle of the magical scripting fairies before he can acquire the dust. :p

Oh yes, the riddle. It has befallen many, so prepare well.

Brandon 05-25-2003 10:07 AM

Take this:
Quote:

Originally posted by Kaimetsu
It is called 'tough love', and it hurts me more than it does you :(
Run it through the 'Kaimetsu-ese to English' translator, and you will be surprised to get this:

http://kaimetsu.bravoonline.net/monkeylaughing.gif


;)

adam 05-25-2003 07:25 PM

Surely you will all hate and laugh at me for this but a serverside string that is level specific and accessible to the clientside.


setstring serverr.#L.string,



just include the #L and it will be as if it were a level string even though it's serverwide. The downside, if you need a lot it will crowd the server flags list.

The only thing I use server strings for is temporary stuff for moving data around.

Projectshifter 05-25-2003 08:58 PM

Adam has a point >.< I still dont' see the whole point of this ANYWAYS. Might as well make a database NPC and save this.strings... or if there really will be that many, then there are npcs[i].save[i] that I really don't ever use but I know that they exist =p
You can also do with(getnpc(Control-NPC)) and set this.strings ;)
Amazing isn't it =p
this.#L.yourstupid ;) LOL j/k. but no there are many ways. If you STILL can't figure it out, and you NEED this NPC... you should know where to find one of us >.<
---Shifter

Milkdude99 05-25-2003 11:42 PM

Quote:

Originally posted by Projectshifter
Adam has a point >.< I still dont' see the whole point of this ANYWAYS. Might as well make a database NPC and save this.strings... or if there really will be that many, then there are npcs[i].save[i] that I really don't ever use but I know that they exist =p
You can also do with(getnpc(Control-NPC)) and set this.strings ;)
Amazing isn't it =p
this.#L.yourstupid ;) LOL j/k. but no there are many ways. If you STILL can't figure it out, and you NEED this NPC... you should know where to find one of us >.<
---Shifter

Isn't getnpc also what hackers exploit? And wouldn't it be a better idea to limit the use of that and have the action on the level and not thru the NPC Server if it is not nessary?

Falados 05-26-2003 03:30 AM

Quote:

Originally posted by Projectshifter
Adam has a point >.< I still dont' see the whole point of this ANYWAYS. Might as well make a database NPC and save this.strings... or if there really will be that many, then there are npcs[i].save[i] that I really don't ever use but I know that they exist =p
You can also do with(getnpc(Control-NPC)) and set this.strings ;)
Amazing isn't it =p
this.#L.yourstupid ;) LOL j/k. but no there are many ways. If you STILL can't figure it out, and you NEED this NPC... you should know where to find one of us >.<
---Shifter

Using serverr strings for this simple task is not recommended x-x.
Why would you want to send excess of data to EVERY client, when 1 npc can just handle the 1 level?

Knuckles 05-26-2003 04:46 AM

Quote:

Originally posted by Milkdude99
Isn't getnpc also what hackers exploit? And wouldn't it be a better idea to limit the use of that and have the action on the level and not thru the NPC Server if it is not nessary?
Hacker's exploit client.strings.... but they can't exploit clientr.strings 'cause they can only be set serverside.

CheeToS2 05-26-2003 04:56 AM

1 Attachment(s)
Quote:

Originally posted by Brandon
Take this:


Run it through the 'Kaimetsu-ese to English' translator, and you will be surprised to get this:

http://kaimetsu.bravoonline.net/monkeylaughing.gif


;)

;o

EDIT: 10 seconds after posting:
Jagen: dude
Jagen: you cant strangle the moneky
Jagen: its too strong for you
Jagen: HOW DARE YOU EVEN TOUCH IT :[
CheeToS: lol
Jagen: bish
Jagen: *stranges the cheetos*
Jagen: omg so crunchy =
Jagen: [

CheeToS2 05-26-2003 05:31 AM

1 Attachment(s)
:D.

CheeToS2 05-26-2003 06:20 AM

1 Attachment(s)
bwahaha.

Dude6252000 05-26-2003 06:24 AM

1 Attachment(s)
Karsh wins.

Falados 05-26-2003 06:58 AM

1 Attachment(s)
Hah, no match.

Dude6252000 05-26-2003 07:25 AM

1 Attachment(s)
Quote:

Originally posted by Falados
Hah, no match.
The gani explains my emotions.

Ningnong 05-26-2003 12:29 PM

LoL, I was reading this post yesterday, now I woke up and read it today. Everyone has gone Insane! Even the mods O.o (who are probably insane already)

But hey, I like insanity!

*draws something o.O*

Deek2 05-26-2003 06:47 PM

LOLOLOL PWNED OMG WTF LOLOL!!11!!!!
http://www.harley.com/abstract-art/i...-mona-lisa.jpg

Python523 05-26-2003 06:48 PM

1 Attachment(s)
the monkey lives a lonely life...then

Dude6252000 05-26-2003 07:42 PM

1 Attachment(s)
Another gani explains my feelings.

Neoreno 05-26-2003 08:20 PM

1 Attachment(s)
Quote:

Originally posted by Dude6252000
Another gani explains my feelings.

Allow this to show mine. Maximise GraalShop.

Milkdude99 05-26-2003 11:23 PM

Quote:

Originally posted by Ningnong
LoL, I was reading this post yesterday, now I woke up and read it today. Everyone has gone Insane! Even the mods O.o (who are probably insane already)

But hey, I like insanity!

*draws something o.O*

It is required to be insane to be a Mod...:megaeek:

Dude6252000 05-27-2003 12:29 AM

1 Attachment(s)
Quote:

Originally posted by Neoreno



Allow this to show mine. Maximise GraalShop.

:)

Tseng 05-27-2003 01:06 AM

Haxing is bad, karsh XD

Dude6252000 05-27-2003 01:59 AM

1 Attachment(s)
:) again.
-EDIT- Kai, you should sticky this thread.

Pokilty 05-27-2003 02:20 AM

omg what happened. i stopped looking at forums for two days and I come back and there's monkeys all over. i repeat, see what happens when i post things?

Projectshifter 05-27-2003 04:37 AM

*****! Invasion of the monkeys! Pretty funny actually.
But no, it all depends. I was just stating ways it COULD be done. It depends on how intensive the whole NPC is, and it's usage for what you want. But I still don't see the point >.<
---Shifter

Pokilty 05-27-2003 02:09 PM

well for my purposes I kind of like the getnpc() idea, which i never thought of :p

adam 05-27-2003 03:57 PM

Quote:

Originally posted by Pokilty
well for my purposes I kind of like the getnpc() idea, which i never thought of :p
Then I hope that means you don't have to access the string *too often.


All times are GMT +2. The time now is 04:40 AM.

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