Graal Forums

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

Enigma_GP6 09-24-2001 08:27 AM

Vortex
 
Please post you best vortex scripts here! We would like to se how many different ones there have been made!

-Rebel95

Xaviar 09-24-2001 08:29 AM

Re: Vortex
 
Quote:

Originally posted by Enigma_GP6
Please post you best vortex scripts here! We would like to se how many different ones there have been made!

-Rebel95

Also know as "Please post your vortex scripts so I can steal them because I am too lazy and/or stupid to make one of my own"

Brady2 09-24-2001 08:33 AM

Pachuka's is the original.. Wait nevermind, someone made that for him. ok uh whoever made that's vortex is fine for me thanks.

Enigma_GP6 09-24-2001 08:41 AM

No, I dont steal scripts, If someone else makes them, I ask permission, and if I can, I put it where I want it.

-Rebel95

Vinvect 09-24-2001 09:11 AM

well thats ease t script!

Enigma_GP6 09-24-2001 12:13 PM

Nobody has the courage to post a script...hey Kai, help us out, get this thing started......

-Rebel95

Knightoffrost 09-24-2001 06:24 PM

[ Delph Inc. ]
I'd be able to make one...but only if I know how it works :)Could someone explain what its use is and what it does?

Shard_IceFire 09-24-2001 08:55 PM

Ok i'd post my script if you told us what the hell the 'vortex' is and is supposed to do...sheesh, and you wonder why no one is giving you scripts for this.

AlexH 09-24-2001 09:36 PM

what is a vortex script? :confused:

JeffTL 09-24-2001 09:41 PM

Obtain an old levelpack, you'd find them in the Gravity Temple or in Sardon's.

AlexH 09-24-2001 09:47 PM

cant you just tell me what it is
i really cant be bothered hunting for an old lvls pack

freddyfox 09-24-2001 09:52 PM

Quote:

Originally posted by AlexH
cant you just tell me what it is

Basically, a vortex script inside an NPC would make the player be pulled towards the NPC.

AlexH 09-24-2001 09:54 PM

o that
thats pretty easy

Knightoffrost 09-24-2001 10:00 PM

[ Delph Inc. ]
Oh, yes...Now I remember. That level really pissed me off because it always kept resetting when I had to go back through the levels.
It's one of the simplest things anyone could posibly script apart from:
if (playertouchsme) {
hide;
}

joseyisleet 09-24-2001 10:03 PM

Ok this is an old ass one I made.

//Code copyrighted by Josey Hunt and may not be used without his express written permission
// NPC made by The Josey Hunt
if (playerenters) {
x=x +.5;
timereverywhere;
set spar;
timeout=0.05;
}
if (timeout&&playerx<=x&&playery<=y&&spar) {
playerx=playerx +.08;
playery=playery +.08;
timeout=0.05;
}
if (timeout&&playerx>=x&&playery>=y&&spar) {
playerx=playerx -.08;
playery=playery -.08;
timeout=0.05;
}

if (timeout&&playerx<=x&&playery>=y&&spar) {
playerx=playerx +.08;
playery=playery -.08;
timeout=0.05;
}
if (timeout&&playerx>=x&&playery<=y&&spar) {
playerx=playerx -.08;
playery=playery +.08;
timeout=0.05;
}

Dont worry about the copyright up there, use it, who cares =D This can be easily edited for other things ;)

P.S.
My new tat owns jo0! =D didnt show up in the pic very good though -curses lighting at raves. v.v

joseyisleet 09-24-2001 10:44 PM

Speak it Kaimetsu! ;) That script is pretty simple, hell I wrote that one a looong time ago (about 2 months since ive only been scripting in Graal for about 4 months) so it seems like a long time for me. ;)

joseyisleet 09-24-2001 11:07 PM

said it was old =P
if i was to redo it, itd probobally be 10 times shorter and use only about 10 - 8 lines of code =P

Enigma_GP6 09-25-2001 03:42 AM

I could script it, I just ain't got he time, Thank you for those who have posted, once someone tells me something as short as, posibly 7 lines, I will close this thread.

-Rebel95

chime 09-25-2001 03:55 AM

any who ever said the scripts in quests on classic isnt like the vortex npc that one dosent with with other npc's in the room and alot of the vortex;s people make dont work because it warps them to a npc because they mess up. I dont think vortex shoul pull it should just warp. Working with the vortex weapon as staff it just causes more problems trapping people and they like it. they try to get on houses and such and then you cant help the one person but it is the weapon used the most and the most helpful.

Enigma_GP6 09-25-2001 04:12 AM

Quote:

Originally posted by Kaimetsu


You can't close threads.

I can delete Them Faster Than You could sand-blast a stainless steel soup cracker.

-Rebel95

joseyisleet 09-25-2001 06:27 AM

alls you would have to add would be an on wall thing. just put inside one of the code, !onwall. then make one if the player is onwall itd just make the timeout 0. :D

Xaviar 09-25-2001 06:42 AM

Quote:

Originally posted by Enigma_GP6


I can delete Them Faster Than You could sand-blast a stainless steel soup cracker.

-Rebel95

I Can Capitalize Like You :D

joseyisleet 09-25-2001 06:45 AM

a question for rebel:
why do you need a shorter code as long as it all does the same?

Merlin 09-25-2001 07:00 AM

hmm well i tried maybe you could fix this code up

// NPC made by Merlin
if (playerenters || created) {
x = 30;
y = 30;
this.x = x;
this.y = y;
timeout = .5;
}
if (timeout) {
if (this.x==playerx) {
if (this.y==playery) {
this.x = x;
this.y = y;
}
elseif (!this.x==playerx) {
if (!this.y==playery) {
if (playery > 30) {
playery--;
timeout = .2;
}
elseif (playery < 30) {
playery++;
timeout = .2;
}
if (playerx < 30) {
playerx++;
timeout = .2;
}
elseif (playerx > 30) {
playerx--;
timeout = .2;
}
}
}
}
}

Vinvect 09-25-2001 07:34 AM

ok this is not mines so dont ask!
NPC Code:

// NPC made by Antago God of Gravity
if (playerenters) {
timeout=.1;
}
if (created) {
timeout=.1;
}
if(timeout){
if(playery>=19 && playery <=38){
if(playerx>=41 && playerx <=44){
playery -=.7;
}
}
if(playery>=33.5 && playery <=36.5){
if(playerx>=20 && playerx <=44){
playerx +=.7;
}
}
if(playery>=18 && playery <=20){
if(playerx>=21 && playerx <=44){
playerx -=.7;
}
}
if(playery>=17 && playery <=34){
if(playerx>=20 && playerx <=22){
playery +=.7;
}
}
timeout=.05;
}


and Antago, pleez dont ban me pleez? k.
and staff, dont ban me pleez. thx ppl!

hendelbroadaxe 09-25-2001 09:01 AM

// ========== Vortex A.I. (v1.1)==========
// written by Lord Bruges (FoD)
// for Project Quest (17/02/1999)
// email: [email protected]
// http://www.geocities.com/TimesSquare/9901/FoD/
//
//modified by sardon for 1.22
//modified by king dan for chaos continuum
//
// Below are variables which modify
// the vortex's behavior. Press PgDn
// to view them all.
//
// thanx to King Dan for the islinked idea
//
if (playerenters) {timereverywhere; timeout=.05;
if(playerscount=1){
hearts=1; //the number of hearts the vortex starts with
this.delay=0; //the pause between each attack
this.durtn=4; //the duration of each attack
loopspeed=.05; //the speed the AI loops
pulldist=.2; //the distance covered by each pull
this.power=0; //number of half hearts it drains when it gets the player
this.islinked=0; //0=no; 1or2=linked to AttackBlock: 1=Vortex On, ABs OFF; 2=Vortex On, Abs ON
}}
//do not edit anything below this
// line!!
//-----------------------------------
if (playerenters) {this.attacking=0; this.t=0;}
if (playertouchsme && this.active>0) {
if (x>playerx) {if (!onwall(playerx+.5-.5,playery+.5)) playerx=playerx-.5;if (!onwall(playerx+.5-.5,playery+.5)) playerx=playerx-.5;};
if (x<playerx) {if (!onwall(playerx+.5+.5,playery+.5)) playerx=playerx+.5;if (!onwall(playerx+.5+.5,playery+.5)) playerx=playerx+.5;};
if (y>playery) {if (!onwall(playerx+.5,playery+.5-.5)) playery=playery-.5;if (!onwall(playerx+.5,playery+.5-.5)) playery=playery-.5;};
if (y<playery) {if (!onwall(playerx+.5,playery+.5+.5)) playery=playery+.5;if (!onwall(playerx+.5,playery+.5+.5)) playery=playery+.5;};
};
if (x-playerx<1 && playerx-x<1 && y-playery<1 && playery-y<1 && this.active>0) {
if (x>playerx) {if (!onwall(playerx+.5-.5,playery+.5)) playerx=playerx-.5;if (!onwall(playerx+.5-.5,playery+.5)) playerx=playerx-.5;};
if (x<playerx) {if (!onwall(playerx+.5+.5,playery+.5)) playerx=playerx+.5;if (!onwall(playerx+.5+.5,playery+.5)) playerx=playerx+.5;};
if (y>playery) {if (!onwall(playerx+.5,playery+.5-.5)) playery=playery-.5;if (!onwall(playerx+.5,playery+.5-.5)) playery=playery-.5;};
if (y<playery) {if (!onwall(playerx+.5,playery+.5+.5)) playery=playery+.5;if (!onwall(playerx+.5,playery+.5+.5)) playery=playery+.5;};
};


if (hearts>0) {

if (this.attacking=1){this.t=this.t+loopspeed;
if (playerdir<3) {playerdir+=1} else {playerdir=0};
if (x<playerx) {playerx=playerx-pulldist};
if (x>playerx) {playerx=playerx+pulldist};
if (y<playery) {playery=playery-pulldist};
if (y>playery) {playery=playery+pulldist};}
if (this.t>=this.durtn) {this.t=0; this.attacking=0; this.image=1; }
if (this.islinked=2) set SHOOTING;
if (this.islinked=1) unset SHOOTING;
timeout=loopspeed;
}

if (this.attacking=0){this.t=this.t+loopspeed;
if (this.t>=this.delay) {this.t=0; this.attacking=1;}
if (this.islinked=1) set SHOOTING;
if (this.islinked=2) unset SHOOTING;
timeout=loopspeed;
}

if (timeout && this.active<1 && hearts>0) {this.active=1; timeout=0.1;show;}

//================================================== ===================

Brady2 09-25-2001 09:52 AM

jadis:

of course that script was written in 1.1 so it is insanely complicated. and I don't mean this one down here, I mean the one that was made by Bruges.

NPC Code:


if (playerenters||timeout) {
this.speed = .2;
timeout = .05;
if (playerdir<3) playerdir++;
else playerdir = 0;
if (abs(playerx-x)<=this.speed&&abs(playery-y)<=this.speed) {
playerx = x;
playery = y;
}
if (playery>y&&!onwall(playerx+.5,playery+1)&&!onwall (playerx+1,playery+1)&&!onwall(playerx+1.5,playery +1)) playery-=this.speed;
if (playery<y&&!onwall(playerx+.5,playery+3)&&!onwall (playerx+1,playery+3)&&!onwall(playerx+1.5,playery +3)) playery+=this.speed;
if (playerx<x&&!onwall(playerx+2.5,playery+1)&&!onwal l(playerx+2.5,playery+2)) playerx+=this.speed;
if (playerx>x&&!onwall(playerx-.5,playery+1)&&!onwall(playerx-.5,playery+2)) playerx-=this.speed;
}



chime 09-25-2001 08:46 PM

hey kaimetsu why do you have to be such a <censored>. in every question people have you have some dumb thing to say about it.if the people dont know what there doing tell them how.

chime 09-26-2001 02:24 AM

lol

entravial 09-26-2001 04:01 AM

~AlphaFlame~

You mean something like this?

if (playerenters) {
timeout=.05;
}
if (timeout) {
playerdir=playerdir+1%3;
this.ag = arctan((playery-y)/(playerx-x));
this.x = playerx-cos(this.ag)*.15*(x>playerx? -1 : 1);
this.y = playery-sin(this.ag)*.15*(x>playerx? -1 : 1);
playerx=this.x;
playery=this.y;
timeout=.05;
}

P.S - Yes, the trig was lifted from Kyle's FollowPlayer script... Don't kill me x.x

entravial 09-26-2001 04:10 AM

~AlphaFlame~

Notice the PS Kai... tell Kyle that :p

Brady2 09-26-2001 04:19 AM

Jadis:

Kaimetsu always makes me feel inferior.

entravial 09-26-2001 04:22 AM

~AlphaFlame~

It's fairly recent. Search for the post "How dare you ask me to follow a player!" I believe.

SSj_Link 09-26-2001 05:06 AM

:-D
 
Please don't be so vulgar -Kaimetsu


All times are GMT +2. The time now is 12:23 AM.

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