Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Finding Easier Ways (https://forums.graalonline.com/forums/showthread.php?t=43553)

Ethic_Sern 03-18-2003 10:30 PM

Finding Easier Ways
 
I wanted to know if i could use #inculde <string> in the header in graal scripting instead of respawing stings with like EX:thiso.string?

tlf288 03-18-2003 11:20 PM

Re: Finding Easier Ways
 
Quote:

Originally posted by Ethic_Sern
I wanted to know if i could use #inculde <string> in the header in graal scripting instead of respawing stings with like EX:thiso.string?
No.

Ethic_Sern 03-19-2003 01:48 AM

Re: Re: Finding Easier Ways
 
Quote:

Originally posted by tlf288


No.

Bahhh ya know i was hoping my C++ would pay off.... but my java does ;)

tlf288 03-19-2003 01:58 AM

Re: Re: Re: Finding Easier Ways
 
Quote:

Originally posted by Ethic_Sern

Bahhh ya know i was hoping my C++ would pay off.... but my java does ;)

It is just as easy to use thiso. strings . And if your smart and setstrings right, you can copy all in one for statement.

PastAustin 03-19-2003 04:16 AM

Re: Re: Re: Re: Finding Easier Ways
 
Quote:

Originally posted by tlf288


It is just as easy to use thiso. strings . And if your smart and setstrings right, you can copy all in one for statement.

*loves seeing scripters who know their stuff*

Python523 03-19-2003 05:28 AM

you want to copy the strings from one npc to another?

something like
with(npcs[i]) copystrings this.,thiso.;

PastAustin 03-19-2003 07:53 AM

Quote:

Originally posted by Python523
you want to copy the strings from one npc to another?

something like
with(npcs[i]) copystrings this.,thiso.;

You are kidding me, that works?

tlf288 03-19-2003 08:21 AM

Quote:

Originally posted by PastAustin


You are kidding me, that works?

Yeah, I forgot about that though x.x . I think Jagen is the one who got it implemeted becasue he wined to Stefan :p .

PastAustin 03-19-2003 11:01 PM

Quote:

Originally posted by tlf288


Yeah, I forgot about that though x.x . I think Jagen is the one who got it implemeted becasue he wined to Stefan :p .

wow that kicks. i love you jagie.
what about copyvars? i don't think it works with vars...
NPC Code:

this.test = 0;
with(getnpc(npcname))
this.test = thiso.test;
// Doesn't work, right?
// Don't you need:
this.test = 0;
setstring this.test, #v(this.test);
with(getnpc(npcname))
this.test = strtofloat(#s(thiso.test));


Python523 03-19-2003 11:52 PM

thiso vars don't exist

and stefan added it, i didnt even know it existed till I looked at the pet script

Soul-Blade 03-20-2003 01:21 AM

Wow...I really need to get with the program. So many new enhancements...

Falados 03-20-2003 02:47 AM

Quote:

Originally posted by Python523
thiso vars don't exist

Added Info: Use non-prefixed variables to transfer variable information from one NPC to the other using With()
var = this.var;
with(getnpc(NPC)) {
this.nicevariable = var;
}

Ethic_Sern 03-20-2003 02:51 AM

Re: Re: Re: Re: Finding Easier Ways
 
i KNOW how to use thiso.strings mad easy i just wanted to know if some of my C++ background would pay off to calling strings instead of thiso.strings =p. I am always tring to use my diffrent laugage knowledge to add to graal. I donno thats what i do when i am board. If ya know any ways to add stuff to header commands please post here =D that way i can play with it and so can others =p
Quote:

Originally posted by tlf288


It is just as easy to use thiso. strings . And if your smart and setstrings right, you can copy all in one for statement.


HoudiniMan 03-20-2003 07:58 AM

For me it was reverse, i knew HTML but thats just <on tag params="stuff">affected stuff<off tag>...

But after these years of doing Gscript it's a lot easier to understand things like java, c, php, etc

php is very very easy now :D

PastAustin 03-20-2003 10:23 AM

Quote:

Originally posted by Python523
you want to copy the strings from one npc to another?

something like
with(npcs[i]) copystrings this.,thiso.;

That so didn't work man...it made me very sad. I'll try it one more time. Ok nevermind, its:
NPC Code:

with(npcs[i]) copystrings from, to;


PastAustin 03-20-2003 11:26 AM

Quote:

Originally posted by Kaimetsu
The parameters are not as simple as just 'from' and 'to'. They specify a source and a destination, true, but these are both prefixes. For example:

NPC Code:
copystrings this.game,client.game;



Would take all strings starting with 'this.game' and copy them with the new prefix 'client.game'. So this.game49 would be copied under the new name client.game49.

Now that I didn't know. sweet.

Ethic_Sern 03-21-2003 02:59 AM

I like how my threads get popular and i dont even post on them much i must have good topics ;) so vote for me then =p

PastAustin 03-21-2003 08:31 AM

Quote:

Originally posted by Ethic_Sern
I like how my threads get popular and i dont even post on them much i must have good topics ;) so vote for me then =p
I don't like it when people request me to vote for them...:-/.
*yawn*

screen_name 03-21-2003 11:27 AM

Quote:

Originally posted by Ethic_Sern
I like how my threads get popular and i dont even post on them much i must have good topics ;) so vote for me then =p
Just because your thread actually has popularity, even though it had nothing to do with what you said, you believe that you deserve votes? **** you man.

azuretek23 03-21-2003 05:22 PM

Quote:

Originally posted by screen_name


Just because your thread actually has popularity, even though it had nothing to do with what you said, you believe that you deserve votes? **** you man.

hahaaha, thats kind of mean...


All times are GMT +2. The time now is 01:26 AM.

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