Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 08-29-2002, 10:13 AM
prozac424242 prozac424242 is offline
Registered User
prozac424242's Avatar
Join Date: May 2001
Location: Gone crazy: back soon
Posts: 356
prozac424242 is on a distinguished road
Send a message via ICQ to prozac424242 Send a message via AIM to prozac424242
Reverse engineer this npc

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.
Attached Thumbnails
Click image for larger version

Name:	pro-sprl.gif
Views:	440
Size:	7.2 KB
ID:	20124  
__________________

Useful links:
Graal Stats
Client Script Functions-GS1 to GS2
Serverside Script Functions-Gscript page
Particle Engine-Player Attributes
Server Options-Admin rights-Gmaps
Quote:
Originally Posted by Admins
Thanks for developing and improving playerworlds and such
Reply With Quote
  #2  
Old 08-29-2002, 10:53 AM
HoudiniMan HoudiniMan is offline
Playerworld Administrator
HoudiniMan's Avatar
Join Date: Dec 2001
Location: Calfiornia - USA
Posts: 3,512
HoudiniMan will become famous soon enough
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
__________________
-HoudiniMan (Chief Playerworld Administrator)
Compulsive Support Center Checker - 5 Years and Change
Graal Support Center

Reply With Quote
  #3  
Old 08-29-2002, 01:54 PM
LilbrojX LilbrojX is offline
why dont you marry it?
LilbrojX's Avatar
Join Date: Mar 2001
Location: hmm
Posts: 1,465
LilbrojX is on a distinguished road
Send a message via AIM to LilbrojX Send a message via Yahoo to LilbrojX
wut if he DIDN'T?
__________________

http://www.dictionary.com/search?q=arrogant
kai is an expert on all things arrogant
Reply With Quote
  #4  
Old 08-29-2002, 11:15 PM
jeff335 jeff335 is offline
Registered User
Join Date: Oct 2001
Posts: 605
jeff335 is on a distinguished road
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.
__________________

Quote:
Some people like standing around talking to idiots in the real world, and some don't. Neither choice is inherently better than the other.

-Kaimetsu
Reply With Quote
  #5  
Old 08-29-2002, 11:24 PM
emortylone emortylone is offline
Registered User
Join Date: Apr 2002
Location: Control-NPC
Posts: 834
emortylone is on a distinguished road
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
__________________
Quote:
*Stefan: it seems sometimes they hire newbie scripters everywhere x-x
*Stefan: scripters are sometimes like people that draw paintings
*Stefan: all that counts is that it looks nice
Reply With Quote
  #6  
Old 08-30-2002, 02:40 AM
RavenTelvecho RavenTelvecho is offline
Registered User
RavenTelvecho's Avatar
Join Date: Apr 2002
Location: Toronto, Ontario, Canada
Posts: 0
RavenTelvecho is on a distinguished road
Send a message via ICQ to RavenTelvecho Send a message via AIM to RavenTelvecho Send a message via Yahoo to RavenTelvecho
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;
}




__________________

^tuff newbie ;x
RavenTelvecho
!Booj
we are 'brothers'
Reply With Quote
  #7  
Old 08-30-2002, 09:06 AM
prozac424242 prozac424242 is offline
Registered User
prozac424242's Avatar
Join Date: May 2001
Location: Gone crazy: back soon
Posts: 356
prozac424242 is on a distinguished road
Send a message via ICQ to prozac424242 Send a message via AIM to prozac424242
OoOoOo

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..
Attached Files
File Type: nw matrix_hallway.nw (10.4 KB, 307 views)
__________________

Useful links:
Graal Stats
Client Script Functions-GS1 to GS2
Serverside Script Functions-Gscript page
Particle Engine-Player Attributes
Server Options-Admin rights-Gmaps
Quote:
Originally Posted by Admins
Thanks for developing and improving playerworlds and such
Reply With Quote
  #8  
Old 08-30-2002, 09:08 AM
prozac424242 prozac424242 is offline
Registered User
prozac424242's Avatar
Join Date: May 2001
Location: Gone crazy: back soon
Posts: 356
prozac424242 is on a distinguished road
Send a message via ICQ to prozac424242 Send a message via AIM to prozac424242
also

if by some off chance you dont have the light image
here it is...
Attached Images
 
__________________

Useful links:
Graal Stats
Client Script Functions-GS1 to GS2
Serverside Script Functions-Gscript page
Particle Engine-Player Attributes
Server Options-Admin rights-Gmaps
Quote:
Originally Posted by Admins
Thanks for developing and improving playerworlds and such
Reply With Quote
  #9  
Old 08-30-2002, 10:39 AM
emortylone emortylone is offline
Registered User
Join Date: Apr 2002
Location: Control-NPC
Posts: 834
emortylone is on a distinguished road
You and you're scripting challeneges, he he. You want me to teach you some NPC Server stuff still?
---Shifter
__________________
Quote:
*Stefan: it seems sometimes they hire newbie scripters everywhere x-x
*Stefan: scripters are sometimes like people that draw paintings
*Stefan: all that counts is that it looks nice
Reply With Quote
  #10  
Old 08-31-2002, 02:54 PM
Dragona2002 Dragona2002 is offline
Registered User
Join Date: May 2002
Location: The Netherlands
Posts: 105
Dragona2002 is on a distinguished road
Send a message via AIM to Dragona2002 Send a message via Yahoo to Dragona2002
well i need to XD
__________________

Quote:
The Dark Nemesis begins.......
Reply With Quote
  #11  
Old 09-01-2002, 05:07 AM
osrs osrs is offline
Graalian since 1998
osrs's Avatar
Join Date: Mar 2002
Location: Brazil
Posts: 2,724
osrs is on a distinguished road
Send a message via ICQ to osrs Send a message via AIM to osrs Send a message via MSN to osrs Send a message via Yahoo to osrs
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
__________________
"Ability is what you are capable of doing. Motivation determines what you do. Attitude determines how well you do it."
Facebook: facebook.com/raysilvadotnet /
Reply With Quote
  #12  
Old 09-01-2002, 01:50 PM
Thript Thript is offline
Registered User
Join Date: Aug 2002
Location: Rimbey, Alberta
Posts: 457
Thript is on a distinguished road
Send a message via ICQ to Thript Send a message via AIM to Thript Send a message via Yahoo to Thript
You know, light4.png is much nicer looking then light2.png O.o
Reply With Quote
  #13  
Old 09-12-2002, 01:04 AM
adam adam is offline
http://wiki.graal.us/
adam's Avatar
Join Date: Nov 2001
Posts: 2,247
adam has a spectacular aura aboutadam has a spectacular aura about
Send a message via AIM to adam
I haven't been able to post till now but this thread inspired me to make this.... attached script gani...
Attached Files
File Type: gani tcn_shield_idle.gani (8.7 KB, 273 views)
__________________
Rogue Shadow (TCN)(NAT)(Global Development Team)

For development help, contact the patrons of the #graaldt irc channel below, I am usually there.
Click Here to Join IRC Chat Now! -- irc.freenode.net Channel: #graaldt
Quote:
<Dustyshouri> no, RogueShadow is always talking about scripts lol
<Dustyshouri> in fact, he pretty much brought Graal back as a topic single-handedly
Reply With Quote
  #14  
Old 09-12-2002, 01:39 AM
R0b1n-NPC R0b1n-NPC is offline
Registered User
Join Date: Sep 2002
Posts: 397
R0b1n-NPC is on a distinguished road
Uhh it inspired you to make a copy of the default idle.gani?
__________________
- R0bin
Reply With Quote
  #15  
Old 09-13-2002, 03:45 AM
adam adam is offline
http://wiki.graal.us/
adam's Avatar
Join Date: Nov 2001
Posts: 2,247
adam has a spectacular aura aboutadam has a spectacular aura about
Send a message via AIM to adam
Use it in graal foo ;-)
I said script gani.
__________________
Rogue Shadow (TCN)(NAT)(Global Development Team)

For development help, contact the patrons of the #graaldt irc channel below, I am usually there.
Click Here to Join IRC Chat Now! -- irc.freenode.net Channel: #graaldt
Quote:
<Dustyshouri> no, RogueShadow is always talking about scripts lol
<Dustyshouri> in fact, he pretty much brought Graal back as a topic single-handedly
Reply With Quote
  #16  
Old 09-15-2002, 09:23 AM
R0b1n-NPC R0b1n-NPC is offline
Registered User
Join Date: Sep 2002
Posts: 397
R0b1n-NPC is on a distinguished road
Heh my bad
__________________
- R0bin
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 06:39 AM.


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