Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting > New Scripting Engine (GS2)
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 04-24-2009, 11:50 PM
greggiles greggiles is offline
Registered User
greggiles's Avatar
Join Date: Sep 2007
Posts: 149
greggiles has a spectacular aura about
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
Reply With Quote
  #2  
Old 04-25-2009, 12:42 AM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Quote:
Originally Posted by greggiles View Post
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.
__________________
Reply With Quote
  #3  
Old 04-25-2009, 03:03 AM
Angel_Light Angel_Light is offline
Varia Developer
Angel_Light's Avatar
Join Date: Nov 2005
Location: Knoxville, TN
Posts: 1,684
Angel_Light is on a distinguished road
Send a message via AIM to Angel_Light Send a message via MSN to Angel_Light
Also the code gallery has a few examples if you want to learn how use those as guides.

lrn2search :P
__________________
Deep into the Darkness peering...
Reply With Quote
  #4  
Old 04-25-2009, 09:43 AM
[email protected] sid.gottlieb@googlemail.com is offline
Banned
Join Date: Mar 2008
Posts: 861
sid.gottlieb@googlemail.com will become famous soon enough
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.
Reply With Quote
  #5  
Old 04-25-2009, 11:30 AM
Pelikano Pelikano is offline
Registered User
Pelikano's Avatar
Join Date: Oct 2008
Posts: 1,133
Pelikano has a little shameless behaviour in the past
I'd suggest you use Gambet's GBaddy, it helped me a lot
Reply With Quote
  #6  
Old 04-27-2009, 06:59 PM
Gambet Gambet is offline
Registered User
Join Date: Oct 2003
Posts: 2,712
Gambet is on a distinguished road
I released an updated version last night: GBaddy v.2.0
Reply With Quote
  #7  
Old 04-27-2009, 09:04 PM
greggiles greggiles is offline
Registered User
greggiles's Avatar
Join Date: Sep 2007
Posts: 149
greggiles has a spectacular aura about
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", "");
}
}
}
Reply With Quote
  #8  
Old 04-27-2009, 09:14 PM
Gambet Gambet is offline
Registered User
Join Date: Oct 2003
Posts: 2,712
Gambet is on a distinguished road
Quote:
Originally Posted by greggiles View Post
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
Reply With Quote
  #9  
Old 04-28-2009, 11:59 AM
Pelikano Pelikano is offline
Registered User
Pelikano's Avatar
Join Date: Oct 2008
Posts: 1,133
Pelikano has a little shameless behaviour in the past
Quote:
Originally Posted by Gambet View Post
I released an updated version last night: GBaddy v.2.0
Nice
Reply With Quote
  #10  
Old 05-12-2009, 12:02 PM
greggiles greggiles is offline
Registered User
greggiles's Avatar
Join Date: Sep 2007
Posts: 149
greggiles has a spectacular aura about
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] );
      }
    }
  } 

Last edited by Tigairius; 05-12-2009 at 07:39 PM.. Reason: Please wrap your code in code or php tags so it's easier to read.
Reply With Quote
  #11  
Old 05-12-2009, 01:58 PM
Gambet Gambet is offline
Registered User
Join Date: Oct 2003
Posts: 2,712
Gambet is on a distinguished road
Use: plyr.clientr.stat_HP
Reply With Quote
  #12  
Old 05-12-2009, 02:47 PM
Deas_Voice Deas_Voice is offline
Deas
Deas_Voice's Avatar
Join Date: Jun 2007
Location: Sweden
Posts: 2,264
Deas_Voice is a jewel in the roughDeas_Voice is a jewel in the rough
Send a message via AIM to Deas_Voice Send a message via MSN to Deas_Voice Send a message via Yahoo to Deas_Voice
use the new version instead..
__________________
.
WTF is real life, and where do I Download it?
There is no Real Life, just AFK!
since 2003~
I Support~
ღAeonღ | ღTestbedღ | ღDelteriaღ

if you are going to rep me, don't be an idiot, leave your name!
I got nothing but love for you
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 03:30 AM.


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