Page 1 of 1

vendor buy to buy

Posted: Mon Mar 06, 2006 11:08 pm
by Devloper BCL
where i canc hange te fonction vendor buy to buy...vendor sell to sell

Posted: Fri Apr 07, 2006 12:51 pm
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!