Graal Forums

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

Zergling 11-01-2005 01:29 AM

help me with dealie
 
// NPC made by Stefan Knorr
if (created) {
setimg block.png;
setshape 1,32,32;
}
if (playermessage) hi; {
hide;
sleep 3;
show;
}
i want it too acivate when you say hi...

napo_p2p 11-01-2005 01:32 AM

*senses moderator action*

Remember the comments from your other thread?

Zergling 11-01-2005 01:36 AM

i looked hard for the answer... I just cant find it...

Riot 11-01-2005 01:47 AM

Quote:

Originally Posted by npcprogramming.doc
7. Events

Here you will see a list of all events. 'Event' means the npc script will be called and a special flag is set.

playerenters the player enters the level right now
playerouchsme the player touchs the npc
playertouchsother another npc is touched by the player
playerlaysitem an item is layed by the player or another npc
playerchats the player says something
...
8. Addtional flags

A list of flags not mentioned yet:

...
strequals( str1, str2 ) str1 = str2 (both strings can contain message codes)
strcontains( str1, str2 ) str1 contains str2
(to check what the player says use: strequals(#c,str), strcontains(#c,str); to check if the player is in a special guild: strequals(#g,guildname) or strcontains(#n,(guildname)))

Put them together.

Lance 11-01-2005 02:46 AM

As Riot said, check what the player has said within a playerchats event block.

Zergling 11-01-2005 03:11 AM

i cant open that document...

excaliber7388 11-01-2005 03:34 AM

;) hope that helps a bit more
just a note, read the NPC programing document in the graal2001 folder

ZeLpH_MyStiK 11-01-2005 04:26 AM

Quote:

Originally Posted by excaliber7388
just a note, read the NPC programing document in the graal2001 folder

you should too =D

excaliber7388 11-01-2005 04:29 AM

Quote:

Originally Posted by ZeLpH_MyStiK
you should too =D

:rolleyes: XD I did, but it only helps with basic problems (like this one)

excaliber7388 11-01-2005 05:13 AM

yeah i'm begging to see the beauty of gs2 it's a little different at first, but it's easier to read

Zergling 11-01-2005 06:15 PM

it wont let me open that document can you paste it here for me?

Silent 11-01-2005 11:54 PM

1 Attachment(s)
Quote:

Originally Posted by Zergling
it wont let me open that document can you paste it here for me?

Presuming you're using Windows, open it with Wordpad

Edit: Just realised Wordpad can't open it, my bad. I've saved it in Rich Text format, check attachment (unzip it, of course)

Zergling 11-02-2005 12:25 AM

thaks this helps alot no more wondering why i'm not alot to ask questions there answerd here!!!

Yen 11-02-2005 12:46 AM

Try reading Skyld's topic on formatting your script.
It makes it a lot easier to read, which makes it a lot easier for us to help you.


All times are GMT +2. The time now is 09:52 PM.

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