adoption.txt 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504
  1. //===== eAthena Script =======================================
  2. //= Simple Adoption Script
  3. //===== By ===================================================
  4. //= Fredzilla with help from Kamari,Acky
  5. //===== Version ==============================================
  6. //= 1.7 Moved warps to the southern exit of the main chappel. [L0ne_W0lf]
  7. //= 1.6a Fixed wrong label name [KarLaeda]
  8. //= 1.6 Removed call to function Is_Taekwon_Class in favor of baseClass == Job_Taekwon [Silentdragon]
  9. //= 1.5 Added GM menu to reset current adoption [Lupus]
  10. //= 1.4 Got rid of useless "event_adoptXXX" variables [Lupus]
  11. //= 1.3c - Slightly rewrote the anti-taekwon protection to
  12. //= detect problems more easily [DracoRPG]
  13. //= 1.3a - Added anti Taekwon Classes protection (they can't
  14. //= be adopted) [Lupus]
  15. //= 1.3 - Now it can teach parents/baby their missing skills.
  16. //= Your old families should talk to these NPCs to get
  17. //= their family skills [Lupus]
  18. //= 1.2b - More fixes + Added Acky's teacher to the end
  19. //= (stoped it from saying a particular word I thought
  20. //= was inapropriate for a kids game)
  21. //= 1.1 - Minor correction, replaced missing close; and mes :D
  22. //= 1.0 - First Release, most likely going to have some bugs
  23. //= Is using @adopt instead of proper NPC script command
  24. //===== Compatible With ======================================
  25. //= eAthena Final (SVN), any version that contained the GM command @adopt
  26. //= This is any version released after 03/29/05, don't know the number
  27. //===== Description ==========================================
  28. //= A simple adoption script that lets couples adopt a
  29. //= lvl 1/1 novice without the help of a GM there
  30. //===== Comments =============================================
  31. //= List or Variables used
  32. //= $@AdoptionActive = Stops other people trying to use
  33. //= the adoption NPC's intill the currant one is over.
  34. //= @AdoptionReady = Marks person that talks to first NPC,
  35. //= this person will end up being ParentOne.
  36. //= $@ParentOne$ = Explains itself.
  37. //= $@ParentTwo$ = "" ""
  38. //= $@Baby$ = "" ""
  39. //= $@GenderBaby$ = Set so it can state boy or girl.
  40. //= $@FinalQuestion = Lets the parents take one last chance
  41. //= to cancel the adoption before it is perminant.
  42. //= $@CheckAll = Follow on from the last one, when this = 3,
  43. //= the adoption will take place and will be perminant.
  44. //= @regged = Stops the same person being counted twice
  45. //= before the adoption is completed.
  46. //= Lupus removed:
  47. //= *event_adopt = Put on the parents so they cannot adopt again.
  48. //= *event_adopted = Put on baby so it can't be adopted again.
  49. //= Use "getchildid()>0" insread of event_adopt
  50. //= Use "Upper==2" insread of event_adopted
  51. //============================================================
  52. prt_church,83,122,0 warp prtch03 1,2,prt_church,164,171
  53. prt_church,162,171,0 warp prtch01-3 1,2,prt_church,86,122
  54. prt_church,166,176,3 script Adoption Man 61,{
  55. //If u're a GM you can always reset current Adoption process
  56. if(getgmlevel()>=90) {
  57. mes "[GM Menu]";
  58. mes "Would you like to reset curent adoption?";
  59. next;
  60. menu "Yes",-,"No",L_SKIP;
  61. callfunc "AdoptReset","GM reset";
  62. close;
  63. }
  64. L_SKIP:
  65. if($@AdoptionActive == 1) goto A_Cannot;
  66. mes "[Oliver]";
  67. if (Upper==2) goto A_YouBaby;
  68. if (getchildid()>0 && getskilllv(410)<=0) goto A_GetSkill;
  69. if (getchildid()>0) goto A_Already;
  70. mes "Would you like to adopt someone?";
  71. next;
  72. menu "Yes",A_Yes,"No",-;
  73. A_No:
  74. mes "[Oliver]";
  75. mes "I am sorry to hear that, please come back when you believe you are ready.";
  76. close;
  77. A_Cannot:
  78. mes "[Oliver]";
  79. mes "There is currentlly an adoption in progress, come back when it is finished.";
  80. close;
  81. A_Yes:
  82. mes "[Oliver]";
  83. mes "Good to hear it!";
  84. mes "But do you meet the requirements for adoption?";
  85. next;
  86. mes "[Oliver]";
  87. mes "We can't just give out babies at the drop of a hat.";
  88. mes "Before we can let you leave with a baby we have to know you are strong enough to take care of it.";
  89. next;
  90. mes "[Oliver]";
  91. mes "We also need to know you have a partner you are married to.";
  92. mes "We won't give a baby to an un-married couple.";
  93. next;
  94. mes "[Oliver]";
  95. mes "Do you think you meet these criteria?";
  96. next;
  97. menu "Yes, I would love to adopt?",-,"No, I don't think I can",A_No;
  98. mes "[Oliver]";
  99. mes "Well you seem set on this.";
  100. next;
  101. deltimer "timeadopt::OnAdopt";
  102. addtimer 300000,"timeadopt::OnAdopt";
  103. if ($@AdoptionActive == 1) goto A_Cannot;
  104. set $@AdoptionActive,1;
  105. set @AdoptionReady,1;
  106. mes "[Oliver]";
  107. mes "I will refer you to my coleage over there.";
  108. close;
  109. A_GetSkill:
  110. mes "You have just adopted a baby. I'll teach you a useful skill CALL BABY !";
  111. next;
  112. emotion 46;
  113. skill 410,1,0;
  114. mes "[Oliver]";
  115. mes "Done! Tell your partner to call me, too.";
  116. mes "Our children are our future!";
  117. close;
  118. A_Already:
  119. emotion 1;
  120. mes "How is your baby today?";
  121. close;
  122. A_YouBaby:
  123. emotion 2;
  124. mes "Say HI to your parents! Be cool!";
  125. if (getskilllv(408)<=0 || getskilllv(409)<=0) mes "By the way, our Teacher's wanting to see you.";
  126. close;
  127. }
  128. prt_church,172,177,3 script Adoption Lady 103,{
  129. if (Upper==2) goto A_YouBaby;
  130. if (getchildid()>0 && getskilllv(410)<=0) goto A_GetSkill;
  131. if (getchildid()>0) goto A_Already;
  132. if ($@FinalQuestion==1 && $@ParentOne$==strcharinfo(0)) goto A_ParentOneEnd;
  133. if ($@FinalQuestion==1 && $@ParentTwo$==strcharinfo(0)) goto A_ParentTwoEnd;
  134. if ($@FinalQuestion==1 && $@Baby$==strcharinfo(0)) goto A_BabyEnd;
  135. if (strcharinfo(0)==$@Baby$) goto A_FinalTest;
  136. if (strcharinfo(0)==$@ParentTwo$) goto A_SecondReg;
  137. if (@AdoptionReady==0 || $@AdoptionActive==0) goto A_SeeFriend;
  138. mes "[Inanna]";
  139. deltimer "timeadopt::OnAdopt";
  140. addtimer 300000,"timeadopt::OnAdopt";
  141. mes "So you think you meet our strict requirements?";
  142. mes "Let's see here, are you over level 70?";
  143. next;
  144. menu "Yes, I am over level 70",A_lvl,"No, sorry to bother you",-;
  145. mes "[Inanna]";
  146. mes "Oh, I am sorry to hear that, please return when you meet this requirement.";
  147. callfunc "AdoptReset","the parent didn't meet level requirements";
  148. close;
  149. A_SeeFriend:
  150. mes "[Inanna]";
  151. mes "Seems you haven't talked to my friend here.";
  152. mes "He will refer you to me, when he thinks you are ready.";
  153. close;
  154. A_lvl:
  155. if(BaseLevel >= 70) goto A_lvlpassed;
  156. mes "[Inanna]";
  157. mes "Not only should I fail you on being a low level, but you also lied to me.";
  158. next;
  159. mes "[Inanna]";
  160. mes "I can't give a baby to you";
  161. callfunc "AdoptReset","the parent didn't meet level requirements";
  162. close;
  163. A_lvlpassed:
  164. mes "[Inanna]";
  165. mes "WOW, you have passed the test of strength.";
  166. next;
  167. mes "[Inanna]";
  168. mes "But lets see if you are happily married.";
  169. mes "For this I will need to see your wedding ring.";
  170. next;
  171. mes "[Inanna]";
  172. mes "Do you have you wedding ring on you now?";
  173. next;
  174. menu "Yes, here you go",A_Wedring,"No, Sorry I don't",A_Noring,"I am not married",-;
  175. mes "[Inanna]";
  176. mes "Well, as my fried said here, we will not give a baby to a family that is not married";
  177. callfunc "AdoptReset","the parent isn't married";
  178. close;
  179. A_Noring:
  180. mes "[Inanna]";
  181. mes "I can't believe you are in a loving marriage when you don't have your ring on you at all times!!!";
  182. next;
  183. mes "[Inanna]";
  184. mes "I don't believe you deserve a baby.";
  185. callfunc "AdoptReset","the parent hasn't got a wedding ring as proof of marriage.";
  186. close;
  187. A_Wedring:
  188. if ( countitem(2634)>0 || countitem(2635)>0 ) goto A_Wedringpassed;
  189. goto A_Noring;
  190. A_Wedringpassed:
  191. mes "[Inanna]";
  192. mes "Awwwww, such a lovely ring, you must love your partner.";
  193. next;
  194. if (getchildid()>0) goto A_AlreadyHaveBaby;
  195. mes "[Inanna]";
  196. mes "I need to see them, please tell me their name.";
  197. next;
  198. input $@ParentTwo$;
  199. set $@ParentOne$, strcharinfo(0);
  200. mes "[Inanna]";
  201. mes "Your partner now has 5 min to talk to me before the adoption is canceled.";
  202. next;
  203. deltimer "timeadopt::OnAdopt";
  204. addtimer 300000,"timeadopt::OnAdopt";
  205. areaannounce "prt_church",0,0,350,350,"Can I please see "+$@ParentTwo$+" please",0;
  206. mes "[Inanna]";
  207. mes "Can you now please wait for me to call you again, thank you.";
  208. close;
  209. A_AlreadyHaveBaby:
  210. mes "Now lets look at the inscription on your ring, oh it seems you already have a baby.";
  211. next;
  212. mes "[Inanna]";
  213. mes "I am sorry, you can only ever adopt once.";
  214. mes "Please take care of you baby.";
  215. callfunc "AdoptReset","the parent has already adopted once before";
  216. close;
  217. A_SecondReg:
  218. deltimer "timeadopt::OnAdopt";
  219. addtimer 300000,"timeadopt::OnAdopt";
  220. mes "[Inanna]";
  221. mes "You must be "+$@ParentTwo$+", I just talked to your partner "+$@ParentOne$+", they mentioned you want to adopt baby.";
  222. next;
  223. mes "[Inanna]";
  224. mes "Do you agree with "+$@ParentOne$+", do you want to adopt?";
  225. next;
  226. menu "Yes, I agree with them",A_agree,"No, I don't want to adopt",-;
  227. mes "[Inanna]";
  228. mes "This is bad news, I am very sorry to hear this.";
  229. callfunc "AdoptReset","the 2nd parent does not want to adopt";
  230. close;
  231. A_agree:
  232. mes "[Inanna]";
  233. mes "Now I will put you through the same test as your partner.";
  234. next;
  235. if(BaseLevel >= 70) goto A_lvltwo;
  236. mes "[Inanna]";
  237. mes "Sorry you are not over level 70.";
  238. callfunc "AdoptReset","the 2nd parent didn't meet the level requirements";
  239. close;
  240. A_lvltwo:
  241. if ( countitem(2634)>0 || countitem(2635)>0 ) goto A_Wedringtwo;
  242. mes "[Inanna]";
  243. mes "Sorry you don't have a wedding ring on you as proof of marriage.";
  244. callfunc "AdoptReset","the 2nd parent hasnt got a wedding ring as proof of marriage";
  245. close;
  246. A_Wedringtwo:
  247. if (getchildid()>0) goto A_AlreadyHaveBaby;
  248. mes "[Inanna]";
  249. mes "You have checked out, and have passed all the requirements.";
  250. mes "All you need is a novice to adopt.";
  251. next;
  252. mes "[Inanna]";
  253. mes "Do you have a novice to adopt?";
  254. next;
  255. menu "Yes, right here",A_YesBaby,"No, I'm sorry",-;
  256. mes "[Inanna]";
  257. mes "I suggest you find one, remember to get your parent to talk to my friend first when you return.";
  258. callfunc "AdoptReset","there is no novice present to be adopted";
  259. close;
  260. A_YesBaby:
  261. mes "[Inanna]";
  262. mes "Can I please know thier name?";
  263. next;
  264. input $@Baby$;
  265. mes "[Inanna]";
  266. mes "The novice now has 5min to come and talk to me, or the adopt will be canceled.";
  267. next;
  268. deltimer "timeadopt::OnAdopt";
  269. addtimer 300000,"timeadopt::OnAdopt";
  270. mes "[Inanna]";
  271. mes "Thank you, can you please wait with your partner, and wait to be called back.";
  272. areaannounce "prt_church",0,0,350,350,"Can I please see "+$@Baby$+", please",0;
  273. close;
  274. A_FinalTest:
  275. deltimer "timeadopt::OnAdopt";
  276. addtimer 300000,"timeadopt::OnAdopt";
  277. if(Upper==2) goto A_AlreadyAdopted;
  278. if(baseClass == Job_Taekwon) goto A_CantBeAdopted;
  279. mes "[Inanna]";
  280. mes "You must be "+$@Baby$+", its very nice to meet you.";
  281. mes "Some very nice people, "+$@ParentOne$+" and "+$@ParentTwo$+", have asked to adopt you.";
  282. next;
  283. if(sex!=0) set $@GenderBaby$,"boy";
  284. if(sex==0) set $@GenderBaby$,"girl";
  285. mes "[Inanna]";
  286. mes "Now can you be a good "+$@GenderBaby$+" and go with these nice people?";
  287. next;
  288. menu "Yes, me would luv too",A_BabyYes,"NOOOOO!!!",-;
  289. mes "[Inanna]";
  290. mes "Please calm down.";
  291. mes "I will try and find better parents for you next time.";
  292. callfunc "AdoptReset","the novice didn't want to be adopted";
  293. close;
  294. A_BabyYes:
  295. mes "[Inanna]";
  296. mes "Awwww, so cute, good to hear it.";
  297. mes "Now lets see here.";
  298. next;
  299. mes "[Inanna]";
  300. mes "I need to do a check on your level to prove you are a novice, stand still.";
  301. next;
  302. if (BaseLevel == 1 && JobLevel == 1) goto A_Ready;
  303. mes "[Inanna]";
  304. mes "Sorry but you are higher than level one, and cause of this you are a true novice.";
  305. callfunc "AdoptReset","the person that would be adopted, is over level 1";
  306. close;
  307. A_Ready:
  308. mes "[Inanna]";
  309. mes "You are just as sweet an inocent as the day our lord made you.";
  310. next;
  311. mes "[Inanna]";
  312. mes "I have no objections to you being adopted.";
  313. mes "Before you can be adopted I will need to see your parents, and you, one last time.";
  314. set $@FinalQuestion,1;
  315. areaannounce "prt_church",0,0,350,350,"Can I please see all people involved with this adoption please",0;
  316. deltimer "timeadopt::OnAdopt";
  317. addtimer 300000,"timeadopt::OnAdopt";
  318. close;
  319. A_AlreadyAdopted:
  320. mes "[Inanna]";
  321. mes "Oh you are already adopted, so you can't be adopted again.";
  322. callfunc "AdoptReset","the person that would be adopted has already been adopted before";
  323. close;
  324. A_CantBeAdopted:
  325. mes "[Inanna]";
  326. mes "Sorry, but your job does not allow adoption.";
  327. callfunc "AdoptReset","the person that would be adopted has a job that can't be adopted";
  328. close;
  329. A_ParentOneEnd:
  330. if (@regged>1) goto A_AlreadyReged;
  331. if ($@ParentOne$==$@ParentTwo$) goto A_SameFail;
  332. mes "[Inanna]";
  333. mes "Nice to talk to you again "+$@ParentOne$;
  334. mes "This is you last chance to back out";
  335. next;
  336. mes "[Inanna]";
  337. mes "You can only ever adopt once, so if you adopt "+$@Baby$+", you can never adopt any one else ever";
  338. next;
  339. mes "[Inanna]";
  340. mes "Are you sure you want to proceed";
  341. next;
  342. menu "Yes",A_FinalYesP,"No",-;
  343. mes "[Inanna]";
  344. mes "I cannot believe you would come this far to say no!";
  345. mes "Are you sure you want to stop now?";
  346. next;
  347. menu "Yes, I don't want to adopt",-,"No, I made a mistake",A_ParentOneEnd;
  348. A_Failend:
  349. mes "[Inanna]";
  350. mes "Well if you are sure";
  351. callfunc "AdoptReset","a parent or the novice pulled out";
  352. close;
  353. A_FinalYesP:
  354. mes "[Inanna]";
  355. mes "OK everything is ready to start this adoption";
  356. mes "I will announce to everyone when it is complete";
  357. set @regged,1;
  358. set $@checkall,$@checkall+1;
  359. if ($@checkall==3) goto THEEND;
  360. close;
  361. A_ParentTwoEnd:
  362. if (@regged>1) goto A_AlreadyReged;
  363. mes "[Inanna]";
  364. mes "Nice to talk to you again "+$@ParentTwo$;
  365. mes "This is you last chance to back out";
  366. next;
  367. mes "[Inanna]";
  368. mes "You can only ever adopt once, so if you adopt "+$@Baby$+", you can never adopt any one else ever";
  369. next;
  370. mes "[Inanna]";
  371. mes "Are you sure you want to proceed";
  372. next;
  373. menu "Yes",A_FinalYesP,"No",-;
  374. mes "[Inanna]";
  375. mes "I cannot believe you would come this far to say no!";
  376. mes "Are you sure you want to stop now?";
  377. next;
  378. menu "Yes, I don't want to adopt",A_Failend,"No, I made a mistake",A_ParentTwoEnd;
  379. A_AlreadyReged:
  380. mes "[Inanna]";
  381. mes "Please wait for the others to talk to me";
  382. close;
  383. A_BabyEnd:
  384. if (@regged>1) goto A_AlreadyReged;
  385. mes "[Inanna]";
  386. mes "Nice to talk to you again "+$@Baby$;
  387. mes "This is you last chance to back out";
  388. next;
  389. mes "[Inanna]";
  390. mes "You can only ever be adopted once, so if you are adopted by "+$@ParentOne$+" and "+$@ParentTwo$+", you can never be adopted again";
  391. next;
  392. mes "[Inanna]";
  393. mes "Are you sure you want to proceed";
  394. next;
  395. menu "Yes",A_FinalYesB,"No",-;
  396. mes "[Inanna]";
  397. mes "I cannot believe you would come this far to say no!";
  398. mes "Are you sure you want to stop now?";
  399. next;
  400. menu "Yes, I don't want to adopt",A_Failend,"No, I made a mistake",A_BabyEnd;
  401. A_FinalYesB:
  402. mes "[Inanna]";
  403. mes "OK everything is ready to start this adoption";
  404. mes "I will announce to everyone when it is complete";
  405. set @regged,1;
  406. set $@checkall,$@checkall+1;
  407. if ($@checkall==3) goto THEEND;
  408. close;
  409. A_SameFail:
  410. mes "[Inanna]";
  411. mes "Sorry, it seems you have registered as both parents, this isn't allowed";
  412. callfunc "AdoptReset","both parents are the same person";
  413. close;
  414. A_GetSkill:
  415. emotion 20;
  416. mes "[Inanna]";
  417. mes "You can't see your baby often?.. I'll try to teach you one skil... Where's my skills manual?";
  418. next;
  419. mes "[Oliver]";
  420. mes "Hey, Inanna! This is my job. Pass them to me!";
  421. close;
  422. A_Already:
  423. mes "[Inanna]";
  424. emotion 21;
  425. mes "How is your baby now?";
  426. close;
  427. A_YouBaby:
  428. mes "[Inanna]";
  429. emotion 30;
  430. mes "Tell your father he's a good father!";
  431. if (getskilllv(408)<=0 || getskilllv(409)<=0) mes "You should talk to our Teacher.";
  432. close;
  433. THEEND:
  434. logmes "Adoption: "+$@Baby$+" adopted by "+$@ParentOne$+" and "+$@ParentTwo$+".";
  435. adopt $@ParentOne$,$@ParentTwo$,$@Baby$;
  436. announce $@ParentOne$+" and "+$@ParentTwo$+" has just adopted a new baby "+$@GenderBaby$+", called "+$@Baby$,5;
  437. deltimer "timeadopt::OnAdopt";
  438. set $@AdoptionActive, 0;
  439. set $@ParentOne$, null;
  440. set $@ParentTwo$, null;
  441. set $@Baby$, null;
  442. set $@GenderBaby$, null;
  443. set $@FinalQuestion, 0;
  444. set $@CheckAll, 0;
  445. close;
  446. end;
  447. }
  448. prt_church,165,175,0 script timeadopt -1,{
  449. OnAdopt:
  450. callfunc "AdoptReset","too much time has passed between steps";
  451. end;
  452. }
  453. function script AdoptReset {
  454. deltimer "timeadopt::OnAdopt";
  455. set $@AdoptionActive, 0;
  456. set $@ParentOne$, null;
  457. set $@ParentTwo$, null;
  458. set $@Baby$, null;
  459. set $@GenderBaby$, null;
  460. set $@FinalQuestion, 0;
  461. set $@CheckAll, 0;
  462. areaannounce "prt_church",0,0,350,350,"The adoption has been canceled because "+getarg(0),0;
  463. return;
  464. }
  465. prt_church,165,166,6 script Teacher#adopt 97,{
  466. mes "[Mario]";
  467. if (Upper==2 && (getskilllv(408)<=0 || getskilllv(409)<=0)) goto L_Teach;
  468. if (Upper==2) mes "Hello, baby! How are you?";
  469. if (Upper!=2) mes "How are you?";
  470. next;
  471. menu "Great!",-,"Fine.",-,"So-so...",-,"Shoot me, please.",-;
  472. mes "[Mario]";
  473. mes "So nice!";
  474. emotion rand(19,21);
  475. close;
  476. L_Teach:
  477. skill 408,1,0;
  478. skill 409,1,0;
  479. mes "Ta-da! Now you know 2 quite useful skills!";
  480. mes "1. Call your Parents (when you're in a danger).";
  481. mes "2. Protect your parents' EXP with yor love!";
  482. emotion 41;
  483. next;
  484. mes "[Mario]";
  485. mes "On seeing a baby tell them to visit me.";
  486. next;
  487. L_Cancel:
  488. mes "[Mario]";
  489. mes "Bye bye!";
  490. close;
  491. }