Setscptrig

Forum where anything UOX3-related goes - including, but not limited to: newbie-support, ideas, general questions, comments, etc and-so-forth.
Post Reply
Mindless Automaton
UOX3 Apprentice
Posts: 189
Joined: Wed May 10, 2006 3:48 am
Has thanked: 0
Been thanked: 1 time
Contact:

Setscptrig

Post by Mindless Automaton »

Is there a way to view what script is assigned to a npc? I tried cstats, but it didn't show the script number.

Also, I have 2 npcs I added and am trying to use setscptrig to assign scripts and they don't seem to affect the character.

What happens when you setscptrig on the same character, is it replaced or removed?

Thanks!
Mindless Automaton
Linux - UOX3 - 0.99.5 dev branch
Win10Pro 19042.572 - UOX3 0.99.3a; Razor 1.0.14; Client 7.0.87.11 or 4.0.11c (Patch 0)
User avatar
Xuri
Site Admin
Posts: 3704
Joined: Mon Jun 02, 2003 9:11 am
Location: Norway
Has thanked: 48 times
Been thanked: 8 times
Contact:

Post by Xuri »

'setscptrig # will always overwrite whatever scripttrigger/id the object already has. I'm not sure if it's possible to view the scripttrigger ingame actually - that should be fixed =P

The hard way of doing it would be to do a worldsave and then do a search through all the .wsc files for that specific npc (by name, for instance) and see which script he's setup with there.
-= Ho Eyo He Hum =-
stranf
UOX3 Guru
Posts: 939
Joined: Wed Jan 04, 2006 3:59 pm
Has thanked: 0
Been thanked: 0

Post by stranf »

The hard way of doing it would be to do a worldsave and then do a search through all the .wsc files for that specific npc (by name, for instance) and see which script he's setup with there.
That's an understatement. Especially when your worldfile is pushing over 100MB. :)
giwo
Developer
Posts: 1780
Joined: Fri Jun 18, 2004 4:17 pm
Location: California
Has thanked: 0
Been thanked: 0

Post by giwo »

Where should the script ID show, on the cstats gump?
Maarc
Developer
Posts: 576
Joined: Sat Mar 27, 2004 6:22 am
Location: Fleet, UK
Has thanked: 0
Been thanked: 0
Contact:

Post by Maarc »

Cstats and istats both, I'd suggest.

And stranf, you'll find the command line command "findstr" quite useful.

Something like:

Code: Select all

findstr /i /c:"id=12345" *.wsc
That'll search the files and report the file its in for you.
User avatar
Xuri
Site Admin
Posts: 3704
Joined: Mon Jun 02, 2003 9:11 am
Location: Norway
Has thanked: 48 times
Been thanked: 8 times
Contact:

Post by Xuri »

giwo wrote:Where should the script ID show, on the cstats gump?
I volunteer the 'TWEAK menu as well ;)
-= Ho Eyo He Hum =-
giwo
Developer
Posts: 1780
Joined: Fri Jun 18, 2004 4:17 pm
Location: California
Has thanked: 0
Been thanked: 0

Post by giwo »

Try adding the following line to gumps.js in onCallback0 and onCallback1

Code: Select all

addEntry( myGump, "Script ID:", ourObj.scripttrigger );
Didn't test it, but it looks like that is the property you guys are wanting, and it's already exposed to JS. ;)

The tweak menu, on the other hand, will require a change to the code.
User avatar
Xuri
Site Admin
Posts: 3704
Joined: Mon Jun 02, 2003 9:11 am
Location: Norway
Has thanked: 48 times
Been thanked: 8 times
Contact:

Post by Xuri »

And we all love code-changes, right? ...Right?
-= Ho Eyo He Hum =-
giwo
Developer
Posts: 1780
Joined: Fri Jun 18, 2004 4:17 pm
Location: California
Has thanked: 0
Been thanked: 0

Post by giwo »

Xuri wrote:And we all love code-changes, right? ...Right?
Sounds like we have a volunteer!

Cheers :D
User avatar
Xuri
Site Admin
Posts: 3704
Joined: Mon Jun 02, 2003 9:11 am
Location: Norway
Has thanked: 48 times
Been thanked: 8 times
Contact:

Post by Xuri »

Done. ScriptID will be present (and working, hopefully) in the 'TWEAK menu in my next commit. Will also update the gump.js file with your snippet for the 'ISTATS and 'CSTATS menu.
-= Ho Eyo He Hum =-
Post Reply