View Single Post
  #2  
Old 01-26-2007, 04:06 AM
Tolnaftate2004 Tolnaftate2004 is offline
penguin.
Join Date: Jul 2004
Location: Berkeley, CA
Posts: 534
Tolnaftate2004 is a jewel in the roughTolnaftate2004 is a jewel in the rough
Send a message via AIM to Tolnaftate2004
This happened on Zenkou a while back. I'm not too sure how it was fixed, but eventually it worked again. In the meantime though, we used a stand-in script.

A gift from me to you.
PHP Code:
function onActionserverside() {
  if (
params[0] == "placemoney"){
    if (
player.rupees params[3]) return false;
    
thiso.tnpc = -1;
    
intNPCscount npcs.size();
    for (
this.i=0;this.i<intNPCscount;this.i++){
      
this.= ((params[1] - npcs[this.i].x)^+ (params[2] - npcs[this.i].y)^2)^.5;
      if (
this.3){
        
with(npcs[this.i]){
          for (
this.i=0;this.i<intNPCscount;this.i++){
            if (
npcs[this.i].id == id){
              
thiso.tnpc this.i;
              break;
            }
          }
        }
        if (
thiso.tnpc != -1) break;
      }
    }
    
with(npcs[thiso.tnpc]){
      if (
this.ani == "gralat"){ /* I recall this not working, you may need to use a variable that will recognize it as a gralat */
        
rupees += params[3];
        
this.updategani();
      }else{
        
temp.npc putnpc2(params[1],params[2]-1,{"join(\"gralats;\");"});
        
with(temp.npc){
          
this.owner playero.account;
          
rupees params[3];
          
this.updategani();
        }
      }
    }
    
thiso.tnpc NULL;
  }
}
//#CLIENTSIDE
function onCreated() onTimeout();
function 
onTimeout() {
  
this.rupeesn player.rupees;
  
intItemscount items.size();
  for (
this.i=0;this.i<intItemscount;this.i++){
    if (
items[this.i].type in {0,1,2,19}){
      
this.val = (items[this.i].type == 0) + (items[this.i].type == 1)*+ (items[this.i].type == 2)*30 + (items[this.i].type == 19)*100;
      
this.coords = {items[this.i].x-(playerx%64),items[this.i].y-(playery%64)};
      if (
this.rupeeso this.rupeesn this.val == 0){
        
triggeraction(0,0,"serverside",this.name,"placemoney",playerx+this.coords[0],playery+this.coords[1],this.val);
      }
      
take2(this.i);
      
temp.1;
    }
  }
  if (
temp.== 1sleep(.3);
  
this.rupeeso player.rupees;
  
timeout .05;

You will need to change the gralat class to make updategani a public function. And please take note that this is a pretty strict transliteration from GS1.
__________________
◕‿‿◕ · pfa · check yer syntax! · src

Killa Be: when i got that locker in 6th grade the only thing in it was a picture of a midget useing a firehose :/
Reply With Quote