Graal Forums

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

ChibiChibiLuc 09-03-2005 03:57 AM

Local NPC Script
 
Can anyone tell me how to get/modify the script of a local NPC?
I'm pretty sure I've seen it done before.. For some reason, I thought it was npcs[index].script. But it's not.

Any ideas?

calani 09-03-2005 04:30 AM

edit the level itself with a script.
(open the level as a text file, search for SCRIPT, modify, save file, update level if needed)

Ajira 09-03-2005 06:00 AM

Quote:

Originally Posted by calani
edit the level itself with a script.
(open the level as a text file, search for SCRIPT, modify, save file, update level if needed)

No.

NPC Code:

requesttext("npc", npcid);



EDIT: You should define local NPC. I was thinking NPCs placed using putnpc2. If you are talking about level NPCs, then calani's method works.

ChibiChibiLuc 09-03-2005 08:43 PM

Thanks.

z-z For some reason, I was using "npcs"

Admins 09-03-2005 11:55 PM

I think the script of local npcs cannot be loaded with requesttext yet, but that will be added soon, together with a possibility to freeze the local npcs while editing

ForgottenLegacy 09-04-2005 12:08 AM

Quote:

Originally Posted by Stefan
I think the script of local npcs cannot be loaded with requesttext yet, but that will be added soon, together with a possibility to freeze the local npcs while editing

Will these be added into some sort of newfeatures docu?

napo_p2p 09-05-2005 02:01 AM

How would you go about loading the flags of an NPC?

ForgottenLegacy 09-05-2005 04:36 AM

Quote:

Originally Posted by napo_p2p
How would you go about loading the flags of an NPC?

Target the NPC inside a with() and use 'getStringKeys("this")' or something. Not sure.

ChibiChibiLuc 09-05-2005 04:46 AM

npcs[index].getvars()

napo_p2p 09-05-2005 04:48 AM

Quote:

Originally Posted by ChibiChibiLuc
npcs[index].getvars()

Thanks :D.

Does that work for DB NPCs?

Ajira 09-05-2005 06:08 AM

Quote:

Originally Posted by napo_p2p
Thanks :D.

Does that work for DB NPCs?

NPC Code:

findnpc("npc name").getdynamicvarnames();



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

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