Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Future Improvements (https://forums.graalonline.com/forums/forumdisplay.php?f=10)
-   -   new command suggetion (https://forums.graalonline.com/forums/showthread.php?t=32798)

Warcaptain 07-03-2002 06:33 AM

new command suggetion
 
NPC Code:

prompt question,answer1,answer2,answer3;




pops up a sign on your screen, with a question and the answers you give (how big the question screen is depends on the ammt of answers you provide

then when the player answers it triggers the weapon actionansweredquestion

param1=question
param2=answer given


so for example
NPC Code:

if (playerenters){
prompt Do you feel lucky?,Yes,No;
}
if (actionansweredquestion){
if (strequals(#p(1),yes)){
playerhearts=0;
say2 Too bad punk, you arent.;
}else{
playerrupees+=100;
say2 Good kid, dont too be proud.;
}
}


Python523 07-03-2002 06:36 AM

great idea :)

cloudstrifevii 07-03-2002 10:59 PM

What might this NPC be for? A mafia hideout like on GTA3 *goes to play it*

user13-xo 07-04-2002 02:23 AM

Riddle Quests, Comfirming Stuff,.......etc.

Warcaptain 07-07-2002 07:47 AM

Quote:

Originally posted by user13-xo
Riddle Quests, Comfirming Stuff,.......etc.
exactly

like for a bank

"Are you sure you want to deposit #v(this.depamt)g in the bank?"
or for a new form of trading

"Are you sure you want to give #s(this.recacc) a #s(this.senditem) for #v(this.recammt) #s(this.recitem)?"

Terminator3001 07-10-2002 06:28 AM

it should be if (strequals(#p(0),yes)) {
blah}

AlexH 07-10-2002 06:30 AM

SOunds good.
I really like that idea.

Loriel 07-10-2002 07:58 PM

Don't be lazy and script it yourself :P

jeff335 07-10-2002 10:14 PM

I suggested this months ago. :)

So of course I think it is a capital idea.

Warcaptain 07-11-2002 01:56 PM

Quote:

Originally posted by Terminator3001
it should be if (strequals(#p(0),yes)) {
blah}


if you read...
param1 (#p(0)) is the question

param2 (#p(1)) is the answer

Falcor 07-11-2002 11:32 PM

yes, you see though, its better to script things like this yourself. Since you can do anything with your own script, you arent restricted to default.

KuJi2002 08-01-2002 02:46 AM

Nice Idea
 
Wouldn't be laggier if he scripted it?
I mean he basicaly scripted Enigma/Pandora and it lags like hell!

emortylone 08-02-2002 03:47 AM

LOLz... you can ALWAYS do stuff better yourself. make the sign stay there, or use showimg's until they type yes,or press 1, 2, 3, whatever. So what would be the point, you'd save all of 10 seconds x.x
---Shifter

Warcaptain 08-02-2002 07:45 PM

If it was hard coded into the game, its going to run faster.

No matter, what Hard coding, runs faster than something scripted.

No matter what. Somewhere along the line it will slow down as a script.

And I scripted all of enigma.

And it doesnt "lag like hell"

DarkHero2002 08-02-2002 08:20 PM

I think it would be a great idea. It would save time from having to script yourself and would definately lag less

Kaimetsu 08-02-2002 09:08 PM

Quote:

Originally posted by Warcaptain
If it was hard coded into the game, its going to run faster.

No matter, what Hard coding, runs faster than something scripted.

No matter what. Somewhere along the line it will slow down as a script.

And I scripted all of enigma.

And it doesnt "lag like hell"

The question is: Could you possibly script it badly enough to slow down anything at all to any noticable degree? This command would be a waste of Stefan's time.

Warcaptain 08-03-2002 01:19 AM

Quote:

Originally posted by Kaimetsu


The question is: Could you possibly script it badly enough to slow down anything at all to any noticable degree? This command would be a waste of Stefan's time.

how so?

its easy if you have several npc's that do prompting

every major coding language, even the lame baisic ones have a command like this.

why do functions when we have timeout loops?

because it makes things simpler, and neater

Kaimetsu 08-03-2002 01:26 AM

Quote:

Originally posted by Warcaptain


how so?

its easy if you have several npc's that do prompting

Easier, maybe. Less flexible, certainly.

Quote:

every major coding language, even the lame baisic ones have a command like this.
Only for debugging purposes. It's not relevant here.

Quote:

why do functions when we have timeout loops?

because it makes things simpler, and neater

What? How are functions related to timeout loops?

stomper_TK 08-03-2002 02:24 AM

wouldn't this work just as well? (I've only been scripting for like 3 hours)

NPC Code:

if(flag&&count=1) {
if (playertouchsme){
say2 Do you feel lucky? Yes or No?;
}
if (playerchats&&strequals(#c,Yes)) {
playerhearts=1;
say2 Too bad punk, you arent.;
}
if (playerchats&&strequals(#c,No)) {
playerrupees+=100;
say2 Good kid, dont too be proud.;
}
}


Warcaptain 08-03-2002 03:36 AM

Quote:

Originally posted by stomper_TK
wouldn't this work just as well? (I've only been scripting for like 3 hours)

NPC Code:

if(flag&&count=1) {
if (playertouchsme){
say2 Do you feel lucky? Yes or No?;
}
if (playerchats&&strequals(#c,Yes)) {
playerhearts=1;
say2 Too bad punk, you arent.;
}
if (playerchats&&strequals(#c,No)) {
playerrupees+=100;
say2 Good kid, dont too be proud.;
}
}



it would if you could use up down arrow to select Yes or No

RavenTelvecho 08-03-2002 04:04 AM

Quote:

Originally posted by Python523
great idea :)

Kyle_2002 08-05-2002 07:05 AM

One would not need a "up" or "down" arrow. All they need is a brain to type "Yes" or "No".

Here is the new edited script:
NPC Code:

if (playertouchsme&&!client.lucky) say2 Do you feel lucky? Yes or No?;
else say2 Hey I already talked to you!;
if (playerchats&&!client.lucky) {
if(strequals(#c,yes)) {
playerhearts = 1;
say2 Too bad punk, you arent.;
set client.lucky;
}
if(strequals(#c,no)) {
playerrupees+=100;
say2 Good kid, dont too be proud.;
set client.lucky;
}
}


Godspeed helped me edit it. :)

AlexH 08-05-2002 07:11 AM

True you can just type them out but by using arrows to select the correct answer (or clicking on it with the mouse) seems more profesional than typing it out.

Kyle_2002 08-05-2002 07:18 AM

Well to tel lyou the truth, I'm a newb to scripting and I don't know how. :(

user13-xo 08-05-2002 12:28 PM

Quote:

Originally posted by AlexH
True you can just type them out but by using arrows to select the correct answer (or clicking on it with the mouse) seems more profesional than typing it out.
The Babylon store script is like that :)
I'm not posting the script for it tho

Kyle_2002 08-05-2002 12:39 PM

blah I'm just too lazy to learn that...


All times are GMT +2. The time now is 07:10 PM.

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