Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Need a few examples here (https://forums.graalonline.com/forums/showthread.php?t=21130)

MeoDea 01-14-2002 07:33 AM

Need a few examples here
 
I need some code examples, to try and learn from.

First, i need something that uses sin cos and tan, or whichever are needed to make something, say,and image, circle the player

Second, i need an example of how one would use arrays to keep track of many many things at once

Any help would be GREATLY appreciated

Faheria_LAT1 01-14-2002 07:45 AM

Re: Need a few examples here
 
Quote:

Originally posted by MeoDea
I need some code examples, to try and learn from.

First, i need something that uses sin cos and tan, or whichever are needed to make something, say,and image, circle the player

Second, i need an example of how one would use arrays to keep track of many many things at once

Any help would be GREATLY appreciated


I think tan cant be used.. here's something VERY cool made by Warren, an ex-Graalian :p He also made the Popular Gravity script in the first pages (unless someone revived it) of the forum.

PHP Code:

//Eye made by Warren
if (playertouchsmetoweapons Eye of Protection;
if (
weaponfired&&playermp>=15) {
 
playermp-=15;
 
this.blah=0;
 
freezeplayer 0.75;
 while (
this.blah<6.3) {
  
putexplosion 1,cos(this.blah)*12+playerx,sin(this.blah)*6+playery;
  
putexplosion2 3,1,cos(this.blah)*4+playerx,sin(this.blah)*6+playery;
  
this.blah+=0.1;
 }




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

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