Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Reverse engineer this npc (https://forums.graalonline.com/forums/showthread.php?t=36873)

prozac424242 08-29-2002 10:13 AM

Reverse engineer this npc
 
1 Attachment(s)
Another challenge, a fairly easy one if you know a little trig for starters:

Given this attaced image,
write the code that will produce
a similar image.

some hints:

the image is showimg of @O
(thats the letter O there not number 0)

the only trig functions i use are sin() and cos()


let see how fast you can whip this out.

HoudiniMan 08-29-2002 10:53 AM

wow, a whole 17 minutes... also factoring he didn't see it as soon as it was posted... wonder if he even had to open graal

LilbrojX 08-29-2002 01:54 PM

wut if he DIDN'T? :megaeek:

jeff335 08-29-2002 11:15 PM

I can't do all that trig and stuff, I have this hacked-up version of the Flame Spiral which I use to do circle stuff.

emortylone 08-29-2002 11:24 PM

Hmm... I have something that will do a circle, I am at school so I can't play much w/ it :P
if (created)
{this.circles;
this.angle=1;
this.distance;
for (i=0;i<this.circles;i++)
{this.x=sin(this.angle)*this.distance;
this.y=cos(this.angle)*this.distance;
showimg 65+i@O,this.x,this.y;}
}
---Shifter

RavenTelvecho 08-30-2002 02:40 AM

R0bin: This is a modification of Kaimetsu's code, and if you use it in graal with a black background, a wierd (as in scary) pattern emerges.

NPC Code:

NPC Code:

if(created){
num=100;
zoomfactor=1;
angfactor=-1;
timeout=0.05;
}
if (timeout) {
num=num+10;
angfactor=angfactor+0.001;
zoomfactor=zoomfactor+0.001;
for(i=int(num*0.1);i!=num;i++){
temp=i*0.6;
temp2=zoomfactor*i/num;
showimg i,@O,200+cos(i*angfactor)*temp-temp2*8,200+sin(i*angfactor)*temp-temp2*8;
changeimgvis i,4;
changeimgcolors i,0,i,i,1;
changeimgzoom i,temp2;
}
timeout=0.05;
}





prozac424242 08-30-2002 09:06 AM

OoOoOo
 
1 Attachment(s)
Kewl stuff!
Nice work Kai and R0bin!

I mutated it even more..
used sin and cos to make a box...
Kind of a tunnel effect
that reminds me a little bit
of the electric walls
that Neo sees in the movie
The Matrix...
also used light2.png, lighting effects..

prozac424242 08-30-2002 09:08 AM

also
 
1 Attachment(s)
if by some off chance you dont have the light image
here it is...

emortylone 08-30-2002 10:39 AM

You and you're scripting challeneges, he he. You want me to teach you some NPC Server stuff still?
---Shifter

Dragona2002 08-31-2002 02:54 PM

well i need to XD

osrs 09-01-2002 05:07 AM

Re: OoOoOo
 
Quote:

Originally posted by prozac424242
Kewl stuff!
Nice work Kai and R0bin!

I mutated it even more..
used sin and cos to make a box...
Kind of a tunnel effect
that reminds me a little bit
of the electric walls
that Neo sees in the movie
The Matrix...
also used light2.png, lighting effects..

Very Good ;)

Thript 09-01-2002 01:50 PM

You know, light4.png is much nicer looking then light2.png O.o

adam 09-12-2002 01:04 AM

1 Attachment(s)
I haven't been able to post till now but this thread inspired me to make this.... attached script gani...

R0b1n-NPC 09-12-2002 01:39 AM

Uhh it inspired you to make a copy of the default idle.gani?

adam 09-13-2002 03:45 AM

Use it in graal foo ;-)
I said script gani.

R0b1n-NPC 09-15-2002 09:23 AM

Heh my bad


All times are GMT +2. The time now is 09:42 PM.

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