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 06-15-2002, 09:17 AM
Chaos0838 Chaos0838 is offline
Revendicare
Chaos0838's Avatar
Join Date: Dec 2001
Location: Philadelphia
Posts: 905
Chaos0838 is on a distinguished road
Send a message via AIM to Chaos0838 Send a message via Yahoo to Chaos0838
NPC Baddie

I am trying to make an NPC that will attack people that are not on the VV tag.

For example:
Sting Darkmane(Man with VV tag) and Maximus(no offence Max(No tag)) are in a room together where the Baddie NPCs are. Maximus annoys Sting, so Sting says "Number 1 Attack", which shoots balls at the Maximus. Then he says "Number 1 Chase" which makes the NPC follow Maximus and kill him with his sword.

I have run into a few questions and problens o.o
If the person on the VV tag would say that, would the NPC attack him also? Would the balls be fired at him? Please help me o.o

NPC Code:

// NPC made by Vlåd Hasimir ¤Øççûlt¤ (VV)

if (created) {
// Initialize the attributes
showcharacter;
setcharprop #3,head711.png;
setcharprop #C0,black;
setcharprop #C1,gray;
setcharprop #C2,black;
setcharprop #C3,black;
setcharprop #C4,black;
setcharprop #2,no-shield.gif;
setcharprop #8,body13.png;
setcharprop #1,noxdagger-sword.png;
shieldpower = 3;
dir = 2;
dontblock;
blockagain;
}
if (playerchats && strequals(#c,Number 1 Attack)){
if (!charge1 && strequals(#g,VV)){
set attack1;
}
}

if (playerchats && strequals(#c,Stop Attack 1)){
if (strequals(#g,VV)){
unset attack1;
sprite=0;
}
}

if (playerchats && strequals(#c,Number 1 Charge)){
if (!attack1 && strequals(#g,VV)){
set charge1;
}
}
if (playerchats && strequals(#c,Stop Charge 1)){
if (strequals(#g,VV)){
sprite=0;
x=33;
y=22;
unset charge1;
dir = 2;
dontblock;
blockagain;
}
}
if (strequals(#g,VV)){
if (attack1){
sleep.1;
sprite=25;
sleep .1;
sprite=24;
sleep.1;
timeout = .5 ;
}
}
if (strequals(#g,VV)){
if (charge1){
followplayer;
timeout=1;
}
}
if (timeout){
if (attack1){
sprite=23;
shootball;
timeout = .5;
}
if (charge1){
setcharani sword, gani;
sprite=11;
play sword.wav;
hitplayer 0,1,playerx,playery;
}
}

__________________
Reply With Quote
  #2  
Old 06-15-2002, 08:14 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
= /
__________________

Quote:
The Dark Nemesis begins.......
Reply With Quote
  #3  
Old 06-15-2002, 08:15 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
i asked loriel to fix = )
__________________

Quote:
The Dark Nemesis begins.......
Reply With Quote
  #4  
Old 06-15-2002, 08:39 PM
AlexH AlexH is offline
Have A Drink On Me
AlexH's Avatar
Join Date: Jun 2001
Location: Somewhere In Time
Posts: 7,442
AlexH is on a distinguished road
Send a message via AIM to AlexH Send a message via MSN to AlexH
Wouldn't functions make that script look less messy?
__________________
QUICK LOOK BUSY JESUS IS COMING!
Reply With Quote
  #5  
Old 06-15-2002, 08:44 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
srry i know im a noob but...........
what is a function ???
the same as an tag or somthing like an Event ?
__________________

Quote:
The Dark Nemesis begins.......
Reply With Quote
  #6  
Old 06-15-2002, 09:42 PM
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
it would not work.. youd need to use a for loop in the level..
__________________

^tuff newbie ;x
RavenTelvecho
!Booj
we are 'brothers'
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:26 AM.


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