Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   pulling? (https://forums.graalonline.com/forums/showthread.php?t=67340)

excaliber7388 07-20-2006 10:45 PM

I've set it down to 2, it didn't work x_X

excaliber7388 07-22-2006 06:19 PM

This is the script that's doing it.
PHP Code:

function onActionserverside()
{
  if(
params[0]=="mp")
  {
    
player.mp+=clientr.meditatelevel;
    if(
player.mp==99)
      {
        
player.mp=100;
      }
    if(
player.mp+clientr.meditatelevel>100)
    {
      while(
player.mp>100)
      {
        
player.mp++;
      }
    }
  }
  if(
params[0]=="levelup")
  {
    
clientr.meditatelevel+=2;
    
player.chat="Level up!";
    if(
clientr.meditatelevel>=25)
    {
      
clientr.meditatelevel=25;
    }
  }
}
//#CLIENTSIDE
function onWeaponfired()
{
  
this.on=1;
  
ths=is.ok=1;
  if(
clientr.meditatelevel==0)
  {
    
triggeraction(0,0,"serverside","Spells/Meditate","levelup");
  }
  else
  {
    
this.rand=int(random(0,75));
    if(
this.rand==3)
    {
      
triggeraction(0,0,"serverside","Spells/Meditate","levelup");
    }
    
setani(meditate,NULL);
    if(
player.mp<100)
    {
      
freezeplayer(.05);
      
settimer(.05);
    }
  }
}
function 
onTimeout()
{
  
this.light=.1;
  
showimg(5,"light12.png",player.x-2.5,player.y-2.5);
  
changeimgcolors(5,1,1,1,this.light);
  if(
this.ok==1)
  {
    
this.light+=.1;
  }
  else if(
this.ok==0)
  {
    
this.light-=.1;
  }
  if(
this.light>=.9)
  {
    
this.light-=.1;
    
this.ok=0;
  }
  if(
this.light<=.1)
  {
    
this.light+=.1;
    
this.ok=1;
  }
  
freezeplayer(.1);
  
setani meditate,;
  if(
player.mp<100)
  {
    
triggeraction(0,0,"serverside","Spells/Meditate","mp");
  }
  else if(
playermp==100)
  {
    
setani(idle,NULL);
    
freezeplayer(0);
    
settimer(0);
    
hideimg(5);
    
this.on=0;
    return 
0;
  }
  function 
onKeypressed()
  {
    if(
params[1]=="A")
    {
      
setani(idle,NULL);
      
freezeplayer(0);
      
settimer(0);
      
hideimg(5);
      
this.on=0;
      
params[1]=0;
      return 
0;
    }
  }
  if(
player.mp<100 && this.on==1)
  {
    
settimer(.1);
  }



contiga 07-22-2006 08:49 PM

Quote:

Originally Posted by excaliber7388
This is the script that's doing it.
PHP Code:

  // **** here 


Lol! function onKeyPressed() in function onTimeout()? x_x

Also setting gani to idle, and freezing when A is hold down, wouldn't support pulling or carrieng something haha.


All times are GMT +2. The time now is 09:42 AM.

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