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 06-11-2012, 10:08 PM
Fysez Fysez is offline
Banned
Join Date: Apr 2012
Posts: 89
Fysez has a little shameless behaviour in the past
Question Bow not working?

I have found the bow script and I was going to edit it to shoot different objects, by only changing the Gani's.
However, It doesn't hurt the player it shoots?
I tried adding in:
PHP Code:
for (plfindNearestPlayers() {
hurt(1);

but that doesn't seem to help, either.
Here's the bow script:
PHP Code:
//#CLIENTSIDE

function onWeaponfired() {
  if (
player.darts <= 0) return;
  
player.darts--;
  
freezeplayer(.1);
  
setani("shoot""wbow1.png"); 
  
setshootparams("classic""arrow"player.dirplayer.account);
  
temp.angl getangle(vecx(player.dir), vecy(player.dir));
  
shoot(player.0.5 vecx(player.dir), player.vecy(player.dir), player.ztemp.angl00"classic_arrow"player.dir);
}  

function 
onActionProjectile(ptypeatypepdirpacc) {
  if (
ptype != "classic" && atype != "arrow") return;
  if (
findplayer(pacc).guild == player.guild && player.guild) return;
  
hitplayer(01player.1.5 vecx(pdir), player.vecy(pdir));

I just need it to hurt the player is all x.x
Reply With Quote
  #2  
Old 06-12-2012, 01:17 AM
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
You are in way above your head. You simply don't understand enough about GScript to be able to edit others script, you really need to start with the basics until you feel comfterable enough.

http://public.zodiacdev.com/index.php?title=Fowlplay4
__________________
Follow my work on social media post-Graal:Updated august 2025.
Reply With Quote
  #3  
Old 06-12-2012, 04:51 AM
Fysez Fysez is offline
Banned
Join Date: Apr 2012
Posts: 89
Fysez has a little shameless behaviour in the past
Quote:
Originally Posted by xXziroXx View Post
You are in way above your head. You simply don't understand enough about GScript to be able to edit others script, you really need to start with the basics until you feel comfterable enough.

http://public.zodiacdev.com/index.php?title=Fowlplay4
Are you saying that because I didn't post the editted Bow version? That's not what i'm talking about. Even the regular bow script does not hurt the player.
Simply, I COULD just add the weapon 'Bow' to players,
But i'd like to change it around Via Gani.
I would do this, And i know how,
But the problem is that even this simple Bow Script alone
does not hurt the player on contact.
I know the basics. And I know how to edit them,
This just wont hurt the player. Even as a default script.

See now?
Reply With Quote
  #4  
Old 06-12-2012, 05:12 AM
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
Quote:
Originally Posted by Fysez View Post
Are you saying that because I didn't post the editted Bow version?
No, I'm saying it because of this:

Quote:
Originally Posted by Fysez View Post
PHP Code:
for (plfindNearestPlayers() {
hurt(1);

Quote:
Originally Posted by Fysez View Post
PHP Code:
findplayer("Graal781471").addweapon(this.name);
function 
onActionServerSide() {
if (
params[0] == "zoom") {
setzoomeffect this.zoom;
} else if (
params[0] == "overzoom") {
player.chat "Zoom effect is too big! Big zoom = HUGE lag!";
}
}
//#CLIENTSIDE
function onPlayerChats() {
if (
player.chat.starts("/zoom ")) {
if (
player.chat.substring(6)=<9) {
player.zoom player.chat.substring(7).trim();
triggerserver("gui",this.name,"zoom",0,player.account,0.5);
} else if (
player.chat.substring(6)=>9) {
triggerserver("gui",this.name,"overzoom",0,player.account,0.5);
}
}

Quote:
Originally Posted by Fysez View Post
I thought maybe this would work
PHP Code:
function onCreated() {
this.chat "Message1";
if (
this.chat "Message1") {
sleep(3);
this.chat "Message2";
} else if (
this.chat "Message2") {
sleep(3);
this.chat "Message1";
}

How can this be fixed up?

You -really- need to stop messing with somewhat simple things you don't understand and go back to the basics, or you'll never really learn on your own.
__________________
Follow my work on social media post-Graal:Updated august 2025.
Reply With Quote
  #5  
Old 06-12-2012, 05:41 AM
Fysez Fysez is offline
Banned
Join Date: Apr 2012
Posts: 89
Fysez has a little shameless behaviour in the past
Quote:
Originally Posted by xXziroXx View Post
No, I'm saying it because of this:








You -really- need to stop messing with somewhat simple things you don't understand and go back to the basics, or you'll never really learn on your own.
The message thing, Was a very bad error. And it was a dumb question
because I already knew Timeout.
The Zoom seemed to work and my friend saw me as large for a few minutes.
Must've been some sort of lag.
I appreciate you trying to get me to go to basics,
But i understand basics just fine.
I've never worked with any types of Projectiles before,
And I asked for help.
Not to be critisized and practically called a noob scripter,
Because I can't make a script hurt a player.

In the most polite way I can say it,
Don't comment unless you're trying to help.
I don't see you trying to help at all.
Reply With Quote
  #6  
Old 06-12-2012, 08:05 AM
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
Fysez, maybe the reason Ziro is the only one still trying to help you (and he is trying to help you) is because everyone else has already given up.

As I told you before,

Quote:
Originally Posted by cbk1994 View Post
Do not expect help in this forum if you won't even take the time to make your code readable and get defensive every time someone with more experience than you gives you advice.
For someone who claims

Quote:
Originally Posted by Fysez View Post
I'm not new.
Quote:
Originally Posted by Fysez View Post
I know the basics.
Quote:
Originally Posted by Fysez View Post
I'm not new to scripting
you sure run into a lot of really simple problems. Maybe you should try listening to the people giving you advice instead of blowing them off and being rude:

Quote:
Originally Posted by Fysez View Post
There is, Because I can write it as I please.
All I ask is for help on a script to make it work.
Not how to style and make my script look all pretty and sparkly.
Quote:
Originally Posted by Fysez View Post
If you re-read what he posted, You'd understand.

Kthxbye
Quote:
Originally Posted by Fysez View Post
So if you don't have the answer yourself, Just... Don't even comment.
Quote:
Originally Posted by Fysez View Post
In the most polite way I can say it,
Don't comment unless you're trying to help.
I don't see you trying to help at all.
Quote:
Originally Posted by Fysez View Post
I think i've listed quite clearly now that the script I listed was a test,
Not the actual thing to disable since it doesn't even work anyways.
All I need is how to fix the script I have listed. From there, I can work my own way towards disabling swords.
Get it not?{o}.{o}

Once again:
Quote:
Originally Posted by cbk1994 View Post
You should probably start at the beginning. We're happy to help you with GScript's quirks or other complicated stuff, but there's no point in explaining the simple stuff again when it's already been explained before. The tutorial I linked you to is a good resource for getting started.
__________________
Reply With Quote
  #7  
Old 06-12-2012, 08:44 AM
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
Keep in mind that we're not here to fix your scripts or script for you. We're here to teach you how to do that yourself, and even though we're more than happy to provide working examples a lot of the time, it's not to be expected. In your case, we can clearly see that you're not really progressing, and because of that we want you to go back to the beginning and try to actually learn things.

You say I'm not helping, yet here I am bothering to explain this to you.
__________________
Follow my work on social media post-Graal:Updated august 2025.
Reply With Quote
  #8  
Old 06-13-2012, 03:00 AM
Fysez Fysez is offline
Banned
Join Date: Apr 2012
Posts: 89
Fysez has a little shameless behaviour in the past
Thank you guys so much =D
I was saved a ton of time=)
Thanks cbk)))
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 02:13 PM.


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