Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Learning (https://forums.graalonline.com/forums/showthread.php?t=11077)

ownerofbabylon 09-03-2001 11:59 AM

Learning
 
I am learning scripting and getting better with commands and I just today found out that a++ means that it adds one to a. Anyways, the one thing I cant figure out how to do is onwall. If someone could help I would greatly appreciate it. I dont wanna be a nuisance but I need u guys to help me along the way.

Enigma_GP6 09-03-2001 12:05 PM

I'm not exactly an expert at onwall either, but I can throw in a few pointers. For example.

if (onwall,x,y){
putexplosion x,y;
hurt 10000;
lay2 goldrupee,random(1,60),random(1,60);
lay2 goldrupee,random(1,60),random(1,60);
lay2 goldrupee,random(1,60),random(1,60);
lay2 goldrupee,random(1,60),random(1,60);
lay2 goldrupee,random(1,60),random(1,60);sleep.05;
lay2 goldrupee,random(1,60),random(1,60);
lay2 goldrupee,random(1,60),random(1,60);
lay2 goldrupee,random(1,60),random(1,60);
lay2 goldrupee,random(1,60),random(1,60);
lay2 goldrupee,random(1,60),random(1,60);
destroy;
}
//End of script
Try that and see if you dont get that picure, I give up, *yawn* dang, it's 1:00 A.M. in Texas. I had better get some sleep. night all.:asleep: :asleep: :asleep:
-Rebel95

entravial 09-03-2001 01:27 PM

Onwall detects whether or not the x/y specified is on a wall... format:

if (onwall(x,y)){
}

That should help...

And I believe the a++ thing was detailed in the commands.doc... which makes me wonder if you've read it or not...

Enigma_GP6 09-03-2001 02:25 PM

Show off.....
:spam: :spam: :spam: :spam:
-Rebel95

Enigma_GP6 09-03-2001 10:53 PM

Quote:

Originally posted by Kaimetsu


GRGRGDGRDSG. That script is stupid. Putting one line repeatedly is stupid. Making it have nothing to do with onwall is stupid.

Sorry, I know you're trying, but if you give help that doesn't make sense then you just confuse the other new scripters.

Well....I tried....but that's it, give me a letter of resignation,clean out your desk, see if you can spell your "F**K*N'" Name Right, you over paid piece of Sh*T....sorry, got carried away, I DIDN'T SAY THAT!!! HONEST!!!!!!!!

-Rebel95

ownerofbabylon 09-04-2001 01:11 AM

im just trying to learn how to make a weapon that only works when fired on a certain area

Enigma_GP6 09-04-2001 02:02 AM

PHP Code:

if (weaponfires&&strequals(#L,"LEVELNAME.graal)){ command here;} 

-Rebel95

oscarjf1 09-04-2001 04:20 AM

i c
 
I think i c what youre saying....If youre between 2 points you want your weapon to work.

use this:

if (weaponfired) {
if (playerx in |<this is the number for as far left as its allowed>,<this is the number for far right>|) {
if (playery in |<this is min height that is allowed>,<this is max height allowed>) {you action here;
}
}
}

Of course, you replace the <>'s with values (normally numbers ;)).
Here is an example:

if (weaponfired) { // You use the weapon to shoot an arrow in the players direction.
if (playerx in |2,20|) { // The player is between the points of 2 and 20 on the x axis
if (playery in |10,30|) { // The player is between the points of 10 and 30 on the y axis
if (playerdarts>=1) {shootarrow playerdir;
}
}
}
}

entravial 09-04-2001 04:40 AM

Or if there's a certain wall in front of the player. Or if the chicken crossed the road. :megaeek:


All times are GMT +2. The time now is 08:35 PM.

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