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 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
 


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 05:26 AM.


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