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 11-24-2011, 08:07 PM
Ohk4y Ohk4y is offline
Registered User
Ohk4y's Avatar
Join Date: Jun 2011
Posts: 43
Ohk4y is an unknown quantity at this point
Send a message via AIM to Ohk4y
Mining System Timeout

Hello! I'm trying to make a mining system and I ran into an issue. I want it to put all the rocks back to normal (from being destroyed - to how they were before the player 'hurt' them) if there are no players around the rocks.

This is what I have so far for that part of the script. keep in mind I am just testing the X and Y of the player so I can go from there.

PHP Code:
function onTimeOut() {
  for (
pl allplayers) {
    if (
pl.1.5 in |this.xthis.2|) {
      
onTrueX();
    }else 
onFalse();
    if (
pl.1.5 in |this.ythis.2|) {
      
onTrueY();
    }else 
onFalse();    
  }
 
setTimer(.05);
}

function 
onTrueX() this.chat "true X";
function 
onTrueY() this.chat "true Y";
function 
onFalse() {
  
this.chat "  ";

NOTE: This is within a class, serverside.
__________________
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 10:54 PM.


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