Jump to content
  • 0

Adoption NPC script


pueblodefairy

Question


  • Group:  Members
  • Topic Count:  19
  • Topics Per Day:  0.01
  • Content Count:  74
  • Reputation:   0
  • Joined:  01/24/15
  • Last Seen:  

Hello, my adoption system is not working. So i would like to ask for help to create a NPC script that helps to adopt a novice. My server doesn´ t uses commands on normal players so thats why i need help to create a npc that people can use to adopt like they were using the command @adopt.... Thanks a lot for help.

Edited by pueblodefairy
Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

try

prontera,155,181,5	script	Sample	757,{
	if (!ispartneron()) {
		mes "Your partner isn't online or not found.";
	}
	else if (getchildid()) {
		mes "You already has a child.";
	}
	else {
		mes "Would you like to adopt someone?";
		next;
		if (select("Yes", "Cancel") == 1) {
			mes "Enter Child name";
			input .@child_name$;
			switch(adopt(strcharinfo(0), .@child_name$)) {
				case ADOPT_ALLOWED:
					mes "Sent message to Baby to accept or deny.";
					break;
				case ADOPT_ALREADY_ADOPTED:
					mes "Character is already adopted.";
					break;
				case ADOPT_MARRIED_AND_PARTY:
					mes "Parents need to be married and in a party with the baby.";
					break;
				case ADOPT_EQUIP_RINGS:
					mes "Parents need wedding rings equipped.";
					break;
				case ADOPT_NOT_NOVICE:
					mes "Baby is not a Novice.";
					break;
				case ADOPT_CHARACTER_NOT_FOUND:
					mes "A parent or Baby was not found.";
					break;
				case ADOPT_MORE_CHILDREN:
					mes "You cannot adopt more than 1 child. (client message)";
					break;
				case ADOPT_LEVEL_70:
					mes "Parents need to be at least level 70 in order to adopt someone. (client message)";
					break;
				case ADOPT_MARRIED:
					mes "You cannot adopt a married person. (client message)";
					break;
			}
		}
	}
	close;
}

 

  • Love 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  19
  • Topics Per Day:  0.01
  • Content Count:  74
  • Reputation:   0
  • Joined:  01/24/15
  • Last Seen:  

Thanks i will check it when i arrived home. Thanks a lot ur awesome

12 hours ago, Emistry said:

try


prontera,155,181,5	script	Sample	757,{
	if (!ispartneron()) {
		mes "Your partner isn't online or not found.";
	}
	else if (getchildid()) {
		mes "You already has a child.";
	}
	else {
		mes "Would you like to adopt someone?";
		next;
		if (select("Yes", "Cancel") == 1) {
			mes "Enter Child name";
			input .@child_name$;
			switch(adopt(strcharinfo(0), .@child_name$)) {
				case ADOPT_ALLOWED:
					mes "Sent message to Baby to accept or deny.";
					break;
				case ADOPT_ALREADY_ADOPTED:
					mes "Character is already adopted.";
					break;
				case ADOPT_MARRIED_AND_PARTY:
					mes "Parents need to be married and in a party with the baby.";
					break;
				case ADOPT_EQUIP_RINGS:
					mes "Parents need wedding rings equipped.";
					break;
				case ADOPT_NOT_NOVICE:
					mes "Baby is not a Novice.";
					break;
				case ADOPT_CHARACTER_NOT_FOUND:
					mes "A parent or Baby was not found.";
					break;
				case ADOPT_MORE_CHILDREN:
					mes "You cannot adopt more than 1 child. (client message)";
					break;
				case ADOPT_LEVEL_70:
					mes "Parents need to be at least level 70 in order to adopt someone. (client message)";
					break;
				case ADOPT_MARRIED:
					mes "You cannot adopt a married person. (client message)";
					break;
			}
		}
	}
	close;
}

 

it works really good.... THANKS A LOT....... END TOPIC

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...