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 05-22-2003, 03:39 AM
Pokilty Pokilty is offline
Registered User
Join Date: Nov 2002
Posts: 101
Pokilty is on a distinguished road
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...
__________________
"I have not failed. I've just found 10,000 ways that won't work."
"Logic is in the eye of the logician."
Reply With Quote
  #2  
Old 05-22-2003, 04:58 AM
Pokilty Pokilty is offline
Registered User
Join Date: Nov 2002
Posts: 101
Pokilty is on a distinguished road
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.
__________________
"I have not failed. I've just found 10,000 ways that won't work."
"Logic is in the eye of the logician."
Reply With Quote
  #3  
Old 05-22-2003, 05:04 AM
Python523 Python523 is offline
Banned
Join Date: Aug 2001
Location: Illinois
Posts: 3,498
Python523 is on a distinguished road
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
Reply With Quote
  #4  
Old 05-22-2003, 05:15 AM
Pokilty Pokilty is offline
Registered User
Join Date: Nov 2002
Posts: 101
Pokilty is on a distinguished road
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?
__________________
"I have not failed. I've just found 10,000 ways that won't work."
"Logic is in the eye of the logician."
Reply With Quote
  #5  
Old 05-22-2003, 02:00 PM
Pokilty Pokilty is offline
Registered User
Join Date: Nov 2002
Posts: 101
Pokilty is on a distinguished road
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.
__________________
"I have not failed. I've just found 10,000 ways that won't work."
"Logic is in the eye of the logician."
Reply With Quote
  #6  
Old 05-22-2003, 04:55 PM
Tseng Tseng is offline
Sublime
Tseng's Avatar
Join Date: Jan 2003
Location: California
Posts: 0
Tseng is on a distinguished road
...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.
__________________
Funny Things:
Quote:
Originally posted by Stefan
I didn't ban you, I only played a little bit with my RC.
-----
Reply With Quote
  #7  
Old 05-22-2003, 10:31 PM
Pokilty Pokilty is offline
Registered User
Join Date: Nov 2002
Posts: 101
Pokilty is on a distinguished road
that's not what i'm trying to do kai & tseng. bah, nvm x.X
__________________
"I have not failed. I've just found 10,000 ways that won't work."
"Logic is in the eye of the logician."
Reply With Quote
  #8  
Old 05-23-2003, 02:02 AM
Pokilty Pokilty is offline
Registered User
Join Date: Nov 2002
Posts: 101
Pokilty is on a distinguished road
Quote:
Originally posted by Kaimetsu
IT SHOULD BE.
Kai is mean wahh
__________________
"I have not failed. I've just found 10,000 ways that won't work."
"Logic is in the eye of the logician."
Reply With Quote
  #9  
Old 05-23-2003, 02:41 AM
Pokilty Pokilty is offline
Registered User
Join Date: Nov 2002
Posts: 101
Pokilty is on a distinguished road
Now we're all hurt See what happens when I ask questions?
__________________
"I have not failed. I've just found 10,000 ways that won't work."
"Logic is in the eye of the logician."
Reply With Quote
  #10  
Old 05-23-2003, 02:59 AM
Alexander Alexander is offline
Registered User
Join Date: Apr 2003
Location: California
Posts: 246
Alexander is on a distinguished road
Send a message via AIM to Alexander
Quote:
Originally posted by Pokilty
Now we're all hurt See what happens when I ask questions?
Yea you get no answer.
Reply With Quote
  #11  
Old 05-23-2003, 03:05 AM
CheeToS2 CheeToS2 is offline
That Guy
CheeToS2's Avatar
Join Date: Dec 2001
Location: Seattle, WA
Posts: 2,528
CheeToS2 will become famous soon enough
Send a message via AIM to CheeToS2
Quote:
Originally posted by Alexander

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

Reply With Quote
  #12  
Old 05-23-2003, 05:21 AM
Pokilty Pokilty is offline
Registered User
Join Date: Nov 2002
Posts: 101
Pokilty is on a distinguished road
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
__________________
"I have not failed. I've just found 10,000 ways that won't work."
"Logic is in the eye of the logician."
Reply With Quote
  #13  
Old 05-23-2003, 02:37 PM
Falados Falados is offline
Cucumber NPC
Falados's Avatar
Join Date: Jan 2003
Posts: 141
Falados is on a distinguished road
Send a message via ICQ to Falados Send a message via AIM to Falados
Quote:
Originally posted by Pokilty
I did get an answer, he means I didn't get the answer i was lookin for
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.
__________________

subliminal message: 1+1=3
Reply With Quote
  #14  
Old 05-23-2003, 04:47 PM
Tseng Tseng is offline
Sublime
Tseng's Avatar
Join Date: Jan 2003
Location: California
Posts: 0
Tseng is on a distinguished road
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.
__________________
Funny Things:
Quote:
Originally posted by Stefan
I didn't ban you, I only played a little bit with my RC.
-----
Reply With Quote
  #15  
Old 05-23-2003, 07:44 PM
Falados Falados is offline
Cucumber NPC
Falados's Avatar
Join Date: Jan 2003
Posts: 141
Falados is on a distinguished road
Send a message via ICQ to Falados Send a message via AIM to Falados
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.
Oh yes, the riddle. It has befallen many, so prepare well.
__________________

subliminal message: 1+1=3
Reply With Quote
  #16  
Old 05-25-2003, 10:07 AM
Brandon Brandon is offline
Master of Chaos
Brandon's Avatar
Join Date: Jul 2002
Location: Kalamazoo, Michigan USA
Posts: 233
Brandon is on a distinguished road
Send a message via ICQ to Brandon Send a message via AIM to Brandon Send a message via MSN to Brandon Send a message via Yahoo to Brandon
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:




__________________
Brandon M.
Bravo Online Manager
Reply With Quote
  #17  
Old 05-25-2003, 07:25 PM
adam adam is offline
http://wiki.graal.us/
adam's Avatar
Join Date: Nov 2001
Posts: 2,247
adam has a spectacular aura aboutadam has a spectacular aura about
Send a message via AIM to adam
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.
__________________
Rogue Shadow (TCN)(NAT)(Global Development Team)

For development help, contact the patrons of the #graaldt irc channel below, I am usually there.
Click Here to Join IRC Chat Now! -- irc.freenode.net Channel: #graaldt
Quote:
<Dustyshouri> no, RogueShadow is always talking about scripts lol
<Dustyshouri> in fact, he pretty much brought Graal back as a topic single-handedly
Reply With Quote
  #18  
Old 05-25-2003, 08:58 PM
Projectshifter Projectshifter is offline
The David
Projectshifter's Avatar
Join Date: Apr 2002
Location: USA
Posts: 912
Projectshifter is an unknown quantity at this point
Send a message via ICQ to Projectshifter Send a message via AIM to Projectshifter Send a message via MSN to Projectshifter Send a message via Yahoo to 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
__________________
Who has time for life these days?
Reply With Quote
  #19  
Old 05-25-2003, 11:42 PM
Milkdude99 Milkdude99 is offline
Truckin Up
Milkdude99's Avatar
Join Date: Jun 2001
Location: Central Florida
Posts: 3,390
Milkdude99 is an unknown quantity at this point
Send a message via ICQ to Milkdude99
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?
__________________

Moon God
Graal.net

---------- Home---------

Reply With Quote
  #20  
Old 05-26-2003, 03:30 AM
Falados Falados is offline
Cucumber NPC
Falados's Avatar
Join Date: Jan 2003
Posts: 141
Falados is on a distinguished road
Send a message via ICQ to Falados Send a message via AIM to Falados
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?
__________________

subliminal message: 1+1=3
Reply With Quote
  #21  
Old 05-26-2003, 04:46 AM
Knuckles Knuckles is offline
Registered User
Join Date: Sep 2002
Location: New York
Posts: 580
Knuckles is on a distinguished road
Send a message via AIM to Knuckles
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.
__________________
Knuckles
"They say 60% of the time, it works everytime!"
Reply With Quote
  #22  
Old 05-26-2003, 04:56 AM
CheeToS2 CheeToS2 is offline
That Guy
CheeToS2's Avatar
Join Date: Dec 2001
Location: Seattle, WA
Posts: 2,528
CheeToS2 will become famous soon enough
Send a message via AIM to CheeToS2
Quote:
Originally posted by Brandon
Take this:


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




;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: [
Attached Thumbnails
Click image for larger version

Name:	monkey3.gif
Views:	89
Size:	2.1 KB
ID:	23840  
__________________

Reply With Quote
  #23  
Old 05-26-2003, 05:31 AM
CheeToS2 CheeToS2 is offline
That Guy
CheeToS2's Avatar
Join Date: Dec 2001
Location: Seattle, WA
Posts: 2,528
CheeToS2 will become famous soon enough
Send a message via AIM to CheeToS2
.
Attached Thumbnails
Click image for larger version

Name:	monkey4.gif
Views:	82
Size:	13.5 KB
ID:	23842  
__________________

Reply With Quote
  #24  
Old 05-26-2003, 06:20 AM
CheeToS2 CheeToS2 is offline
That Guy
CheeToS2's Avatar
Join Date: Dec 2001
Location: Seattle, WA
Posts: 2,528
CheeToS2 will become famous soon enough
Send a message via AIM to CheeToS2
bwahaha.
Attached Thumbnails
Click image for larger version

Name:	monkey5.gif
Views:	84
Size:	115.0 KB
ID:	23844  
__________________

Reply With Quote
  #25  
Old 05-26-2003, 06:24 AM
Dude6252000 Dude6252000 is offline
More often known as Karsh
Dude6252000's Avatar
Join Date: May 2002
Location: USA.
Posts: 2,603
Dude6252000 is on a distinguished road
Send a message via AIM to Dude6252000
Karsh wins.
Attached Images
 
__________________
BEING AWAY FROM THE FORUMS RULES

http://www.livejournal.com/users/karsheth/
Reply With Quote
  #26  
Old 05-26-2003, 06:58 AM
Falados Falados is offline
Cucumber NPC
Falados's Avatar
Join Date: Jan 2003
Posts: 141
Falados is on a distinguished road
Send a message via ICQ to Falados Send a message via AIM to Falados
Hah, no match.
Attached Thumbnails
Click image for larger version

Name:	cucumberframed.jpg
Views:	86
Size:	20.5 KB
ID:	23846  
__________________

subliminal message: 1+1=3
Reply With Quote
  #27  
Old 05-26-2003, 07:25 AM
Dude6252000 Dude6252000 is offline
More often known as Karsh
Dude6252000's Avatar
Join Date: May 2002
Location: USA.
Posts: 2,603
Dude6252000 is on a distinguished road
Send a message via AIM to Dude6252000
Quote:
Originally posted by Falados
Hah, no match.
The gani explains my emotions.
Attached Files
File Type: gani meep.gani (8.4 KB, 79 views)
__________________
BEING AWAY FROM THE FORUMS RULES

http://www.livejournal.com/users/karsheth/
Reply With Quote
  #28  
Old 05-26-2003, 12:29 PM
Ningnong Ningnong is offline
Registered User
Ningnong's Avatar
Join Date: Nov 2002
Location: < -- way
Posts: 262
Ningnong is on a distinguished road
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*
__________________
Former Global Scripting Team Member



Last edited by Ningnong; 05-26-2003 at 03:06 PM..
Reply With Quote
  #29  
Old 05-26-2003, 06:47 PM
Deek2 Deek2 is offline
Registered User
Join Date: May 2002
Location: Springfield, Missouri
Posts: 1,578
Deek2 is on a distinguished road
LOLOLOL PWNED OMG WTF LOLOL!!11!!!!
Reply With Quote
  #30  
Old 05-26-2003, 06:48 PM
Python523 Python523 is offline
Banned
Join Date: Aug 2001
Location: Illinois
Posts: 3,498
Python523 is on a distinguished road
the monkey lives a lonely life...then
Attached Thumbnails
Click image for larger version

Name:	monkeylove.png
Views:	92
Size:	241.6 KB
ID:	23852  
Reply With Quote
  #31  
Old 05-26-2003, 07:42 PM
Dude6252000 Dude6252000 is offline
More often known as Karsh
Dude6252000's Avatar
Join Date: May 2002
Location: USA.
Posts: 2,603
Dude6252000 is on a distinguished road
Send a message via AIM to Dude6252000
Another gani explains my feelings.
Attached Files
File Type: gani awesomethread.gani (8.4 KB, 81 views)
__________________
BEING AWAY FROM THE FORUMS RULES

http://www.livejournal.com/users/karsheth/
Reply With Quote
  #32  
Old 05-26-2003, 08:20 PM
Neoreno Neoreno is offline
Cerebrate
Neoreno's Avatar
Join Date: Aug 2001
Location: England
Posts: 1,663
Neoreno is on a distinguished road
Send a message via AIM to Neoreno
Quote:
Originally posted by Dude6252000
Another gani explains my feelings.

Allow this to show mine. Maximise GraalShop.
Attached Files
File Type: gani awesomethread2.gani (9.6 KB, 79 views)
__________________

Quote:
Exitus Acta Probat: The Outcome Justifies the Deed.
Reply With Quote
  #33  
Old 05-26-2003, 11:23 PM
Milkdude99 Milkdude99 is offline
Truckin Up
Milkdude99's Avatar
Join Date: Jun 2001
Location: Central Florida
Posts: 3,390
Milkdude99 is an unknown quantity at this point
Send a message via ICQ to Milkdude99
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...
__________________

Moon God
Graal.net

---------- Home---------

Reply With Quote
  #34  
Old 05-27-2003, 12:29 AM
Dude6252000 Dude6252000 is offline
More often known as Karsh
Dude6252000's Avatar
Join Date: May 2002
Location: USA.
Posts: 2,603
Dude6252000 is on a distinguished road
Send a message via AIM to Dude6252000
Quote:
Originally posted by Neoreno



Allow this to show mine. Maximise GraalShop.
Attached Files
File Type: gani awesomethread3.gani (2.6 KB, 78 views)
__________________
BEING AWAY FROM THE FORUMS RULES

http://www.livejournal.com/users/karsheth/
Reply With Quote
  #35  
Old 05-27-2003, 01:06 AM
Tseng Tseng is offline
Sublime
Tseng's Avatar
Join Date: Jan 2003
Location: California
Posts: 0
Tseng is on a distinguished road
Haxing is bad, karsh XD
__________________
Funny Things:
Quote:
Originally posted by Stefan
I didn't ban you, I only played a little bit with my RC.
-----
Reply With Quote
  #36  
Old 05-27-2003, 01:59 AM
Dude6252000 Dude6252000 is offline
More often known as Karsh
Dude6252000's Avatar
Join Date: May 2002
Location: USA.
Posts: 2,603
Dude6252000 is on a distinguished road
Send a message via AIM to Dude6252000
again.
-EDIT- Kai, you should sticky this thread.
Attached Files
File Type: gani awesomethread4.gani (3.0 KB, 79 views)
__________________
BEING AWAY FROM THE FORUMS RULES

http://www.livejournal.com/users/karsheth/
Reply With Quote
  #37  
Old 05-27-2003, 02:20 AM
Pokilty Pokilty is offline
Registered User
Join Date: Nov 2002
Posts: 101
Pokilty is on a distinguished road
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?
__________________
"I have not failed. I've just found 10,000 ways that won't work."
"Logic is in the eye of the logician."
Reply With Quote
  #38  
Old 05-27-2003, 04:37 AM
Projectshifter Projectshifter is offline
The David
Projectshifter's Avatar
Join Date: Apr 2002
Location: USA
Posts: 912
Projectshifter is an unknown quantity at this point
Send a message via ICQ to Projectshifter Send a message via AIM to Projectshifter Send a message via MSN to Projectshifter Send a message via Yahoo to Projectshifter
*****! 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
__________________
Who has time for life these days?
Reply With Quote
  #39  
Old 05-27-2003, 02:09 PM
Pokilty Pokilty is offline
Registered User
Join Date: Nov 2002
Posts: 101
Pokilty is on a distinguished road
well for my purposes I kind of like the getnpc() idea, which i never thought of
__________________
"I have not failed. I've just found 10,000 ways that won't work."
"Logic is in the eye of the logician."
Reply With Quote
  #40  
Old 05-27-2003, 03:57 PM
adam adam is offline
http://wiki.graal.us/
adam's Avatar
Join Date: Nov 2001
Posts: 2,247
adam has a spectacular aura aboutadam has a spectacular aura about
Send a message via AIM to adam
Quote:
Originally posted by Pokilty
well for my purposes I kind of like the getnpc() idea, which i never thought of
Then I hope that means you don't have to access the string *too often.
__________________
Rogue Shadow (TCN)(NAT)(Global Development Team)

For development help, contact the patrons of the #graaldt irc channel below, I am usually there.
Click Here to Join IRC Chat Now! -- irc.freenode.net Channel: #graaldt
Quote:
<Dustyshouri> no, RogueShadow is always talking about scripts lol
<Dustyshouri> in fact, he pretty much brought Graal back as a topic single-handedly
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:40 AM.


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