Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   help me plz!!! (https://forums.graalonline.com/forums/showthread.php?t=23656)

psi 02-13-2002 04:20 AM

help me plz!!!
 
hi I need to know one or two things.

1. is there a script that has some effect such as if(npctouchsme)?

2. How do I change a players speed?

3. is there a way to make an npc attack only people with a certain item?

if you have the answer plz let me know and what the script is thnx

nyghtGT 02-13-2002 04:24 AM

Re: help me plz!!!
 
Quote:

Originally posted by psi
hi I need to know one or two things.

1. is there a script that has some effect such as if(npctouchsme)?

2. How do I change a players speed?

3. is there a way to make an npc attack only people with a certain item?

if you have the answer plz let me know and what the script is thnx

1. if (touchsother) {} or something like that ...
2. if (keydown(#)) {playerxory++or--;}
3. not sure

psi 02-13-2002 04:28 AM

I meant if an npc thouches another npc

Python523 02-13-2002 05:54 AM

only two types of touch commands playertouchsme, playertouchsother

psi 02-13-2002 06:02 AM

so theres no npctouchsnpc?

darkriders_p2p 02-13-2002 06:24 AM

no
 
there isn't npctouchme :(
But if you want an NPC to attack someone with a weapon,put like
NPC Code:
if (hasweapon(whatever) 

at the very start of the script for an NPC baddie,but you probably wouldn't like that :(

neomaximus2k 02-13-2002 02:56 PM

Quote:

Originally posted by psi
so theres no npctouchsnpc?
no there is no command like that but you can do a simple NPC detection...
if (timeout){
bah i cant remember the rest, i have it somewhere so i will post it l8r

neomaximus2k 02-13-2002 02:58 PM

Re: no
 
Quote:

Originally posted by darkriders_p2p
there isn't npctouchme :(
But if you want an NPC to attack someone with a weapon,put like
NPC Code:
if (hasweapon(whatever) 

at the very start of the script for an NPC baddie,but you probably wouldn't like that :(

yeah afraid that is the ony REAL way i can think that you can do that.

if (playerx>this.difx1 && playerx<this.dfx2 && playery>this.diffy1 && playery<this.diffy2 && hasweapon(bah)){

Script goes here

}
but this would have to be in a timeout so the NPC can detect when the NPC or player is near him, i may just post my baddy on here it would be easier

TDK_RC6 02-13-2002 07:59 PM

you would use testnpc and if the index is greater or equal 0, then its a npc, so you would make the npcs attack the other (triggeraction)

psi 02-14-2002 04:45 AM

ok..... how do I change someones speed? Im not quite sure about that......

Python523 02-14-2002 05:01 AM

There isnt a built in flag called playerspeed so you have to make a custom one like
if (keydown(0)) {playerx=playerx-1;}

psi 02-15-2002 03:57 AM

k thnx


All times are GMT +2. The time now is 04:50 AM.

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