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-08-2001, 03:36 PM
maximus_asinus maximus_asinus is offline
RIP DarkCloud_PK
Join Date: Oct 2001
Location: Canada
Posts: 3,746
maximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond repute
Unhappy How would I make a watering can thing?

How would I go about making the watering can that I could make water plants/trees/NPCs? I want to make it for my server.I probably will use the gfx from g2k1 until I can make my own.
But please I need a bit of help over here.
(P.S. I actually tried math and made my timescript
I made some gfx for the bushes,they will shake where they get watered.
DANCE TREE,DANCE!
__________________
Save Classic!
Reply With Quote
  #2  
Old 11-09-2001, 01:15 PM
Python523 Python523 is offline
Banned
Join Date: Aug 2001
Location: Illinois
Posts: 3,498
Python523 is on a distinguished road
Triggeraction and ganis
Reply With Quote
  #3  
Old 11-09-2001, 08:33 PM
KJS KJS is offline
The one, The only -
KJS's Avatar
Join Date: Apr 2001
Location: USA, Minnesota
Posts: 1,012
KJS is on a distinguished road
Send a message via AIM to KJS
humm try this

NPC Code:
if(weaponfired){
this.checkx = playerx + 1.5 + vecx(playerdir) * 2;
this.checky = playery + 1.5 + vecy(playerdir) * 2;
if(onwater(this.checkx,this.checky)){
setplayerani watercanfill,;
setstring client.water_sprays,4;
freezeplayer 2.5;
}elseif(strequals(#s(client.water_sprays),0)){
setplayerani watercan,;
freezeplayer 2.5;
}else{
triggeraction client.checkx,client.checky,water_sprays,;
setplayerani watercanspread,;
setstring client.water_sprays,#s(client.water_sprays)-1;
freezeplayer 1.4;
}
}



I haven't tested it or anything I just wrote it off the top of my head so there might be a few small bugs
__________________
Thanks,
-KJL
Reply With Quote
  #4  
Old 11-09-2001, 08:40 PM
Poogle Poogle is offline
Registered User
Poogle's Avatar
Join Date: Jun 2001
Posts: 2,471
Poogle is on a distinguished road
Quote:
Originally posted by KJS
humm try this

NPC Code:
if(weaponfired){
this.checkx = playerx + 1.5 + vecx(playerdir) * 2;
this.checky = playery + 1.5 + vecy(playerdir) * 2;
if(onwater(this.checkx,this.checky)){
setplayerani watercanfill,;
setstring client.water_sprays,4;
freezeplayer 2.5;
}elseif(strequals(#s(client.water_sprays),0)){
setplayerani watercan,;
freezeplayer 2.5;
}else{
triggeraction client.checkx,client.checky,water_sprays,;
setplayerani watercanspread,;
setstring client.water_sprays,#s(client.water_sprays)-1;
freezeplayer 1.4;
}
}



I haven't tested it or anything I just wrote it off the top of my head so there might be a few small bugs
Sorry but setplayerani dont work and it doesnt get empty when used.
Reply With Quote
  #5  
Old 11-09-2001, 08:52 PM
KJS KJS is offline
The one, The only -
KJS's Avatar
Join Date: Apr 2001
Location: USA, Minnesota
Posts: 1,012
KJS is on a distinguished road
Send a message via AIM to KJS
NPC Code:
if(weaponfired){
this.checkx=playerx+1.5+vecx(playerdir)*2;
this.checky=playery+1.5+vecy(playerdir)*2;
if(onwater(this.checkx,this.checky)){
setani watercanfill,;
setstring client.water_sprays,4;
freezeplayer 2.5;
}elseif(strequals(#v(#s(client.water_sprays)),0)){
setani watercan,;
freezeplayer .5;
}else{
triggeraction client.checkx,client.checky,water_sprays,;
setani watercanspread,;
setstring client.water_sprays,#v(#s(client.water_sprays)-1);
freezeplayer 1.4;
}
}



there fixed...
well I can sure tell I am tired lol I forget commands lol

I said setplayerani insted of setani lol
__________________
Thanks,
-KJL
Reply With Quote
  #6  
Old 11-10-2001, 02:29 AM
maximus_asinus maximus_asinus is offline
RIP DarkCloud_PK
Join Date: Oct 2001
Location: Canada
Posts: 3,746
maximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond repute
Talking Thankies!

I made a watering can but thi one is probably way better.Next time you might wanna leave a space between the else and strequals
Now I gotta make the seeds so when I through them on a hole the tree will appear.(I made the tree already)
__________________
Save Classic!
Reply With Quote
  #7  
Old 11-10-2001, 02:47 AM
TDO2000 TDO2000 is offline
Registered User
TDO2000's Avatar
Join Date: Jul 2001
Location: Germany
Posts: 655
TDO2000 is on a distinguished road
use triggeractions then there is also an extra: 50% more scripting power ;D

no I think triggeraction should be an easy way to do this =)
__________________
No Webhost at the moment
Reply With Quote
  #8  
Old 11-10-2001, 02:53 AM
maximus_asinus maximus_asinus is offline
RIP DarkCloud_PK
Join Date: Oct 2001
Location: Canada
Posts: 3,746
maximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond repute
Thumbs up

This was a very helpful fprum I give it a thumbs up!
But since I am not to fimiliar with tiles how would I make the triggeraction occur when the tile is one of the holes?
__________________
Save Classic!
Reply With Quote
  #9  
Old 11-10-2001, 06:07 AM
Poogle Poogle is offline
Registered User
Poogle's Avatar
Join Date: Jun 2001
Posts: 2,471
Poogle is on a distinguished road
Quote:
Originally posted by KJS
NPC Code:
if(weaponfired){
this.checkx=playerx+1.5+vecx(playerdir)*2;
this.checky=playery+1.5+vecy(playerdir)*2;
if(onwater(this.checkx,this.checky)){
setani watercanfill,;
setstring client.water_sprays,4;
freezeplayer 2.5;
}elseif(strequals(#v(#s(client.water_sprays)),0)){
setani watercan,;
freezeplayer .5;
}else{
triggeraction client.checkx,client.checky,water_sprays,;
setani watercanspread,;
setstring client.water_sprays,#v(#s(client.water_sprays)-1);
freezeplayer 1.4;
}
}



there fixed...
well I can sure tell I am tired lol I forget commands lol

I said setplayerani insted of setani lol
Now you got it =)
Reply With Quote
  #10  
Old 11-10-2001, 06:18 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 Poogle

Now you got it =)
i have no idea who you are but you sure as hell are annoying ....
Reply With Quote
  #11  
Old 11-10-2001, 06:30 AM
Xaviar Xaviar is offline
Registered User
Join Date: Aug 2001
Location: Fairyland
Posts: 463
Xaviar is on a distinguished road
Send a message via ICQ to Xaviar Send a message via AIM to Xaviar
Quote:
Originally posted by nyghtGT

i have no idea who you are but you sure as hell are annoying ....
Indeed he is..But you are too
__________________
One by one, the penguins steal my sanity.

*cookie for Xaviar* --Originally posted by Tyhm

--Xaviar

A m e r i c a
Reply With Quote
  #12  
Old 11-10-2001, 07:43 AM
Brad_Elven Brad_Elven is offline
Registered User
Join Date: Jul 2001
Posts: 0
Brad_Elven is on a distinguished road
Send a message via AIM to Brad_Elven
Quote:
Originally posted by Xaviar


Indeed he is..But you are too
poogle is but nyght is cool
Reply With Quote
  #13  
Old 11-10-2001, 07:51 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 Brad_Elven


poogle is but nyght is cool
lord helmut ownz j00 Xaviar !
Reply With Quote
  #14  
Old 11-10-2001, 07:57 AM
Brad_Elven Brad_Elven is offline
Registered User
Join Date: Jul 2001
Posts: 0
Brad_Elven is on a distinguished road
Send a message via AIM to Brad_Elven
Quote:
Originally posted by nyghtGT

lord helmut ownz j00 Xaviar !
Xaviar is cool too
Reply With Quote
  #15  
Old 11-10-2001, 08:04 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 Xaviar


Indeed he is..But you are too
...
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:19 PM.


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