View Single Post
  #3  
Old 07-15-2004, 02:44 AM
Kramer Kramer is offline
Graal2001 Graphics
Kramer's Avatar
Join Date: Jan 2003
Location: California
Posts: 646
Kramer is on a distinguished road
Send a message via AIM to Kramer
NPC Code:

if (created){
this.pos = 15;
this.speed = 1;
}
if (weaponfired && this.bootson == 1){
hideimg nums;
this.bootson = 0;
for(this.speedsel=0;this.speedsel<=5;this.speedsel ++){
hideimg 200+(this.speedsel);
}
hideimg 230;
hideimg 231;
this.pos =15;
}
else if (weaponfired){
this.bootson = 1;
for(this.speedsel=1;this.speedsel<=5;this.speedsel ++){
this.pos=this.pos+20;
showtext 200+(this.speedsel),this.pos,115,,,#v(this.speedse l);
changeimgvis 200+(this.speedsel),5;
}
showimg 231,admingui.gif,10,115;
changeimgvis 231,4;
timeout = .05;
}
if (timeout && this.bootson == 1) {
for (i=0;i<4;i++) {
if (keydown(i)) {
playerx += (vecx(i)/2)*this.speed;
playery += (vecy(i)/2)*this.speed;
}
}
showtext 230,30,135,,,X: #v(mousescreenx) Y: #v(mousescreeny);
changeimgvis 230,5;
if (mousescreenx in |35,45| && mousescreeny in |120,135|){
if(leftmousebutton){
this.speed = 1;
sleep .5;
}
}
if (mousescreenx in |55,65| && mousescreeny in |120,135|){
if(leftmousebutton){
this.speed = 2;
sleep .5;
}
}
if (mousescreenx in |75,85| && mousescreeny in |120,135|){
if(leftmousebutton){
this.speed = 3;
sleep .5;
}
}
if (mousescreenx in |95,105| && mousescreeny in |120,135|){
if(leftmousebutton){
this.speed = 4;
sleep .5;
}
}
if (mousescreenx in |115,125| && mousescreeny in |120,135|){
if(leftmousebutton){
this.speed = 5;
sleep .5;
}
}
timeout = .05;
}



there's the problematic code, all clientside
__________________

~Kramer
(11:52:32 PM) Skylar: but seriously noah, you can't even call me a nerd if you took acid and installed azureus
(11:52:48 PM) Skylar: that bans you from ever calling someone a nerd
Reply With Quote