Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   New Ideas (https://forums.graalonline.com/forums/showthread.php?t=7915)

Warcaptain 07-23-2001 03:13 PM

New Ideas
 
that way you can do something like..

rote#s(string)();

so you can do different things like..

function rote1(){}

function rote2(){}

instead of having if (strequals(#s(rote),1)){
rote1();}

it would be alot easier and cut down on scripting.

;-)


ownerofbabylon 07-23-2001 07:13 PM

Dont you hate it when like 74 people view ur post and 0 repspond? LOL

TB3 07-23-2001 07:51 PM

Ummmmmm
 
Warcaptian...... what.... the hell are you talking about?

grim_squeaker_x 07-23-2001 08:42 PM

Re: Ummmmmm
 
Quote:

Originally posted by TB3
Warcaptian...... what.... the hell are you talking about?
He's trying to say that he wants the possibility of using strings in certain places when calling functions etc.
Although it'd just be better if they added the possibility for adding arguments to functions.

ownerofbabylon 07-23-2001 11:05 PM

Shes so smart!!! :eek:

grim_squeaker_x 07-23-2001 11:12 PM

Quote:

Originally posted by ownerofbabylon
Shes so smart!!! :eek:
Hmm, I'll give you a standard answer:
  1. No I don't want to:
  2. Be your Girlfriend
  3. Work on your server
Since I noticed you keep saying such things.

ownerofbabylon 07-23-2001 11:17 PM

LOL, I know. First off im 15 and I dont need a 20 year old GF on the internet. Second, I would like if you helped but your not needed that badly. Third, I was saying those things as a joke because You go to everyones post who doesnt know somthing and script it. Your kinda like a female Kaimetsu.

Sorry, I will stop now :(

Brady2 07-23-2001 11:32 PM

Jadis:

I have never ever gotten what you mean arguments in a function?

I never really learned functions in my ---vast--- experience with C++ so are arguments the stuff in the ()'s?

Or do you mean arguments as in && and ! and || and hi.

grim_squeaker_x 07-23-2001 11:38 PM

Quote:

Originally posted by Brady2
Jadis:

I have never ever gotten what you mean arguments in a function?

I never really learned functions in my ---vast--- experience with C++ so are arguments the stuff in the ()'s?

Or do you mean arguments as in && and ! and || and hi.

Here, I'll give you a bit of code:
NPC Code:
this.z=multiplier(2,1);
function Multiplier(var1,var2) {
return var1*var2;
}


That's what I'm talking about. That you can use those var1 var2 things.

Brady2 07-23-2001 11:42 PM

Jadis:

Oh..
Ok..
I see... Oh wait.. No I don't.
I should go read some C++ tutorial or something.
Thanks though..

Merlin 07-24-2001 01:48 AM

Hey i'm in tb3's sig i feel the love.

General 07-24-2001 03:42 AM

let me give you two pieces of code to show you
NPC Code:

//Code 1 - Functions take arguments
function happy(a,b) {
return a*b;
}
variable = happy(2,2);



NPC Code:

//Code 2 - No arguments
fucntion happy() {
this.return=a*b;
}
a=2;
b=2;
happy();
variable=this.return



in both cases variable winds up equaling 4...but notice how much shorter Code 1 is than code 2

grim_squeaker_x 07-24-2001 04:14 AM

Quote:

Originally posted by General
let me give you two pieces of code to show you
NPC Code:

//Code 1 - Functions take arguments
function happy(a,b) {
return a*b;
}
variable = happy(2,2);



NPC Code:

//Code 2 - No arguments
fucntion happy() {
this.return=a*b;
}
a=2;
b=2;
happy();
variable=this.return



in both cases variable winds up equaling 4...but notice how much shorter Code 1 is than code 2

Well yes, it can be done like that but something like this won't work as good with that:
NPC Code:
function multiplier(var1,var2) {
return var1*var2;
}
blah=1;
blahblah=2;
blahblahblah=3;
this.a=multiplier(blah,blahblah);
this.b=multiplier(blahblah,blahblahblah);



Brady2 07-24-2001 09:06 AM

Jadis:

Golly guys
I appreciate this as much as I do when ma cooks me some macaroni!

Anyway gracias para me ayudando.

Knightoffrost 07-24-2001 09:09 AM

Quote:

Originally posted by grim_squeaker_x
Hmm, I'll give you a standard answer:
  1. No I don't want to:
  2. Be your Girlfriend
  3. Work on your server
Since I noticed you keep saying such things.

ROFL!! Thats funny =D

Merlin 07-24-2001 09:46 AM

haha lord walnut or whatever got told

Knightoffrost 07-24-2001 11:05 AM

Quote:

Originally posted by Merlin
haha lord walnut or whatever got told
WALNUT ROFLMAO!!! =D

General 07-24-2001 12:12 PM

lol @ walnut


All times are GMT +2. The time now is 04:03 PM.

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