Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Future Improvements (https://forums.graalonline.com/forums/forumdisplay.php?f=10)
-   -   Time saving on adding npcs (https://forums.graalonline.com/forums/showthread.php?t=56323)

prozac424242 12-06-2004 04:36 PM

Time saving on adding npcs
 
Let's say you want to have noplayerkilling on your whole overworld map,
or you have a radio npc that plays user selected midi when the radio is on
but the game theme midi when the radio is off depending on what level you are in..

Or any kind of npc that you want to have in nearly every level of your server.

Instead of copy and pasting the npc a hundred times, how about a small, simple application:

-Put the text of the npc you want to add into a file

-Put the .nw files into the folder that the text of the npc is in

-assign a destination folder

program: read the .nw file
for each .nw file : read .nw file
append the .txt file to .nw file
save .nw file with the npc text together, in destination folder

Should not be too hard to program into a small standalone app ...and would save a bunch of time!

ZeroTrack 12-06-2004 04:48 PM

Quote:

Originally Posted by prozac424242
Let's say you want to have noplayerkilling on your whole overworld map,
or you have a radio npc that plays user selected midi when the radio is on
but the game theme midi when the radio is off depending on what level you are in..

Or any kind of npc that you want to have in nearly every level of your server.

Instead of copy and pasting the npc a hundred times, how about a small, simple application:

-Put the text of the npc you want to add into a file

-Put the .nw files into the folder that the text of the npc is in

-assign a destination folder

program: read the .nw file
for each .nw file : read .nw file
append the .txt file to .nw file
save .nw file with the npc text together, in destination folder

Should not be too hard to program into a small standalone app ...and would save a bunch of time!

just add a script in a dbnpc or system weapon npc such as if your pw OW levels start with argos_
PHP Code:

//#CLIENTSIDE
if(startswith(argos_,#L)) noplayerkilling; 


Slash-P2P 12-07-2004 12:04 AM

Quote:

Originally Posted by ZeroTrack
just add a script in a dbnpc or system weapon npc such as if your pw OW levels start with argos_
PHP Code:

//#CLIENTSIDE
if(startswith(argos_,#L)) noplayerkilling; 


I doubt it would work with a DB NPC, but I have never tried.

For a radio, have a string that stores whether the radio is on or off.
Then, in a system npc or something, make a script (kind of like Sern's script) that checks the level names and plays a midi if the radio is off. You could do something like levels that start with house_ play house.mid or dungeon_ play dungeon.mid or something along those lines.

ZeroTrack 12-07-2004 01:00 AM

Quote:

Originally Posted by Slash-P2P
I doubt it would work with a DB NPC, but I have never tried.

i have it in the control npc =p

xAndrewx 12-26-2004 08:59 PM

Wouldn't it be better in a item everyplayer has like the gui or system?

Slash-P2P 12-27-2004 05:12 AM

Quote:

Originally Posted by xAndrewx
Wouldn't it be better in a item everyplayer has like the gui or system?

Thats what I do.


All times are GMT +2. The time now is 11:45 PM.

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