[FIXED] Does NPC training work?

Here we stuff all the bugs we've managed to squash/squish/squelch.
Locked
Grimson
Developer
Posts: 802
Joined: Sat Jun 04, 2005 1:52 am
Location: Germany
Has thanked: 0
Been thanked: 0

Does NPC training work?

Post by Grimson »

I just tried to get training from an NPC. He told me which skills he can train after asking "train", but asking for a specific skill, for ex. "train tactics" doesn't do a bit.
giwo
Developer
Posts: 1780
Joined: Fri Jun 18, 2004 4:17 pm
Location: California
Has thanked: 0
Been thanked: 0

Post by giwo »

Training *should* work.

I'll have a look
Scott
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 »

Confirmed.

NPCTRAININGENABLED=1 in UOX.INI
'SET CANTRAIN 1 on NPC ingame (or add NPC with trainer flag set already).

Displays the correct skills he can train in, but doesn't respond to "train <skillname>"
-= 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 »

Tested this, found the issue.

It seems that because of how we handle triggerwords, it seems that multiple triggerwords in a line of speech throw things off.

For instance, try "<skillname> train"

I will see about a proper and full implementation of triggerwords (which would improve the situation all around, as it would save us from running a string search for a match to that skillname).
Scott
giwo
Developer
Posts: 1780
Joined: Fri Jun 18, 2004 4:17 pm
Location: California
Has thanked: 0
Been thanked: 0

Post by giwo »

LOL!

It's even better than that...

See, I thought the train problem was OUR fault.... bwahahahaha.... lovely OSI, always wasting space.

Instead of having *train* in the Speech.mul, they have *train <skillname> for EVERY skill, plus the other possibilities (like train necro, instead of train necromancy). Personally I would have done *train* and then <skillname>

*shrug*

Anyway, back to the point. I updated our handling of TriggerWords, we can now handle multiple triggerwords sent by the client. Remember this doesn't necesarrily mean a line like "vendor buy the bank from the guards who train me to escort an npc" or something like that will work.
Triggerwords must be sent to us by the client, which means it has to do a wildcard match on them first. (IE if it's *bank* they search for, then we will get a "bank" triggerword, despite where it is in the sentence, if it's *bank they search for, then it MUST be at the beginning, etc).

I will work on implementing handling of every variation of *train <skillname>, but due to the sheer number of these, and needing to pull the indexes out one-by-one, it could take a while.

For now, <skillname> train is an acceptable workaround. :)
Scott
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 »

*bump* ;)
-= 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 »

Yeah, umm, not going to do it.

I'll look in to a way to expose the trigger words to JS for you, though. :)
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 »

Verified in 0.98-4.0 using Client 6.0.12.3. :)
-= Ho Eyo He Hum =-
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 »

Fixed on CVS and in UOX3 0.99.
-= Ho Eyo He Hum =-
Locked