Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 03-08-2007, 07:22 PM
Skyld Skyld is offline
Script-fu
Skyld's Avatar
Join Date: Jan 2002
Location: United Kingdom
Posts: 3,914
Skyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud of
Send a message via AIM to Skyld
Exclamation 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.
__________________
Skyld
Reply With Quote
  #2  
Old 03-08-2007, 07:23 PM
Chandler Chandler is offline
Banned
Join Date: Jan 2007
Posts: 656
Chandler will become famous soon enough
Very good, I really like this feature!!
PHP Code:
/scriptscan weapons/npcs/classes/levels/all textscan scripts 
Reply With Quote
  #3  
Old 03-08-2007, 09:05 PM
zokemon zokemon is offline
That one guy...
zokemon's Avatar
Join Date: Mar 2001
Location: Sonoma County, California
Posts: 2,925
zokemon is a jewel in the roughzokemon is a jewel in the rough
Send a message via ICQ to zokemon Send a message via AIM to zokemon Send a message via MSN to zokemon Send a message via Yahoo to zokemon
/scriptscan all onCreated
__________________
Do it with a DON!
Reply With Quote
  #4  
Old 03-08-2007, 09:05 PM
napo_p2p napo_p2p is offline
oh snaps
napo_p2p's Avatar
Join Date: Sep 2003
Location: Pismo Beach, California
Posts: 2,118
napo_p2p has a spectacular aura aboutnapo_p2p has a spectacular aura about
Send a message via AIM to napo_p2p Send a message via MSN to napo_p2p
Very nice .

I don't have a chance to test it right now, but does it also scan putnpc2s?
__________________
Scito hoc super omnia.
Haec vita est tua una sola.
Dum vita superest, utere maxime quoque puncto, momento, et hora quae habes.
Tempus neminem non manet.
Noli manere tempus.
Carpe Diem

Seize the Day.
Reply With Quote
  #5  
Old 03-08-2007, 09:50 PM
godofwarares godofwarares is offline
Webmaster
godofwarares's Avatar
Join Date: Dec 2006
Location: Florida
Posts: 552
godofwarares is on a distinguished road
Send a message via ICQ to godofwarares Send a message via AIM to godofwarares Send a message via MSN to godofwarares Send a message via Yahoo to godofwarares
I like ;o
__________________
What signature? I see no signature?
Reply With Quote
  #6  
Old 03-08-2007, 09:56 PM
smirt362 smirt362 is offline
Tee Hee
smirt362's Avatar
Join Date: Feb 2005
Location: Texas
Posts: 2,101
smirt362 has a brilliant futuresmirt362 has a brilliant futuresmirt362 has a brilliant futuresmirt362 has a brilliant futuresmirt362 has a brilliant futuresmirt362 has a brilliant futuresmirt362 has a brilliant future
Send a message via AIM to smirt362 Send a message via MSN to smirt362
Very nice.
__________________

Don Hertzfeldt <3
Reply With Quote
  #7  
Old 03-08-2007, 09:58 PM
Gambet Gambet is offline
Registered User
Join Date: Oct 2003
Posts: 2,712
Gambet is on a distinguished road
Quite a useful addition. About time I'd say.
Reply With Quote
  #8  
Old 03-08-2007, 10:58 PM
Twinny Twinny is offline
My empire of dirt
Twinny's Avatar
Join Date: Mar 2006
Location: Australia
Posts: 2,422
Twinny is just really niceTwinny is just really nice
Send a message via AIM to Twinny
Quote:
Originally Posted by Gambet View Post
Quite a useful addition. About time I'd say.
It has been on N-Pulse Dev ever since the move. You didn't notice?
Reply With Quote
  #9  
Old 03-08-2007, 11:05 PM
Gambet Gambet is offline
Registered User
Join Date: Oct 2003
Posts: 2,712
Gambet is on a distinguished road
Quote:
Originally Posted by Twinny View Post
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.
Reply With Quote
  #10  
Old 03-09-2007, 04:31 AM
Kristi Kristi is offline
Bowie's Deciple
Kristi's Avatar
Join Date: Dec 2003
Location: Boston, MA
Posts: 748
Kristi has a spectacular aura aboutKristi has a spectacular aura about
Send a message via AIM to Kristi Send a message via MSN to Kristi
Quote:
Originally Posted by napo_p2p View Post
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
__________________
Reply With Quote
  #11  
Old 03-09-2007, 01:11 PM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
/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).
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 10:42 PM.


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