Graal Forums

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

talkingnoodle 12-10-2005 10:35 PM

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



talkingnoodle 12-11-2005 12:12 AM

not 1 answer in 2 hours huh...
xD

no one can fix it :/

ZeLpH_MyStiK 12-11-2005 12:36 AM

You might want to tell us what's wrong with it.

napo_p2p 12-11-2005 02:10 AM

This is one reason why I love the GUIControls so much.

talkingnoodle 12-11-2005 06:30 AM

whoa...even napo cant do it x_x

well to put it in this way...you kno eras ATM script? i tryin to make it so you type like that on screen

ZeLpH_MyStiK 12-11-2005 06:57 AM

it's not that hard to make =\
use keypressed, setstring, and showtext.

ApothiX 12-11-2005 08:38 AM

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

?

ZeLpH_MyStiK 12-11-2005 09:35 AM

I still don't see the problem here.

napo_p2p 12-12-2005 06:12 AM

Quote:

Originally Posted by talkingnoodle
whoa...even napo cant do it x_x

It's not that is it 'undoable', it is just that there is an easier way with GS2.

ApothiX 12-12-2005 03:17 PM

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.

Yen 12-12-2005 10:03 PM

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.

Lance 12-12-2005 10:12 PM

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.

Yen 12-12-2005 10:19 PM

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

Lance 12-12-2005 10:24 PM

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.

Yen 12-12-2005 10:31 PM

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.

Lance 12-12-2005 10:43 PM

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.

ZeLpH_MyStiK 12-13-2005 12:50 AM

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.

ApothiX 12-13-2005 03:21 PM

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

prozac424242 12-13-2005 08:02 PM

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.

Lance 12-13-2005 08:12 PM

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.

Yen 12-13-2005 09:35 PM

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.

Damix2 12-13-2005 09:39 PM

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.

ApothiX 12-14-2005 01:45 AM

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.

Projectshifter 12-14-2005 02:02 AM

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.

ApothiX 12-14-2005 04:03 AM

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

Kronan 12-14-2005 05:28 AM

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? :/

ZeLpH_MyStiK 12-14-2005 06:18 AM

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;


Projectshifter 12-14-2005 09:37 AM

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.

talkingnoodle 12-14-2005 11:01 PM

seeing how were completely off topic...never mind...projectshifter on RC...

thanks for your help...

xD yea rite

ZeLpH_MyStiK 12-15-2005 02:26 AM

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 -.-


All times are GMT +2. The time now is 08:42 AM.

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