Skip to content

Commit

Permalink
Updated Custom Godlike Mixing NPC
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeybla committed Aug 15, 2016
1 parent 2cbc9ac commit 5d52871
Showing 1 changed file with 65 additions and 15 deletions.
80 changes: 65 additions & 15 deletions npc/custom/quests/valhallen.txt
Expand Up @@ -3,14 +3,19 @@
//===== By: ==================================================
//= Avaji
//===== Current Version: =====================================
//= 1.1
//= 2.0
//===== Compatible With: =====================================
//= rAthena Project
//===== Description: =========================================
//= All-in-one: Mjolnir,Sleipnir,Brisingamen,Gleipnir,Megingjard
//= Custom quest, ingredients based on official RO FAQ
//===== Additional Comments: =================================
//= 1.1 Optimized. [Euphy]
//= 2.0 Adds SE and TE Godlikes. Fixed Mixing Itemlist. [Jey]
//= Sources for the mixing lists 2015-08-15:
//= http://irowiki.org/wiki/God_Items_Quest
//= http://irowiki.org/wiki/God_Items_Quest_2
//= http://irowiki.org/wiki/God_Items_Quest_3
//============================================================

prontera,147,171,5 script Lenneth 811,{
Expand All @@ -19,21 +24,21 @@ prontera,147,171,5 script Lenneth 811,{
mes "I can transmute for you many of the Valhallen items,";
mes "although they require many rare elements to make.";
next;
switch(select("Mjolnir:Sleipnir:Brisingamen:Gleipnir:Megingjard")) {
switch(select("Mjolnir:Sleipnir:Brisingamen:Gleipnir:Megingjard:Asprika:Brynhild:Hervor:Jormungand")) {
case 1:
mes "[Lenneth]";
mes "^3355FFMjolnir^000000 is the mighty Hammer of Thor.";
setarray .@Items[0],1530,1531,2,984,20,985,5,969,40,7074,2,7075,4,7078,5,7087,5,7089,5;
setarray .@Items[0],1530,1522,2,984,20,985,5,969,40,7074,2,7075,4,7078,5,7091,5,7089,5;
break;
case 2:
mes "[Lenneth]";
mes "^3355FFSleipnir^000000 are boots made after Odin's War Horse.";
setarray .@Items[0],2410,2406,2,984,1,969,20,985,10,7076,3,7079,5,7083,3,7086,3;
setarray .@Items[0],2410,2406,2,984,20,969,20,985,10,7076,3,7079,5,7083,3,7086,4,7087,3;
break;
case 3:
mes "[Lenneth]";
mes "^3355FFBrisingammen^000000 is the magical Necklace of Freyja, goddess of Beauty.";
setarray .@Items[0],2630,2603,1,726,2,722,3,727,10,723,5,969,20,7073,4,7077,4,7088,3,7090,3,7092,3;
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;
break;
case 4:
mes "[Lenneth]";
Expand All @@ -43,26 +48,71 @@ prontera,147,171,5 script Lenneth 811,{
case 5:
mes "[Lenneth]";
mes "The ^3355FFMegingjard^000000 is the powerful Belt of Thor.";
setarray .@Items[0],2629,7058,1,2627,1,969,10,726,10,984,5;
break; }
setarray .@Items[0],2629,7058,1,2627,1,969,20,726,10,984,10;
break;
case 6:
mes "[Lenneth]";
mes "The ^3355FFAsprika^000000 is the light of gods.";
setarray .@Items[0],2541,7835,1,7836,1,7837,1,7838,1,2513,1,7063,100,7291,10,7293,10,985,20;
break;
case 7:
mes "[Lenneth]";
mes "The ^3355FFBrynhild^000000 is the warrior's armor.";
setarray .@Items[0],2383,7830,1,7831,1,7832,1,7833,1,7834,1,7510,100,2357,1,969,10,985,20;
break;
case 8:
mes "[Lenneth]";
mes "The ^3355FFHervor^000000 is named after the valkyrie who ensures victory for her warriors.";
setarray .@Items[0],2181,6595,2,6596,1,6594,4,6597,3,6602,1,6604,1,6605,1,2115,1;
break;
case 9:
mes "[Lenneth]";
mes "The ^3355FFJormungand^000000 is famous for its ability to poison the enemy.";
setarray .@Items[0],2020,6603,4,6599,1,6598,1,6601,4,6600,1,6604,1,6605,1,1473,1;
break;
}

mes "^FF0000The items I need are as follows:^000000";
for(set .@i,1; .@i<getarraysize(.@Items[0]); set .@i,.@i+2) {
mes " ~ "+.@Items[.@i+1]+"x ^3355FF"+getitemname(.@Items[.@i])+"^000000";
if (countitem(.@Items[.@i]) < .@Items[.@i+1]) set .@nr,1; }
if (.@nr) close;
set .@itemmissing,0;
for(set .@i,1; .@i<getarraysize(.@Items); set .@i,.@i+2) {
set .@amount,.@Items[.@i+1];
set .@id,.@Items[.@i];
mes " ~ "+.@amount+"x "+((countitem(.@id)<.@amount)?("^dd3355"):("^33dd55"))+getitemname(.@id)+((getitemslots(.@id)>0)?" ["+getitemslots(.@id)+"]":"")+"^000000";
if (countitem(.@id) < .@amount)
set .@itemmissing,1;
}
if (.@itemmissing) {
next;
mes "[Lenneth]";
mes "Go on and find all these items.";
mes "I will wait here to aid you.";
close;
}
next;
mes "[Lenneth]";
mes "Do you desire ^3355FF"+getitemname(.@Items[0])+"^000000?";
next;
if(select("Yes:No")==2) {
if(select("No","Yes")==1) {
mes "[Lenneth]";
mes "Please return if you change your mind.";
close; }
close;
}
mes "[Lenneth]";
mes "Here is your ^3355FF"+getitemname(.@Items[0])+"^000000.";
mes "May it serve you well.";
for(set .@i,1; .@i<getarraysize(.@Items); set .@i,.@i+2)
delitem .@Items[.@i], .@Items[.@i+1];
//second check if the player tries to bypass the first
for(set .@i,1; .@i<getarraysize(.@Items); set .@i,.@i+2) {
set .@amount,.@Items[.@i+1];
set .@id,.@Items[.@i];
if (countitem(.@id) < .@amount)
close;
}
// Delete the items _after_ the second check
for(set .@i,1; .@i<getarraysize(.@Items); set .@i,.@i+2) {
set .@amount,.@Items[.@i+1];
set .@id,.@Items[.@i];
delitem .@id, .@amount;
}
getitem .@Items[0],1;
close;
}

0 comments on commit 5d52871

Please sign in to comment.