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
  #16  
Old 07-20-2006, 10:45 PM
excaliber7388 excaliber7388 is offline
Banned
excaliber7388's Avatar
Join Date: Jul 2005
Location: US
Posts: 5,229
excaliber7388 can only hope to improve
Send a message via AIM to excaliber7388
I've set it down to 2, it didn't work x_X
Reply With Quote
  #17  
Old 07-22-2006, 06:19 PM
excaliber7388 excaliber7388 is offline
Banned
excaliber7388's Avatar
Join Date: Jul 2005
Location: US
Posts: 5,229
excaliber7388 can only hope to improve
Send a message via AIM to excaliber7388
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);
  }

Reply With Quote
  #18  
Old 07-22-2006, 08:49 PM
contiga contiga is offline
Graal2001 Administration
contiga's Avatar
Join Date: Jul 2004
Location: Netherlands
Posts: 419
contiga is an unknown quantity at this point
Send a message via ICQ to contiga Send a message via AIM to contiga Send a message via MSN to contiga Send a message via Yahoo to contiga
Quote:
Originally Posted by excaliber7388
This is the script that's doing it.
PHP Code:
  // **** here 
Lol! function onKeyPressed() in function onTimeout()?

Also setting gani to idle, and freezing when A is hold down, wouldn't support pulling or carrieng something haha.
__________________
AIM: Contiga122
MSN: [email protected]
Status:
Quote:
Originally Posted by unixmad View Post
I am also awake 3AM to help correct problems.
Quote:
Originally Posted by Bomy Island RC people
Daniel: HoudiniMan is a bad guy =p
*Bell: rofl. I first read that as houdini is a bad man. like the little kid that wants his mommy to keep her away from that boogie man
Daniel: xD
*Rufus: I wouldn't want my kids around him.
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 07:24 AM.


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