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
  #16  
Old 09-24-2001, 10:44 PM
joseyisleet joseyisleet is offline
Registered User
Join Date: Aug 2001
Posts: 378
joseyisleet is on a distinguished road
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.
__________________
Account used by Josey and Howard.
Ali G: 'Is it cause i Black?'
Reply With Quote
  #17  
Old 09-24-2001, 11:07 PM
joseyisleet joseyisleet is offline
Registered User
Join Date: Aug 2001
Posts: 378
joseyisleet is on a distinguished road
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
__________________
Account used by Josey and Howard.
Ali G: 'Is it cause i Black?'
Reply With Quote
  #18  
Old 09-25-2001, 03:42 AM
Enigma_GP6 Enigma_GP6 is offline
Banned
Join Date: Jul 2001
Location: Who?
Posts: 261
Enigma_GP6 is on a distinguished road
Send a message via ICQ to Enigma_GP6 Send a message via AIM to Enigma_GP6
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
Reply With Quote
  #19  
Old 09-25-2001, 03:55 AM
chime chime is offline
Registered User
Join Date: Sep 2001
Posts: 132
chime is on a distinguished road
Send a message via ICQ to chime Send a message via AIM to chime
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.
Reply With Quote
  #20  
Old 09-25-2001, 04:12 AM
Enigma_GP6 Enigma_GP6 is offline
Banned
Join Date: Jul 2001
Location: Who?
Posts: 261
Enigma_GP6 is on a distinguished road
Send a message via ICQ to Enigma_GP6 Send a message via AIM to Enigma_GP6
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
Reply With Quote
  #21  
Old 09-25-2001, 06:27 AM
joseyisleet joseyisleet is offline
Registered User
Join Date: Aug 2001
Posts: 378
joseyisleet is on a distinguished road
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.
__________________
Account used by Josey and Howard.
Ali G: 'Is it cause i Black?'
Reply With Quote
  #22  
Old 09-25-2001, 06:42 AM
Xaviar Xaviar is offline
Registered User
Join Date: Aug 2001
Location: Fairyland
Posts: 463
Xaviar is on a distinguished road
Send a message via ICQ to Xaviar Send a message via AIM to Xaviar
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
__________________
One by one, the penguins steal my sanity.

*cookie for Xaviar* --Originally posted by Tyhm

--Xaviar

A m e r i c a
Reply With Quote
  #23  
Old 09-25-2001, 06:45 AM
joseyisleet joseyisleet is offline
Registered User
Join Date: Aug 2001
Posts: 378
joseyisleet is on a distinguished road
a question for rebel:
why do you need a shorter code as long as it all does the same?
__________________
Account used by Josey and Howard.
Ali G: 'Is it cause i Black?'
Reply With Quote
  #24  
Old 09-25-2001, 07:00 AM
Merlin Merlin is offline
Banned
Merlin's Avatar
Join Date: Jul 2001
Location: Merlin - U S A Malak - United Kingdom
Posts: 2,543
Merlin is on a distinguished road
Send a message via ICQ to Merlin Send a message via AIM to Merlin
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;
}
}
}
}
}
Reply With Quote
  #25  
Old 09-25-2001, 07:34 AM
Vinvect Vinvect is offline
Registered User
Join Date: Aug 2001
Location: U.S.A,California,Milpitas,In A House,In Room,On A Seat,On a Computer
Posts: 157
Vinvect is on a distinguished road
Send a message via ICQ to Vinvect Send a message via Yahoo to Vinvect
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!
__________________
==========================
I Script Really Good
&
Looking For A NAT Job
==========================
Quote:
That's like a big lugee!
-Evolution The Movie
Quote:
Ha Ha Ha Give It Up!
-Cyrus From Bomberman
I'm not a Bomy anymore.
I'm a MUTATED BROCLI MONSTER!
(or SIGN MONSTER)
If you make me angry,
I'LL EAT YOU WHOLE!
ME, MUTATED BROCLI MONSTER MASTER
(or SIGN MONSTER)
WILL EAT YOU ALL UP!
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Quest Valley Owner
Looking For Staff
Pm Me
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
O.o Still Have My Braen Damaegd o.O


Thanks To Esiah, He Made This For Me!
Thanks Esiah!
Reply With Quote
  #26  
Old 09-25-2001, 09:01 AM
hendelbroadaxe hendelbroadaxe is offline
Registered User
Join Date: Sep 2001
Posts: 65
hendelbroadaxe is on a distinguished road
// ========== 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;}

//================================================== ===================
__________________
Horny=Pleasure | Pleasure=Tight ***** | Tight *****=Satisfied
[img]http://rick.*******ers.net/sr/users/~lost/nick1.jpg[/img]
Click My Sig!
Reply With Quote
  #27  
Old 09-25-2001, 09:52 AM
Brady2 Brady2 is offline
Registered User
Brady2's Avatar
Join Date: Mar 2001
Location: Phoenix, AZ and Wichita Falls, TX
Posts: 924
Brady2 is on a distinguished road
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;
}


Reply With Quote
  #28  
Old 09-25-2001, 08:46 PM
chime chime is offline
Registered User
Join Date: Sep 2001
Posts: 132
chime is on a distinguished road
Send a message via ICQ to chime Send a message via AIM to chime
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.

Last edited by Kaimetsu; 09-25-2001 at 09:12 PM..
Reply With Quote
  #29  
Old 09-26-2001, 02:24 AM
chime chime is offline
Registered User
Join Date: Sep 2001
Posts: 132
chime is on a distinguished road
Send a message via ICQ to chime Send a message via AIM to chime
lol
Reply With Quote
  #30  
Old 09-26-2001, 04:01 AM
entravial entravial is offline
Registered User
entravial's Avatar
Join Date: Mar 2001
Posts: 825
entravial is on a distinguished road
Send a message via ICQ to entravial Send a message via AIM to entravial Send a message via Yahoo to entravial
~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
__________________


If the post says ~AlphaFlame~, that's who's posting. If not, it's Entravial (owner)
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 08:07 AM.


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