Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting > Code Gallery
FAQ Members List Calendar Search Today's Posts Mark Forums Read

View Poll Results: Do you think this script is good?
Yes 3 33.33%
No 6 66.67%
Voters: 9. You may not vote on this poll

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 06-20-2012, 07:12 PM
E_Man E_Man is offline
E-Man
E_Man's Avatar
Join Date: Jun 2012
Posts: 81
E_Man will become famous soon enough
GS1 Flamethrower

This is not the best script, but it is still a good script, it shoots fire like a bow and uses up 1 arrow and 1 bomb each use. Try it for yourself in offline editor.

PHP Code:
// NPC made by E-Man
if (created) {
setimg firebow.png
}
if (
playertouchsme) {
toweapons Flamethrower;
hide;
}
if (
weaponfired && playerdir=&& playerbombs this.>= && playerdarts this.>= 1) {
freezeplayer 1.1;
playerdarts -= 1;
playerbombs -= 1;
setani shoot,firebow1.png;
sleep 0.2;
putexplosion 0.5,playerx-0,playery-1;
sleep 0.1;
putexplosion 0.5,playerx-0,playery-3;
sleep 0.1;
putexplosion 0.5,playerx-0,playery-5;
sleep 0.1;
putexplosion 0.5,playerx-0,playery-7;
sleep 0.1;
putexplosion 0.5,playerx-0,playery-9;
sleep 0.1;
putexplosion 0.5,playerx-0,playery-11;
sleep 0.1;
putexplosion 0.5,playerx-0,playery-13;
sleep 0.1;
putexplosion 0.5,playerx-0,playery-15;
sleep 0.1;
putexplosion 0.5,playerx-0,playery-17;
}
if(
weaponfired && playerdir=&& playerbombs this.>= && playerdarts this.>= 1){
freezeplayer 1.1;
playerdarts -= 1;
playerbombs -= 1;
setani shoot,firebow1.png;
sleep 0.2;
putexplosion 0.5,playerx-1.8,playery+0.75;
sleep 0.1;
putexplosion 0.5,playerx-3.8,playery+0.75;
sleep 0.1;
putexplosion 0.5,playerx-5.8,playery+0.75;
sleep 0.1;
putexplosion 0.5,playerx-7.8,playery+0.75;
sleep 0.1;
putexplosion 0.5,playerx-9.8,playery+0.75;
sleep 0.1;
putexplosion 0.5,playerx-11.8,playery+0.75;
sleep 0.1;
putexplosion 0.5,playerx-13.8,playery+0.75;
sleep 0.1;
putexplosion 0.5,playerx-15.8,playery+0.75;
sleep 0.1;
putexplosion 0.5,playerx-17.8,playery+0.75;
}
if(
weaponfired && playerdir=&& playerbombs this.>= && playerdarts this.>= 1){
freezeplayer 1.1;
playerdarts -= 1;
playerbombs -= 1;
setani shoot,firebow1.png;
sleep 0.2;
putexplosion 0.5,playerx+0.5,playery+3;
sleep 0.1;
putexplosion 0.5,playerx+0.5,playery+5;
sleep 0.1;
putexplosion 0.5,playerx+0.5,playery+7;
sleep 0.1;
putexplosion 0.5,playerx+0.5,playery+9;
sleep 0.1;
putexplosion 0.5,playerx+0.5,playery+11;
sleep 0.1;
putexplosion 0.5,playerx+0.5,playery+13;
sleep 0.1;
putexplosion 0.5,playerx+0.5,playery+15;
sleep 0.1;
putexplosion 0.5,playerx+0.5,playery+17;
sleep 0.1;
putexplosion 0.5,playerx+0.5,playery+19;
}
if(
weaponfired && playerdir=&& playerbombs this.>= && playerdarts this.>= 1){
freezeplayer 1.1;
playerdarts -= 1;
playerbombs -= 1;
setani shoot,firebow1.png;
sleep 0.2;
putexplosion 0.5,playerx+3,playery+0.75;
sleep 0.1;
putexplosion 0.5,playerx+5,playery+0.75;
sleep 0.1;
putexplosion 0.5,playerx+7,playery+0.75;
sleep 0.1;
putexplosion 0.5,playerx+9,playery+0.75;
sleep 0.1;
putexplosion 0.5,playerx+11,playery+0.75;
sleep 0.1;
putexplosion 0.5,playerx+13,playery+0.75;
sleep 0.1;
putexplosion 0.5,playerx+15,playery+0.75;
sleep 0.1;
putexplosion 0.5,playerx+17,playery+0.75;
sleep 0.1;
putexplosion 0.5,playerx+19,playery+0.75;
sleep 0.1;
putexplosion 0.5,playerx+21,playery+0.75;

You will need these images however for it to work, unless you just use the images from nukeshot.

firebow.png (Used as image in inventory)


firebow1.png (The weapon sprite)


You will need bomb1.png to be working in graal editor for this to work, I'm just saying this because bomb1.png did not work for me at first until I deleted filenamecahce.txt and reloaded it.
Reply With Quote
  #2  
Old 06-20-2012, 08:11 PM
E_Man E_Man is offline
E-Man
E_Man's Avatar
Join Date: Jun 2012
Posts: 81
E_Man will become famous soon enough
I meant to put weapon in poll, not script because I want it to include the images. Is there a way to change the poll?
Reply With Quote
  #3  
Old 06-20-2012, 08:49 PM
callimuc callimuc is offline
callimuc's Avatar
Join Date: Nov 2010
Location: Germany
Posts: 1,015
callimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to behold
You shouldn't post this into the code gallery since it's only for GS2. You can post it in the GS1 section though
And you don't need player.x-0 since that actually does change nothing. It just goes back to player.x. I'm not that good with GS1 but you could try to use the maths cbk (chris) explained you for your shoot command to safe some lines. Than you can expand the x/y with a for() loop. Could save you some time
__________________
MEEP!
Reply With Quote
  #4  
Old 06-20-2012, 09:00 PM
xXziroXx xXziroXx is offline
Master of Puppets
xXziroXx's Avatar
Join Date: May 2004
Location: Sweden
Posts: 5,288
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
Send a message via AIM to xXziroXx Send a message via MSN to xXziroXx
Quote:
Originally Posted by callimuc View Post
You shouldn't post this into the code gallery since it's only for GS2. You can post it in the GS1 section though
The code gallery is just not for GS1. To quote the description of the forums:

"For showing complete scripts, if possible with comments. Mark scripts which are for GS1."
__________________

"A delayed game is eventually good, but a rushed game is forever bad." - Shigeru Miyamoto
Reply With Quote
  #5  
Old 06-20-2012, 09:01 PM
E_Man E_Man is offline
E-Man
E_Man's Avatar
Join Date: Jun 2012
Posts: 81
E_Man will become famous soon enough
Quote:
You shouldn't post this into the code gallery since it's only for GS2. You can post it in the GS1 section though
And you don't need player.x-0 since that actually does change nothing. It just goes back to player.x. I'm not that good with GS1 but you could try to use the maths cbk (chris) explained you for your shoot command to safe some lines. Than you can expand the x/y with a for() loop. Could save you some time
I made it say -0 because if someone wants to edit it. Also I can post GS1 here because under the tile code gallery is said:

For showing complete scripts, if possible with comments. Mark scripts which are for GS1.

And I put GS1 in the title, unless there is another way to mark it.
Reply With Quote
  #6  
Old 06-20-2012, 09:04 PM
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
I feel you have a lot to learn before you start posting scripts for others to use.
Reply With Quote
  #7  
Old 06-20-2012, 09:35 PM
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 xXziroXx View Post
The code gallery is just not for GS1. To quote the description of the forums:

"For showing complete scripts, if possible with comments. Mark scripts which are for GS1."
Unless it's particularly interesting or unique, I don't really see any place for GS1 here. This code is not a good example for others and shouldn't be used on a server. It doesn't serve either of the purposes of the Code Gallery.

If the code was something unique and not seen before, it would be a different story. However, with this particular piece of code, people would be raising the same objections (it's not useful on a server or for learning) even if it was written in GS2.
__________________
Reply With Quote
  #8  
Old 06-20-2012, 10:31 PM
E_Man E_Man is offline
E-Man
E_Man's Avatar
Join Date: Jun 2012
Posts: 81
E_Man will become famous soon enough
Quote:
Originally Posted by cbk1994 View Post
Unless it's particularly interesting or unique, I don't really see any place for GS1 here. This code is not a good example for others and shouldn't be used on a server. It doesn't serve either of the purposes of the Code Gallery.

If the code was something unique and not seen before, it would be a different story. However, with this particular piece of code, people would be raising the same objections (it's not useful on a server or for learning) even if it was written in GS2.
K, so is there anywhere to post good gs1 scripts for if someone wants to use them?
Reply With Quote
  #9  
Old 06-21-2012, 12:12 AM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
Quote:
Originally Posted by E_Man View Post
K, so is there anywhere to post good gs1 scripts for if someone wants to use them?
The GS1 forums.
__________________
Reply With Quote
  #10  
Old 06-21-2012, 12:32 AM
E_Man E_Man is offline
E-Man
E_Man's Avatar
Join Date: Jun 2012
Posts: 81
E_Man will become famous soon enough
Quote:
Originally Posted by Crow View Post
The GS1 forums.
It says that's only for problems you need help on
Reply With Quote
  #11  
Old 06-21-2012, 05:18 AM
Imperialistic Imperialistic is offline
graal player lord
Imperialistic's Avatar
Join Date: Apr 2007
Location: Florida
Posts: 1,094
Imperialistic is a jewel in the roughImperialistic is a jewel in the rough
i'm really disappointed with the so called present 'developers'

what kind of potential scripter would want to continue advancing and progressing with all of your pessimistic and shitty remarks. Instead of pointing out what he is doing wrong, why can't we just explain to him how to better himself?

all of the sudden everyone acts like a forum mod, just shut up and get off your high horse.
__________________
" It's been swell, but the swelling's gone down. "
Reply With Quote
  #12  
Old 06-21-2012, 05:25 AM
Starfire2001 Starfire2001 is offline
Unholy Nation
Starfire2001's Avatar
Join Date: Dec 2010
Location: The streets.
Posts: 156
Starfire2001 will become famous soon enough
Quote:
Originally Posted by Imperialistic View Post
i'm really disappointed with the so called present 'developers'

what kind of potential scripter would want to continue advancing and progressing with all of your pessimistic and shitty remarks. Instead of pointing out what he is doing wrong, why can't we just explain to him how to better himself?

all of the sudden everyone acts like a forum mod, just shut up and get off your high horse.
Gonna have to disagree with this entirely, from what I've seen people have been pretty nice to this guy in this thread and others.
__________________
-Ph8
Reply With Quote
  #13  
Old 06-21-2012, 02:30 PM
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 Imperialistic View Post
i'm really disappointed with the so called present 'developers'

what kind of potential scripter would want to continue advancing and progressing with all of your pessimistic and shitty remarks. Instead of pointing out what he is doing wrong, why can't we just explain to him how to better himself?

all of the sudden everyone acts like a forum mod, just shut up and get off your high horse.
This is a Code Gallery post, not a post looking for help. The Code Gallery isn't intended for feedback on scripts, it's intended for scripts that are finished and can be used by others either to learn from or on their server. This is what he was told.

If you look at his other threads in the scripting forums, you'll see that he received help on most of them; also keep in mind that he's requesting help on a language which a lot of us have done everything possible to forget.
__________________
Reply With Quote
  #14  
Old 06-21-2012, 03:00 PM
E_Man E_Man is offline
E-Man
E_Man's Avatar
Join Date: Jun 2012
Posts: 81
E_Man will become famous soon enough
Quote:
Originally Posted by cbk1994 View Post
also keep in mind that he's requesting help on a language which a lot of us have done everything possible to forget.
I wouldnt' be doing GS1 if I wasn't trial, but since I am, I want to make use of the GS1 Script fourms since they are never used anymore and people still do have knowledge (even if they want to forget it) of gs1. Also there may be others who like that I'm asking about GS1 because they are trial and never got gold which means that they can only do GS1 and they also can't sign up for this forum.
Reply With Quote
  #15  
Old 06-21-2012, 03:17 PM
xXziroXx xXziroXx is offline
Master of Puppets
xXziroXx's Avatar
Join Date: May 2004
Location: Sweden
Posts: 5,288
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
Send a message via AIM to xXziroXx Send a message via MSN to xXziroXx
Quote:
Originally Posted by cbk1994 View Post
The Code Gallery isn't intended for feedback on scripts, it's intended for scripts that are finished and can be used by others either to learn from or on their server.
I don't know about you, but I always appreciate feedback on the things I post in the Code Gallery. Anything that can help me improve what I deemed ready is helpful. Comments stroking my ego helps me sleep at night too.

Quote:
Originally Posted by cbk1994 View Post
also keep in mind that he's requesting help on a language which a lot of us have done everything possible to forget.
Just because we despise GS1 doesn't mean we can't/shouldn't help people who are stuck with it. Learning GS1 could likely still be very useful to learn before moving on to GS2 later.
__________________

"A delayed game is eventually good, but a rushed game is forever bad." - Shigeru Miyamoto
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 09:15 AM.


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