Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Bow not working? (https://forums.graalonline.com/forums/showthread.php?t=134266628)

Fysez 06-11-2012 10:08 PM

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

xXziroXx 06-12-2012 01:17 AM

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

Fysez 06-12-2012 04:51 AM

Quote:

Originally Posted by xXziroXx (Post 1697029)
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?

xXziroXx 06-12-2012 05:12 AM

Quote:

Originally Posted by Fysez (Post 1697042)
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 (Post 1697012)
PHP Code:

for (plfindNearestPlayers() {
hurt(1);



Quote:

Originally Posted by Fysez (Post 1696690)
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 (Post 1696643)
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.

Fysez 06-12-2012 05:41 AM

Quote:

Originally Posted by xXziroXx (Post 1697043)
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.

cbk1994 06-12-2012 08:05 AM

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 (Post 1694781)
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 (Post 1693897)
I'm not new.

Quote:

Originally Posted by Fysez (Post 1697042)
I know the basics.

Quote:

Originally Posted by Fysez (Post 1693978)
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 (Post 1694772)
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 (Post 1694092)
If you re-read what he posted, You'd understand.

Kthxbye

Quote:

Originally Posted by Fysez (Post 1693897)
So if you don't have the answer yourself, Just... Don't even comment.;)

Quote:

Originally Posted by Fysez (Post 1697046)
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 (Post 1693781)
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 (Post 1693861)
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.


xXziroXx 06-12-2012 08:44 AM

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.

Fysez 06-13-2012 03:00 AM

Thank you guys so much =D
I was saved a ton of time=)
Thanks cbk:))))


All times are GMT +2. The time now is 02:07 AM.

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