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 09-25-2005, 09:43 PM
excaliber7388 excaliber7388 is offline
Banned
excaliber7388's Avatar
Join Date: Jul 2005
Location: US
Posts: 5,229
excaliber7388 can only hope to improve
Send a message via AIM to excaliber7388
hmmmm

okay, this is a script that I'm using, and it works, however when it's used around an npc baddie, it doesn't work, why yould this be happening? (baddies are both the pre-defined ones, and other ones made in similar fashions, which is most of the baddies on the sever, so i'd rather change this script)
NPC Code:
//NPC made By Excaliber
//#CLIENTSIDE
if(isweapon&&weaponfired&&playermp>4||isweapon&&mo usedown&&playermp>4){
disabledefmovement;
showimg 300,dr-crosshairs.png,mousex-.5,mousey-.35;
set shooting;
timeout=.05;
}
if(isweapon && shooting && timeout){
replaceani idle,grab;
setani grab,;
showimg 300,dr-crosshairs.png,mousex-.5,mousey-.35;
timeout=.05;
}
if(shooting&&keypressed&&strequals(#p(1),A)){
unset shooting;
hideimg 300;
enabledefmovement;
replaceani idle,idle;
setani idle,;
}

if(strequals(#w,Lightning 2)&&shooting && mousedown && leftmousebutton){
unset shooting;
playermp=playermp-5;
showimg 400,dr-lightning.png,mousex-.5,mousey-8;
newx2 = mousex;
newy2 = mousey;
for(i=1;i<100;i=i+25){
changeimgpart 400,0,0,35,i;
sleep .05;
}
putexplosion2 3,4,newx2-.75,newy2-.75;
hideimg 400;
hitobjects 2,mousex,mousey;
hitobjects 2,mousex-.25,mousey-.25;
hitobjects 2,mousex+.25,mousey-.25;
hitobjects 2,mousex-.25,mousey+.25;
hideimg 300;
timeout=.05;
replaceani idle,idle;
setani idle,;
enabledefmovement;
hideimg 302;
sleep 3;
hideimg 301;
}
if(timeout&&!shooting){
hideimg 300;
}

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 01:49 AM.


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