Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting > New Scripting Engine (GS2)
FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 07-29-2007, 04:10 AM
Knightmare1 Knightmare1 is offline
Billy Allan
Knightmare1's Avatar
Join Date: Apr 2007
Posts: 804
Knightmare1 can only hope to improve
Question Checking my script

i made a gun sciript, is it right?



---------------------------------------------------------------------
//#CLIENTSIDE
function onCreated() {
client.max_m16_ammo = 10;
client.m16_ammo=10;
this.m16_on = 0;
}
function onWeaponFired() {
if (this.m16_on = 0) {
this.m16m16_on == 1 && client.m16_ammo > 0) {
replaceani("walk", "nightmare_m16_walk");
replaceani("idle", "nightmare_m16_idle");
replaceani("sword", "nightmare_m16_shoot");
} else if (this.m16_on == 1 && client.m16_ammo == 0) {
replaceani("walk", "nightmare_m16_empty_walk");
replaceani("idle", "nightmare_m16_empty_idle");
replaceani("sword", "nightmare_m16_empty_shoot");
}
} else if (this.m16_on == 1) {
this.m16_on = 0;
replaceani("walk", "walk");
replaceani("idle", "idle");
replaceani("sword", "sword");
}
}
function onKeyPressed(keycode, keychar) {
if (this.m16_on == 1 && keychar == "r") {
if (client.m16_ammo == 0) {
setani("nightmare_m16_reload", " ");
client.m16_ammo = client.max_m16_ammo;
}
}
if (keychar == "s" && client.m16_ammo > 0) {
client.m16_ammo -= 1;
setshootparams("damage", 5);
temp.shootangle = getangle(vecx(player.dir), vecy(player.dir));
shoot(player.x+vecx(player.dir), player.y+vecy(player.dir), player.z, temp.shootangle, 0, 0, "nightmare_m16_fire", NULL);
}
}
__________________
I am the devil, I am here to do to devils work.
Reply With Quote
  #2  
Old 07-29-2007, 05:06 AM
coreys coreys is offline
N-Pulse Assistant Manager
coreys's Avatar
Join Date: Mar 2005
Posts: 2,180
coreys has a spectacular aura about
Send a message via AIM to coreys Send a message via MSN to coreys Send a message via Yahoo to coreys
All I have to say is:
lol wut?
__________________

Quote:
*SlikRick: so should I even ask about your aim status?
*Xor: well if you want to
*Xor: but i am LARPING
*SlikRick: While on a computer?
*Xor: yes
*Xor: in my living room
*SlikRick: ahh
*Xor: i have a fort setup to hide from beasts
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 04:24 PM.


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