What's new
  • Visit Rebornbuddy
  • Visit Resources
  • Visit API Documentation
  • Visit Downloads
  • Visit Portal
  • Visit Panda Profiles
  • Visit LLamamMagic

Gold trader

Status
Not open for further replies.

remark

New Member
Joined
Nov 13, 2014
Messages
58
Reaction score
0
is there anyway of detecting if we near a gold trader, without using a list of all the ids or their name? i was thinking would it be possible to detect their title [Gold Trader] Eva

and then we be happy?
 
You'll have to work with their npcNicknameId.

Example:
Code:
private void findMerchant(){
	bool found  = false;
	int counter = 0;   
	List<Creature> creatures = getCreatures(); 
	while(!found && counter < creatures.Count){
		if(creatures[counter].db.npcNicknameId == 12){
			found = true;
		}else{
			counter++;
		}
	}
	if(found){
		MoveTo(creatures[counter);   
		Log("[INFO] General Merchant found.");
	}else{
		Log("[ERROR] General Merchant not found.");
	}
}

This is for general merchant (npcNicknameId is 12). I suggest you go to some town with the NPC you want and list them all by creature.name and their creature.db.npcNicknameId and see which matches your merchant. (Their names are actual names, like Alfred, Figaro, Elena, ...).
 
Status
Not open for further replies.
Back
Top