Graal Forums

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

Python523 08-06-2005 01:00 AM

New NPC Control
 
1 Attachment(s)
I have been working on a new NC Control concept and script (in-game editing for weapons/classes/database NPCs). So far the features include the following:
  • Tree-View control for listing NPCs
  • Tabbed Scripts for easier editing
  • Syntax Highlighting

Some planned features (will be editted when new ideas are thought of):
  • Other functions to make the script more list the current NC Control (image editting for weapons,x/y/level/flag editting for classes, delete buttons, adding entries to NC, etc)
  • Adding local-npcs in the level the player is in to the tree-view
  • Find/Replace
  • Scroll-to-function (drop down list, when a function is selected, the script window will scroll to the function)
  • Reload Button (added 08/05/05, picture updated) (suggested by Calani)
  • Customization(custom syntax colors, window/background colors, possibly hotkeys, etc) (suggested by Calani)

I attatched a screenshot of what I have done so far... comments and criticisms would both be appreciated. Also, suggestions for improvements and functions that could be added would also be appreciated!

Benm00t 08-06-2005 01:02 AM

I think it looks sexy.

. ' . I think you are sexy as well!

nullify 08-06-2005 01:03 AM

The regualr NC shall pale in comparison to this work of pure genius. :redface:

calani 08-06-2005 01:10 AM

Seckay plz

anyways, further ideas:
* (correct) error highlighting (missing semicolon on line 53... line 53 is blank)
* command to relaod a script without saving changes
* lengthy undo stack (not like winblow's notepad's one undo >.>)
* inline popups/autocomplete for commands/functions (and vars too?)
such as "trig" would give a popup list with triggeraction and triggerserver
very handy for forgetting functions (ex: was hit -.-)
* customizability (custom syntax colors, window/background colors, etc)
* hotkeys? (popup, hide, switch, add level npc, save, close, reload)

Blitz_Hunter 08-06-2005 01:34 AM

Thats hot. <3

calani 08-06-2005 01:37 AM

sexay reload button



Postcount++;

xAndrewx 08-06-2005 05:56 PM

Awesome :D

Luigi1 08-06-2005 09:58 PM

Hurry up and finish it. :(

Skyld 08-06-2005 10:42 PM

Looks impressive.

xXDuMajuXx 08-07-2005 01:41 AM

Very good, indeed.

However, I'm not keen on in-game editting. It might be good for the quick 1-2-BAM-Finished edit but I prefer to keep everything nice, simple and seperate.

ChibiChibiLuc 08-07-2005 02:56 AM

... You don't even script. Go away.

:D Jagen keeps getting sexier by the day. <3

xXDuMajuXx 08-07-2005 12:59 PM

Yes I do too! Just not as often as I used to do.

Inverness 08-07-2005 09:03 PM

Would like the ability to make the weapon hidden without needing to begin the weapon name with a minus, it cramps my system style, not joking.
Also would like to be able to set custom weapon attributes than can be accessed clientside or serverside (weapons[index].attr[index]). EX:
NPC Code:
//#ATTR2 false
//#ATTR3 10
//#ATTR4 "Incomplete"
[script]
//#CLIENTSIDE
[morescript]



And maybe a list of serverside variables/strings/arrays/objects in the weapon.

Oh and, LINE NUMBERS D@MNIT >:O

xAndrewx 08-08-2005 03:18 PM

Quote:

Originally Posted by xXDuMajuXx
Very good, indeed.

However, I'm not keen on in-game editting. It might be good for the quick 1-2-BAM-Finished edit but I prefer to keep everything nice, simple and seperate.

Yea, I hate ingame rc too :[..

calani 08-16-2005 02:32 AM

The only reason I use NC to script at this point is because its like notepad, but has a better font. v3 textboxes suck. >.> no ctrl+left/right, no useful undo feature, etc.
But if I could get a decent textbox with color AND the right font...... good-bye NC ^_^;

Ajira 08-17-2005 05:42 AM

o.o
Very nice, but are those actual Gui Tabs?

Matt 08-17-2005 05:53 AM

Quote:

Originally Posted by Ajira
o.o
Very nice, but are those actual Gui Tabs?

I think he customized that himself for himself.

Maniaman 08-17-2005 10:38 PM

Quote:

Originally Posted by Ajira
o.o
Very nice, but are those actual Gui Tabs?

Yes. There is a GuiTabCtrl or somehting like that now.

Ajira 08-19-2005 09:45 PM

Quote:

Originally Posted by Maniaman
Yes. There is a GuiTabCtrl or somehting like that now.

Nice, Stefan finally added it. =D

ForgottenLegacy 08-20-2005 11:03 PM

GuiTabCtrl? Anyone got the specs on that, such as the functions/commands/whatever?

Ajira 08-21-2005 05:50 AM

Quote:

Originally Posted by ForgottenLegacy
GuiTabCtrl? Anyone got the specs on that, such as the functions/commands/whatever?

Quote:

Originally Posted by scriptfunctions_client.txt

GuiTabCtrl (GuiControl):
iconheight - integer (read only)
iconwidth - integer (read only)
leveling - integer
maxvisibletabs - integer (read only)
selected - object (read only)
tabwidth - integer
addrow(int, str) - returns object - the added row
clearrows()
clearselection()
findtext(str) - returns integer - row index
findtextid(str) - returns integer - row id
getrowatpoint(int, int) - returns integer - row index
getrowidatpoint(int, int) - returns integer - row id
getrownumbyid(int) - returns integer
getselectedid() - returns integer - row id
getselectedrow() - returns integer - row index
getselectedtext() - returns string
insertrow(int, int, str) - returns object - the inserted row
isidselected(int) - returns boolean
isrowselected(int) - returns boolean
makevisible(int)
makevisiblebyid(int)
removerow(int)
removerowbyid(int)
rowcount() - returns integer
seticonsize(int, int)
setselectedbyid(int)
setselectedrow(int)

Also, ControlName.onSelect(tabid, tabtext, tabrow);

ForgottenLegacy 08-21-2005 09:04 AM

Liek omigosh. Thanks a bunch dude!

calani 08-24-2005 09:57 PM

o.o spam?
that's a long quote, aji. yikes.

glad ya got your GuiTabCtrl working though =]

ForgottenLegacy 08-24-2005 10:07 PM

Quote:

Originally Posted by calani
o.o spam?
that's a long quote, aji. yikes.

glad ya got your GuiTabCtrl working though =]

No, GuiTextListCtrl. GuiTabCtrl is v4 only z-z

calani 08-24-2005 10:09 PM

oh, that's right.
my mistake.

napo_p2p 09-13-2005 08:06 AM

I was able to make one, but it doesn't have the 'sekc' folder icons (just the defaults +'s) on the left, and my text editing box is harder on the eyes :\ .

ForgottenLegacy 09-14-2005 12:15 AM

Quote:

Originally Posted by napo_p2p
I was able to make one, but it doesn't have the 'sekc' folder icons (just the defaults +'s) on the left, and my text editing box is harder on the eyes :\ .

PHP Code:

<Source>.<Location>.icon.drawImageRectangle(int,int,str,int,int,int,int); 

Source would be the name of the object, location would be the line number. That'll give you those fancy folder icons. I forget what each param does, but 'str' is the imagename, obviously.

Also, use profiles. I made my own 'TGCBlue_' profile set that uses those blue image thingeys, which I am recolouring to be a variety of designs and colours. That'll get rid of the strain on the eyes.

Ajira 09-14-2005 12:30 AM

Quote:

Originally Posted by ForgottenLegacy
Also, use profiles. I made my own 'TGCBlue_' profile set that uses those blue image thingeys, which I am recolouring to be a variety of designs and colours. That'll get rid of the strain on the eyes.

The profiles for the Blue gfx are pre-made and come in the client.

napo_p2p 09-14-2005 02:08 AM

Quote:

Originally Posted by Ajira
The profiles for the Blue gfx are pre-made and come in the client.

Yes, they all start with 'GuiBlue'.

petro1212 09-14-2005 09:14 AM

mmm.... this is more of a "fashionality" question?
Why doesn't anyone bother to make a "rc" thats processed within the game screen? (This is more about looks.. but you get the point, this could be a steps towards it finaly) With that I mean totaly processed and not the normal in-game rc ;)

Anyhow tought about being able to edit (not only add) npcs to a level (putnpc2)? If not making a seperate tab for them would be nice. Just so you know that their there (wouldn't be to hard)

Nabru 09-14-2005 04:24 PM

Quote:

Originally Posted by petro1212
mmm.... this is more of a "fashionality" question?
Why doesn't anyone bother to make a "rc" thats processed within the game screen? (This is more about looks.. but you get the point, this could be a steps towards it finaly) With that I mean totaly processed and not the normal in-game rc ;)

Anyhow tought about being able to edit (not only add) npcs to a level (putnpc2)? If not making a seperate tab for them would be nice. Just so you know that their there (wouldn't be to hard)

....An in-game RC already exists

Ajira 09-14-2005 08:34 PM

Quote:

Originally Posted by petro1212
Anyhow tought about being able to edit (not only add) npcs to a level (putnpc2)? If not making a seperate tab for them would be nice. Just so you know that their there (wouldn't be to hard)

I started scripting an Online NPC Editor where you pressed a button and then it showed some image thing around all the NPCs in the level. You could click each and it brought up a GUI Window with all the vars of that NPC. You could then edit those vars and there was also a button to edit the script and the classes joined to that NPC.

napo_p2p 09-14-2005 09:59 PM

Quote:

Originally Posted by Ajira
I started scripting an Online NPC Editor where you pressed a button and then it showed some image thing around all the NPCs in the level. You could click each and it brought up a GUI Window with all the vars of that NPC. You could then edit those vars and there was also a button to edit the script and the classes joined to that NPC.

Is there a way to get the vars of an NPC with requesttext? Or, did you just use getDynamicSomethingIForget()?

Ajira 09-14-2005 11:56 PM

Quote:

Originally Posted by napo_p2p
Is there a way to get the vars of an NPC with requesttext? Or, did you just use getDynamicSomethingIForget()?

You have to use the getvarnames() function.

napo_p2p 09-15-2005 08:57 AM

Quote:

Originally Posted by Ajira
You have to use the getvarnames() function.

So currently there is not a clientside command to get the flags of a putnpc2 NPC?

ForgottenLegacy 09-15-2005 11:59 PM

Quote:

Originally Posted by napo_p2p
So currently there is not a clientside command to get the flags of a putnpc2 NPC?

Quote:

Originally Posted by scriptfunctions_client.txt
TGraalVar:
getdatablockvars() - returns object
getdynamicvarnames() - returns object
geteditvarnames() - returns object
getfunctions() - returns object
getstaticvarnames() - returns object
getvarnames() - returns object

o_O Looks like it /is/ clientside.

napo_p2p 09-16-2005 12:02 AM

Quote:

Originally Posted by ForgottenLegacy
o_O Looks like it /is/ clientside.

But that only will work for NPCs in the level (and maybe also only for NPCs that are clientsided?).

You need to use the serverside commands to get the info from putnpc2 NPCs.

Ajira 09-16-2005 01:24 AM

Quote:

Originally Posted by napo_p2p
But that only will work for NPCs in the level (and maybe also only for NPCs that are clientsided?).

You need to use the serverside commands to get the info from putnpc2 NPCs.

If there is clientside data contained in the NPC, then it will work correctly clientside. Otherwise you need to use it serverside.

DarkFireXZ3 09-24-2005 07:20 PM

Quote:

Originally Posted by Nabru
....An in-game RC already exists

About that i am tring to search for the original scripts where i can add it to my server, could someone direct me toward the scripts.

Riot 09-24-2005 07:32 PM

http://forums.graalonline.com/forums...ad.php?t=57428

It's slightly old and outdated, read through the thread to find out how to fix it.


All times are GMT +2. The time now is 07:56 PM.

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