 |
 |
 |
 |
| Author |
Message |
Datus
Joined: 19 Sep 2006 Posts: 58
|
Posted: Tue Sep 19, 2006 3:26 pm Post subject: A couple of annoying newbie questions. |
|
|
I've been tinkering with a few UO Server emulators now for the past few days. I started with POL095, then went to Sphere, then tried RunUO... now I'm back to POL... for 2 reasons. I found POL to be the easiest OOTB to configure and it has the best documentation. Neither - obviously -is mutually exclusive. Anyway, I forsee a long road in regards to scripting and customization of POL095, and I do plan to take it on quite heavily, as for now though, I have some VERY basic questions.
1. NPCs are not responding to training requests. They only respond to "buy" or "sell" requests. Am I doing something wrong here? I've tried "[name] train", dropping gold on them, with which they take from me, "train","teach", and all combinations in-between. I renamed speech.mul and still nothing.
***UPDATE***
OK I figured out the first answer by digging through merchant.src. "vendor train" ...now I just have to figure out how to change this.
2. What are these Sanctuary scripts I keep reading about and where can I grab them?
Anyway thanks for any help. Everyone here will no doubt be hearing more from me!!
Also, I try pretty hard to search the forums for answers to my questions, so forgive me if I've missed anything. |
|
 |
|
|
 |
 |
|
 |
 |
|
 |
 |
|
 |
 |
|
 |
 |
|
 |
 |
|
 |
 |
|
 |
 |
|
 |
 |
| Author |
Message |
CWO
Joined: 04 Feb 2006 Posts: 697 Location: Chicago, IL USA
|
Posted: Wed Sep 20, 2006 12:55 am Post subject: |
|
|
Just picked up the distro scriptpack and looked at it and I think I found where the problem is. My scriptbase works a little differently than distro's and where you changed it would have worked in mine. In mine, the vendor script does all the speech processing where in the distro, it seems the merchant's node does the processing and sends the result to the vendor script... But anyway, look for the script
pkg/systems/merchantnode/merchantNodeControl.src
this starts at line 303 in the script (fresh from the zip)
| Code: |
// If the character wants to do something with a vendor:
if (text["buy"] || text["sell"] || text["train"] || text["teach"]||(pass))
// Just pick the nearest vendor if the player isn't specific.
if( text["merchant"] || text["vendor"] || (pass) )
var dis := 7;
foreach mob in npclist
if(CheckLineOfSight(who, mob))
var dst := dist(who, mob);
if(dst < dis)
dis := dst;
npc := mob;
endif
endif
endforeach
endif
// Has the player said the name of the vendor? Use that.
var vendorname;
foreach mob in npclist
if(CheckLineOfSight(who, mob))
vendorname := splitwords(mob.name);
if (text[lower(vendorname[1])])
npc := mob;
endif
endif
endforeach
endif
|
change all of this to
| Code: |
// If the character wants to do something with a vendor:
if (text["buy"] || text["sell"] || text["train"] || text["teach"]||(pass))
// Has the player said the name of the vendor? Use that.
var vendorname;
foreach mob in npclist
if(CheckLineOfSight(who, mob))
vendorname := splitwords(mob.name);
if (text[lower(vendorname[1])])
npc := mob;
endif
endif
endforeach
// Just pick the nearest vendor if the player isn't specific.
if (!npc)
var dis := 7;
foreach mob in npclist
if(CheckLineOfSight(who, mob))
var dst := dist(who, mob);
if(dst < dis)
dis := dst;
npc := mob;
endif
endif
endforeach
endif
endif
|
I have not tested this code, I havent even tried to compile it but hopefully this will solve it and hopefully I was looking at the right spot. Change, compile, reboot the shard.
My basic changes:
it was looking for any vendor first (if you said vendor or merchant) then it would look if you called a specific vendor name. I switched it so if you called the vendor name, it would be processed first and if none found, then look for any vendor. I also removed the IF statement with the "vendor" and "merchant" in it. |
|
 |
|
|
 |
 |
|
 |
 |
|
|