Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   New NC commands (https://forums.graalonline.com/forums/showthread.php?t=72679)

Skyld 03-08-2007 07:22 PM

New NC commands
 
There are two new NC commands in the latest npcserver version: /scripthelp and /scriptscan. They help by providing information about script objects, functions and variables, and also allow scanning scripts for certain text.

The /scripthelp command returns information about object functions and expected parameters to RC, i.e. if you want to find out more about functions available to TServerNPC objects, you would type /scripthelp TServerNPC.

Secondly, you can also now scan scripts on the server for given text using /scriptscan. /scriptscan expects the location to search (either "weapons", "classes", "npcs", "levels" or "all") and the text to search for. For example, running /scriptscan all checkAdminRight on Rudora returns:
HTML Code:

Scanning for 'checkAdminRight' in all:
Commands:
 9:    case "summon":
 10:    {
>11:      if (player.checkAdminRight("Summon"))
 12:      {
 13:        temp.player = findPlayer(temp.tok[1]);
 14:
 15:        if (temp.player != NULL)

These should make it easier to find help on objects and to find things in scripts. If these functions do not work, you may need to restart your NPC-Server.

Chandler 03-08-2007 07:23 PM

Very good, I really like this feature!!
PHP Code:

/scriptscan weapons/npcs/classes/levels/all textscan scripts 


zokemon 03-08-2007 09:05 PM

/scriptscan all onCreated

napo_p2p 03-08-2007 09:05 PM

Very nice :).

I don't have a chance to test it right now, but does it also scan putnpc2s?

godofwarares 03-08-2007 09:50 PM

I like ;o

smirt362 03-08-2007 09:56 PM

Very nice.

Gambet 03-08-2007 09:58 PM

Quite a useful addition. About time I'd say.

Twinny 03-08-2007 10:58 PM

Quote:

Originally Posted by Gambet (Post 1286399)
Quite a useful addition. About time I'd say.

It has been on N-Pulse Dev ever since the move. You didn't notice?

Gambet 03-08-2007 11:05 PM

Quote:

Originally Posted by Twinny (Post 1286461)
It has been on N-Pulse Dev ever since the move. You didn't notice?



No, nobody is ever on NP Dev now-a-days.

Kristi 03-09-2007 04:31 AM

Quote:

Originally Posted by napo_p2p (Post 1286378)
Very nice :).

I don't have a chance to test it right now, but does it also scan putnpc2s?

any npc on the server is concidered "npc", so if you scan npc or all, it will scan any level/etc npcs

Admins 03-09-2007 01:11 PM

/scriptscan npcs text will scan all database npcs (putnpc2 + the ones you see in the npc list)
Scanning for npcs in levels can take much more time, that's why it's a different option ("levels")

btw: /scriptscan is also working on GS1, I am not sure if the new npcserver version has been uploaded to all machines yet though. If you get messages like "unknown command" when typing /scriptscan or /scripthelp then you also need to restart the gserver, although it is not required (might just being annoying, the command will work anyway).


All times are GMT +2. The time now is 02:04 PM.

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