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 02-07-2002, 02:44 AM
Spectre1337 Spectre1337 is offline
Banned
Spectre1337's Avatar
Join Date: Nov 2001
Location: United States
Posts: 790
Spectre1337 is on a distinguished road
Send a message via AIM to Spectre1337 Send a message via Yahoo to Spectre1337
Elemental NPC Weapons

Hi, I was wondering how I would make some neat NPC weapons that arent just some stupid putexplosions but better.. I am trying to make like Summon NPCs.. There would be one called 'Fire' and one called 'Fire 2', the 'Fire' npc would put a little bit of fire and use 10 MP and the 'Fire 2' NPC would use 15 and cause more damage.. And there would be the big NPCs that would use 50 MP, like on Final Fantasy games how the summons use a butt-load of MP and the little ones use low ammounts.. Who thinks they can help me with this? I can make the images if needed..


Quote:
For scripting help you can ask people on the
npc scripting forums, like Kaimetsu
Reply With Quote
  #2  
Old 02-07-2002, 02:49 AM
GregoryYoshi GregoryYoshi is offline
Registered User
Join Date: Jan 2002
Location: Wherever I am right now
Posts: 227
GregoryYoshi is on a distinguished road
Send a message via AIM to GregoryYoshi Send a message via Yahoo to GregoryYoshi
Re: Elemental NPC Weapons

Quote:
Originally posted by Spectre1337
Hi, I was wondering how I would make some neat NPC weapons that arent just some stupid putexplosions but better.. I am trying to make like Summon NPCs.. There would be one called 'Fire' and one called 'Fire 2', the 'Fire' npc would put a little bit of fire and use 10 MP and the 'Fire 2' NPC would use 15 and cause more damage.. And there would be the big NPCs that would use 50 MP, like on Final Fantasy games how the summons use a butt-load of MP and the little ones use low ammounts.. Who thinks they can help me with this? I can make the images if needed..


If you know how to work with vecx and vecy you can make just about anything

I have 4 basic level Magic NPCs...Fireshot, IceBlast, Quake, and Aero Blast.

They are all line attacks (ie go in a straight line until collision) so you have to aim well. Hehe, Quake actually causes the screen to jitter when it hits something They all do damage through triggeraction so something like Fireshot will slowly burn the player for a short amount of time
__________________
Zayjee uses this account now. OK?
Reply With Quote
  #3  
Old 02-07-2002, 02:58 AM
Spectre1337 Spectre1337 is offline
Banned
Spectre1337's Avatar
Join Date: Nov 2001
Location: United States
Posts: 790
Spectre1337 is on a distinguished road
Send a message via AIM to Spectre1337 Send a message via Yahoo to Spectre1337
Re: Re: Elemental NPC Weapons

Quote:
Originally posted by GregoryYoshi


If you know how to work with vecx and vecy you can make just about anything

I have 4 basic level Magic NPCs...Fireshot, IceBlast, Quake, and Aero Blast.

They are all line attacks (ie go in a straight line until collision) so you have to aim well. Hehe, Quake actually causes the screen to jitter when it hits something They all do damage through triggeraction so something like Fireshot will slowly burn the player for a short amount of time
Cool, I was thinking I would try to make a Fire, Ice, Earth, Lighting, and Shadow npcs.. The neat thing about the Shadow NPC I am working on is that it hits the player with an image (shadoworb.gif or something) and once it hits them, it turns their backpal to dusk8.png and works its way back to normal ever 10 seconds I was thinking they would go in a straight line too, so we are on the same idea here.
Reply With Quote
  #4  
Old 02-07-2002, 03:09 AM
joseyisleet joseyisleet is offline
Registered User
Join Date: Aug 2001
Posts: 378
joseyisleet is on a distinguished road
-=Josey=-
The only way that you would be able to "do" your shadow NPC would be to use a server flag. Something like

if (weaponfired){
youcodehere;
}
if (yourhitplayerthinghere){
addstring server.hitbyshadow,#a;
}
Then with another NPC you'd have to check to see if the string contains their account name then set the backpal. In my opinion, backpals are pretty stupid. I'd use something like
seteffect 0,0,0,0.7;. The default is 0,0,0,0;.
__________________
Account used by Josey and Howard.
Ali G: 'Is it cause i Black?'
Reply With Quote
  #5  
Old 02-07-2002, 03:13 AM
TDO2000 TDO2000 is offline
Registered User
TDO2000's Avatar
Join Date: Jul 2001
Location: Germany
Posts: 655
TDO2000 is on a distinguished road
Quote:
Originally posted by joseyisleet
-=Josey=-
The only way that you would be able to "do" your shadow NPC would be to use a server flag. Something like

if (weaponfired){
youcodehere;
}
if (yourhitplayerthinghere){
addstring server.hitbyshadow,#a;
}
Then with another NPC you'd have to check to see if the string contains their account name then set the backpal. In my opinion, backpals are pretty stupid. I'd use something like
seteffect 0,0,0,0.7;. The default is 0,0,0,0;.
um no, he could (even on non P2p) use triggeractions (ok other player needs a weapon that does shadow thing, but it's needed with a serverflag too)...
__________________
No Webhost at the moment
Reply With Quote
  #6  
Old 02-07-2002, 03:15 AM
joseyisleet joseyisleet is offline
Registered User
Join Date: Aug 2001
Posts: 378
joseyisleet is on a distinguished road
Yeah, but, if they log off then back on it'll keep as the backpal. ;\
__________________
Account used by Josey and Howard.
Ali G: 'Is it cause i Black?'
Reply With Quote
  #7  
Old 02-07-2002, 03:18 AM
TDO2000 TDO2000 is offline
Registered User
TDO2000's Avatar
Join Date: Jul 2001
Location: Germany
Posts: 655
TDO2000 is on a distinguished road
Quote:
Originally posted by joseyisleet
Yeah, but, if they log off then back on it'll keep as the backpal. ;\
the NPC getting triggeraction could change this after logging off and on again ^_^
__________________
No Webhost at the moment
Reply With Quote
  #8  
Old 02-07-2002, 03:25 AM
Spectre1337 Spectre1337 is offline
Banned
Spectre1337's Avatar
Join Date: Nov 2001
Location: United States
Posts: 790
Spectre1337 is on a distinguished road
Send a message via AIM to Spectre1337 Send a message via Yahoo to Spectre1337
I might need a bit more help than that.... I didnt know it would be so hard... Any samples of NPCs (not only shadow) would be very appreciated thanks
Reply With Quote
  #9  
Old 02-07-2002, 03:37 AM
Spectre1337 Spectre1337 is offline
Banned
Spectre1337's Avatar
Join Date: Nov 2001
Location: United States
Posts: 790
Spectre1337 is on a distinguished road
Send a message via AIM to Spectre1337 Send a message via Yahoo to Spectre1337
How would I make the fire from a putexplosion go accross the screen until it hits something like you were talking about?
Reply With Quote
  #10  
Old 02-07-2002, 04:04 AM
joseyisleet joseyisleet is offline
Registered User
Join Date: Aug 2001
Posts: 378
joseyisleet is on a distinguished road
-=Josey=-
Lol. I checked this post before I went so I'll help you out a bit. ;P

Ok I'm considering that you've already made the first part of it so use something like:

if (weaponfired){
timeout=.05;
}
if (timeout){
this.x+=.5;
doFire();
}
function doFire(){
if (!this.x=0){
putexplosion <yourthinghere>,this.x,playery;
timeout=.05;
} else {
timeout=0;
this.x=playerx+1;
}

I'd use something similar to that. Considering I'm tired and just wrote this it may not be right. So just mess around with it. Using vecx and vecy would make it a whole lot simpler. ;D
__________________
Account used by Josey and Howard.
Ali G: 'Is it cause i Black?'
Reply With Quote
  #11  
Old 02-07-2002, 04:05 AM
joseyisleet joseyisleet is offline
Registered User
Join Date: Aug 2001
Posts: 378
joseyisleet is on a distinguished road
-=Josey=-
Quote:
Originally posted by TDO2000


the NPC getting triggeraction could change this after logging off and on again ^_^
What about finishing off the script hmm?
__________________
Account used by Josey and Howard.
Ali G: 'Is it cause i Black?'
Reply With Quote
  #12  
Old 02-07-2002, 04:21 AM
Spectre1337 Spectre1337 is offline
Banned
Spectre1337's Avatar
Join Date: Nov 2001
Location: United States
Posts: 790
Spectre1337 is on a distinguished road
Send a message via AIM to Spectre1337 Send a message via Yahoo to Spectre1337
Problem with that script, check out the screenshot... lol
Attached Thumbnails
Click image for larger version

Name:	lol.png
Views:	262
Size:	22.9 KB
ID:	11653  
Reply With Quote
  #13  
Old 02-07-2002, 05:13 AM
Wes2000 Wes2000 is offline
Registered User
Join Date: Dec 2001
Posts: 57
Wes2000 is on a distinguished road
Send a message via AIM to Wes2000
lmao thats funny

All you need to do is change the x+ to a x-. I would reccomend that you also rescript it yourself so that you actually learn to script for yourself and you learn how to fix simple bugs like that one. Last, you need to use onwall to make it stop when it hits a wall (I think you said you wanted it to).
__________________
Reply With Quote
  #14  
Old 02-07-2002, 09:42 AM
Lomgren Lomgren is offline
Senior Member, Anti-Spam
Join Date: Mar 2001
Location: Missouri
Posts: 196
Lomgren will become famous soon enough
Here is a script like what you are making;

NPC Code:

if (isweapon) {
setarray fireshot,3;
}
if (weaponfired) {
fireshot[0] = playerdir;
fireshot[1] = playerx+2*vecx(playerdir);
fireshot[2] = playery+2*vecy(playerdir);
timeout = .05;
}
if (timeout) {
putexplosion 2,fireshot[1],fireshot[2];
fireshot[1]+=vecx(fireshot[0]);
fireshot[2]+=vecy(fireshots[0]);
checkforwalls/players();
if (hitwall==1) {
break;
}
timeout = .05;
}
function checkforwalls/players() {
<insert code here>;
}



I would have put an option for multiple fireshots, but that would have taken longer to write, and that takes time...
__________________
Lomgren - devoted to classic, even though I may be gone for months on end
Reply With Quote
  #15  
Old 02-07-2002, 11:01 AM
dragoonvenganc dragoonvenganc is offline
Registered User
Join Date: Jul 2001
Location: USA
Posts: 331
dragoonvenganc is on a distinguished road
Send a message via ICQ to dragoonvenganc Send a message via AIM to dragoonvenganc
I dont help dumb people trying to copy stupid stuff make something original and dont ask for a whole script.. noobs.. man.. and the stupid *** bases.. get a life it gets old
__________________
Dragoon Vengance
Owner of Pangea Relics of Time
P2P Rp server
For info or job
Email: [email protected]
aim: dragoonvengnc
Reply With Quote
  #16  
Old 02-07-2002, 03:29 PM
joseyisleet joseyisleet is offline
Registered User
Join Date: Aug 2001
Posts: 378
joseyisleet is on a distinguished road
-=Josey=-
Well if you took off every spam thread in the NPC scripting part, it wouldn't have very many posts, almost everyone spams. Spectre I said to use vecx and vecy for it. If you can't even script why come here and ask for stuff? You could also use playerdir but that would be useless if they shot it and their dir was 0 then they turned and it was 3.... Anyway, weapon NPCs are pointless. They don't make a server good.
__________________
Account used by Josey and Howard.
Ali G: 'Is it cause i Black?'
Reply With Quote
  #17  
Old 02-07-2002, 03:43 PM
Faheria_LAT1 Faheria_LAT1 is offline
Seraphim Warrior
Faheria_LAT1's Avatar
Join Date: Oct 2001
Location: QUÉBEC!!!!!!1
Posts: 2,040
Faheria_LAT1 is on a distinguished road
Send a message via ICQ to Faheria_LAT1 Send a message via AIM to Faheria_LAT1
Quote:
Originally posted by Spectre1337
Problem with that script, check out the screenshot... lol
The 'S' Image belongs to Faheria, it was made by Shadrock or Justin and you cannot use it online k?
__________________


"I like movies where the guy shoots stuff, and then it blows up, and then this other guy shoots him, and then the first guy drives through a Coke sign, and it blows up, and the car flips over in slow motion, and then the guy gets out and pops his arm back in place, and then they fight 'cause they're out of bullets, and the guy says something like "This is Walmart, boy...and you just got price-checked!" - Broken Saints

"There is no greater sorrow than to recall in misery when we were happy" - Dante

"If you know yourself but not the enemy, for every victory gained you will also suffer a defeat" - Sun Tzu, The Art Of War

"Kingdoms ...rising without word. Collapsing without warning." - Broken Saints

Account now used by Silver and Mmmmkay
yoshee15 account has run out :[[[
Reply With Quote
  #18  
Old 02-07-2002, 03:51 PM
Saga2001 Saga2001 is offline
Wishing he had 3 feet
Join Date: Aug 2001
Location: Basement
Posts: 1,565
Saga2001 is on a distinguished road
Send a message via ICQ to Saga2001 Send a message via AIM to Saga2001 Send a message via Yahoo to Saga2001
Speaking of this, how do u unset backpals?
__________________

!Wan ( 11:27:55 AM):
can i c ur scripts please?
Zorg (RC): If I hear NPC Server call Ne0, Past Austin or Brent sexy one more time im disconnecting it
Reply With Quote
  #19  
Old 02-07-2002, 03:52 PM
nyghtGT nyghtGT is offline
Banned
nyghtGT's Avatar
Join Date: Jun 2001
Posts: 3,993
nyghtGT is on a distinguished road
Send a message via AIM to nyghtGT
Quote:
Originally posted by Saga2001
Speaking of this, how do u unset backpals?
to set the backpal to normal do:

setbackpal pics1.png
Reply With Quote
  #20  
Old 02-07-2002, 04:02 PM
Saga2001 Saga2001 is offline
Wishing he had 3 feet
Join Date: Aug 2001
Location: Basement
Posts: 1,565
Saga2001 is on a distinguished road
Send a message via ICQ to Saga2001 Send a message via AIM to Saga2001 Send a message via Yahoo to Saga2001
Quote:
Originally posted by joseyisleet
-=Josey=-
Well if you took off every spam thread in the NPC scripting part, it wouldn't have very many posts, almost everyone spams. Spectre I said to use vecx and vecy for it. If you can't even script why come here and ask for stuff? You could also use playerdir but that would be useless if they shot it and their dir was 0 then they turned and it was 3.... Anyway, weapon NPCs are pointless. They don't make a server good.
dude, whine somewhere else, make them quality, not quantity...kapisch?
__________________

!Wan ( 11:27:55 AM):
can i c ur scripts please?
Zorg (RC): If I hear NPC Server call Ne0, Past Austin or Brent sexy one more time im disconnecting it
Reply With Quote
  #21  
Old 02-08-2002, 10:33 AM
dragoonvenganc dragoonvenganc is offline
Registered User
Join Date: Jul 2001
Location: USA
Posts: 331
dragoonvenganc is on a distinguished road
Send a message via ICQ to dragoonvenganc Send a message via AIM to dragoonvenganc
Saga... anything about the system.. are u working on it.. u done..
u quite.. i need an answer
__________________
Dragoon Vengance
Owner of Pangea Relics of Time
P2P Rp server
For info or job
Email: [email protected]
aim: dragoonvengnc
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:40 PM.


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