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 11-19-2001, 05:10 AM
taki taki is offline
Registered User
Join Date: Nov 2001
Location: Arizona
Posts: 30
taki is on a distinguished road
bush script

how to make the classic graal bush? i made two versions, one has a bug with the 'thow-through' attribute (kinda alternates after you touch it) and the other's "supposed" to work using the setshape2 command
NPC Code:

Bush #1:
if (created){
canbecarried;
this.bushx=x; this.bushy=y;
this.mode=1;
timereverywhere;
timeout=0.05;
}
if (timeout){
if (abs((x+.5)-(playerx+.5))<=1&&abs((playery+.5)-(y+.5))<=1) this.mode=1;
else this.mode=0;
if (this.mode==0){
dontblock;
drawunderplayer;
} else{
blockagain;
drawunderplayer;
}
timeout=0.05
}
if (washit||exploded||wasthrown){
putleaps 0,x,y;
if (!wasthrown){
bushlay=int(random(0,9));
if (bushlay==0){lay2 heart,x,y;}
if (bushlay==1){lay2 bombs,x,y;}
if (bushlay==2){lay2 greenrupee,x,y;}
if (bushlay==3){lay2 bluerupee,x,y;}
}
hide;
sleep 9;
x=this.bushx; y=this.bushy;
show;
}

==================================

Bush #2
if (created){
canbecarried;
this.bushx=x; this.bushy=y;
setshape2 2,2,{20,20,20,20};
}
if (washit||exploded||wasthrown){
putleaps 0,x,y;
if (!wasthrown){
bushlay=int(random(0,9));
if (bushlay==0){lay2 heart,x,y;}
if (bushlay==1){lay2 bombs,x,y;}
if (bushlay==2){lay2 greenrupee,x,y;}
if (bushlay==3){lay2 bluerupee,x,y;}
}
hide;
sleep 9;
x=this.bushx; y=this.bushy;
show;
}

Reply With Quote
  #2  
Old 11-19-2001, 05:13 AM
DoragonKoden_RC6 DoragonKoden_RC6 is offline
Registered User
Join Date: Oct 2001
Posts: 221
DoragonKoden_RC6 is on a distinguished road
Bushes are not external NPCs. They are built-in!

Just place bush tiles and viola, BUSH!
Reply With Quote
  #3  
Old 11-19-2001, 05:16 AM
Faheria_GP2 Faheria_GP2 is offline
Banned
Faheria_GP2's Avatar
Join Date: Oct 2001
Posts: 1,177
Faheria_GP2 is on a distinguished road
lmao, we got a bright one here!
Reply With Quote
  #4  
Old 11-19-2001, 05:18 AM
taki taki is offline
Registered User
Join Date: Nov 2001
Location: Arizona
Posts: 30
taki is on a distinguished road
of course i knew that

I mean to have things "added" to them (for quests and stuff, that's what the base bush script's for), it wouldn't work with just plain level tiles
Reply With Quote
  #5  
Old 01-25-2002, 05:14 AM
taki taki is offline
Registered User
Join Date: Nov 2001
Location: Arizona
Posts: 30
taki is on a distinguished road
So.. is the setshape2 command working yet?
or anyone got a way around this?
Reply With Quote
  #6  
Old 01-25-2002, 07:39 AM
royce royce is offline
Banned
royce's Avatar
Join Date: Sep 2001
Location: Yakitinzen, China
Posts: 2,271
royce is on a distinguished road
Send a message via AIM to royce
Quote:
Originally posted by taki
So.. is the setshape2 command working yet?
or anyone got a way around this?
I dont use setshape2 ever so
Reply With Quote
  #7  
Old 01-25-2002, 07:41 AM
nyghtGT nyghtGT is offline
Banned
nyghtGT's Avatar
Join Date: Jun 2001
Posts: 3,993
nyghtGT is on a distinguished road
Send a message via AIM to nyghtGT
Quote:
Originally posted by royce


I dont use setshape2 ever so
i've used it once for like a chair
and a house
Reply With Quote
  #8  
Old 01-25-2002, 04:37 PM
TDO2000 TDO2000 is offline
Registered User
TDO2000's Avatar
Join Date: Jul 2001
Location: Germany
Posts: 655
TDO2000 is on a distinguished road
Quote:
Originally posted by taki
So.. is the setshape2 command working yet?
or anyone got a way around this?
for me it always worked...
__________________
No Webhost at the moment
Reply With Quote
  #9  
Old 01-26-2002, 12:08 AM
Saga2001 Saga2001 is offline
Wishing he had 3 feet
Join Date: Aug 2001
Location: Basement
Posts: 1,565
Saga2001 is on a distinguished road
Send a message via ICQ to Saga2001 Send a message via AIM to Saga2001 Send a message via Yahoo to Saga2001
it works, but your doing it wrong, cause...well i am tired. night, i'll post about how to fix your many problems when i get on tonite at 9:00 Mountain Time...lol
__________________

!Wan ( 11:27:55 AM):
can i c ur scripts please?
Zorg (RC): If I hear NPC Server call Ne0, Past Austin or Brent sexy one more time im disconnecting it
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:43 AM.


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