Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Trigger Action and Timevar Help Please (https://forums.graalonline.com/forums/showthread.php?t=23112)

Poogle 02-05-2002 08:37 PM

Trigger Action and Timevar Help Please
 
Please help:
// NPC made by Poogle
if (playerenters) {
setcharani licookie-normal,;
}
if (actionSprikels){
this.procent+=1;
message #v(this.procent) %;
}
if (this.procent=100){
playerrupees = playerrupees+1;
x = 33;
y = 18;
set donecookie;
this.procent=0;
}
while (donecookie) {
setcharani licookie-sprinkels,;
x = 26;
y = 25;
unset donecookie;
}

AND heres the weapon

toweapons Sprikels;
if (isweapon) {
set sprinkels;
sleep 1000000;
say2 You ran out of#bsprinkels!;
unset sprinkels;
destroy;
}
if(weaponfired){
triggeraction playerx,playery,Sprikels,;
}

Weapon like that for easy testing.

Poogle 02-06-2002 09:39 AM

Re: Re: Trigger Action and Timevar Help Please
 
Quote:

Originally posted by Kaimetsu
Horrible coding.

NPC Code:

if(playerenters&&isleader) setcharani licookie-normal,;
if(actionSprikels){
this.percent++;
message #v(this.percent) %;
if(this.percent==100){
playerrupees++;
setcharani licookie-sprinkels,;
x = 26; y = 25;
this.percent=0;
}
}



NPC Code:

if(playerenters){
if(isweapon) timeout=1000000;
else toweapons Sprikels;
}
if(timeout){
say2 You ran out of#bsprinkels!;
destroy;
}
if(weaponfired){
triggeraction playerx,playery,Sprikels,;
}



Stupid parts removed and in some cases replaced. Still don't know what it's supposed to do, though.

It doesnt make the % go up on the cookie with the weapon hiting it and when it gets 100 it give the player a gralat

lordhelmut 02-06-2002 09:42 AM

is it like cookie hitting or something? LOL

Poogle 02-06-2002 10:11 AM

Quote:

Originally posted by lordhelmut
is it like cookie hitting or something? LOL
No Cookie Making and Then you hit people with the cookie!

lordhelmut 02-06-2002 10:14 AM

sounds kinda ***, why not let them eat the cookie to heal or something?

Saga2001 02-06-2002 11:24 AM

wait wait wait...u hit people with the cookies?
don't u usually eat them?

Poogle 02-06-2002 10:36 PM

Quote:

Originally posted by lordhelmut
sounds kinda ***, why not let them eat the cookie to heal or something?
They do as of now! But there will be a food fight weapon to hit people with them!

Poogle 02-06-2002 10:37 PM

Re: Re: Re: Re: Trigger Action and Timevar Help Please
 
Quote:

Originally posted by Kaimetsu


Hint: (playerx,playery) is the point in the extreme top-left of the player.

i dont want a certian spot though

GregoryYoshi 02-06-2002 11:02 PM

there is a little something in the newfeatures2001.txt that has a small script for triggeraction...just the weapon script though :)

Saga2001 02-07-2002 12:03 AM

Quote:

Originally posted by GregoryYoshi
there is a little something in the newfeatures2001.txt that has a small script for triggeraction...just the weapon script though :)
your sig is hacking my head off...

joseyisleet 02-07-2002 12:06 AM

Yoshi's signature owns, that is, if you like graphical images. I just like the simple one's. Like yours Saga.

Saga2001 02-07-2002 12:14 AM

Indeed, and I like mine 2. But his are cool. But my brain hurts because they are too big for me to comprehend. Arg. They are leet, but make smaller...I used to have a ub3r huge sig, and i got axe murdered and that learned me...;)

GregoryYoshi 02-07-2002 12:56 AM

Quote:

Originally posted by Saga2001

your sig is hacking my head off...

eh? How so?

If I had an image rotator, I'd be using it...

Poogle 02-07-2002 06:00 AM

Re: Re: Re: Re: Re: Re: Trigger Action and Timevar Help Please
 
Quote:

Originally posted by Kaimetsu


Then: vecx, vecy and playerdir.

still doesnt work








...

nyghtGT 02-07-2002 12:12 PM

Re: Trigger Action and Timevar Help Please
 
Quote:

Originally posted by Poogle
Please help:
// NPC made by Poogle
if(weaponfired){
triggeraction playerx,playery,Sprikels,;
}

Weapon like that for easy testing.

If you have weapons trigger actions exactly on the players
x and y the player will have to have an NPc with the action
in it ...

*i think*

nyghtGT 02-07-2002 12:13 PM

Quote:

Originally posted by GregoryYoshi


eh? How so?

If I had an image rotator, I'd be using it...

*has Ricks code if ya needs it*

Saga2001 02-08-2002 02:18 AM

Isn't it if the action is being placed on the player is should be triggeraction playerx+1.5,playery+2,action,weaponname,params;? That is as i remember it on npc server...maybe different on non-p2p?

Saga2001 02-08-2002 02:21 AM

Like so:
NPC Code:

// This is what i think you should do.
triggeraction playerx,playery,Sprikels,Sprikels;


Also its not Sprikels, its Sprinkles. ;)


All times are GMT +2. The time now is 01:26 PM.

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