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 04-03-2003, 06:00 PM
Onijustin_P2P Onijustin_P2P is offline
Registered User
Join Date: Mar 2003
Location: The Netherlands
Posts: 64
Onijustin_P2P is on a distinguished road
Send a message via AIM to Onijustin_P2P Send a message via Yahoo to Onijustin_P2P
Dx Dy

hello,
you may know me as Dragona2002 but this just an new acc

well ok...
question

im working on a script / sniper rifle
but i want to make an shoot bullet effect on the snipex,snipey when i fire the weapon.... i just have problems with Dx and Dy x.x

heres the script (any commands are welcome yeah i know im not the bestest scripter )


NPC Code:

// NPC made by Fîêrçê Ðãr/< Rãzõr Ãçãrî
if (created) {
toweapons sniper;
}
if (isweapon) {
if (weaponfired) {
timoeut=0.1;
set client.sniping;
disabledefmovement;
snipey=playery;
snipex=playerx;
showimg 1223,dn_snipe.gif,snipex,snipey;
timeout=0.1;
}
if (timeout) {
if (client.sniping) {
if (keydown(2)) {
snipey+=0.5;
}
if (keydown(0)) {
snipey-=0.5;
}
if (keydown(1)) {
snipex-=0.5;
}
if (keydown(3)) {
snipex+=0.5;
}
if (keydown(5)) {
shoot playerx+.5,playery,0,,,1,0,fireball_effect,;
putexplosion 1,snipex,snipey;
putexplosion2 3,1,snipex,snipey;
}
}
showimg 1223,dn_snipe.gif,snipex,snipey;
setfocus snipex,snipey;
timeout=0.05;
}
if (keydown(6)) {
timeout=0;
snipey=playery;
snipex=playerx;
unset client.sniping;
hideimg 1223;
enabledefmovement;
resetfocus;
}
if (snipex<playerx&&snipey<playery) {
playerdir=0;
}
if (snipex>playerx&&snipey>playery) {
playerdir=2;
}
if (snipex<playerx&&snipey>playery) {
playerdir=1;
}
if (snipex>playerx&&snipey<playery) {
playerdir=3;
}
}

__________________
you dont get money for being an ****.....
 


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


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