View Single Post
  #1  
Old 06-21-2005, 02:38 PM
EmpireOwnsYou EmpireOwnsYou is offline
Banned
Join Date: Mar 2005
Posts: 12
EmpireOwnsYou is on a distinguished road
onwall2 is supposed to be serverside, but doesn't work so well serverside....

I wrote up some temp code for when I would make the TNT for my server for mining, and well its tnt only so the code is sort of important to make sure rocks dont end up on walls... and also so people can not spam tnt and block area's in. For some reason onwall2 tells me that every single tile is on a wall, no matter where it is... Maybe I scripted it wrong, or maybe theres something wrong with the command? I was hoping someone could tell me.

NPC Code:

if (created){
this.rocks=5;
putrox();
}

function putrox(){
for (i=0;i<10;i++){
this.randx=x+int(random(-10,10));
this.randy=y+int(random(-10,10));
if (!onwall2(this.randx,this.randy,32,32)){
putnpc2 this.randx,this.randy,{join minerock};
this.rocks--;
i=0;
}
if (this.rocks<1){
destroy;
}
}
}



If your going to attempt to insult me for no reason what-so-ever, just stay out of the thread now, I only want answers to my issue, not worthless spam from kaimetsu.
Reply With Quote