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 04-08-2006, 06:43 PM
coreys coreys is offline
N-Pulse Assistant Manager
coreys's Avatar
Join Date: Mar 2005
Posts: 2,180
coreys has a spectacular aura about
Send a message via AIM to coreys Send a message via MSN to coreys Send a message via Yahoo to coreys
baddie tutorial

I remember a long time ago, someone made a tutorial on gs1 baddie scripting. I've been wanting to find that tutorial to give me some help on a script I've been wanting to make, but I can't find it. Does anyone know what I'm talking about and where I can find it?
__________________

Quote:
*SlikRick: so should I even ask about your aim status?
*Xor: well if you want to
*Xor: but i am LARPING
*SlikRick: While on a computer?
*Xor: yes
*Xor: in my living room
*SlikRick: ahh
*Xor: i have a fort setup to hide from beasts
Reply With Quote
  #2  
Old 04-08-2006, 07:41 PM
Yen Yen is offline
Banned
Yen's Avatar
Join Date: Oct 2005
Location: Nova Scotia, Canada
Posts: 1,085
Yen is an unknown quantity at this point
Send a message via AIM to Yen Send a message via MSN to Yen
With the existance of the NPC Server, it's 100% useless now.
Reply With Quote
  #3  
Old 04-09-2006, 04:25 AM
coreys coreys is offline
N-Pulse Assistant Manager
coreys's Avatar
Join Date: Mar 2005
Posts: 2,180
coreys has a spectacular aura about
Send a message via AIM to coreys Send a message via MSN to coreys Send a message via Yahoo to coreys
I wanted it basically for its tutorial on scripts to follow a player.
__________________

Quote:
*SlikRick: so should I even ask about your aim status?
*Xor: well if you want to
*Xor: but i am LARPING
*SlikRick: While on a computer?
*Xor: yes
*Xor: in my living room
*SlikRick: ahh
*Xor: i have a fort setup to hide from beasts
Reply With Quote
  #4  
Old 04-09-2006, 05:09 AM
Googi Googi is offline
A Serious Epidemic
Googi's Avatar
Join Date: Oct 2001
Location: Canada
Posts: 18,866
Googi has much to be proud ofGoogi has much to be proud ofGoogi has much to be proud ofGoogi has much to be proud ofGoogi has much to be proud ofGoogi has much to be proud of
Send a message via AIM to Googi
...
Attached Files
File Type: zip baddyguide.zip (37.6 KB, 164 views)
__________________
Reply With Quote
  #5  
Old 04-09-2006, 05:12 AM
Yen Yen is offline
Banned
Yen's Avatar
Join Date: Oct 2005
Location: Nova Scotia, Canada
Posts: 1,085
Yen is an unknown quantity at this point
Send a message via AIM to Yen Send a message via MSN to Yen
Quote:
Originally Posted by Googi
...
That's great if you're trying to crash your NPC Server.

EDIT: I should probably help. This is the function I use for chasing, assuming you understand how to implement it. It's called on a .5 second timer, the gettarget() function isn't the one I use, because I'm using a more complex aggression system to pick a target. I changed it to target the nearest player, here.

PHP Code:
function Chase(dx,dy) {
  
dx limit(dx,-6,6);
  
dy limit(dy,-6,6);
  
len = (dx^dy^2) ^ .5;
  
mx = (dx len) * 1.5;
  
my = (dy len) * 1.5;
  
steps 6;
  
target gettarget();
  for (
1<= 6a++) {
    
temp.tdx target.- (mx a);
    
temp.tdy target.- (my a);
    
temp.tlen = (temp.tdx^temp.tdy^2) ^ .5;
    if (
onwall2(.5 mx amy a22) || temp.tlen 2) {
      
steps a-1;
      break;
    }
  }
  
setcharani("walk",NULL);
  
dir getdir(mx,my);
  if (
steps <= 0) return;
  if (
steps == 6move(mx*6,my*6,.6,0);
  else 
move(mx*steps,my*steps,((steps-1)/10)+.1,0+8);
}

function 
gettarget() {
  return 
findnearestplayers(x,y)[0];

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 05:24 PM.


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