adoption.txt 17 KB

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