//===== Athena Script ======================================= //= Simple Adoption Script //===== By ================================================ //= Fredzilla //= Help from Kamari,Acky //===== Version =========================================== //= 1.2b - More fixes + Added Acky's teacher to the end //= (stoped it from saying a particular word I thought //= was inapropriate for a kids game) //= 1.1 - Minor correction, replaced missing close; and mes :D //= 1.0 - First Release, most likely going to have some bugs //= Is using @adopt instead of proper NPC script command //===== Compatible With =================================== //= eAthena Final (SVN), any version that contained the GM command @adopt //= This is any version released after 03/29/05, dont know the number //===== Description ======================================= //= A simple adoption script that lets couples adopt a //= lvl 1/1 novice without the help of a GM there //===== Comments ========================================== //= List or Variables used //= $@AdoptionActive = Stops other people trying to use //= the adoption NPC's intill the currant one is over. //= @AdoptionReady = Marks person that talks to first NPC, //= this person will end up being ParentOne. //= $@ParentOne$ = Explains itself. //= $@ParentTwo$ = "" "" //= $@Baby$ = "" "" //= $@GenderBaby$ = Set so it can state boy or girl. //= $@FinalQuestion = Lets the parents take one last chance //= to cancel the adoption before it is perminant. //= $@CheckAll = Follow on from the last one, when this = 3, //= the adoption will take place and will be perminant. //= @regged = Stops the same person being counted twice //= before the adoption is completed. //= event_adopt = Put on the parents so they cannot adopt //= again. //= event_adopted = Put on baby so it cant be adopted again. //= //= Removed useless Teacher. Because Baby Class can get any //= job with common Job quests NPCs now //= Made it to use new adopt command [Lupus] //========================================================= prt_church.gat,115,122,0 warp prtch03 1,2,prt_church.gat,164,171 prt_church.gat,162,171,0 warp prtch01-3 1,2,prt_church.gat,113,122 prt_church.gat,166,176,3 script Adoption Man 61,{ if($@AdoptionActive == 1) goto A_Cannot; mes "[Adoption Man]"; mes "Would you like to adopt someone?"; next; menu "Yes",A_Yes,"No",-; A_No: mes "[Adoption Man]"; mes "I am sorry to hear that, please come back when you believe you are ready"; close; A_Cannot: mes "[Adoption Man]"; mes "There is currentally an adoption inprogress, come back when it has finished"; close; A_Yes: mes "[Adoption Man]"; mes "Good to hear it!"; mes "But do you meet the requirments for adoption?"; next; mes "[Adoption Man]"; mes "We cant just give out babies at the drop of a hat"; mes "Before we can let you leave with a baby we have to know you are strong enough to take care of it"; next; mes "[Adoption Man]"; mes "We also need to know you have a partner you are married to"; mes "We wont give a baby to an un-married couple"; next; mes "[Adoption Man]"; mes "Do you think you meet these criteria?"; next; menu "Yes, I would love to adopt?",-,"No, I dont think I can",A_No; mes "[Adoption Man]"; mes "Well you seem set on this"; next; deltimer "timeadopt"; addtimer 300000,"timeadopt"; if ($@AdoptionActive == 1) goto A_Cannot; set $@AdoptionActive,1; set @AdoptionReady,1; mes "[Adoption Man]"; mes "I will refer you to my coleage over there"; close; } prt_church.gat,172,177,3 script Adoption Lady 103,{ if ($@FinalQuestion==1 && $@ParentOne$==strcharinfo(0)) goto A_ParentOneEnd; if ($@FinalQuestion==1 && $@ParentTwo$==strcharinfo(0)) goto A_ParentTwoEnd; if ($@FinalQuestion==1 && $@Baby$==strcharinfo(0)) goto A_BabyEnd; if (strcharinfo(0)==$@Baby$) goto A_FinalTest; if (strcharinfo(0)==$@ParentTwo$) goto A_SecondReg; if (@AdoptionReady==0 || $@AdoptionActive==0) goto A_SeeFriend; mes "[Adoption Lady]"; deltimer "timeadopt"; addtimer 300000,"timeadopt"; mes "So you think you meet our strict requirments?"; mes "Let's see here, are you over level 70?"; next; menu "Yes, I am over level 70",A_lvl,"No, sorry to bother you",-; mes "[Adoption Lady]"; mes "Oh, I am sorry to hear that, please return when you meet this requirment"; callfunc "AdoptReset","the parent didnt meet level requirments"; close; A_SeeFriend: mes "[Adoption Lady]"; mes "Seems you havent talked to my friend here"; mes "He will refer you to me, when he thinks you are ready"; close; A_lvl: if(BaseLevel >= 70) goto A_lvlpassed; mes "[Adoption Lady]"; mes "Not only should I fail you on being a low level, but you also lied to me"; next; mes "[Adoption Lady]"; mes "I cant give a baby to you"; callfunc "AdoptReset","the parent didnt meet level requirments"; close; A_lvlpassed: mes "[Adoption Lady]"; mes "WOW, you have passed the test of strength"; next; mes "[Adoption Lady]"; mes "But lets see if you are happily married"; mes "For this I will need to see your wedding ring"; next; mes "[Adoption Lady]"; mes "Do you have you wedding ring on you now?"; next; menu "Yes, here you go",A_Wedring,"No, Sorry I dont",A_Noring,"I am not married",-; mes "[Adoption Lady]"; mes "Well, as my fried said here, we will not give a baby to a family that is not married"; callfunc "AdoptReset","the parent isnt married"; close; A_Noring: mes "[Adoption Lady]"; mes "I cant believe you are in a loving marrige when you dont have your ring on you at all times!!!"; next; mes "[Adoption Lady]"; mes "I dont believe you deserve a baby"; callfunc "AdoptReset","the parent hasnt got a wedding as proof of marriage"; close; A_Wedring: if ( countitem(2634)>0 || countitem(2635)>0 ) goto A_Wedringpassed; goto A_noring; A_Wedringpassed: mes "[Adoption Lady]"; mes "Awwwww, such a lovely ring, you must love your partner"; next; if (event_adopt>0) goto A_AlreadyHaveBaby; mes "[Adoption Lady]"; mes "I need to see them, please tell me their name"; next; input $@ParentTwo$; set $@ParentOne$, strcharinfo(0); mes "[Adoption Lady]"; mes "Your partner now has 5 min to talk to me before the adoption is canceled"; next; deltimer "timeadopt"; addtimer 300000,"timeadopt"; areaannounce "prt_church.gat",0,0,350,350,"Can I please see "+$@ParentTwo$+" please",0; mes "[Adoption Lady]"; mes "Can you now please wait for me to call you again, thank you"; close; A_AlreadyHaveBaby: mes "Now lets look at the inscription on your ring, oh it seems you already have a baby"; next; mes "[Adoption Lady]"; mes "I am sorry, you can only ever adopt once"; mes "Please take care of you baby"; callfunc "AdoptReset","the parent has already adopted once before"; close; A_SecondReg: deltimer "timeadopt"; addtimer 300000,"timeadopt"; mes "[Adoption Lady]"; mes "You must be "+$@ParentTwo$+", I just talked to your partner "+$@ParentOne$+", they mentioned you want to adopt baby"; next; mes "[Adoption Lady]"; mes "Do you agree with "+$@ParentOne$+", do you want to adopt?"; next; menu "Yes, I agree with them",A_agree,"No, I dont want to adopt",-; mes "[Adoption Lady]"; mes "This is bad news, I am very sorry to hear this"; callfunc "AdoptReset","the 2nd parent does not want to adopt"; close; A_agree: mes "[Adoption Lady]"; mes "Now I will put you through the same test as your partner"; next; if(BaseLevel >= 70) goto A_lvltwo; mes "[Adoption Lady]"; mes "Sorry you are not over level 70"; callfunc "AdoptReset","the 2nd parent didnt meet the level requirments"; close; A_lvltwo: if ( countitem(2634)>0 || countitem(2635)>0 ) goto A_Wedringtwo; mes "[Adoption Lady]"; mes "Sorry you dont have a wedding ring on you as proof of marriage"; callfunc "AdoptReset","the 2nd parent hasnt got a wedding ring as proof of marriage"; close; A_Wedringtwo: if (event_adopt>0) goto A_AlreadyHaveBaby; mes "[Adoption Lady]"; mes "You have checked out, and have passed all the requirments"; mes "All you need is a novice to adopt"; next; mes "[Adoption Lady]"; mes "Do you have a novice to adopt?"; next; menu "Yes, right here",A_YesBaby,"No, I'm sorry",-; mes "[Adoption Lady]"; mes "I suggest you find one, remember to get your parent to talk to my friend first when you return"; callfunc "AdoptReset","there is no novice present to be adopted"; close; A_YesBaby: mes "[Adoption Lady]"; mes "Can I please know thier name?"; next; input $@Baby$; mes "[Adoption Lady]"; mes "The novice now has 5min to come and talk to me, or the adopt will be canceled"; next; deltimer "timeadopt"; addtimer 300000,"timeadopt"; mes "[Adoption Lady]"; mes "Thank you, can you please wait with your partner, and wait to be called back"; areaannounce "prt_church.gat",0,0,350,350,"Can I please see "+$@Baby$+" please",0; close; A_FinalTest: deltimer "timeadopt"; addtimer 300000,"timeadopt"; if(event_adopted>0) goto A_AlreadyAdopted; mes "[Adoption Lady]"; mes "You must be "+$@Baby$+", its very nice to meet you"; mes "Some very nice people, "+$@ParentOne$+" and "+$@ParentTwo$+", have asked to adopt you"; next; if(sex==0) goto A_Girl; set $@GenderBaby$,"boy"; goto A_BabyAsk; A_Girl: set $@GenderBaby$,"girl"; A_BabyAsk: mes "[Adoption Lady]"; mes "Now can you be a good "+$@GenderBaby$+" and go with these nice people?"; next; menu "Yes, me would luv too",A_BabyYes,"NOOOOO!!!",-; mes "[Adoption Lady]"; mes "Please calm down"; mes "I will try and find better parents for you next time"; callfunc "AdoptReset","the novice didnt want to be adopted"; close; A_BabyYes: mes "[Adoption Lady]"; mes "Awwww, so cute, good to hear it"; mes "Now lets see here"; next; mes "[Adoption Lady]"; mes "I need to do a check on your level to prove you are a novice, stand still"; next; if (BaseLevel == 1 && JobLevel == 1) goto A_Ready; mes "[Adoption Lady]"; mes "Sorry but you are higher than level one, and cause of this you are a true novice"; callfunc "AdoptReset","the person that would be adopted, is over level 1"; close; A_Ready: mes "[Adoption Lady]"; mes "You are just as sweet an inocent as the day our lord made you"; next; mes "[Adoption Lady]"; mes "I have no objections to you being adopted"; mes "Before you can be adopted I will need to see your parents, and you, one last time"; set $@FinalQuestion,1; areaannounce "prt_church.gat",0,0,350,350,"Can I please see all people involved with this adoption please",0; deltimer "timeadopt"; addtimer 300000,"timeadopt"; close; A_AlreadyAdopted: mes "[Adoption Lady]"; mes "Oh you are already adopted, so you cant be adopted again"; callfunc "AdoptReset","the person that would be adoped, has already been adopted before"; close; A_ParentOneEnd: if (@regged>1) goto AlreadyReged; if ($@ParentOne$==$@ParentTwo$) goto A_SameFail; mes "[Adoption Lady]"; mes "Nice to talk to you again "+$@ParentOne$; mes "This is you last chance to back out"; next; mes "[Adoption Lady]"; mes "You can only ever adopt once, so if you adopt "+$@Baby$+", you can never adopt any one else ever"; next; mes "[Adoption Lady]"; mes "Are you sure you want to proceed"; next; menu "Yes",A_FinalYesP,"No",-; mes "[Adoption Lady]"; mes "I cannot believe you would come this far to say no!"; mes "Are you sure you want to stop now?"; next; menu "Yes, I dont want to adopt",-,"No, I made a mistake",A_ParentOneEnd; A_Failend: mes "[Adoption Lady]"; mes "Well if you are sure"; callfunc "AdoptReset","a parent or the novice pulled out"; close; A_FinalYesP: mes "[Adoption Lady]"; mes "OK everything is ready to start this adoption"; mes "I will announce to everyone when it is complete"; set event_adopt,1; set @regged,1; set $@checkall,$@checkall+1; if ($@checkall==3) goto THEEND; close; A_ParentTwoEnd: if (@regged>1) goto AlreadyReged; mes "[Adoption Lady]"; mes "Nice to talk to you again "+$@ParentTwo$; mes "This is you last chance to back out"; next; mes "[Adoption Lady]"; mes "You can only ever adopt once, so if you adopt "+$@Baby$+", you can never adopt any one else ever"; next; mes "[Adoption Lady]"; mes "Are you sure you want to proceed"; next; menu "Yes",A_FinalYesP,"No",-; mes "[Adoption Lady]"; mes "I cannot believe you would come this far to say no!"; mes "Are you sure you want to stop now?"; next; menu "Yes, I dont want to adopt",A_Failend,"No, I made a mistake",A_ParentTwoEnd; A_AlreadyReged: mes "[Adoption Lady]"; mes "Please wait for the others to talk to me"; close; A_BabyEnd: if (@regged>1) goto AlreadyReged; mes "[Adoption Lady]"; mes "Nice to talk to you again "+$@Baby$; mes "This is you last chance to back out"; next; mes "[Adoption Lady]"; mes "You can only ever be adopted once, so if you are adopted by "+$@ParentOne$+" and "+$@ParentTwo$+", you can never be adopted again"; next; mes "[Adoption Lady]"; mes "Are you sure you want to proceed"; next; menu "Yes",A_FinalYesB,"No",-; mes "[Adoption Lady]"; mes "I cannot believe you would come this far to say no!"; mes "Are you sure you want to stop now?"; next; menu "Yes, I dont want to adopt",A_Failend,"No, I made a mistake",A_BabyEnd; A_FinalYesB: mes "[Adoption Lady]"; mes "OK everything is ready to start this adoption"; mes "I will announce to everyone when it is complete"; set event_adopted,1; set @regged,1; set $@checkall,$@checkall+1; if ($@checkall==3) goto THEEND; close; A_SameFail: mes "[Adoption Lady]"; mes "Sorry, it seems you have registerd as both parents, this isnt allowed"; callfunc "AdoptReset","both parents are the same person"; close; THEEND: logmes "Adoption: "+$@Baby$+" adopted by "+$@ParentOne$+" and "+$@ParentTwo$+"."; adopt $@ParentOne$,$@ParentTwo$,$@Baby$; announce $@ParentOne$+" and "+$@ParentTwo$+" has just adopted a new baby "+$@GenderBaby$+", called "+$@Baby$,5; deltimer "timeadopt"; set $@AdoptionActive, 0; set $@ParentOne$, null; set $@ParentTwo$, null; set $@Baby$, null; set $@GenderBaby$, null; set $@FinalQuestion, 0; set $@CheckAll, 0; close; end; } prt_church.gat,165,175,0 script timeadopt -1,{ callfunc "AdoptReset","too much time has passed between steps"; end; } function script AdoptReset { deltimer "timeadopt"; set $@AdoptionActive, 0; set $@ParentOne$, null; set $@ParentTwo$, null; set $@Baby$, null; set $@GenderBaby$, null; set $@FinalQuestion, 0; set $@CheckAll, 0; areaannounce "prt_church.gat",0,0,350,350,"The adoption has been canceled because "+getarg(0),0; return; }