valhallen.txt 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. //===== rAthena Script =======================================
  2. //= Valhallen Items Quests NPC
  3. //===== By: ==================================================
  4. //= Avaji
  5. //===== Current Version: =====================================
  6. //= 2.0
  7. //===== Compatible With: =====================================
  8. //= rAthena Project
  9. //===== Description: =========================================
  10. //= All-in-one: Mjolnir,Sleipnir,Brisingamen,Gleipnir,Megingjard
  11. //= Custom quest, ingredients based on official RO FAQ
  12. //===== Additional Comments: =================================
  13. //= 1.1 Optimized. [Euphy]
  14. //= 2.0 Adds SE and TE Godlikes. Fixed Mixing Itemlist. [Jey]
  15. //= Sources for the mixing lists 2016-08-15:
  16. //= http://irowiki.org/wiki/God_Items_Quest
  17. //= http://irowiki.org/wiki/God_Items_Quest_2
  18. //= http://irowiki.org/wiki/God_Items_Quest_3
  19. //============================================================
  20. prontera,147,171,5 script Lenneth 811,{
  21. mes "[Lenneth]";
  22. mes "I come from Valhalla to aid you.";
  23. mes "I can transmute for you many of the Valhallen items,";
  24. mes "although they require many rare elements to make.";
  25. next;
  26. switch(select("Mjolnir:Sleipnir:Brisingamen:Gleipnir:Megingjard:Asprika:Brynhild:Hervor:Jormungand:Muspellium:Essence Of Rune:Close")) {
  27. case 1:
  28. mes "[Lenneth]";
  29. mes "^3355FFMjolnir^000000 is the mighty Hammer of Thor.";
  30. setarray .@Items[0],1530,1522,2,984,20,985,5,969,40,7074,2,7075,4,7078,5,7091,5,7089,5;
  31. break;
  32. case 2:
  33. mes "[Lenneth]";
  34. mes "^3355FFSleipnir^000000 are boots made after Odin's War Horse.";
  35. setarray .@Items[0],2410,2406,2,969,20,985,10,7076,3,7079,5,7083,3,7086,4,7087,3;
  36. break;
  37. case 3:
  38. mes "[Lenneth]";
  39. mes "^3355FFBrisingammen^000000 is the magical Necklace of Freyja, goddess of Beauty.";
  40. setarray .@Items[0],2630,2603,1,726,2,722,3,727,10,724,5,969,20,7073,4,7077,4,7088,3,7090,3,7092,3;
  41. break;
  42. case 4:
  43. mes "[Lenneth]";
  44. mes "The ^3355FFGleipnir^000000 is a light yet strong rope required to make ^3355FFMegingjard^000000";
  45. setarray .@Items[0],7058,7080,4,7081,5,7082,4,7084,3,7085,3;
  46. break;
  47. case 5:
  48. mes "[Lenneth]";
  49. mes "The ^3355FFMegingjard^000000 is the powerful Belt of Thor.";
  50. setarray .@Items[0],2629,7058,1,2627,1,969,20,726,10,984,10;
  51. break;
  52. case 6:
  53. mes "[Lenneth]";
  54. mes "The ^3355FFAsprika^000000 is the light of gods.";
  55. setarray .@Items[0],2541,7835,1,7836,1,7837,1,7838,1,2513,1,7063,100,7291,10,7293,10,985,20;
  56. break;
  57. case 7:
  58. mes "[Lenneth]";
  59. mes "The ^3355FFBrynhild^000000 is the warrior's armor.";
  60. setarray .@Items[0],2383,7830,1,7831,1,7832,1,7833,1,7834,1,7510,100,2357,1,969,10,985,20;
  61. break;
  62. case 8:
  63. mes "[Lenneth]";
  64. mes "The ^3355FFHervor^000000 is named after the valkyrie who ensures victory for her warriors.";
  65. setarray .@Items[0],2181,6595,2,6596,1,6594,4,6597,3,6602,1,6604,1,6605,1,2115,1;
  66. break;
  67. case 9:
  68. mes "[Lenneth]";
  69. mes "The ^3355FFJormungand^000000 is famous for its ability to poison the enemy.";
  70. setarray .@Items[0],2020,6603,4,6599,1,6598,1,6601,4,6600,1,6604,1,6605,1,1473,1;
  71. break;
  72. case 10:
  73. mes "[Lenneth]";
  74. mes "The ^3355FFMuspellium^000000 is required to make ^3355FFJormungand^000000 and ^3355FFHervor^000000.";
  75. setarray .@Items[0],6605,984,50,985,50;
  76. break;
  77. case 11:
  78. mes "[Lenneth]";
  79. mes "The ^3355FFEssence Of Rune^000000 is required to make ^3355FFJormungand^000000 and ^3355FFHervor^000000.";
  80. setarray .@Items[0],6604,12735,200,12736,100;
  81. break;
  82. default:
  83. close;
  84. }
  85. mes "^FF0000The items I need are as follows:^000000";
  86. set .@itemmissing,0;
  87. for(set .@i,1; .@i<getarraysize(.@Items); set .@i,.@i+2) {
  88. set .@amount,.@Items[.@i+1];
  89. set .@id,.@Items[.@i];
  90. mes " ~ "+.@amount+"x "+((countitem(.@id)<.@amount)?("^dd3355"):("^33dd55"))+getitemname(.@id)+((getitemslots(.@id)>0)?" ["+getitemslots(.@id)+"]":"")+"^000000";
  91. if (countitem(.@id) < .@amount)
  92. set .@itemmissing,1;
  93. }
  94. if (.@itemmissing) {
  95. next;
  96. mes "[Lenneth]";
  97. mes "Go on and find all these items.";
  98. mes "I will wait here to aid you.";
  99. close;
  100. }
  101. next;
  102. mes "[Lenneth]";
  103. mes "Do you desire ^3355FF"+getitemname(.@Items[0])+"^000000?";
  104. next;
  105. if(select("No","Yes")==1) {
  106. mes "[Lenneth]";
  107. mes "Please return if you change your mind.";
  108. close;
  109. }
  110. mes "[Lenneth]";
  111. mes "Here is your ^3355FF"+getitemname(.@Items[0])+"^000000.";
  112. mes "May it serve you well.";
  113. //second check if the player tries to bypass the first
  114. for(set .@i,1; .@i<getarraysize(.@Items); set .@i,.@i+2) {
  115. set .@amount,.@Items[.@i+1];
  116. set .@id,.@Items[.@i];
  117. if (countitem(.@id) < .@amount)
  118. close;
  119. }
  120. // Delete the items _after_ the second check
  121. for(set .@i,1; .@i<getarraysize(.@Items); set .@i,.@i+2) {
  122. set .@amount,.@Items[.@i+1];
  123. set .@id,.@Items[.@i];
  124. delitem .@id, .@amount;
  125. }
  126. getitem .@Items[0],1;
  127. close;
  128. }