PDA

View Full Version : Level-Wide Strings


Pokilty
05-22-2003, 03:39 AM
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
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
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
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
Originally posted by Alexander

Yea you get no answer.
You just contradicted yourself by answering ;o

Pokilty
05-23-2003, 05:21 AM
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
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
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
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:
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
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
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
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
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
:D.

CheeToS2
05-26-2003, 06:20 AM
bwahaha.

Dude6252000
05-26-2003, 06:24 AM
Karsh wins.

Falados
05-26-2003, 06:58 AM
Hah, no match.

Dude6252000
05-26-2003, 07:25 AM
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/images/(davinci)-mona-lisa.jpg

Python523
05-26-2003, 06:48 PM
the monkey lives a lonely life...then

Dude6252000
05-26-2003, 07:42 PM
Another gani explains my feelings.

Neoreno
05-26-2003, 08:20 PM
Originally posted by Dude6252000
Another gani explains my feelings.


Allow this to show mine. Maximise GraalShop.

Milkdude99
05-26-2003, 11:23 PM
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
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
:) 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
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.

Pokilty
05-28-2003, 01:07 AM
yea it's just one string but i dont want to use up serverside string lists for it

Projectshifter
05-28-2003, 03:49 AM
You kill me pokilty! Seriously, lol. HOW LONG have you been the NPC Admin of Maloria =p
---Shifter

Pokilty
05-28-2003, 02:09 PM
I quit Maloria a while ago, but I've been staff on there for over a year =D. Besides after I quit i decided to try scripting everything I can to improve my skills so that's why you're seeing me on forums more. I only post the stupid questions, not my good scripts ;). How about you project? Didn't I hire you once or something?

Tseng
05-28-2003, 04:58 PM
Originally posted by Pokilty
yea it's just one string but i dont want to use up serverside string lists for it

I'm still trying to figure out just what it is you're wanting...because I still think it's a lot simpler than it's being made out to be.

You're trying to make an NPC that kicks out anyone who's not on a list?

Pokilty
05-29-2003, 12:18 AM
kind of... but i want to be able to change the list using a command i can say in playerchat

Pokilty
06-03-2003, 12:39 AM
so... close... 5 ... pages... keep.. replying...

protagonist
06-03-2003, 12:42 AM
Uh lol, I didn't read this whole thing but why don't you just use a string array to have your list?

Pokilty
06-03-2003, 12:51 AM
that's kinda the point of this thing... strings are only stored clientside or serverside, and if u dont want to cram up serverside there arent many other choices

protagonist
06-03-2003, 01:07 AM
Oh, I see. :(

petro1212
06-08-2003, 05:03 PM
Leave him alone :P

KaMeHahAhAh :P

adam
06-08-2003, 07:30 PM
Originally posted by petro1212
Leave him alone :P

KaMeHahAhAh :P

Hmm, I never saw krillin use the Kamehameha wave.

Pokilty
06-08-2003, 09:11 PM
Originally posted by adam


Hmm, I never saw krillin use the Kamehameha wave.
goku!!