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-10-2005, 10:35 PM
talkingnoodle talkingnoodle is offline
Rapidwolve
talkingnoodle's Avatar
Join Date: Nov 2005
Location: Leominster, MA
Posts: 229
talkingnoodle is on a distinguished road
Send a message via AIM to talkingnoodle Send a message via MSN to talkingnoodle
Exclamation typing script

im making a script so when you type one the screen it shows what your typing...except im having a lil problem...i dno how to make the letters actually type XD...i have an idea of it done..look at the script

NPC Code:


//#CLIENTSIDE

if (created){
disablepause;
disableselectweapons;
sy = 60/100 * screenheight;
timeout = .05;
}


if (timeout){
sx = 50/100 * screenwidth+this.keyspressed;
message #v(this.keyspressed);
timeout = .05;
}
if (keypressed){
this.keyspressed++;
addstring this.lastletter,#p(1);
if (!strequals(#p(1),)){
showimg 1,@Arial@b@#s(this.lastletter),sx,sy;
changeimgvis 1,4;
changeimgzoom 1,.60;
}else{this.keyspressed--;}
}


Reply With Quote
  #2  
Old 12-11-2005, 12:12 AM
talkingnoodle talkingnoodle is offline
Rapidwolve
talkingnoodle's Avatar
Join Date: Nov 2005
Location: Leominster, MA
Posts: 229
talkingnoodle is on a distinguished road
Send a message via AIM to talkingnoodle Send a message via MSN to talkingnoodle
not 1 answer in 2 hours huh...
xD

no one can fix it :/
Reply With Quote
  #3  
Old 12-11-2005, 12:36 AM
ZeLpH_MyStiK ZeLpH_MyStiK is offline
Scripter
ZeLpH_MyStiK's Avatar
Join Date: May 2003
Location: NYC
Posts: 553
ZeLpH_MyStiK is on a distinguished road
Send a message via MSN to ZeLpH_MyStiK Send a message via Yahoo to ZeLpH_MyStiK
You might want to tell us what's wrong with it.
__________________
Reply With Quote
  #4  
Old 12-11-2005, 02:10 AM
napo_p2p napo_p2p is offline
oh snaps
napo_p2p's Avatar
Join Date: Sep 2003
Location: Pismo Beach, California
Posts: 2,118
napo_p2p has a spectacular aura aboutnapo_p2p has a spectacular aura about
Send a message via AIM to napo_p2p Send a message via MSN to napo_p2p
This is one reason why I love the GUIControls so much.
__________________
Scito hoc super omnia.
Haec vita est tua una sola.
Dum vita superest, utere maxime quoque puncto, momento, et hora quae habes.
Tempus neminem non manet.
Noli manere tempus.
Carpe Diem

Seize the Day.
Reply With Quote
  #5  
Old 12-11-2005, 06:30 AM
talkingnoodle talkingnoodle is offline
Rapidwolve
talkingnoodle's Avatar
Join Date: Nov 2005
Location: Leominster, MA
Posts: 229
talkingnoodle is on a distinguished road
Send a message via AIM to talkingnoodle Send a message via MSN to talkingnoodle
whoa...even napo cant do it

well to put it in this way...you kno eras ATM script? i tryin to make it so you type like that on screen
Reply With Quote
  #6  
Old 12-11-2005, 06:57 AM
ZeLpH_MyStiK ZeLpH_MyStiK is offline
Scripter
ZeLpH_MyStiK's Avatar
Join Date: May 2003
Location: NYC
Posts: 553
ZeLpH_MyStiK is on a distinguished road
Send a message via MSN to ZeLpH_MyStiK Send a message via Yahoo to ZeLpH_MyStiK
it's not that hard to make =\
use keypressed, setstring, and showtext.
__________________
Reply With Quote
  #7  
Old 12-11-2005, 08:38 AM
ApothiX ApothiX is offline
Okiesmokie
Join Date: May 2004
Posts: 1,447
ApothiX is on a distinguished road
Just out of curiosity, but why do you do:
PHP Code:
sx 50/100 screenwidth+this.keyspressed
instead of:
PHP Code:
sx screenwidth this.keyspressed
?
__________________


[06:24:19] * Parts: Skyld (i=silent@unaffiliated/skyld) ("Perhaps Okiesmokie did not realise that I like the boys. ")
Reply With Quote
  #8  
Old 12-11-2005, 09:35 AM
ZeLpH_MyStiK ZeLpH_MyStiK is offline
Scripter
ZeLpH_MyStiK's Avatar
Join Date: May 2003
Location: NYC
Posts: 553
ZeLpH_MyStiK is on a distinguished road
Send a message via MSN to ZeLpH_MyStiK Send a message via Yahoo to ZeLpH_MyStiK
I still don't see the problem here.
__________________
Reply With Quote
  #9  
Old 12-12-2005, 06:12 AM
napo_p2p napo_p2p is offline
oh snaps
napo_p2p's Avatar
Join Date: Sep 2003
Location: Pismo Beach, California
Posts: 2,118
napo_p2p has a spectacular aura aboutnapo_p2p has a spectacular aura about
Send a message via AIM to napo_p2p Send a message via MSN to napo_p2p
Quote:
Originally Posted by talkingnoodle
whoa...even napo cant do it
It's not that is it 'undoable', it is just that there is an easier way with GS2.
__________________
Scito hoc super omnia.
Haec vita est tua una sola.
Dum vita superest, utere maxime quoque puncto, momento, et hora quae habes.
Tempus neminem non manet.
Noli manere tempus.
Carpe Diem

Seize the Day.
Reply With Quote
  #10  
Old 12-12-2005, 03:17 PM
ApothiX ApothiX is offline
Okiesmokie
Join Date: May 2004
Posts: 1,447
ApothiX is on a distinguished road
I put it in an NPC myself, and I didn't see a problem.. perhaps you could tell us the problem before you disobey the rules and paste whole scripts.
__________________


[06:24:19] * Parts: Skyld (i=silent@unaffiliated/skyld) ("Perhaps Okiesmokie did not realise that I like the boys. ")
Reply With Quote
  #11  
Old 12-12-2005, 10:03 PM
Yen Yen is offline
Banned
Yen's Avatar
Join Date: Oct 2005
Location: Nova Scotia, Canada
Posts: 1,085
Yen is an unknown quantity at this point
Send a message via AIM to Yen Send a message via MSN to Yen
Quote:
Originally Posted by ApothiX
I put it in an NPC myself, and I didn't see a problem.. perhaps you could tell us the problem before you disobey the rules and paste whole scripts.
I don't think it's against the rules to post a script that needs fixing.



... And it just occured to me that the forums are run by a bunch of dictators.
Reply With Quote
  #12  
Old 12-12-2005, 10:12 PM
Lance Lance is offline
dark overlord
Lance's Avatar
Join Date: Sep 2003
Location: Space Jam Mountain
Posts: 5,072
Lance is on a distinguished road
Quote:
Originally Posted by Yen
I don't think it's against the rules to post a script that needs fixing.
It isn't, generally.

Quote:
... And it just occured to me that the forums are run by a bunch of dictators.
Okiesmokie doesn't run the forum.
Reply With Quote
  #13  
Old 12-12-2005, 10:19 PM
Yen Yen is offline
Banned
Yen's Avatar
Join Date: Oct 2005
Location: Nova Scotia, Canada
Posts: 1,085
Yen is an unknown quantity at this point
Send a message via AIM to Yen Send a message via MSN to Yen
Quote:
Originally Posted by Lance
Okiesmokie doesn't run the forum.

That's not what I'm refering to. If we try to oppose a mod, the message will be deleted and the topic closed. The mods don't allow the players to give their input on what should and shouldn't be allowed in the forums. They dictate what is and isn't allowed.
Quote:
dictatorship

n : a form of government in which the ruler is an absolute dictator (not restricted by a constitution or laws or opposition etc.)
Reply With Quote
  #14  
Old 12-12-2005, 10:24 PM
Lance Lance is offline
dark overlord
Lance's Avatar
Join Date: Sep 2003
Location: Space Jam Mountain
Posts: 5,072
Lance is on a distinguished road
Quote:
Originally Posted by Yen
That's not what I'm refering to. If we try to oppose a mod, the message will be deleted and the topic closed. The mods don't allow the players to give their input on what should and shouldn't be allowed in the forums. They dictate what is and isn't allowed.
You are free to provide your input, suggestions, and complaints through private messages.

That sounds like an allowance to me.
Reply With Quote
  #15  
Old 12-12-2005, 10:31 PM
Yen Yen is offline
Banned
Yen's Avatar
Join Date: Oct 2005
Location: Nova Scotia, Canada
Posts: 1,085
Yen is an unknown quantity at this point
Send a message via AIM to Yen Send a message via MSN to Yen
Quote:
Originally Posted by Lance
You are free to provide your input, suggestions, and complaints through private messages.

That sounds like an allowance to me.
No matter how many people may oppose something, this is Graal. Nothing will change unless the higher staff (mods) want it to.
We could have 90% of the Graal population saying 'We want to be able to post full scripts for others,' but it wouldn't change.
Reply With Quote
  #16  
Old 12-12-2005, 10:43 PM
Lance Lance is offline
dark overlord
Lance's Avatar
Join Date: Sep 2003
Location: Space Jam Mountain
Posts: 5,072
Lance is on a distinguished road
Quote:
Originally Posted by Yen
No matter how many people may oppose something, this is Graal. Nothing will change unless the higher staff (mods) want it to.
Care to back that claim up?

Quote:
We could have 90% of the Graal population saying 'We want to be able to post full scripts for others,' but it wouldn't change.
You can post full scripts that you've made to show off.

Not to solve others' problems.
Reply With Quote
  #17  
Old 12-13-2005, 12:50 AM
ZeLpH_MyStiK ZeLpH_MyStiK is offline
Scripter
ZeLpH_MyStiK's Avatar
Join Date: May 2003
Location: NYC
Posts: 553
ZeLpH_MyStiK is on a distinguished road
Send a message via MSN to ZeLpH_MyStiK Send a message via Yahoo to ZeLpH_MyStiK
Quote:
Originally Posted by Lance
You can post full scripts that you've made to show off. Not to solve others' problems.
Yep, or for teaching purposes. Many has done just that, none of which had their thread deleted.
__________________
Reply With Quote
  #18  
Old 12-13-2005, 03:21 PM
ApothiX ApothiX is offline
Okiesmokie
Join Date: May 2004
Posts: 1,447
ApothiX is on a distinguished road
Quote:
Originally Posted by Lance
Okiesmokie doesn't run the forum.
Lies. All lies.

Quote:
Originally Posted by Yen
We could have 90% of the Graal population saying 'We want to be able to post full scripts for others,' but it wouldn't change.
Because those 90% of people don't understand the point of the rule. If you post entire scripts when people have a problem, two things will happen:

1) The person will not learn anything, because more than likely they wouldn't even look over the script that is being handed to them, let alone try to learn what it is doing.

2) Everyone will start asking for handouts, instead of attempting to write the script first on their own.

Edit:
I swear I saw Lance say "This is not a democracy" in a thread awhile ago, too bad I can't find where it is
__________________


[06:24:19] * Parts: Skyld (i=silent@unaffiliated/skyld) ("Perhaps Okiesmokie did not realise that I like the boys. ")
Reply With Quote
  #19  
Old 12-13-2005, 08:02 PM
prozac424242 prozac424242 is offline
Registered User
prozac424242's Avatar
Join Date: May 2001
Location: Gone crazy: back soon
Posts: 356
prozac424242 is on a distinguished road
Send a message via ICQ to prozac424242 Send a message via AIM to prozac424242
Quote:
Originally Posted by Lance
You are free to provide your input, suggestions, and complaints through private messages.
So if someone has "input" where the information is the answer you need (a full working version of your script), then the way the rule seems to be presented, nothing stops people from using the private message feature of the forums to freely exchange full npcs. Just don't post that same information in this part of the forums, becasue that's the rule. I don't like that rule, but the rule does not require me to like it. It just is because Lance says so. It dosen't matter that there is an extremely easy way around the rule - the forum pm. Or instant messaging. Or hosting a bunch of free scripts on websites. Once someones chooses to be stubborn, only that person can choose to see how foolish their rules are, or not.
__________________

Useful links:
Graal Stats
Client Script Functions-GS1 to GS2
Serverside Script Functions-Gscript page
Particle Engine-Player Attributes
Server Options-Admin rights-Gmaps
Quote:
Originally Posted by Admins
Thanks for developing and improving playerworlds and such
Reply With Quote
  #20  
Old 12-13-2005, 08:12 PM
Lance Lance is offline
dark overlord
Lance's Avatar
Join Date: Sep 2003
Location: Space Jam Mountain
Posts: 5,072
Lance is on a distinguished road
Quote:
Originally Posted by prozac424242
So if someone has "input" where the information is the answer you need (a full working version of your script), then the way the rule seems to be presented, nothing stops people from using the private message feature of the forums to freely exchange full npcs.
Would you please try to be a little more coherent? I am having trouble deciphering your first sentence.

Quote:
Just don't post that same information in this part of the forums, becasue that's the rule. I don't like that rule, but the rule does not require me to like it. It just is because Lance says so.
The rule dates back at the very least to Kaimetsu's moderation of this forum. The rule is not by me, though I fully support it.

Quote:
It dosen't matter that there is an extremely easy way around the rule - the forum pm. Or instant messaging. Or hosting a bunch of free scripts on websites.
It will not be done in this forum.

Quote:
Once someones chooses to be stubborn, only that person can choose to see how foolish their rules are, or not.
How is it foolish? You have not yet established this.
Reply With Quote
  #21  
Old 12-13-2005, 09:35 PM
Yen Yen is offline
Banned
Yen's Avatar
Join Date: Oct 2005
Location: Nova Scotia, Canada
Posts: 1,085
Yen is an unknown quantity at this point
Send a message via AIM to Yen Send a message via MSN to Yen
If people need to ask how to do a script, rhyming off a list of commands isn't going to help, especially since there's no GS2 documentation.

Personally, I find it easier to learn from a full script, rather than people telling me something like 'keypressed, strings, and a for loop.'
It would be nice if we could post full scripts for people as long as they're learning from them, rather than asking for a script over and over.
Reply With Quote
  #22  
Old 12-13-2005, 09:39 PM
Damix2 Damix2 is offline
RED SQUARE CLUB
Join Date: Nov 2003
Location: NY-what's better?
Posts: 3,577
Damix2 will become famous soon enough
Quote:
Originally Posted by Yen
If people need to ask how to do a script, rhyming off a list of commands isn't going to help, especially since there's no GS2 documentation.
wiki

Quote:
Originally Posted by Yen
Personally, I find it easier to learn from a full script, rather than people telling me something like 'keypressed, strings, and a for loop.'
It would be nice if we could post full scripts for people as long as they're learning from them, rather than asking for a script over and over.

The former reasons have been stated by Okiesmokie, if you want to learn from other scripts, there is a great section on graal.net for scripts to be posted.

What it comes down to, is the people here are not your personal scripters. If you want a script for your server then either.
A) Script it yourself, we will provide plenty of direction and help if needbe
B) Hire a Scripter for your server. Who can also ask for help here, if he/she so wishes.
__________________
Reply With Quote
  #23  
Old 12-14-2005, 01:45 AM
ApothiX ApothiX is offline
Okiesmokie
Join Date: May 2004
Posts: 1,447
ApothiX is on a distinguished road
Quote:
Originally Posted by Yen
Personally, I find it easier to learn from a full script, rather than people telling me something like 'keypressed, strings, and a for loop.'
It would be nice if we could post full scripts for people as long as they're learning from them, rather than asking for a script over and over.
Like I said, most people wouldn't 'learn' off it as much as they would copy and paste and claim it as their own. You also get a bigger feeling of accomplishment if you do something yourself, instead of copying and pasting code.
__________________


[06:24:19] * Parts: Skyld (i=silent@unaffiliated/skyld) ("Perhaps Okiesmokie did not realise that I like the boys. ")
Reply With Quote
  #24  
Old 12-14-2005, 02:02 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
People putting up full scripts to have fixed is pointless. I have the same position I've had for the last several years: I'm more than willing to teach you HOW to do it, but I'm not going to do it for you. It's the "give a man a fish, feed him for a day; teach a man to fish, feed him for life".

The wiki does exist for the new engine, I'm not quite sure if I consider it "complete" or easy to use as it's basically a little expansion on the document Stefan wrote previously. If there is enough demand for it, I could sit down and write another tutorial, for the new engine, because I really would like to see servers convert to it. It really bothers me when I see coders still writing everything in the old engine when they have access to the new one as well, hopefully more people will pick up the new engine (which has great advantages), and then everyone can move forward.
__________________
Who has time for life these days?
Reply With Quote
  #25  
Old 12-14-2005, 04:03 AM
ApothiX ApothiX is offline
Okiesmokie
Join Date: May 2004
Posts: 1,447
ApothiX is on a distinguished road
Quote:
Originally Posted by Projectshifter
People putting up full scripts to have fixed is pointless. I have the same position I've had for the last several years: I'm more than willing to teach you HOW to do it, but I'm not going to do it for you. It's the "give a man a fish, feed him for a day; teach a man to fish, feed him for life".
I offered to teach the NATs on UN how to use the new engine if they were to switch, and my request was denied.

Quote:
Originally Posted by Projectshifter
The wiki does exist for the new engine, I'm not quite sure if I consider it "complete" or easy to use as it's basically a little expansion on the document Stefan wrote previously. If there is enough demand for it, I could sit down and write another tutorial, for the new engine, because I really would like to see servers convert to it. It really bothers me when I see coders still writing everything in the old engine when they have access to the new one as well, hopefully more people will pick up the new engine (which has great advantages), and then everyone can move forward.
The good thing about the wiki is, anyone can contribute. If you know something about the new engine that isn't in the wiki, feel free to add it
__________________


[06:24:19] * Parts: Skyld (i=silent@unaffiliated/skyld) ("Perhaps Okiesmokie did not realise that I like the boys. ")
Reply With Quote
  #26  
Old 12-14-2005, 05:28 AM
Kronan Kronan is offline
yo
Kronan's Avatar
Join Date: May 2001
Location: Florida, USA
Posts: 682
Kronan is on a distinguished road
Send a message via ICQ to Kronan Send a message via AIM to Kronan Send a message via Yahoo to Kronan
Um.. shouldn't

NPC Code:

showimg 1,@Arial@b@#s(this.lastletter),sx,sy;



be

NPC Code:


showtext(1,sx,sy,"Arial","b",#s(this.lastletter));




But in the GS1 form, i'm not exactly sure how it works in GS1, but I'm not sure if showimg will also show text? :/
__________________
Reply With Quote
  #27  
Old 12-14-2005, 06:18 AM
ZeLpH_MyStiK ZeLpH_MyStiK is offline
Scripter
ZeLpH_MyStiK's Avatar
Join Date: May 2003
Location: NYC
Posts: 553
ZeLpH_MyStiK is on a distinguished road
Send a message via MSN to ZeLpH_MyStiK Send a message via Yahoo to ZeLpH_MyStiK
Quote:
Originally Posted by Kronan
Um.. shouldn't

NPC Code:

showimg 1,@Arial@b@#s(this.lastletter),sx,sy;



be

NPC Code:


showtext(1,sx,sy,"Arial","b",#s(this.lastletter));




But in the GS1 form, i'm not exactly sure how it works in GS1, but I'm not sure if showimg will also show text? :/
NPC Code:
showimg index,@font@style@text,x,y;


works the same as
NPC Code:
showtext index,x,y,font,style,text;

__________________
Reply With Quote
  #28  
Old 12-14-2005, 09: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
Quote:
Originally Posted by ApothiX
The good thing about the wiki is, anyone can contribute. If you know something about the new engine that isn't in the wiki, feel free to add it
I totally understand the concept of a Wiki, as I've contributed to many. My thing is that it really isn't organized and I don't think a standard Wiki without some modifications really helps many people in this case. I'd consider revising some of the code so instead of being a purely open-ended Wiki, it would be a little more organized with the topic of scripting. Right now it's like 4 pages plus some generic stuff, it doesn't quite give much direction for a lot of people. I have no problem using it, but a lot of people feel a little turned off by how it is setup.
__________________
Who has time for life these days?
Reply With Quote
  #29  
Old 12-14-2005, 11:01 PM
talkingnoodle talkingnoodle is offline
Rapidwolve
talkingnoodle's Avatar
Join Date: Nov 2005
Location: Leominster, MA
Posts: 229
talkingnoodle is on a distinguished road
Send a message via AIM to talkingnoodle Send a message via MSN to talkingnoodle
seeing how were completely off topic...never mind...projectshifter on RC...

thanks for your help...

xD yea rite
Reply With Quote
  #30  
Old 12-15-2005, 02:26 AM
ZeLpH_MyStiK ZeLpH_MyStiK is offline
Scripter
ZeLpH_MyStiK's Avatar
Join Date: May 2003
Location: NYC
Posts: 553
ZeLpH_MyStiK is on a distinguished road
Send a message via MSN to ZeLpH_MyStiK Send a message via Yahoo to ZeLpH_MyStiK
Quote:
Originally Posted by talkingnoodle
seeing how were completely off topic...never mind...projectshifter on RC...

thanks for your help...

xD yea rite
we're completely off topic because you never told us what your problems were. you just threw a full script at us and told us to fix it -.-
__________________
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 11:45 PM.


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