vendor buy to buy

Here you can post threads requesting help on the official POL Ultima Online Emulator Core 095. Note: Core 095 is no longer officially supported.
Post Reply
Devloper BCL
New User
Posts: 16
Joined: Wed Mar 01, 2006 3:17 pm

vendor buy to buy

Post by Devloper BCL »

where i canc hange te fonction vendor buy to buy...vendor sell to sell
User avatar
tekproxy
Forum Regular
Posts: 352
Joined: Thu Apr 06, 2006 5:11 pm

Post by tekproxy »

I'm not sure on this since I've never done it myself but I believe that is handled in merchantNodeControl.src. The code should look something like this:

Code: Select all

	// These speech items require no other speech, so should be included in all checks.
	if (text["appraise"] || text["stable"] || text["showinventory"] || text["showrestock"])
		pass := 1;
	endif
	
	// 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
See where it says // These speech items require no other speech, so should be included in all checks. ? Add "buy" and "sell" to that list and remove them from the other list. Recompile. This should work. Let me know if I'm wrong!
Post Reply