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 10-04-2007, 12:24 PM
Zanzel Zanzel is offline
<insert title here>
Zanzel's Avatar
Join Date: Dec 2006
Posts: 35
Zanzel is on a distinguished road
When bushes get destroyed

Is there any possible functions for when you destroy a bush ?
Or would I just have to use an index with an image ?

It has been pondering me for a few hours now, and I am
tying to figure it out, if you could guide me as to what I should
start with that'd be great .
Reply With Quote
  #2  
Old 10-04-2007, 03:22 PM
xXziroXx xXziroXx is offline
Malorian
xXziroXx's Avatar
Join Date: May 2004
Posts: 5,289
xXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant future
There's no function for it.
__________________
Follow my work on social media post-Graal:Updated august 2025.
Reply With Quote
  #3  
Old 10-04-2007, 09:02 PM
Codein Codein is offline
jwd
Codein's Avatar
Join Date: Oct 2005
Location: Greater Manchester
Posts: 2,423
Codein has a spectacular aura aboutCodein has a spectacular aura about
Send a message via AIM to Codein Send a message via MSN to Codein
I suppose you could script your own by checking the tiles directly in front of you when slashing your sword, and if they're the bush tiles, do stuff.
Reply With Quote
  #4  
Old 10-05-2007, 11:33 AM
Zanzel Zanzel is offline
<insert title here>
Zanzel's Avatar
Join Date: Dec 2006
Posts: 35
Zanzel is on a distinguished road
Scripting my own sounds best at this point
I had change of plans for a servers Halloween system so I will
just script my own I guess, thanks.
__________________
  • N-Pulse / N-Pulse Reborn Scripter
  • Graal Kingdoms Player
  • N-Pulse Player
Reply With Quote
  #5  
Old 10-06-2007, 02:49 AM
bscharff bscharff is offline
Bloo
bscharff's Avatar
Join Date: Sep 2006
Location: San Antonio, Texas
Posts: 185
bscharff has a little shameless behaviour in the past
Send a message via AIM to bscharff Send a message via MSN to bscharff Send a message via Yahoo to bscharff
You Should Forward This Thread To Stefan, He May Be Able To Make A Function for It.
__________________
Trying to be nice now...
Reply With Quote
  #6  
Old 10-06-2007, 03:00 AM
oo_jazz_oo oo_jazz_oo is offline
Jazz teh Awesome
oo_jazz_oo's Avatar
Join Date: Jul 2006
Location: California
Posts: 596
oo_jazz_oo is a jewel in the roughoo_jazz_oo is a jewel in the rough
Send a message via MSN to oo_jazz_oo
Why bother making a function?
All you need to do is find the tiles where the player is slashing (or doing w/e) and look for bush tiles, then make a loop to find the top left corner tile of those bushes, and change those 4 tiles to the destroyed bush tiles.
Then the server will automaticaly regenerate that bush...
I did it on a system before lol
Reply With Quote
  #7  
Old 10-06-2007, 06:44 AM
bscharff bscharff is offline
Bloo
bscharff's Avatar
Join Date: Sep 2006
Location: San Antonio, Texas
Posts: 185
bscharff has a little shameless behaviour in the past
Send a message via AIM to bscharff Send a message via MSN to bscharff Send a message via Yahoo to bscharff
Why Bother Making A Function?
Because It Makes It Easier on Us Scripters.
__________________
Trying to be nice now...
Reply With Quote
  #8  
Old 10-06-2007, 06:54 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
Meh Dusty gave a good formula for detecting tiles, it aint that hard if your a good scripter :P
__________________
Deep into the Darkness peering...
Reply With Quote
  #9  
Old 10-06-2007, 07:21 AM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
Hmm, well my formula for tiles was for tiles[x,y]>pics1.png, not really for detecting tiles(unless you're talking about my hammer script). It's a lot simpler to detect tiles when it's just checking the tiles in the level(as easy as making an array and checking if the tiles[x,y] is in the array).
But... the problem is it's most likely going to be difficult to script one that is in sync with the default bush checking. The other option could be detecting leaps(if you can even do that, I don't remember), and if it's a bush leap execute whatever script you want.
Reply With Quote
  #10  
Old 10-07-2007, 02:42 AM
Mog Mog is offline
Banned
Join Date: Jan 2007
Location: at Sammy's house
Posts: 33
Mog is on a distinguished road
there's obviously more than one way of doing something. sometimes the most efficient way takes the harder route, but i would agree with Jazz.
Reply With Quote
  #11  
Old 10-08-2007, 12:18 PM
Zanzel Zanzel is offline
<insert title here>
Zanzel's Avatar
Join Date: Dec 2006
Posts: 35
Zanzel is on a distinguished road
I got it working, I just made it detect when a player slashes
a bush it has a random chance to drop whatever,
in this case, 1 of 5 random types of candy.
Although a function would be handy, I found it easier to script a hit detection.
__________________
  • N-Pulse / N-Pulse Reborn Scripter
  • Graal Kingdoms Player
  • N-Pulse Player
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 06:29 AM.


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