Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   New Scripting Engine (GS2) (https://forums.graalonline.com/forums/forumdisplay.php?f=153)
-   -   baddie (https://forums.graalonline.com/forums/showthread.php?t=85296)

greggiles 04-24-2009 11:50 PM

baddie
 
can someone help me make a baddie. it needs to move toward u, attack, and u can kill it basically. but when u kill it, ur player.kills goes up
please help

-kas

cbk1994 04-25-2009 12:42 AM

Quote:

Originally Posted by greggiles (Post 1486577)
can someone help me make a baddie. it needs to move toward u, attack, and u can kill it basically. but when u kill it, ur player.kills goes up
please help

-kas

Quote:

Originally Posted by Scripting Forum Rules
1. Be clear on your ability level. In other words, do not post asking for scripts, or asking people to fix scripts that are above your ability level. If you are writing a script to aid learning, then try writing a simpler script. If you are looking for a script for a server, then the best solution is probably to hire a scripter.

If you're actually interested in learning to script, there is a good resource here.

Angel_Light 04-25-2009 03:03 AM

Also the code gallery has a few examples if you want to learn how use those as guides.

lrn2search :P

[email protected] 04-25-2009 09:43 AM

http://forums.graal2001.com/forums/s...ighlight=baddy
Fish monster by DustyPorViva

http://forums.graal2001.com/forums/s...ighlight=baddy
A basic monster by Gambet

I just did a search for baddy, please use the search function.

Pelikano 04-25-2009 11:30 AM

I'd suggest you use Gambet's GBaddy, it helped me a lot :p

Gambet 04-27-2009 06:59 PM

I released an updated version last night: GBaddy v.2.0

greggiles 04-27-2009 09:04 PM

hey, this is really sweet. im tryin to edit the baddie a little and im havein trouble gettin my clientr.explevel to go up

if (this.mode != DEAD)
{
( clientr.explevel =+ 1) <------------
this.mode = DEAD;
this.health[0] = 0;
setcharani("dead", "");
this.chat = this.health[0] @ "/" @ this.health[1];
scheduleevent(8, "Respawn", "");
}
}
}

Gambet 04-27-2009 09:14 PM

Quote:

Originally Posted by greggiles (Post 1487188)
hey, this is really sweet. im tryin to edit the baddie a little and im havein trouble gettin my clientr.explevel to go up

if (this.mode != DEAD)
{
( clientr.explevel =+ 1) <------------
this.mode = DEAD;
this.health[0] = 0;
setcharani("dead", "");
this.chat = this.health[0] @ "/" @ this.health[1];
scheduleevent(8, "Respawn", "");
}
}
}


Try:

PHP Code:

findPlayer(this.plyr).clientr.explevel += 1


Pelikano 04-28-2009 11:59 AM

Quote:

Originally Posted by Gambet (Post 1487162)
I released an updated version last night: GBaddy v.2.0

Nice :D

greggiles 05-12-2009 12:02 PM

still a bug :/
 
I have done a bunch a tweaks and stuff to get this baddie to do what i want it to do. but for some reason, when the baddie attacks me, i cant get the clientr.stats_HP to go down

PHP Code:

function damagePlayer()
{
  
temp.randomize intrandom0101 ) );
  
temp.plyr findPlayerthis.plyr );
  if ( 
plyr.hearts )
  {
    if ( 
randomize in 092 | )
    {
      
setCharAni"natrius_ironsword_swing2"NULL );
      
plyr.stats_HP -= intrandom0.5) );    // <------------
    
}
  }
  else if ( 
randomize in 99101 | )
  {
    if ( 
this.health] < this.health] )
    {
      if ( ( 
this.health] + ) < this.health] )
      {
        
healBaddyintrandom0) ) );
      }
      else if ( ( 
this.health] + ) >= this.health] )
      {
        
healBaddythis.health] );
      }
    }
  } 


Gambet 05-12-2009 01:58 PM

Use: plyr.clientr.stat_HP

Deas_Voice 05-12-2009 02:47 PM

use the new version instead..


All times are GMT +2. The time now is 08:46 AM.

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