Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #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
 


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 09:52 AM.


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