login  Naam:   Wachtwoord: 
Registreer je!
 Forum

(C++) Variabele [pt. 2] (Opgelost)

Offline Waflix - 04/07/2011 18:11 (laatste wijziging 04/07/2011 18:12)
Avatar van WaflixLid Ik heb alweer een vraag over C++. Deze keer heb ik een programma geschreven waarin er wordt gekeken of 2 variabelen (int) kloppen, en vervolgens worden er waardes aan andere variabelen (int) verbonden.

  1. // Negeer het feit dat de waardes van variabelen vw1 en vw2 niet worden
  2. // toegewezen. Dit gebeurd ergens anders in het echte programma, maar gebeurd
  3. // niet hier.
  4.  
  5. #include <iostream>
  6.  
  7. using namespace std;
  8.  
  9. int vw1;
  10. int vw2;
  11. int res1;
  12. int res2;
  13.  
  14. int main()
  15. {
  16. if (vw1 == 0)
  17. {
  18. if (vw2 == 0)
  19. {
  20. res1 = 00;
  21. res2 = 00;
  22. }
  23.  
  24. else if (vw2 == 1)
  25. {
  26. res1 = 01;
  27. res2 = 01;
  28. }
  29.  
  30. else
  31. {
  32. return 1;
  33. }
  34. }
  35.  
  36. else if (vw1 == 1)
  37. {
  38. if (vw2 == 0)
  39. {
  40. res1 = 10;
  41. res2 = 10;
  42. }
  43.  
  44. else if (vw2 == 1)
  45. {
  46. res1 = 11;
  47. res2 = 11;
  48. }
  49.  
  50. else
  51. {
  52. return 1;
  53. }
  54. }
  55.  
  56. else
  57. {
  58. return 1;
  59. }
  60.  
  61. cout<<res1;
  62. cout<<"\n";
  63. cout<<res2;
  64. cin.ignore();
  65.  
  66. return 0;
  67. }


Mijn resultaat wordt dan:

[resultaat]
0
0
[/resultaat]

Vreemd genoeg is dit altijd 0, terwijl ik dat nergens toe heb gewezen!

6 antwoorden

Gesponsorde links
Offline MrWolf - 04/07/2011 18:32
Avatar van MrWolf Lid Kan je voor de andere couts dit neerzetten:
  1. cout<<vw1;
  2. cout<<"\n";
  3. cout<<vw2;
  4. cout<<"\n";
Offline Waflix - 04/07/2011 18:35
Avatar van Waflix Lid
MrWolf schreef:
Kan je voor de andere couts dit neerzetten:
[..code..]


Want? Waar slaat dat op?
Offline MrWolf - 04/07/2011 19:43
Avatar van MrWolf Lid
Waflix schreef:
[..quote..]

Want? Waar slaat dat op?


Gewoon testen, ik zie geen andere fout.
Offline Waflix - 05/07/2011 11:13
Avatar van Waflix Lid Mijn code werkt in dit voorbeeld (met en zonder de aanpassing), dus ik heb besloten even de volledige code van mijn programma te plaatsen.

[spoiler]
  1. // Red Dead Redemption - Animal Values
  2. // Version 0.5
  3. // Last update was at the 3rd of July
  4. //
  5. // Written by Felix Dekker
  6. // GNU General Public License, 2011 - Refer to the help dialogue in this program for the license
  7. //
  8. // Most of the information that can be found in this program is based on or copied from the Red Dead Wikia.
  9. // www.reddead.wikia.com
  10.  
  11. #include <iostream>
  12. #include <stdio.h>
  13. #include <windows.h>
  14.  
  15. using namespace std;
  16.  
  17. // Variables
  18. // User input
  19. unsigned int honr;
  20. unsigned int lctn;
  21. unsigned int anml;
  22. unsigned int lgnd;
  23. unsigned int help;
  24. unsigned int strt;
  25.  
  26. // Program output
  27. int lctn_part;
  28. int help_strt;
  29. int help_license;
  30.  
  31. // Animals
  32. int arm_car;
  33. int arm_met;
  34. int ber_clw;
  35. int ber_met;
  36. int bvr_fur;
  37. int bvr_met;
  38. int brn_hrn;
  39. int brn_met;
  40. int brn_skn;
  41. int bor_met;
  42. int bor_skn;
  43. int bor_tsk;
  44.  
  45.  
  46. int main()
  47. {
  48. start:
  49. system("CLS");
  50. cout<<"-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-\n";
  51. cout<<" License \n";
  52. cout<<"-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-\n";
  53. cout<<"Red Dead Redemption - Animal Values Copyright (C) 2011 Felix Dekker\n\n";
  54. cout<<"This program comes with ABSOLUTELY NO WARRANTY; for details type '1'.\n";
  55. cout<<"This is free software, and you are welcome to redistribute it\n";
  56. cout<<"under certain conditions; type '1' for details.\n";
  57. cin>> strt;
  58. cin.ignore();
  59.  
  60. if (strt == 1)
  61. {
  62. help_license = 2;
  63. goto help_license;
  64. }
  65.  
  66. else
  67. {
  68. goto honour;
  69. }
  70.  
  71. honour:
  72. // Choosing honour level dialogue
  73. system("CLS");
  74. cout<<"-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-\n";
  75. cout<<" Red Dead Redemption - Animal Values \n";
  76. cout<<"-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-\n";
  77. cout<<"1) Honest Joe 5) Rustler\n";
  78. cout<<"2) Peacemaker 6) Road Agent\n";
  79. cout<<"3) Hero 7) Desperado\n";
  80. cout<<"4) Drifter\n\n";
  81. cout<<"8) Help 9) Exit\n";
  82. cout<<"Enter the number of your honour level: ";
  83. cin>> honr;
  84. cin.ignore();
  85.  
  86. if (honr == 8)
  87. {
  88. help_strt = 1;
  89. goto help;
  90. }
  91.  
  92. if (honr < 10)
  93. {
  94. goto location;
  95. }
  96.  
  97. else if (honr > 9)
  98. {
  99. cout<<"'";
  100. cout<<honr;
  101. cout<<"' is an invalid command. Please try a valid one.";
  102. cin.ignore();
  103.  
  104. goto honour;
  105. }
  106.  
  107. else if (honr < 1)
  108. {
  109. cout<<"'";
  110. cout<<honr;
  111. cout<<"' is an invalid command. Please try a valid one.";
  112. cin.ignore();
  113.  
  114. goto honour;
  115. }
  116.  
  117. else
  118. {
  119. goto location;
  120. }
  121.  
  122. location:
  123. // Choosing location dialogue
  124. system("CLS");
  125. cout<<"-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-\n";
  126. cout<<" Red Dead Redemption - Animal Values \n";
  127. cout<<"-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-\n";
  128. cout<<"Honor level: ";
  129. if (honr == 1)
  130. {
  131. cout<<"Honest Joe\n";
  132. }
  133.  
  134. else if (honr == 2)
  135. {
  136. cout<<"Peacemaker\n";
  137. }
  138.  
  139. else if (honr == 3)
  140. {
  141. cout<<"Hero\n";
  142. }
  143.  
  144. else if (honr == 4)
  145. {
  146. cout<<"Drifter\n";
  147. }
  148.  
  149. else if (honr == 5)
  150. {
  151. cout<<"Rustler\n";
  152. }
  153.  
  154. else if (honr == 6)
  155. {
  156. cout<<"Road Agent\n";
  157. }
  158.  
  159. else if (honr == 7)
  160. {
  161. cout<<"Desperado\n";
  162. }
  163.  
  164. else
  165. {
  166. return 1;
  167. }
  168. cout<<"1) Armadillo 5) MacFarlane's Ranch\n";
  169. cout<<"2) Blackwater 6) Manzanita Post\n";
  170. cout<<"3) Chuparosa 7) Thieves' Landing\n";
  171. cout<<"4) Escalera\n\n";
  172. cout<<"8) Help 9) Return\n";
  173. cout<<"Enter the number of the General Store's location: ";
  174. cin>> lctn;
  175. cin.ignore();
  176.  
  177. if (lctn == 8)
  178. {
  179. help_strt = 2;
  180. goto help;
  181. }
  182.  
  183. else if (lctn == 9)
  184. {
  185. goto honour;
  186. }
  187.  
  188. else if (lctn < 10)
  189. {
  190. goto animal;
  191. }
  192.  
  193. else if (lctn > 9)
  194. {
  195. cout<<"'";
  196. cout<<lctn;
  197. cout<<"' is an incalid command. Please try a valid one.";
  198. cin.ignore();
  199.  
  200. goto location;
  201. }
  202.  
  203. else if (lctn < 1)
  204. {
  205. cout<<"'";
  206. cout<<lctn;
  207. cout<<"' is an incalid command. Please try a valid one.";
  208. cin.ignore();
  209.  
  210. goto location;
  211. }
  212.  
  213. else
  214. {
  215. cout<<"'";
  216. cout<<lctn;
  217. cout<<"' is an incalid command. Please try a valid one.";
  218. cin.ignore();
  219.  
  220. goto location;
  221. }
  222.  
  223. // Appointing variable values
  224. if (honr == 1)
  225. {
  226. if (lctn == 1)
  227. {
  228. arm_car = 11;
  229. arm_met = 7;
  230. ber_clw = 18;
  231. ber_met = 18;
  232. bvr_fur = 27;
  233. bvr_met = 11;
  234. brn_hrn = 18;
  235. brn_met = 8;
  236. brn_skn = 12;
  237. bor_met = 8;
  238. bor_skn = 5;
  239. bor_tsk = 12;
  240.  
  241. goto animal;
  242. }
  243.  
  244. else if (lctn == 2)
  245. {
  246. arm_car = 11;
  247. arm_met = 7;
  248. ber_clw = 18;
  249. ber_met = 18;
  250. bvr_fur = 27;
  251. bvr_met = 11;
  252. brn_hrn = 18;
  253. brn_met = 8;
  254. brn_skn = 12;
  255. bor_met = 8;
  256. bor_skn = 5;
  257. bor_tsk = 12;
  258.  
  259. goto animal;
  260. }
  261.  
  262. else if (lctn == 3)
  263. {
  264. arm_car = 11;
  265. arm_met = 7;
  266. ber_clw = 18;
  267. ber_met = 18;
  268. bvr_fur = 27;
  269. bvr_met = 11;
  270. brn_hrn = 18;
  271. brn_met = 8;
  272. brn_skn = 12;
  273. bor_met = 8;
  274. bor_skn = 5;
  275. bor_tsk = 12;
  276.  
  277. goto animal;
  278. }
  279.  
  280. else if (lctn == 4)
  281. {
  282. arm_car = 11;
  283. arm_met = 7;
  284. ber_clw = 18;
  285. ber_met = 18;
  286. bvr_fur = 27;
  287. bvr_met = 11;
  288. brn_hrn = 18;
  289. brn_met = 8;
  290. brn_skn = 12;
  291. bor_met = 8;
  292. bor_skn = 5;
  293. bor_tsk = 12;
  294.  
  295. goto animal;
  296. }
  297.  
  298. else if (lctn == 5)
  299. {
  300. arm_car = 11;
  301. arm_met = 7;
  302. ber_clw = 18;
  303. ber_met = 18;
  304. bvr_fur = 27;
  305. bvr_met = 11;
  306. brn_hrn = 18;
  307. brn_met = 8;
  308. brn_skn = 12;
  309. bor_met = 8;
  310. bor_skn = 5;
  311. bor_tsk = 12;
  312.  
  313. goto animal;
  314. }
  315.  
  316. else if (lctn == 6)
  317. {
  318. arm_car = 11;
  319. arm_met = 7;
  320. ber_clw = 18;
  321. ber_met = 18;
  322. bvr_fur = 27;
  323. bvr_met = 11;
  324. brn_hrn = 18;
  325. brn_met = 8;
  326. brn_skn = 12;
  327. bor_met = 8;
  328. bor_skn = 5;
  329. bor_tsk = 12;
  330.  
  331. goto animal;
  332. }
  333.  
  334. else if (lctn == 7)
  335. {
  336. arm_car = 8;
  337. arm_met = 5;
  338. ber_clw = 12;
  339. ber_met = 12;
  340. bvr_fur = 18;
  341. bvr_met = 7;
  342. brn_hrn = 12;
  343. brn_met = 5;
  344. brn_skn = 8;
  345. bor_met = 5;
  346. bor_skn = 3;
  347. bor_tsk = 8;
  348.  
  349. goto animal;
  350. }
  351.  
  352. else
  353. {
  354. return 1;
  355. }
  356. }
  357.  
  358. else if (honr == 2)
  359. {
  360. if (lctn == 1)
  361. {
  362. arm_car = 11;
  363. arm_met = 7;
  364. ber_clw = 18;
  365. ber_met = 18;
  366. bvr_fur = 27;
  367. bvr_met = 11;
  368. brn_hrn = 18;
  369. brn_met = 8;
  370. brn_skn = 12;
  371. bor_met = 8;
  372. bor_skn = 5;
  373. bor_tsk = 12;
  374.  
  375. goto animal;
  376. }
  377.  
  378. else if (lctn == 2)
  379. {
  380. arm_car = 11;
  381. arm_met = 7;
  382. ber_clw = 18;
  383. ber_met = 18;
  384. bvr_fur = 27;
  385. bvr_met = 11;
  386. brn_hrn = 18;
  387. brn_met = 8;
  388. brn_skn = 12;
  389. bor_met = 8;
  390. bor_skn = 5;
  391. bor_tsk = 12;
  392.  
  393. goto animal;
  394. }
  395.  
  396. else if (lctn == 3)
  397. {
  398. arm_car = 11;
  399. arm_met = 7;
  400. ber_clw = 18;
  401. ber_met = 18;
  402. bvr_fur = 27;
  403. bvr_met = 11;
  404. brn_hrn = 18;
  405. brn_met = 8;
  406. brn_skn = 12;
  407. bor_met = 8;
  408. bor_skn = 5;
  409. bor_tsk = 12;
  410.  
  411. goto animal;
  412. }
  413.  
  414. else if (lctn == 4)
  415. {
  416. arm_car = 11;
  417. arm_met = 7;
  418. ber_clw = 18;
  419. ber_met = 18;
  420. bvr_fur = 27;
  421. bvr_met = 11;
  422. brn_hrn = 18;
  423. brn_met = 8;
  424. brn_skn = 12;
  425. bor_met = 8;
  426. bor_skn = 5;
  427. bor_tsk = 12;
  428.  
  429. goto animal;
  430. }
  431.  
  432. else if (lctn == 5)
  433. {
  434. arm_car = 11;
  435. arm_met = 7;
  436. ber_clw = 18;
  437. ber_met = 18;
  438. bvr_fur = 27;
  439. bvr_met = 11;
  440. brn_hrn = 18;
  441. brn_met = 8;
  442. brn_skn = 12;
  443. bor_met = 8;
  444. bor_skn = 5;
  445. bor_tsk = 12;
  446.  
  447. goto animal;
  448. }
  449.  
  450. else if (lctn == 6)
  451. {
  452. arm_car = 11;
  453. arm_met = 7;
  454. ber_clw = 18;
  455. ber_met = 18;
  456. bvr_fur = 27;
  457. bvr_met = 11;
  458. brn_hrn = 18;
  459. brn_met = 8;
  460. brn_skn = 12;
  461. bor_met = 8;
  462. bor_skn = 5;
  463. bor_tsk = 12;
  464.  
  465. goto animal;
  466. }
  467.  
  468. else if (lctn == 7)
  469. {
  470. arm_car = 8;
  471. arm_met = 5;
  472. ber_clw = 12;
  473. ber_met = 12;
  474. bvr_fur = 18;
  475. bvr_met = 7;
  476. brn_hrn = 12;
  477. brn_met = 5;
  478. brn_skn = 8;
  479. bor_met = 5;
  480. bor_skn = 3;
  481. bor_tsk = 8;
  482.  
  483. goto animal;
  484. }
  485.  
  486. else
  487. {
  488. return 1;
  489. }
  490. }
  491.  
  492. else if (honr == 3)
  493. {
  494. if (lctn == 1)
  495. {
  496. arm_car = 8;
  497. arm_met = 5;
  498. ber_clw = 12;
  499. ber_met = 12;
  500. bvr_fur = 18;
  501. bvr_met = 7;
  502. brn_hrn = 12;
  503. brn_met = 5;
  504. brn_skn = 8;
  505. bor_met = 5;
  506. bor_skn = 3;
  507. bor_tsk = 8;
  508.  
  509. goto animal;
  510. }
  511.  
  512. else if (lctn == 2)
  513. {
  514. arm_car = 8;
  515. arm_met = 5;
  516. ber_clw = 12;
  517. ber_met = 12;
  518. bvr_fur = 18;
  519. bvr_met = 7;
  520. brn_hrn = 12;
  521. brn_met = 5;
  522. brn_skn = 8;
  523. bor_met = 5;
  524. bor_skn = 3;
  525. bor_tsk = 8;
  526.  
  527. goto animal;
  528. }
  529.  
  530. else if (lctn == 3)
  531. {
  532. arm_car = 8;
  533. arm_met = 5;
  534. ber_clw = 12;
  535. ber_met = 12;
  536. bvr_fur = 18;
  537. bvr_met = 7;
  538. brn_hrn = 12;
  539. brn_met = 5;
  540. brn_skn = 8;
  541. bor_met = 5;
  542. bor_skn = 3;
  543. bor_tsk = 8;
  544.  
  545. goto animal;
  546. }
  547.  
  548. else if (lctn == 4)
  549. {
  550. arm_car = 8;
  551. arm_met = 5;
  552. ber_clw = 12;
  553. ber_met = 12;
  554. bvr_fur = 18;
  555. bvr_met = 7;
  556. brn_hrn = 12;
  557. brn_met = 5;
  558. brn_skn = 8;
  559. bor_met = 5;
  560. bor_skn = 3;
  561. bor_tsk = 8;
  562.  
  563. goto animal;
  564. }
  565.  
  566. else if (lctn == 5)
  567. {
  568. arm_car = 8;
  569. arm_met = 5;
  570. ber_clw = 12;
  571. ber_met = 12;
  572. bvr_fur = 18;
  573. bvr_met = 7;
  574. brn_hrn = 12;
  575. brn_met = 5;
  576. brn_skn = 8;
  577. bor_met = 5;
  578. bor_skn = 3;
  579. bor_tsk = 8;
  580.  
  581. goto animal;
  582. }
  583.  
  584. else if (lctn == 6)
  585. {
  586. arm_car = 8;
  587. arm_met = 5;
  588. ber_clw = 12;
  589. ber_met = 12;
  590. bvr_fur = 18;
  591. bvr_met = 7;
  592. brn_hrn = 12;
  593. brn_met = 5;
  594. brn_skn = 8;
  595. bor_met = 5;
  596. bor_skn = 3;
  597. bor_tsk = 8;
  598.  
  599. goto animal;
  600. }
  601.  
  602. else if (lctn == 7)
  603. {
  604. arm_car = 8;
  605. arm_met = 5;
  606. ber_clw = 12;
  607. ber_met = 12;
  608. bvr_fur = 18;
  609. bvr_met = 7;
  610. brn_hrn = 12;
  611. brn_met = 5;
  612. brn_skn = 8;
  613. bor_met = 5;
  614. bor_skn = 3;
  615. bor_tsk = 8;
  616.  
  617. goto animal;
  618. }
  619.  
  620. else
  621. {
  622. return 1;
  623. }
  624. }
  625.  
  626. else if (honr == 4)
  627. {
  628. if (lctn == 1)
  629. {
  630. arm_car = 8;
  631. arm_met = 5;
  632. ber_clw = 12;
  633. ber_met = 12;
  634. bvr_fur = 18;
  635. bvr_met = 7;
  636. brn_hrn = 12;
  637. brn_met = 5;
  638. brn_skn = 8;
  639. bor_met = 5;
  640. bor_skn = 3;
  641. bor_tsk = 8;
  642.  
  643. goto animal;
  644. }
  645.  
  646. else if (lctn == 2)
  647. {
  648. arm_car = 8;
  649. arm_met = 5;
  650. ber_clw = 12;
  651. ber_met = 12;
  652. bvr_fur = 18;
  653. bvr_met = 7;
  654. brn_hrn = 12;
  655. brn_met = 5;
  656. brn_skn = 8;
  657. bor_met = 5;
  658. bor_skn = 3;
  659. bor_tsk = 8;
  660.  
  661. goto animal;
  662. }
  663.  
  664. else if (lctn == 3)
  665. {
  666. arm_car = 8;
  667. arm_met = 5;
  668. ber_clw = 12;
  669. ber_met = 12;
  670. bvr_fur = 18;
  671. bvr_met = 7;
  672. brn_hrn = 12;
  673. brn_met = 5;
  674. brn_skn = 8;
  675. bor_met = 5;
  676. bor_skn = 3;
  677. bor_tsk = 8;
  678.  
  679. goto animal;
  680. }
  681.  
  682. else if (lctn == 4)
  683. {
  684. arm_car = 8;
  685. arm_met = 5;
  686. ber_clw = 12;
  687. ber_met = 12;
  688. bvr_fur = 18;
  689. bvr_met = 7;
  690. brn_hrn = 12;
  691. brn_met = 5;
  692. brn_skn = 8;
  693. bor_met = 5;
  694. bor_skn = 3;
  695. bor_tsk = 8;
  696.  
  697. goto animal;
  698. }
  699.  
  700. else if (lctn == 5)
  701. {
  702. arm_car = 8;
  703. arm_met = 5;
  704. ber_clw = 12;
  705. ber_met = 12;
  706. bvr_fur = 18;
  707. bvr_met = 7;
  708. brn_hrn = 12;
  709. brn_met = 5;
  710. brn_skn = 8;
  711. bor_met = 5;
  712. bor_skn = 3;
  713. bor_tsk = 8;
  714.  
  715. goto animal;
  716. }
  717.  
  718. else if (lctn == 6)
  719. {
  720. arm_car = 8;
  721. arm_met = 5;
  722. ber_clw = 12;
  723. ber_met = 12;
  724. bvr_fur = 18;
  725. bvr_met = 7;
  726. brn_hrn = 12;
  727. brn_met = 5;
  728. brn_skn = 8;
  729. bor_met = 5;
  730. bor_skn = 3;
  731. bor_tsk = 8;
  732.  
  733. goto animal;
  734. }
  735.  
  736. else if (lctn == 7)
  737. {
  738. arm_car = 8;
  739. arm_met = 5;
  740. ber_clw = 12;
  741. ber_met = 12;
  742. bvr_fur = 18;
  743. bvr_met = 7;
  744. brn_hrn = 12;
  745. brn_met = 5;
  746. brn_skn = 8;
  747. bor_met = 5;
  748. bor_skn = 3;
  749. bor_tsk = 8;
  750.  
  751. goto animal;
  752. }
  753.  
  754. else
  755. {
  756. return 1;
  757. }
  758. }
  759.  
  760. else if (honr == 5)
  761. {
  762. if (lctn == 1)
  763. {
  764. arm_car = 8;
  765. arm_met = 5;
  766. ber_clw = 12;
  767. ber_met = 12;
  768. bvr_fur = 18;
  769. bvr_met = 7;
  770. brn_hrn = 12;
  771. brn_met = 5;
  772. brn_skn = 8;
  773. bor_met = 5;
  774. bor_skn = 3;
  775. bor_tsk = 8;
  776.  
  777. goto animal;
  778. }
  779.  
  780. else if (lctn == 2)
  781. {
  782. arm_car = 8;
  783. arm_met = 5;
  784. ber_clw = 12;
  785. ber_met = 12;
  786. bvr_fur = 18;
  787. bvr_met = 7;
  788. brn_hrn = 12;
  789. brn_met = 5;
  790. brn_skn = 8;
  791. bor_met = 5;
  792. bor_skn = 3;
  793. bor_tsk = 8;
  794.  
  795. goto animal;
  796. }
  797.  
  798. else if (lctn == 3)
  799. {
  800. arm_car = 8;
  801. arm_met = 5;
  802. ber_clw = 12;
  803. ber_met = 12;
  804. bvr_fur = 18;
  805. bvr_met = 7;
  806. brn_hrn = 12;
  807. brn_met = 5;
  808. brn_skn = 8;
  809. bor_met = 5;
  810. bor_skn = 3;
  811. bor_tsk = 8;
  812.  
  813. goto animal;
  814. }
  815.  
  816. else if (lctn == 4)
  817. {
  818. arm_car = 8;
  819. arm_met = 5;
  820. ber_clw = 12;
  821. ber_met = 12;
  822. bvr_fur = 18;
  823. bvr_met = 7;
  824. brn_hrn = 12;
  825. brn_met = 5;
  826. brn_skn = 8;
  827. bor_met = 5;
  828. bor_skn = 3;
  829. bor_tsk = 8;
  830.  
  831. goto animal;
  832. }
  833.  
  834. else if (lctn == 5)
  835. {
  836. arm_car = 8;
  837. arm_met = 5;
  838. ber_clw = 12;
  839. ber_met = 12;
  840. bvr_fur = 18;
  841. bvr_met = 7;
  842. brn_hrn = 12;
  843. brn_met = 5;
  844. brn_skn = 8;
  845. bor_met = 5;
  846. bor_skn = 3;
  847. bor_tsk = 8;
  848.  
  849. goto animal;
  850. }
  851.  
  852. else if (lctn == 6)
  853. {
  854. arm_car = 8;
  855. arm_met = 5;
  856. ber_clw = 12;
  857. ber_met = 12;
  858. bvr_fur = 18;
  859. bvr_met = 7;
  860. brn_hrn = 12;
  861. brn_met = 5;
  862. brn_skn = 8;
  863. bor_met = 5;
  864. bor_skn = 3;
  865. bor_tsk = 8;
  866.  
  867. goto animal;
  868. }
  869.  
  870. else if (lctn == 7)
  871. {
  872. arm_car = 8;
  873. arm_met = 5;
  874. ber_clw = 12;
  875. ber_met = 12;
  876. bvr_fur = 18;
  877. bvr_met = 7;
  878. brn_hrn = 12;
  879. brn_met = 5;
  880. brn_skn = 8;
  881. bor_met = 5;
  882. bor_skn = 3;
  883. bor_tsk = 8;
  884.  
  885. goto animal;
  886. }
  887.  
  888. else
  889. {
  890. return 1;
  891. }
  892. }
  893.  
  894. else if (honr == 6)
  895. {
  896. if (lctn == 1)
  897. {
  898. arm_car = 8;
  899. arm_met = 5;
  900. ber_clw = 12;
  901. ber_met = 12;
  902. bvr_fur = 18;
  903. bvr_met = 7;
  904. brn_hrn = 12;
  905. brn_met = 5;
  906. brn_skn = 8;
  907. bor_met = 5;
  908. bor_skn = 3;
  909. bor_tsk = 8;
  910.  
  911. goto animal;
  912. }
  913.  
  914. else if (lctn == 2)
  915. {
  916. arm_car = 8;
  917. arm_met = 5;
  918. ber_clw = 12;
  919. ber_met = 12;
  920. bvr_fur = 18;
  921. bvr_met = 7;
  922. brn_hrn = 12;
  923. brn_met = 5;
  924. brn_skn = 8;
  925. bor_met = 5;
  926. bor_skn = 3;
  927. bor_tsk = 8;
  928.  
  929. goto animal;
  930. }
  931.  
  932. else if (lctn == 3)
  933. {
  934. arm_car = 8;
  935. arm_met = 5;
  936. ber_clw = 12;
  937. ber_met = 12;
  938. bvr_fur = 18;
  939. bvr_met = 7;
  940. brn_hrn = 12;
  941. brn_met = 5;
  942. brn_skn = 8;
  943. bor_met = 5;
  944. bor_skn = 3;
  945. bor_tsk = 8;
  946.  
  947. goto animal;
  948. }
  949.  
  950. else if (lctn == 4)
  951. {
  952. arm_car = 8;
  953. arm_met = 5;
  954. ber_clw = 12;
  955. ber_met = 12;
  956. bvr_fur = 18;
  957. bvr_met = 7;
  958. brn_hrn = 12;
  959. brn_met = 5;
  960. brn_skn = 8;
  961. bor_met = 5;
  962. bor_skn = 3;
  963. bor_tsk = 8;
  964.  
  965. goto animal;
  966. }
  967.  
  968. else if (lctn == 5)
  969. {
  970. arm_car = 8;
  971. arm_met = 5;
  972. ber_clw = 12;
  973. ber_met = 12;
  974. bvr_fur = 18;
  975. bvr_met = 7;
  976. brn_hrn = 12;
  977. brn_met = 5;
  978. brn_skn = 8;
  979. bor_met = 5;
  980. bor_skn = 3;
  981. bor_tsk = 8;
  982.  
  983. goto animal;
  984. }
  985.  
  986. else if (lctn == 6)
  987. {
  988. arm_car = 8;
  989. arm_met = 5;
  990. ber_clw = 12;
  991. ber_met = 12;
  992. bvr_fur = 18;
  993. bvr_met = 7;
  994. brn_hrn = 12;
  995. brn_met = 5;
  996. brn_skn = 8;
  997. bor_met = 5;
  998. bor_skn = 3;
  999. bor_tsk = 8;
  1000.  
  1001. goto animal;
  1002. }
  1003.  
  1004. else if (lctn == 7)
  1005. {
  1006. arm_car = 11;
  1007. arm_met = 7;
  1008. ber_clw = 18;
  1009. ber_met = 18;
  1010. bvr_fur = 27;
  1011. bvr_met = 11;
  1012. brn_hrn = 18;
  1013. brn_met = 8;
  1014. brn_skn = 12;
  1015. bor_met = 8;
  1016. bor_skn = 5;
  1017. bor_tsk = 12;
  1018.  
  1019. goto animal;
  1020. }
  1021.  
  1022. else
  1023. {
  1024. return 1;
  1025. }
  1026. }
  1027.  
  1028. else if (honr == 7)
  1029. {
  1030. if (lctn == 1)
  1031. {
  1032. arm_car = 8;
  1033. arm_met = 5;
  1034. ber_clw = 12;
  1035. ber_met = 12;
  1036. bvr_fur = 18;
  1037. bvr_met = 7;
  1038. brn_hrn = 12;
  1039. brn_met = 5;
  1040. brn_skn = 8;
  1041. bor_met = 5;
  1042. bor_skn = 3;
  1043. bor_tsk = 8;
  1044.  
  1045. goto animal;
  1046. }
  1047.  
  1048. else if (lctn == 2)
  1049. {
  1050. arm_car = 8;
  1051. arm_met = 5;
  1052. ber_clw = 12;
  1053. ber_met = 12;
  1054. bvr_fur = 18;
  1055. bvr_met = 7;
  1056. brn_hrn = 12;
  1057. brn_met = 5;
  1058. brn_skn = 8;
  1059. bor_met = 5;
  1060. bor_skn = 3;
  1061. bor_tsk = 8;
  1062.  
  1063. goto animal;
  1064. }
  1065.  
  1066. else if (lctn == 3)
  1067. {
  1068. arm_car = 8;
  1069. arm_met = 5;
  1070. ber_clw = 12;
  1071. ber_met = 12;
  1072. bvr_fur = 18;
  1073. bvr_met = 7;
  1074. brn_hrn = 12;
  1075. brn_met = 5;
  1076. brn_skn = 8;
  1077. bor_met = 5;
  1078. bor_skn = 3;
  1079. bor_tsk = 8;
  1080.  
  1081. goto animal;
  1082. }
  1083.  
  1084. else if (lctn == 4)
  1085. {
  1086. arm_car = 8;
  1087. arm_met = 5;
  1088. ber_clw = 12;
  1089. ber_met = 12;
  1090. bvr_fur = 18;
  1091. bvr_met = 7;
  1092. brn_hrn = 12;
  1093. brn_met = 5;
  1094. brn_skn = 8;
  1095. bor_met = 5;
  1096. bor_skn = 3;
  1097. bor_tsk = 8;
  1098.  
  1099. goto animal;
  1100. }
  1101.  
  1102. else if (lctn == 5)
  1103. {
  1104. arm_car = 8;
  1105. arm_met = 5;
  1106. ber_clw = 12;
  1107. ber_met = 12;
  1108. bvr_fur = 18;
  1109. bvr_met = 7;
  1110. brn_hrn = 12;
  1111. brn_met = 5;
  1112. brn_skn = 8;
  1113. bor_met = 5;
  1114. bor_skn = 3;
  1115. bor_tsk = 8;
  1116.  
  1117. goto animal;
  1118. }
  1119.  
  1120. else if (lctn == 6)
  1121. {
  1122. arm_car = 8;
  1123. arm_met = 5;
  1124. ber_clw = 12;
  1125. ber_met = 12;
  1126. bvr_fur = 18;
  1127. bvr_met = 7;
  1128. brn_hrn = 12;
  1129. brn_met = 5;
  1130. brn_skn = 8;
  1131. bor_met = 5;
  1132. bor_skn = 3;
  1133. bor_tsk = 8;
  1134.  
  1135. goto animal;
  1136. }
  1137.  
  1138. else if (lctn == 7)
  1139. {
  1140. arm_car = 11;
  1141. arm_met = 7;
  1142. ber_clw = 18;
  1143. ber_met = 18;
  1144. bvr_fur = 27;
  1145. bvr_met = 11;
  1146. brn_hrn = 18;
  1147. brn_met = 8;
  1148. brn_skn = 12;
  1149. bor_met = 8;
  1150. bor_skn = 5;
  1151. bor_tsk = 12;
  1152.  
  1153. goto animal;
  1154. }
  1155. }
  1156.  
  1157. else
  1158. {
  1159. return 1;
  1160. }
  1161.  
  1162. animal:
  1163. // Choosing animal dialogue
  1164. system("CLS");
  1165. cout<<"-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-\n";
  1166. cout<<" Red Dead Redemption - Animal Values \n";
  1167. cout<<"-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-\n";
  1168. cout<<"Location General Store: ";
  1169. if (lctn == 1)
  1170. {
  1171. cout<<"Armadillo\n";
  1172. }
  1173.  
  1174. else if (lctn == 2)
  1175. {
  1176. cout<<"Blackwater\n";
  1177. }
  1178.  
  1179. else if (lctn == 3)
  1180. {
  1181. cout<<"Chuparosa\n";
  1182. }
  1183.  
  1184. else if (lctn == 4)
  1185. {
  1186. cout<<"Escalera\n";
  1187. }
  1188.  
  1189. else if (lctn == 5)
  1190. {
  1191. cout<<"MacFarlane's Ranch\n";
  1192. }
  1193.  
  1194. else if (lctn == 6)
  1195. {
  1196. cout<<"Manzanita Post\n";
  1197. }
  1198.  
  1199. else if (lctn == 7)
  1200. {
  1201. cout<<"Thieves' Landing\n";
  1202. }
  1203.  
  1204. else
  1205. {
  1206. return 1;
  1207. }
  1208. cout<<"1) Armadillo 19) Fox\n";
  1209. cout<<"2) Bear 20) Goat\n";
  1210. cout<<"3) Beaver 21) Grizzly Bear\n";
  1211. cout<<"4) Bighorn Sheep 22) Hawk\n";
  1212. cout<<"5) Boar 23) Horse\n";
  1213. cout<<"6) Bobcat 24) Mule\n";
  1214. cout<<"7) Buck 25) Owl\n";
  1215. cout<<"8) Buffalo 26) Pig\n";
  1216. cout<<"9) Cattle 27) Rabbit\n";
  1217. cout<<"10) Chicken 28) Raccoon\n";
  1218. cout<<"11) Cougar 29) Rattlesnake\n";
  1219. cout<<"12) Coyote 30) Seagull\n";
  1220. cout<<"13) Crow 31) Songbird\n";
  1221. cout<<"14) Deer 32) Sheep\n";
  1222. cout<<"15) Dog 33) Skunk\n";
  1223. cout<<"16) Duck 34) Vulture\n";
  1224. cout<<"17) Eagle 35) Wolf\n";
  1225. cout<<"18) Elk 36) Legendary Animals\n\n";
  1226. cout<<"37) Help 38) Return\n";
  1227. cout<<"Enter the number of the animal to retrieve the data: ";
  1228. cin>> anml;
  1229. cin.ignore();
  1230.  
  1231. system("CLS");
  1232. cout<<"-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-\n";
  1233. cout<<" Red Dead Redemption - Animal Values \n";
  1234. cout<<"-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-\n";
  1235.  
  1236. // Animals
  1237. if (anml == 1)
  1238. {
  1239. cout<<"==Armadillo==";
  1240. cout<<"\n Carapace - $";
  1241. cout<<arm_car;
  1242. cout<<"\n Meat - $";
  1243. cout<<arm_met;
  1244. cout<<"\n";
  1245. cin.ignore();
  1246.  
  1247. goto animal;
  1248. }
  1249.  
  1250. else if (anml == 2)
  1251. {
  1252. cout<<"==Bear==";
  1253. cout<<"\n Claw - $";
  1254. cout<<ber_clw;
  1255. cout<<"\n Meat - $";
  1256. cout<<ber_met;
  1257. cout<<"\n";
  1258. cin.ignore();
  1259.  
  1260. goto animal;
  1261. }
  1262.  
  1263. else if (anml == 3)
  1264. {
  1265. cout<<"==Beaver==";
  1266. cout<<"\n Fur - $";
  1267. cout<<bvr_fur;
  1268. cout<<"\n Meat - $";
  1269. cout<<bvr_met;
  1270. cout<<"\n";
  1271. cin.ignore();
  1272.  
  1273. goto animal;
  1274. }
  1275.  
  1276. else if (anml == 4)
  1277. {
  1278. cout<<"==Bighorn Sheep==";
  1279. cout<<"\n Horn - $";
  1280. cout<<brn_hrn;
  1281. cout<<"\n Meat - $";
  1282. cout<<brn_met;
  1283. cout<<"\n Skin - $";
  1284. cout<<brn_skn;
  1285. cout<<"\n";
  1286. cin.ignore();
  1287.  
  1288. goto animal;
  1289. }
  1290.  
  1291. else if (anml == 5)
  1292. {
  1293. cout<<"==Boar==";
  1294. cout<<"\n Meat - $";
  1295. cout<<bor_met;
  1296. cout<<"\n Skin - $";
  1297. cout<<bor_skn;
  1298. cout<<"\n Tusks - $";
  1299. cout<<bor_tsk;
  1300. cout<<"\n";
  1301. cin.ignore();
  1302.  
  1303. goto animal;
  1304. }
  1305.  
  1306. else if (anml == 37)
  1307. {
  1308. help_strt == 3;
  1309. goto help;
  1310. }
  1311.  
  1312. else if (anml == 38)
  1313. {
  1314. goto location;
  1315. }
  1316.  
  1317. else
  1318. {
  1319. cout<<"'";
  1320. cout<<anml;
  1321. cout<<"' is an invalid command. Please enter a valid one.";
  1322. cin.ignore();
  1323.  
  1324. goto animal;
  1325. }
  1326.  
  1327. help:
  1328. // Help dialogue
  1329. system("CLS");
  1330. cout<<"-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-\n";
  1331. cout<<" Red Dead Redemption - Animal Values \n";
  1332. cout<<"-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-\n";
  1333. cout<<"==Help==\n";
  1334. cout<<"1) License\n\n";
  1335. cout<<"2) Return\n";
  1336. cout<<"Enter your command: ";
  1337. cin>> help;
  1338. cin.ignore();
  1339.  
  1340. if (help == 1)
  1341. {
  1342. help_license = 1;
  1343. help_license:
  1344. cout<<"This file is part of Red Dead Redemption - Animal Values\n\n.";
  1345.  
  1346. cout<<"Red Dead Redemption - Animal Values is free software: you can redistribute it and/or modify\n";
  1347. cout<<"it under the terms of the GNU General Public License as published by\n";
  1348. cout<<"the Free Software Foundation, either version 3 of the License, or\n";
  1349. cout<<"(at your option) any later version.\n\n";
  1350.  
  1351. cout<<"Red Dead Redemption - Animal Values is distributed in the hope that it will be useful,\n";
  1352. cout<<"but WITHOUT ANY WARRANTY; without even the implied warranty of\n";
  1353. cout<<"MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n";
  1354. cout<<"GNU General Public License for more details.\n\n";
  1355.  
  1356. cout<<"You should have received a copy of the GNU General Public License\n";
  1357. cout<<"along with Red Dead Redemption - Animal Values. If not, see <http://www.gnu.org/licenses/>.\n";
  1358. cin.ignore();
  1359.  
  1360. if (help_license == 1)
  1361. {
  1362. goto help;
  1363. }
  1364.  
  1365. else if (help_license == 2)
  1366. {
  1367. goto start;
  1368. }
  1369.  
  1370. else
  1371. {
  1372. return 1;
  1373. }
  1374.  
  1375. }
  1376. else if (help == 2)
  1377. {
  1378. if (help_strt == 1)
  1379. {
  1380. goto honour;
  1381. }
  1382.  
  1383. else if (help_strt == 2)
  1384. {
  1385. goto location;
  1386. }
  1387.  
  1388. else if (help_strt == 3)
  1389. {
  1390. goto animal;
  1391. }
  1392.  
  1393. else
  1394. {
  1395. return 1;
  1396. }
  1397. }
  1398.  
  1399. else
  1400. {
  1401. cout<<"'";
  1402. cout<<help;
  1403. cout<<"' is an invalid command. Please try a valid one.";
  1404. }
  1405.  
  1406. return 0;
  1407. }

[/spoiler]
Offline Waflix - 05/07/2011 11:13
Avatar van Waflix Lid
  1. // Red Dead Redemption - Animal Values
  2. // Version 0.5
  3. // Last update was at the 3rd of July
  4. //
  5. // Written by Felix Dekker
  6. // GNU General Public License, 2011 - Refer to the help dialogue in this program for the license
  7. //
  8. // Most of the information that can be found in this program is based on or copied from the Red Dead Wikia.
  9. // www.reddead.wikia.com
  10.  
  11. #include <iostream>
  12. #include <stdio.h>
  13. #include <windows.h>
  14.  
  15. using namespace std;
  16.  
  17. // Variables
  18. // User input
  19. unsigned int honr;
  20. unsigned int lctn;
  21. unsigned int anml;
  22. unsigned int lgnd;
  23. unsigned int help;
  24. unsigned int strt;
  25.  
  26. // Program output
  27. int lctn_part;
  28. int help_strt;
  29. int help_license;
  30.  
  31. // Animals
  32. int arm_car;
  33. int arm_met;
  34. int ber_clw;
  35. int ber_met;
  36. int bvr_fur;
  37. int bvr_met;
  38. int brn_hrn;
  39. int brn_met;
  40. int brn_skn;
  41. int bor_met;
  42. int bor_skn;
  43. int bor_tsk;
  44.  
  45.  
  46. int main()
  47. {
  48. start:
  49. system("CLS");
  50. cout<<"-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-\n";
  51. cout<<" License \n";
  52. cout<<"-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-\n";
  53. cout<<"Red Dead Redemption - Animal Values Copyright (C) 2011 Felix Dekker\n\n";
  54. cout<<"This program comes with ABSOLUTELY NO WARRANTY; for details type '1'.\n";
  55. cout<<"This is free software, and you are welcome to redistribute it\n";
  56. cout<<"under certain conditions; type '1' for details.\n";
  57. cin>> strt;
  58. cin.ignore();
  59.  
  60. if (strt == 1)
  61. {
  62. help_license = 2;
  63. goto help_license;
  64. }
  65.  
  66. else
  67. {
  68. goto honour;
  69. }
  70.  
  71. honour:
  72. // Choosing honour level dialogue
  73. system("CLS");
  74. cout<<"-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-\n";
  75. cout<<" Red Dead Redemption - Animal Values \n";
  76. cout<<"-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-\n";
  77. cout<<"1) Honest Joe 5) Rustler\n";
  78. cout<<"2) Peacemaker 6) Road Agent\n";
  79. cout<<"3) Hero 7) Desperado\n";
  80. cout<<"4) Drifter\n\n";
  81. cout<<"8) Help 9) Exit\n";
  82. cout<<"Enter the number of your honour level: ";
  83. cin>> honr;
  84. cin.ignore();
  85.  
  86. if (honr == 8)
  87. {
  88. help_strt = 1;
  89. goto help;
  90. }
  91.  
  92. if (honr < 10)
  93. {
  94. goto location;
  95. }
  96.  
  97. else if (honr > 9)
  98. {
  99. cout<<"'";
  100. cout<<honr;
  101. cout<<"' is an invalid command. Please try a valid one.";
  102. cin.ignore();
  103.  
  104. goto honour;
  105. }
  106.  
  107. else if (honr < 1)
  108. {
  109. cout<<"'";
  110. cout<<honr;
  111. cout<<"' is an invalid command. Please try a valid one.";
  112. cin.ignore();
  113.  
  114. goto honour;
  115. }
  116.  
  117. else
  118. {
  119. goto location;
  120. }
  121.  
  122. location:
  123. // Choosing location dialogue
  124. system("CLS");
  125. cout<<"-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-\n";
  126. cout<<" Red Dead Redemption - Animal Values \n";
  127. cout<<"-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-\n";
  128. cout<<"Honor level: ";
  129. if (honr == 1)
  130. {
  131. cout<<"Honest Joe\n";
  132. }
  133.  
  134. else if (honr == 2)
  135. {
  136. cout<<"Peacemaker\n";
  137. }
  138.  
  139. else if (honr == 3)
  140. {
  141. cout<<"Hero\n";
  142. }
  143.  
  144. else if (honr == 4)
  145. {
  146. cout<<"Drifter\n";
  147. }
  148.  
  149. else if (honr == 5)
  150. {
  151. cout<<"Rustler\n";
  152. }
  153.  
  154. else if (honr == 6)
  155. {
  156. cout<<"Road Agent\n";
  157. }
  158.  
  159. else if (honr == 7)
  160. {
  161. cout<<"Desperado\n";
  162. }
  163.  
  164. else
  165. {
  166. return 1;
  167. }
  168. cout<<"1) Armadillo 5) MacFarlane's Ranch\n";
  169. cout<<"2) Blackwater 6) Manzanita Post\n";
  170. cout<<"3) Chuparosa 7) Thieves' Landing\n";
  171. cout<<"4) Escalera\n\n";
  172. cout<<"8) Help 9) Return\n";
  173. cout<<"Enter the number of the General Store's location: ";
  174. cin>> lctn;
  175. cin.ignore();
  176.  
  177. if (lctn == 8)
  178. {
  179. help_strt = 2;
  180. goto help;
  181. }
  182.  
  183. else if (lctn == 9)
  184. {
  185. goto honour;
  186. }
  187.  
  188. else if (lctn < 10)
  189. {
  190. goto animal;
  191. }
  192.  
  193. else if (lctn > 9)
  194. {
  195. cout<<"'";
  196. cout<<lctn;
  197. cout<<"' is an incalid command. Please try a valid one.";
  198. cin.ignore();
  199.  
  200. goto location;
  201. }
  202.  
  203. else if (lctn < 1)
  204. {
  205. cout<<"'";
  206. cout<<lctn;
  207. cout<<"' is an incalid command. Please try a valid one.";
  208. cin.ignore();
  209.  
  210. goto location;
  211. }
  212.  
  213. else
  214. {
  215. cout<<"'";
  216. cout<<lctn;
  217. cout<<"' is an incalid command. Please try a valid one.";
  218. cin.ignore();
  219.  
  220. goto location;
  221. }
  222.  
  223. // Appointing variable values
  224. if (honr == 1)
  225. {
  226. if (lctn == 1)
  227. {
  228. arm_car = 11;
  229. arm_met = 7;
  230. ber_clw = 18;
  231. ber_met = 18;
  232. bvr_fur = 27;
  233. bvr_met = 11;
  234. brn_hrn = 18;
  235. brn_met = 8;
  236. brn_skn = 12;
  237. bor_met = 8;
  238. bor_skn = 5;
  239. bor_tsk = 12;
  240.  
  241. goto animal;
  242. }
  243.  
  244. else if (lctn == 2)
  245. {
  246. arm_car = 11;
  247. arm_met = 7;
  248. ber_clw = 18;
  249. ber_met = 18;
  250. bvr_fur = 27;
  251. bvr_met = 11;
  252. brn_hrn = 18;
  253. brn_met = 8;
  254. brn_skn = 12;
  255. bor_met = 8;
  256. bor_skn = 5;
  257. bor_tsk = 12;
  258.  
  259. goto animal;
  260. }
  261.  
  262. else if (lctn == 3)
  263. {
  264. arm_car = 11;
  265. arm_met = 7;
  266. ber_clw = 18;
  267. ber_met = 18;
  268. bvr_fur = 27;
  269. bvr_met = 11;
  270. brn_hrn = 18;
  271. brn_met = 8;
  272. brn_skn = 12;
  273. bor_met = 8;
  274. bor_skn = 5;
  275. bor_tsk = 12;
  276.  
  277. goto animal;
  278. }
  279.  
  280. else if (lctn == 4)
  281. {
  282. arm_car = 11;
  283. arm_met = 7;
  284. ber_clw = 18;
  285. ber_met = 18;
  286. bvr_fur = 27;
  287. bvr_met = 11;
  288. brn_hrn = 18;
  289. brn_met = 8;
  290. brn_skn = 12;
  291. bor_met = 8;
  292. bor_skn = 5;
  293. bor_tsk = 12;
  294.  
  295. goto animal;
  296. }
  297.  
  298. else if (lctn == 5)
  299. {
  300. arm_car = 11;
  301. arm_met = 7;
  302. ber_clw = 18;
  303. ber_met = 18;
  304. bvr_fur = 27;
  305. bvr_met = 11;
  306. brn_hrn = 18;
  307. brn_met = 8;
  308. brn_skn = 12;
  309. bor_met = 8;
  310. bor_skn = 5;
  311. bor_tsk = 12;
  312.  
  313. goto animal;
  314. }
  315.  
  316. else if (lctn == 6)
  317. {
  318. arm_car = 11;
  319. arm_met = 7;
  320. ber_clw = 18;
  321. ber_met = 18;
  322. bvr_fur = 27;
  323. bvr_met = 11;
  324. brn_hrn = 18;
  325. brn_met = 8;
  326. brn_skn = 12;
  327. bor_met = 8;
  328. bor_skn = 5;
  329. bor_tsk = 12;
  330.  
  331. goto animal;
  332. }
  333.  
  334. else if (lctn == 7)
  335. {
  336. arm_car = 8;
  337. arm_met = 5;
  338. ber_clw = 12;
  339. ber_met = 12;
  340. bvr_fur = 18;
  341. bvr_met = 7;
  342. brn_hrn = 12;
  343. brn_met = 5;
  344. brn_skn = 8;
  345. bor_met = 5;
  346. bor_skn = 3;
  347. bor_tsk = 8;
  348.  
  349. goto animal;
  350. }
  351.  
  352. else
  353. {
  354. return 1;
  355. }
  356. }
  357.  
  358. else if (honr == 2)
  359. {
  360. if (lctn == 1)
  361. {
  362. arm_car = 11;
  363. arm_met = 7;
  364. ber_clw = 18;
  365. ber_met = 18;
  366. bvr_fur = 27;
  367. bvr_met = 11;
  368. brn_hrn = 18;
  369. brn_met = 8;
  370. brn_skn = 12;
  371. bor_met = 8;
  372. bor_skn = 5;
  373. bor_tsk = 12;
  374.  
  375. goto animal;
  376. }
  377.  
  378. else if (lctn == 2)
  379. {
  380. arm_car = 11;
  381. arm_met = 7;
  382. ber_clw = 18;
  383. ber_met = 18;
  384. bvr_fur = 27;
  385. bvr_met = 11;
  386. brn_hrn = 18;
  387. brn_met = 8;
  388. brn_skn = 12;
  389. bor_met = 8;
  390. bor_skn = 5;
  391. bor_tsk = 12;
  392.  
  393. goto animal;
  394. }
  395.  
  396. else if (lctn == 3)
  397. {
  398. arm_car = 11;
  399. arm_met = 7;
  400. ber_clw = 18;
  401. ber_met = 18;
  402. bvr_fur = 27;
  403. bvr_met = 11;
  404. brn_hrn = 18;
  405. brn_met = 8;
  406. brn_skn = 12;
  407. bor_met = 8;
  408. bor_skn = 5;
  409. bor_tsk = 12;
  410.  
  411. goto animal;
  412. }
  413.  
  414. else if (lctn == 4)
  415. {
  416. arm_car = 11;
  417. arm_met = 7;
  418. ber_clw = 18;
  419. ber_met = 18;
  420. bvr_fur = 27;
  421. bvr_met = 11;
  422. brn_hrn = 18;
  423. brn_met = 8;
  424. brn_skn = 12;
  425. bor_met = 8;
  426. bor_skn = 5;
  427. bor_tsk = 12;
  428.  
  429. goto animal;
  430. }
  431.  
  432. else if (lctn == 5)
  433. {
  434. arm_car = 11;
  435. arm_met = 7;
  436. ber_clw = 18;
  437. ber_met = 18;
  438. bvr_fur = 27;
  439. bvr_met = 11;
  440. brn_hrn = 18;
  441. brn_met = 8;
  442. brn_skn = 12;
  443. bor_met = 8;
  444. bor_skn = 5;
  445. bor_tsk = 12;
  446.  
  447. goto animal;
  448. }
  449.  
  450. else if (lctn == 6)
  451. {
  452. arm_car = 11;
  453. arm_met = 7;
  454. ber_clw = 18;
  455. ber_met = 18;
  456. bvr_fur = 27;
  457. bvr_met = 11;
  458. brn_hrn = 18;
  459. brn_met = 8;
  460. brn_skn = 12;
  461. bor_met = 8;
  462. bor_skn = 5;
  463. bor_tsk = 12;
  464.  
  465. goto animal;
  466. }
  467.  
  468. else if (lctn == 7)
  469. {
  470. arm_car = 8;
  471. arm_met = 5;
  472. ber_clw = 12;
  473. ber_met = 12;
  474. bvr_fur = 18;
  475. bvr_met = 7;
  476. brn_hrn = 12;
  477. brn_met = 5;
  478. brn_skn = 8;
  479. bor_met = 5;
  480. bor_skn = 3;
  481. bor_tsk = 8;
  482.  
  483. goto animal;
  484. }
  485.  
  486. else
  487. {
  488. return 1;
  489. }
  490. }
  491.  
  492. else if (honr == 3)
  493. {
  494. if (lctn == 1)
  495. {
  496. arm_car = 8;
  497. arm_met = 5;
  498. ber_clw = 12;
  499. ber_met = 12;
  500. bvr_fur = 18;
  501. bvr_met = 7;
  502. brn_hrn = 12;
  503. brn_met = 5;
  504. brn_skn = 8;
  505. bor_met = 5;
  506. bor_skn = 3;
  507. bor_tsk = 8;
  508.  
  509. goto animal;
  510. }
  511.  
  512. else if (lctn == 2)
  513. {
  514. arm_car = 8;
  515. arm_met = 5;
  516. ber_clw = 12;
  517. ber_met = 12;
  518. bvr_fur = 18;
  519. bvr_met = 7;
  520. brn_hrn = 12;
  521. brn_met = 5;
  522. brn_skn = 8;
  523. bor_met = 5;
  524. bor_skn = 3;
  525. bor_tsk = 8;
  526.  
  527. goto animal;
  528. }
  529.  
  530. else if (lctn == 3)
  531. {
  532. arm_car = 8;
  533. arm_met = 5;
  534. ber_clw = 12;
  535. ber_met = 12;
  536. bvr_fur = 18;
  537. bvr_met = 7;
  538. brn_hrn = 12;
  539. brn_met = 5;
  540. brn_skn = 8;
  541. bor_met = 5;
  542. bor_skn = 3;
  543. bor_tsk = 8;
  544.  
  545. goto animal;
  546. }
  547.  
  548. else if (lctn == 4)
  549. {
  550. arm_car = 8;
  551. arm_met = 5;
  552. ber_clw = 12;
  553. ber_met = 12;
  554. bvr_fur = 18;
  555. bvr_met = 7;
  556. brn_hrn = 12;
  557. brn_met = 5;
  558. brn_skn = 8;
  559. bor_met = 5;
  560. bor_skn = 3;
  561. bor_tsk = 8;
  562.  
  563. goto animal;
  564. }
  565.  
  566. else if (lctn == 5)
  567. {
  568. arm_car = 8;
  569. arm_met = 5;
  570. ber_clw = 12;
  571. ber_met = 12;
  572. bvr_fur = 18;
  573. bvr_met = 7;
  574. brn_hrn = 12;
  575. brn_met = 5;
  576. brn_skn = 8;
  577. bor_met = 5;
  578. bor_skn = 3;
  579. bor_tsk = 8;
  580.  
  581. goto animal;
  582. }
  583.  
  584. else if (lctn == 6)
  585. {
  586. arm_car = 8;
  587. arm_met = 5;
  588. ber_clw = 12;
  589. ber_met = 12;
  590. bvr_fur = 18;
  591. bvr_met = 7;
  592. brn_hrn = 12;
  593. brn_met = 5;
  594. brn_skn = 8;
  595. bor_met = 5;
  596. bor_skn = 3;
  597. bor_tsk = 8;
  598.  
  599. goto animal;
  600. }
  601.  
  602. else if (lctn == 7)
  603. {
  604. arm_car = 8;
  605. arm_met = 5;
  606. ber_clw = 12;
  607. ber_met = 12;
  608. bvr_fur = 18;
  609. bvr_met = 7;
  610. brn_hrn = 12;
  611. brn_met = 5;
  612. brn_skn = 8;
  613. bor_met = 5;
  614. bor_skn = 3;
  615. bor_tsk = 8;
  616.  
  617. goto animal;
  618. }
  619.  
  620. else
  621. {
  622. return 1;
  623. }
  624. }
  625.  
  626. else if (honr == 4)
  627. {
  628. if (lctn == 1)
  629. {
  630. arm_car = 8;
  631. arm_met = 5;
  632. ber_clw = 12;
  633. ber_met = 12;
  634. bvr_fur = 18;
  635. bvr_met = 7;
  636. brn_hrn = 12;
  637. brn_met = 5;
  638. brn_skn = 8;
  639. bor_met = 5;
  640. bor_skn = 3;
  641. bor_tsk = 8;
  642.  
  643. goto animal;
  644. }
  645.  
  646. else if (lctn == 2)
  647. {
  648. arm_car = 8;
  649. arm_met = 5;
  650. ber_clw = 12;
  651. ber_met = 12;
  652. bvr_fur = 18;
  653. bvr_met = 7;
  654. brn_hrn = 12;
  655. brn_met = 5;
  656. brn_skn = 8;
  657. bor_met = 5;
  658. bor_skn = 3;
  659. bor_tsk = 8;
  660.  
  661. goto animal;
  662. }
  663.  
  664. else if (lctn == 3)
  665. {
  666. arm_car = 8;
  667. arm_met = 5;
  668. ber_clw = 12;
  669. ber_met = 12;
  670. bvr_fur = 18;
  671. bvr_met = 7;
  672. brn_hrn = 12;
  673. brn_met = 5;
  674. brn_skn = 8;
  675. bor_met = 5;
  676. bor_skn = 3;
  677. bor_tsk = 8;
  678.  
  679. goto animal;
  680. }
  681.  
  682. else if (lctn == 4)
  683. {
  684. arm_car = 8;
  685. arm_met = 5;
  686. ber_clw = 12;
  687. ber_met = 12;
  688. bvr_fur = 18;
  689. bvr_met = 7;
  690. brn_hrn = 12;
  691. brn_met = 5;
  692. brn_skn = 8;
  693. bor_met = 5;
  694. bor_skn = 3;
  695. bor_tsk = 8;
  696.  
  697. goto animal;
  698. }
  699.  
  700. else if (lctn == 5)
  701. {
  702. arm_car = 8;
  703. arm_met = 5;
  704. ber_clw = 12;
  705. ber_met = 12;
  706. bvr_fur = 18;
  707. bvr_met = 7;
  708. brn_hrn = 12;
  709. brn_met = 5;
  710. brn_skn = 8;
  711. bor_met = 5;
  712. bor_skn = 3;
  713. bor_tsk = 8;
  714.  
  715. goto animal;
  716. }
  717.  
  718. else if (lctn == 6)
  719. {
  720. arm_car = 8;
  721. arm_met = 5;
  722. ber_clw = 12;
  723. ber_met = 12;
  724. bvr_fur = 18;
  725. bvr_met = 7;
  726. brn_hrn = 12;
  727. brn_met = 5;
  728. brn_skn = 8;
  729. bor_met = 5;
  730. bor_skn = 3;
  731. bor_tsk = 8;
  732.  
  733. goto animal;
  734. }
  735.  
  736. else if (lctn == 7)
  737. {
  738. arm_car = 8;
  739. arm_met = 5;
  740. ber_clw = 12;
  741. ber_met = 12;
  742. bvr_fur = 18;
  743. bvr_met = 7;
  744. brn_hrn = 12;
  745. brn_met = 5;
  746. brn_skn = 8;
  747. bor_met = 5;
  748. bor_skn = 3;
  749. bor_tsk = 8;
  750.  
  751. goto animal;
  752. }
  753.  
  754. else
  755. {
  756. return 1;
  757. }
  758. }
  759.  
  760. else if (honr == 5)
  761. {
  762. if (lctn == 1)
  763. {
  764. arm_car = 8;
  765. arm_met = 5;
  766. ber_clw = 12;
  767. ber_met = 12;
  768. bvr_fur = 18;
  769. bvr_met = 7;
  770. brn_hrn = 12;
  771. brn_met = 5;
  772. brn_skn = 8;
  773. bor_met = 5;
  774. bor_skn = 3;
  775. bor_tsk = 8;
  776.  
  777. goto animal;
  778. }
  779.  
  780. else if (lctn == 2)
  781. {
  782. arm_car = 8;
  783. arm_met = 5;
  784. ber_clw = 12;
  785. ber_met = 12;
  786. bvr_fur = 18;
  787. bvr_met = 7;
  788. brn_hrn = 12;
  789. brn_met = 5;
  790. brn_skn = 8;
  791. bor_met = 5;
  792. bor_skn = 3;
  793. bor_tsk = 8;
  794.  
  795. goto animal;
  796. }
  797.  
  798. else if (lctn == 3)
  799. {
  800. arm_car = 8;
  801. arm_met = 5;
  802. ber_clw = 12;
  803. ber_met = 12;
  804. bvr_fur = 18;
  805. bvr_met = 7;
  806. brn_hrn = 12;
  807. brn_met = 5;
  808. brn_skn = 8;
  809. bor_met = 5;
  810. bor_skn = 3;
  811. bor_tsk = 8;
  812.  
  813. goto animal;
  814. }
  815.  
  816. else if (lctn == 4)
  817. {
  818. arm_car = 8;
  819. arm_met = 5;
  820. ber_clw = 12;
  821. ber_met = 12;
  822. bvr_fur = 18;
  823. bvr_met = 7;
  824. brn_hrn = 12;
  825. brn_met = 5;
  826. brn_skn = 8;
  827. bor_met = 5;
  828. bor_skn = 3;
  829. bor_tsk = 8;
  830.  
  831. goto animal;
  832. }
  833.  
  834. else if (lctn == 5)
  835. {
  836. arm_car = 8;
  837. arm_met = 5;
  838. ber_clw = 12;
  839. ber_met = 12;
  840. bvr_fur = 18;
  841. bvr_met = 7;
  842. brn_hrn = 12;
  843. brn_met = 5;
  844. brn_skn = 8;
  845. bor_met = 5;
  846. bor_skn = 3;
  847. bor_tsk = 8;
  848.  
  849. goto animal;
  850. }
  851.  
  852. else if (lctn == 6)
  853. {
  854. arm_car = 8;
  855. arm_met = 5;
  856. ber_clw = 12;
  857. ber_met = 12;
  858. bvr_fur = 18;
  859. bvr_met = 7;
  860. brn_hrn = 12;
  861. brn_met = 5;
  862. brn_skn = 8;
  863. bor_met = 5;
  864. bor_skn = 3;
  865. bor_tsk = 8;
  866.  
  867. goto animal;
  868. }
  869.  
  870. else if (lctn == 7)
  871. {
  872. arm_car = 8;
  873. arm_met = 5;
  874. ber_clw = 12;
  875. ber_met = 12;
  876. bvr_fur = 18;
  877. bvr_met = 7;
  878. brn_hrn = 12;
  879. brn_met = 5;
  880. brn_skn = 8;
  881. bor_met = 5;
  882. bor_skn = 3;
  883. bor_tsk = 8;
  884.  
  885. goto animal;
  886. }
  887.  
  888. else
  889. {
  890. return 1;
  891. }
  892. }
  893.  
  894. else if (honr == 6)
  895. {
  896. if (lctn == 1)
  897. {
  898. arm_car = 8;
  899. arm_met = 5;
  900. ber_clw = 12;
  901. ber_met = 12;
  902. bvr_fur = 18;
  903. bvr_met = 7;
  904. brn_hrn = 12;
  905. brn_met = 5;
  906. brn_skn = 8;
  907. bor_met = 5;
  908. bor_skn = 3;
  909. bor_tsk = 8;
  910.  
  911. goto animal;
  912. }
  913.  
  914. else if (lctn == 2)
  915. {
  916. arm_car = 8;
  917. arm_met = 5;
  918. ber_clw = 12;
  919. ber_met = 12;
  920. bvr_fur = 18;
  921. bvr_met = 7;
  922. brn_hrn = 12;
  923. brn_met = 5;
  924. brn_skn = 8;
  925. bor_met = 5;
  926. bor_skn = 3;
  927. bor_tsk = 8;
  928.  
  929. goto animal;
  930. }
  931.  
  932. else if (lctn == 3)
  933. {
  934. arm_car = 8;
  935. arm_met = 5;
  936. ber_clw = 12;
  937. ber_met = 12;
  938. bvr_fur = 18;
  939. bvr_met = 7;
  940. brn_hrn = 12;
  941. brn_met = 5;
  942. brn_skn = 8;
  943. bor_met = 5;
  944. bor_skn = 3;
  945. bor_tsk = 8;
  946.  
  947. goto animal;
  948. }
  949.  
  950. else if (lctn == 4)
  951. {
  952. arm_car = 8;
  953. arm_met = 5;
  954. ber_clw = 12;
  955. ber_met = 12;
  956. bvr_fur = 18;
  957. bvr_met = 7;
  958. brn_hrn = 12;
  959. brn_met = 5;
  960. brn_skn = 8;
  961. bor_met = 5;
  962. bor_skn = 3;
  963. bor_tsk = 8;
  964.  
  965. goto animal;
  966. }
  967.  
  968. else if (lctn == 5)
  969. {
  970. arm_car = 8;
  971. arm_met = 5;
  972. ber_clw = 12;
  973. ber_met = 12;
  974. bvr_fur = 18;
  975. bvr_met = 7;
  976. brn_hrn = 12;
  977. brn_met = 5;
  978. brn_skn = 8;
  979. bor_met = 5;
  980. bor_skn = 3;
  981. bor_tsk = 8;
  982.  
  983. goto animal;
  984. }
  985.  
  986. else if (lctn == 6)
  987. {
  988. arm_car = 8;
  989. arm_met = 5;
  990. ber_clw = 12;
  991. ber_met = 12;
  992. bvr_fur = 18;
  993. bvr_met = 7;
  994. brn_hrn = 12;
  995. brn_met = 5;
  996. brn_skn = 8;
  997. bor_met = 5;
  998. bor_skn = 3;
  999. bor_tsk = 8;
  1000.  
  1001. goto animal;
  1002. }
  1003.  
  1004. else if (lctn == 7)
  1005. {
  1006. arm_car = 11;
  1007. arm_met = 7;
  1008. ber_clw = 18;
  1009. ber_met = 18;
  1010. bvr_fur = 27;
  1011. bvr_met = 11;
  1012. brn_hrn = 18;
  1013. brn_met = 8;
  1014. brn_skn = 12;
  1015. bor_met = 8;
  1016. bor_skn = 5;
  1017. bor_tsk = 12;
  1018.  
  1019. goto animal;
  1020. }
  1021.  
  1022. else
  1023. {
  1024. return 1;
  1025. }
  1026. }
  1027.  
  1028. else if (honr == 7)
  1029. {
  1030. if (lctn == 1)
  1031. {
  1032. arm_car = 8;
  1033. arm_met = 5;
  1034. ber_clw = 12;
  1035. ber_met = 12;
  1036. bvr_fur = 18;
  1037. bvr_met = 7;
  1038. brn_hrn = 12;
  1039. brn_met = 5;
  1040. brn_skn = 8;
  1041. bor_met = 5;
  1042. bor_skn = 3;
  1043. bor_tsk = 8;
  1044.  
  1045. goto animal;
  1046. }
  1047.  
  1048. else if (lctn == 2)
  1049. {
  1050. arm_car = 8;
  1051. arm_met = 5;
  1052. ber_clw = 12;
  1053. ber_met = 12;
  1054. bvr_fur = 18;
  1055. bvr_met = 7;
  1056. brn_hrn = 12;
  1057. brn_met = 5;
  1058. brn_skn = 8;
  1059. bor_met = 5;
  1060. bor_skn = 3;
  1061. bor_tsk = 8;
  1062.  
  1063. goto animal;
  1064. }
  1065.  
  1066. else if (lctn == 3)
  1067. {
  1068. arm_car = 8;
  1069. arm_met = 5;
  1070. ber_clw = 12;
  1071. ber_met = 12;
  1072. bvr_fur = 18;
  1073. bvr_met = 7;
  1074. brn_hrn = 12;
  1075. brn_met = 5;
  1076. brn_skn = 8;
  1077. bor_met = 5;
  1078. bor_skn = 3;
  1079. bor_tsk = 8;
  1080.  
  1081. goto animal;
  1082. }
  1083.  
  1084. else if (lctn == 4)
  1085. {
  1086. arm_car = 8;
  1087. arm_met = 5;
  1088. ber_clw = 12;
  1089. ber_met = 12;
  1090. bvr_fur = 18;
  1091. bvr_met = 7;
  1092. brn_hrn = 12;
  1093. brn_met = 5;
  1094. brn_skn = 8;
  1095. bor_met = 5;
  1096. bor_skn = 3;
  1097. bor_tsk = 8;
  1098.  
  1099. goto animal;
  1100. }
  1101.  
  1102. else if (lctn == 5)
  1103. {
  1104. arm_car = 8;
  1105. arm_met = 5;
  1106. ber_clw = 12;
  1107. ber_met = 12;
  1108. bvr_fur = 18;
  1109. bvr_met = 7;
  1110. brn_hrn = 12;
  1111. brn_met = 5;
  1112. brn_skn = 8;
  1113. bor_met = 5;
  1114. bor_skn = 3;
  1115. bor_tsk = 8;
  1116.  
  1117. goto animal;
  1118. }
  1119.  
  1120. else if (lctn == 6)
  1121. {
  1122. arm_car = 8;
  1123. arm_met = 5;
  1124. ber_clw = 12;
  1125. ber_met = 12;
  1126. bvr_fur = 18;
  1127. bvr_met = 7;
  1128. brn_hrn = 12;
  1129. brn_met = 5;
  1130. brn_skn = 8;
  1131. bor_met = 5;
  1132. bor_skn = 3;
  1133. bor_tsk = 8;
  1134.  
  1135. goto animal;
  1136. }
  1137.  
  1138. else if (lctn == 7)
  1139. {
  1140. arm_car = 11;
  1141. arm_met = 7;
  1142. ber_clw = 18;
  1143. ber_met = 18;
  1144. bvr_fur = 27;
  1145. bvr_met = 11;
  1146. brn_hrn = 18;
  1147. brn_met = 8;
  1148. brn_skn = 12;
  1149. bor_met = 8;
  1150. bor_skn = 5;
  1151. bor_tsk = 12;
  1152.  
  1153. goto animal;
  1154. }
  1155. }
  1156.  
  1157. else
  1158. {
  1159. return 1;
  1160. }
  1161.  
  1162. animal:
  1163. // Choosing animal dialogue
  1164. system("CLS");
  1165. cout<<"-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-\n";
  1166. cout<<" Red Dead Redemption - Animal Values \n";
  1167. cout<<"-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-\n";
  1168. cout<<"Location General Store: ";
  1169. if (lctn == 1)
  1170. {
  1171. cout<<"Armadillo\n";
  1172. }
  1173.  
  1174. else if (lctn == 2)
  1175. {
  1176. cout<<"Blackwater\n";
  1177. }
  1178.  
  1179. else if (lctn == 3)
  1180. {
  1181. cout<<"Chuparosa\n";
  1182. }
  1183.  
  1184. else if (lctn == 4)
  1185. {
  1186. cout<<"Escalera\n";
  1187. }
  1188.  
  1189. else if (lctn == 5)
  1190. {
  1191. cout<<"MacFarlane's Ranch\n";
  1192. }
  1193.  
  1194. else if (lctn == 6)
  1195. {
  1196. cout<<"Manzanita Post\n";
  1197. }
  1198.  
  1199. else if (lctn == 7)
  1200. {
  1201. cout<<"Thieves' Landing\n";
  1202. }
  1203.  
  1204. else
  1205. {
  1206. return 1;
  1207. }
  1208. cout<<"1) Armadillo 19) Fox\n";
  1209. cout<<"2) Bear 20) Goat\n";
  1210. cout<<"3) Beaver 21) Grizzly Bear\n";
  1211. cout<<"4) Bighorn Sheep 22) Hawk\n";
  1212. cout<<"5) Boar 23) Horse\n";
  1213. cout<<"6) Bobcat 24) Mule\n";
  1214. cout<<"7) Buck 25) Owl\n";
  1215. cout<<"8) Buffalo 26) Pig\n";
  1216. cout<<"9) Cattle 27) Rabbit\n";
  1217. cout<<"10) Chicken 28) Raccoon\n";
  1218. cout<<"11) Cougar 29) Rattlesnake\n";
  1219. cout<<"12) Coyote 30) Seagull\n";
  1220. cout<<"13) Crow 31) Songbird\n";
  1221. cout<<"14) Deer 32) Sheep\n";
  1222. cout<<"15) Dog 33) Skunk\n";
  1223. cout<<"16) Duck 34) Vulture\n";
  1224. cout<<"17) Eagle 35) Wolf\n";
  1225. cout<<"18) Elk 36) Legendary Animals\n\n";
  1226. cout<<"37) Help 38) Return\n";
  1227. cout<<"Enter the number of the animal to retrieve the data: ";
  1228. cin>> anml;
  1229. cin.ignore();
  1230.  
  1231. system("CLS");
  1232. cout<<"-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-\n";
  1233. cout<<" Red Dead Redemption - Animal Values \n";
  1234. cout<<"-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-\n";
  1235.  
  1236. // Animals
  1237. if (anml == 1)
  1238. {
  1239. cout<<"==Armadillo==";
  1240. cout<<"\n Carapace - $";
  1241. cout<<arm_car;
  1242. cout<<"\n Meat - $";
  1243. cout<<arm_met;
  1244. cout<<"\n";
  1245. cin.ignore();
  1246.  
  1247. goto animal;
  1248. }
  1249.  
  1250. else if (anml == 2)
  1251. {
  1252. cout<<"==Bear==";
  1253. cout<<"\n Claw - $";
  1254. cout<<ber_clw;
  1255. cout<<"\n Meat - $";
  1256. cout<<ber_met;
  1257. cout<<"\n";
  1258. cin.ignore();
  1259.  
  1260. goto animal;
  1261. }
  1262.  
  1263. else if (anml == 3)
  1264. {
  1265. cout<<"==Beaver==";
  1266. cout<<"\n Fur - $";
  1267. cout<<bvr_fur;
  1268. cout<<"\n Meat - $";
  1269. cout<<bvr_met;
  1270. cout<<"\n";
  1271. cin.ignore();
  1272.  
  1273. goto animal;
  1274. }
  1275.  
  1276. else if (anml == 4)
  1277. {
  1278. cout<<"==Bighorn Sheep==";
  1279. cout<<"\n Horn - $";
  1280. cout<<brn_hrn;
  1281. cout<<"\n Meat - $";
  1282. cout<<brn_met;
  1283. cout<<"\n Skin - $";
  1284. cout<<brn_skn;
  1285. cout<<"\n";
  1286. cin.ignore();
  1287.  
  1288. goto animal;
  1289. }
  1290.  
  1291. else if (anml == 5)
  1292. {
  1293. cout<<"==Boar==";
  1294. cout<<"\n Meat - $";
  1295. cout<<bor_met;
  1296. cout<<"\n Skin - $";
  1297. cout<<bor_skn;
  1298. cout<<"\n Tusks - $";
  1299. cout<<bor_tsk;
  1300. cout<<"\n";
  1301. cin.ignore();
  1302.  
  1303. goto animal;
  1304. }
  1305.  
  1306. else if (anml == 37)
  1307. {
  1308. help_strt == 3;
  1309. goto help;
  1310. }
  1311.  
  1312. else if (anml == 38)
  1313. {
  1314. goto location;
  1315. }
  1316.  
  1317. else
  1318. {
  1319. cout<<"'";
  1320. cout<<anml;
  1321. cout<<"' is an invalid command. Please enter a valid one.";
  1322. cin.ignore();
  1323.  
  1324. goto animal;
  1325. }
  1326.  
  1327. help:
  1328. // Help dialogue
  1329. system("CLS");
  1330. cout<<"-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-\n";
  1331. cout<<" Red Dead Redemption - Animal Values \n";
  1332. cout<<"-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-\n";
  1333. cout<<"==Help==\n";
  1334. cout<<"1) License\n\n";
  1335. cout<<"2) Return\n";
  1336. cout<<"Enter your command: ";
  1337. cin>> help;
  1338. cin.ignore();
  1339.  
  1340. if (help == 1)
  1341. {
  1342. help_license = 1;
  1343. help_license:
  1344. cout<<"This file is part of Red Dead Redemption - Animal Values\n\n.";
  1345.  
  1346. cout<<"Red Dead Redemption - Animal Values is free software: you can redistribute it and/or modify\n";
  1347. cout<<"it under the terms of the GNU General Public License as published by\n";
  1348. cout<<"the Free Software Foundation, either version 3 of the License, or\n";
  1349. cout<<"(at your option) any later version.\n\n";
  1350.  
  1351. cout<<"Red Dead Redemption - Animal Values is distributed in the hope that it will be useful,\n";
  1352. cout<<"but WITHOUT ANY WARRANTY; without even the implied warranty of\n";
  1353. cout<<"MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n";
  1354. cout<<"GNU General Public License for more details.\n\n";
  1355.  
  1356. cout<<"You should have received a copy of the GNU General Public License\n";
  1357. cout<<"along with Red Dead Redemption - Animal Values. If not, see <http://www.gnu.org/licenses/>.\n";
  1358. cin.ignore();
  1359.  
  1360. if (help_license == 1)
  1361. {
  1362. goto help;
  1363. }
  1364.  
  1365. else if (help_license == 2)
  1366. {
  1367. goto start;
  1368. }
  1369.  
  1370. else
  1371. {
  1372. return 1;
  1373. }
  1374.  
  1375. }
  1376. else if (help == 2)
  1377. {
  1378. if (help_strt == 1)
  1379. {
  1380. goto honour;
  1381. }
  1382.  
  1383. else if (help_strt == 2)
  1384. {
  1385. goto location;
  1386. }
  1387.  
  1388. else if (help_strt == 3)
  1389. {
  1390. goto animal;
  1391. }
  1392.  
  1393. else
  1394. {
  1395. return 1;
  1396. }
  1397. }
  1398.  
  1399. else
  1400. {
  1401. cout<<"'";
  1402. cout<<help;
  1403. cout<<"' is an invalid command. Please try a valid one.";
  1404. }
  1405.  
  1406. return 0;
  1407. }
Offline Waflix - 05/07/2011 11:18
Avatar van Waflix Lid Ik heb even de source code van mijn programma geplaatst op mijn site, zodat jullie deze kunnen bekijken en eventueel verbeteren.

Source Code
http://waflix.zoka.cc/source.cpp
Gesponsorde links
Je moet ingelogd zijn om een reactie te kunnen posten.
Actieve forumberichten
© 2002-2024 Sitemasters.be - Regels - Laadtijd: 0.605s