Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 01-26-2007, 03:46 AM
Devenio Devenio is offline
Scripter
Devenio's Avatar
Join Date: Dec 2006
Posts: 28
Devenio is on a distinguished road
Gmap/Gralats problem

Ok we got gmaps on a server i work for. The gralats can be dropped by s+a in inside levels but on gmaps they just dont work... How can i fix this problem so you can drop gralats in any level/gmap???
__________________

"Two things are infinite: the universe and human stupidity, and I'm not sure about the the universe.." -Einstein


Reply With Quote
  #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
  #3  
Old 01-26-2007, 09:41 AM
napo_p2p napo_p2p is offline
oh snaps
napo_p2p's Avatar
Join Date: Sep 2003
Location: Pismo Beach, California
Posts: 2,118
napo_p2p has a spectacular aura aboutnapo_p2p has a spectacular aura about
Send a message via AIM to napo_p2p Send a message via MSN to napo_p2p
Hmm, I never came across that.

Are you sure that the gmap is in serveroptions, as well as in the NPC Level List?
__________________
Scito hoc super omnia.
Haec vita est tua una sola.
Dum vita superest, utere maxime quoque puncto, momento, et hora quae habes.
Tempus neminem non manet.
Noli manere tempus.
Carpe Diem

Seize the Day.
Reply With Quote
  #4  
Old 01-27-2007, 06:35 PM
Devenio Devenio is offline
Scripter
Devenio's Avatar
Join Date: Dec 2006
Posts: 28
Devenio is on a distinguished road
ya i put 'gmaps=graallegacy,glmines,' in server options, while 'graallegacy.gmap,glmines.gmap' in npc levels list... but dont work
__________________

"Two things are infinite: the universe and human stupidity, and I'm not sure about the the universe.." -Einstein


Reply With Quote
  #5  
Old 01-27-2007, 06:58 PM
Riot Riot is offline
Delteria Management
Join Date: Nov 2003
Location: Seminole County, Florida
Posts: 280
Riot is on a distinguished road
Is the gralats gani uploaded to your server? I believe this fixed it once for me awhile ago.
Reply With Quote
  #6  
Old 01-27-2007, 11:04 PM
Devenio Devenio is offline
Scripter
Devenio's Avatar
Join Date: Dec 2006
Posts: 28
Devenio is on a distinguished road
ok it works on levels that ARENT gmaps. anyway i did upload it and still no.
__________________

"Two things are infinite: the universe and human stupidity, and I'm not sure about the the universe.." -Einstein


Reply With Quote
Reply


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 09:32 AM.


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