Initial Release of Guild Daily Mission (#1582)

* Implemented Guild Daily Mission
Thanks to @cydh, @Atemo, and @Lemongrass3110 for their help!
This commit is contained in:
Jittapan Pluemsumran 2017-01-24 22:47:20 +07:00 committed by Aleos
parent 09cbf2dfa6
commit 14b381dcc7
6 changed files with 979 additions and 0 deletions

View File

@ -1385,6 +1385,58 @@
7515,14400,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"30 Paychecks"
7516,1200,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"A break for Commercial Development"
// Guild Occupy Quest
7517,3600,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"Occupy Valkyrie Realm"
7518,3600,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"Occupy Luina"
7519,3600,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"Occupy Britoniah"
7520,3600,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"Occupy Greenwood Lake"
7521,3600,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"Occupy Nidabehl"
7522,3600,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"Occupy Valfreyja"
7523,3600,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"Occupy Gloria"
7524,3600,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"Occupy Kafragaten"
// Guild Dungeon Daily Quest
7525,0,1300,50,1293,50,0,0,0,0,0,0,0,0,0,0,0,"Valkyrie Realm Challenge 1"
7526,0,2284,30,2285,30,2286,30,0,0,0,0,0,0,0,0,0,"Valkyrie Realm Challenge 2"
7527,0,2249,1,2250,1,0,0,0,0,0,0,0,0,0,0,0,"Valkyrie Realm Challenge 3"
7528,0,1305,50,1303,50,0,0,0,0,0,0,0,0,0,0,0,"Luina Challenge 1"
7529,0,1294,40,2133,50,0,0,0,0,0,0,0,0,0,0,0,"Luina Challenge 2"
7530,0,2251,1,2252,1,0,0,0,0,0,0,0,0,0,0,0,"Luina Challenge 3"
7531,0,1298,50,1291,50,0,0,0,0,0,0,0,0,0,0,0,"Britoniah Challenge 1"
7532,0,2282,20,2283,20,2281,50,0,0,0,0,0,0,0,0,0,"Britoniah Challenge 2"
7533,0,2255,1,2256,1,0,0,0,0,0,0,0,0,0,0,0,"Britoniah Challenge 3"
7534,0,1311,50,1306,50,0,0,0,0,0,0,0,0,0,0,0,"Greenwood Lake Challenge 1"
7535,0,1290,45,1301,20,1309,25,0,0,0,0,0,0,0,0,0,"Greenwood Lake Challenge 2"
7536,0,2253,1,2254,1,0,0,0,0,0,0,0,0,0,0,0,"Greenwood Lake Challenge 3"
7537,0,1978,50,1979,50,0,0,0,0,0,0,0,0,0,0,0,"Nidabehl Challenge 1"
7538,0,1290,35,1301,35,0,0,0,0,0,0,0,0,0,0,0,"Nidabehl Challenge 2"
7539,0,1974,50,1975,30,0,0,0,0,0,0,0,0,0,0,0,"Valfreyja Challenge 1"
7540,0,1796,50,1797,20,0,0,0,0,0,0,0,0,0,0,0,"Valfreyja Challenge 2"
7541,0,2415,30,2416,30,2417,30,0,0,0,0,0,0,0,0,0,"Gloria Challenge 1"
7542,0,2419,30,2420,30,2418,30,0,0,0,0,0,0,0,0,0,"Gloria Challenge 2"
7543,72000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"Standby for Valkyrie Realm Challenge 1"
7544,72000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"Standby for Valkyrie Realm Challenge 2"
7545,72000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"Standby for Valkyrie Realm Challenge 3"
7546,72000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"Standby for Luina Challenge 1"
7547,72000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"Standby for Luina Challenge 2"
7548,72000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"Standby for Luina Challenge 3"
7549,72000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"Standby for Britoniah Challenge 1"
7550,72000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"Standby for Britoniah Challenge 2"
7551,72000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"Standby for Britoniah Challenge 3"
7552,72000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"Standby for Greenwood Lake Challenge 1"
7553,72000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"Standby for Greenwood Lake Challenge 2"
7554,72000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"Standby for Greenwood Lake Challenge 3"
7555,72000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"Standby for Nidabehl Challenge 1"
7556,72000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"Standby for Nidabehl Challenge 2"
7557,72000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"Standby for Valfreyja Challenge 1"
7558,72000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"Standby for Valfreyja Challenge 2"
7559,72000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"Standby for Gloria Challenge 1"
7560,72000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"Standby for Gloria Challenge 2"
7561,0,2421,30,2422,30,2423,30,0,0,0,0,0,0,0,0,0,"Kafragaten Challenge 1"
7562,0,2426,30,2427,30,2424,30,0,0,0,0,0,0,0,0,0,"Kafragaten Challenge 2"
7563,72000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"Standby for Kafragaten Challenge 1"
7564,72000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"Standby for Kafragaten Challenge 2"
//7619,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,""
//7621,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,""
//7622,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,""

View File

@ -0,0 +1,434 @@
//===== rAthena Script =======================================
//= Guild Mission - Core Script
//===== Description: =========================================
//= Template for guild mission added in episode 14.3
//===== Changelogs: ==========================================
//= [Official Conversion]
//= 1.0 First version [Secretdataz]
//= 1.1 Fixed potential exploit from original Aegis script. [Secretdataz]
//============================================================
- script gld_mission#core -1,{
function brief;
function mob_brief;
function calcexp;
function calcjobexp;
if (!checkweight(1201,3)){
mes "You have too many items to proceed with the quest.";
mes "Please lighten your load and try again.";
close;
}
.@zone$ = strnpcinfo(2);
if(.@zone$ == "gqaldeg"){
.@zoneid = 3;
.@edition = 1;
} else if(.@zone$ == "gqaru"){
.@zoneid = 4;
.@edition = 2;
} else if(.@zone$ == "gqgefg"){
.@zoneid = 2;
.@edition = 1;
} else if(.@zone$ == "gqpayg"){
.@zoneid = 1;
.@edition = 1;
} else if(.@zone$ == "gqprtg"){
.@zoneid = 0;
.@edition = 1;
} else if(.@zone$ == "gqsch"){
.@zoneid = 5;
.@edition = 2;
} else if(.@zone$ == "gqtealde"){
.@zoneid = 6;
.@edition = 3;
} else if(.@zone$ == "gqteprt"){
.@zoneid = 7;
.@edition = 3;
} else {
// Custom error message.
debugmes "Guild mission script called from an unknown agit region [" + .@zone$ + "].";
end;
}
.@npcname$ = .npcname$[.@zoneid];
mes .@npcname$;
mes "We provide missions and daily quests that you can complete in the region of " + .region$[.@zoneid] + ".";
mes "There are simple daily quests as well as missions that you have to complete within the siege hours only. So, think about it~";
next;
switch(select("Conquering " + .region$[.@zoneid], "Guild Dungeon Daily Quests", "About quests", "I don't need it.")){
case 1: // Conquering.
.@gid = getcharid(2);
if(.@gid && getguildmaster(.@gid) == strcharinfo(0)){
.@time_check1 = checkquest(.conquer_delay_questid[.@zoneid], PLAYTIME);
if(.@time_check1 == 0){
mes .@npcname$;
mes "It's been less than an hour since the last time we've checked!";
mes "Come back when the waiting time is over.";
next;
mes .@npcname$;
mes "If you have luck on your side, you'll have good results.";
close;
} else if(.@time_check1 == 2){
erasequest .conquer_delay_questid[.@zoneid];
mes .@npcname$;
mes "I have confirmed that the waiting time for conquering missions has ended.";
mes "I'll delete unnecessary records for you.";
close;
} else {
.@siege_check = (.@edition == 1 ? agitcheck() : .@edition == 2 ? agitcheck2() : agitcheck3());
.@time = atoi(gettimestr("%H%M",4));
.@after_time = ((.weekday[.@zoneid] == gettime(4)) && ((.@time > .start_time[.@zoneid]) && (.@time < .end_time[.@zoneid])));
if(.@siege_check && .@after_time){
mes .@npcname$;
mes "According to ^4d4dffthe number of fortresses that your guild has conquered at this very moment,^000000 I'll give you a reward.";
mes "Do you want to check right now? You're aware that ^4d4dffthe number can change even as we speak,^000000 right?";
next;
if(select("I'll come back later.","Let's check right now!") == 1){
mes .@npcname$;
mes "Right. Life is all about timing.";
mes "Come back when it's shining the most.";
close;
} else {
.@total = 0;
for(.@i = 0; .@i < 5; ++.@i){
.@total += (.@gid == getcastledata(.castle$[.@i+.@zoneid*5],1));
}
if(!.@total){
mes .@npcname$;
mes "Unfortunately, there is no fortress that your guild has conquered.";
mes "Try again!";
close;
} else {
mes .@npcname$;
if(.@total == 5)
mes "Incredible.";
else
mes "Currently, the total number of fortresses that your guild has conquered";
for(.@i = 0; .@i < 5; ++.@i){
mes getcastlename(.castle$[.@i+.@zoneid*5]) + (.@gid == getcastledata(.castle$[.@i+.@zoneid*5],1) ? ": ^4d4dffOccupied^000000" : "");
}
if(.@total == 5)
mes "Your guild has conquered " + .region$[.@zoneid] + "!";
else
mes "is " + .@total + "!";
next;
mes .@npcname$;
mes "I'll give you a reward accordingly. I hope you make good use of it.";
mes "You have an hour of waiting time until the next report. Keep that in mind and try again.";
setquest .conquer_delay_questid[.@zoneid];
getitem 6489,.@total;
getitem 6615,.@total;
getitem 12888,.@total;
close;
}
}
} else {
mes .@npcname$;
mes "I'm sorry but you can complete this mission only during the siege hours. I'm afraid I can't do anything here.";
close;
}
}
} else {
mes .@npcname$;
mes "I'm sorry but conquering missions are for guild masters only.";
mes "Members should try guild dungeon daily quests instead.";
close;
}
break;
case 2: // Daily Quests
mes .@npcname$;
mes "These are missions that you can complete in guild dungeons of " + .region$[.@zoneid] + " area.";
mes "You can cancel them if you want to. Feel free to challenge yourself.";
next;
.@cancel_index = (.@edition == 1 ? 3 : 2);
for(.@i = 0; .@i < 3; ++.@i){
if(.daily_hunting_questid[.@zoneid*3 + .@i])
.@menu$ = .@menu$ + .region$[.@zoneid] + " Mission " + (.@i+1) + (isbegin_quest(.daily_hunting_questid[.@zoneid*3 + .@i]) ? " ^4d4dffCheck the result^000000" : "") + ":";
}
.@sel = select(.@menu$) - 1;
.@index = .@zoneid*3 + .@sel;
if(.@sel == .@cancel_index){
mes .@npcname$;
mes "You don't need to rush since these missions take place in guild dungeons.";
mes "Feel free to give it a try whenever you want to.";
close;
}
if(BaseLevel < .level_req[.@index]){
mes .@npcname$;
mes "Hmm, unfortunately, this mission is limited to users with ^4d4dfflevel " + .level_req[.@index] + "^000000 or higher only.";
mes "Your level is not high enough.";
close;
}
.@hunting = checkquest(.daily_hunting_questid[.@index], HUNTING);
.@playtime = checkquest(.daily_delay_questid[.@index], PLAYTIME);
if(.@hunting > -1){
if(.@hunting == 2){
mes .@npcname$;
mes "Oh, you've done a good job.";
mes "It isn't much, but hopefully it will be helpful.";
setquest .daily_delay_questid[.@index];
erasequest .daily_hunting_questid[.@index];
getexp calcexp(.@zoneid,.@index),calcjobexp(.@edition);
getitem 6615,1;
} else {
mes .@npcname$;
mes "Hmm? It seems like you haven't completed the mission yet…";
mes "Is there any problem?";
next;
if(select("No.","Give up the quest.") == 1){
mes .@npcname$;
mes "I'm not sure how long you can use the guild dungeon, but good luck.";
close;
} else {
mes .@npcname$;
mes "Well, no one's forcing you.";
mes "Do whatever you like to do.";
mes "I'll cancel the mission then.";
erasequest .daily_hunting_questid[.@index];
close;
}
}
} else {
if(.@playtime == 0 || .@playtime == 1){
mes .@npcname$;
mes "The rule is set here so that you're only allowed to complete one mission each day.";
mes "I would like you to come back when the waiting time is over.";
close;
} else if(.@playtime == 2){
erasequest .daily_delay_questid[.@index];
mes .@npcname$;
mes "I have confirmed that the waiting time for this mission is over.";
mes "I'll delete the records used for confirmation.";
mes "Now, give it a try to complete the quest!";
close;
} else {
mes .@npcname$;
mes "This is the " + .ordinal$[.@sel] + " mission in " + .region$[.@zoneid] + ".";
brief(.daily_hunting_questid[.@index]);
next;
mes .@npcname$;
if(mob_brief(.daily_hunting_questid[.@index]))
mes "I'll reward you accordingly upon completing this mission.";
else
mes "I'll give you experience points in return.";
next;
if(select("Accept it.","Reject it.") == 1){
mes .@npcname$;
mes "Entrance to the guild dungeon is restricted. But it's not like you can't find a way to go there, either.";
mes "I'll pray for your success in fighting those monsters.";
setquest .daily_hunting_questid[.@index];
close;
} else {
mes .@npcname$;
mes "Well, do as you wish.";
close;
}
}
}
break;
case 3: // About quests
mes .@npcname$;
mes "It's not difficult at all.";
mes "I give a reward ^4d4dffdepending on how many fortresses you have conquered.^000000";
mes "^4d4dffThe type and quality of the reward depend on the number of conquered fortresses at the very moment I check.^000000";
next;
mes .@npcname$;
mes "And of course, I check during the siege hours only.";
mes "^4d4dffReceiving a reward is followed by an hour of waiting time. So you'd better figure out the right timing as well.^000000";
next;
mes .@npcname$;
mes "If you are a master of a guild that is currently participating in siege battles, you should give it a try.";
next;
mes .@npcname$;
mes "Guild dungeon daily quests consist of combat quests that you can complete in guild dungeons.";
mes "It's simple.";
close;
case 4: // I don't need it.
mes .@npcname$;
mes "You're really something else~!";
close;
}
end;
OnInit:
setarray .castle$[0],
"prtg_cas01","prtg_cas02","prtg_cas03","prtg_cas04","prtg_cas05",
"payg_cas01","payg_cas02","payg_cas03","payg_cas04","payg_cas05",
"gefg_cas01","gefg_cas02","gefg_cas03","gefg_cas04","gefg_cas05",
"aldeg_cas01","aldeg_cas02","aldeg_cas03","aldeg_cas04","aldeg_cas05",
"arug_cas01","arug_cas02","arug_cas03","arug_cas04","arug_cas05",
"schg_cas01","schg_cas02","schg_cas03","schg_cas04","schg_cas05",
"te_aldecas1","te_aldecas2","te_aldecas3","te_aldecas4","te_aldecas5",
"te_prtcas01","te_prtcas02","te_prtcas03","te_prtcas04","te_prtcas05";
setarray .npcname$[0],
"[Altir]","[Alshine]","[Denev]","[Tarazed]","[Mirah]","[Almark]","[Becrux]","[Acrux]";
setarray .region$[0],
"Valkyrie Realm","Greenwood Lake","Britoria","Luina","Valfreyja","Nidhoggur","Kafragarten","Gloria";
setarray .weekday[0], // Day of the week. 0 = Sunday, 6 = Saturday.
0,0,0,0,0,0,6,6;
setarray .start_time[0],
2200,2200,2200,2200,2200,2200,2200,2200;
setarray .end_time[0],
2230,2230,2230,2230,2230,2230,2230,2230;
setarray .conquer_delay_questid[0], // Quest ID for cooldowns
7517,7520,7519,7518,7522,7521,7524,7523;
setarray .level_req[0], // Level requirement for quests. There are 2-3 quests per region
100,120,120, //prt
100,120,120, //pay
100,120,120, //gef
100,120,120, //alde
90,90,0, //aru
90,90,0, //sch
70,70,0, //tealde
70,70,0; //teprt
setarray .max_level[0], // Exp increase cap for quests. 0 for unlimited/not exist
130,140,0, //prt
130,140,0, //pay
130,140,0, //gef
130,140,0, //alde
120,120,0, //aru
120,120,0, //sch
99,99,0, //tealde
99,99,0; //teprt
setarray .daily_hunting_questid[0], //Quest ID for daily quests.
7525,7526,7527, //prt
7534,7535,7536, //pay
7531,7532,7533, //gef
7528,7529,7530, //alde
7539,7540,0, //aru
7537,7538,0, //sch
7561,7562,0, //tealde
7541,7542,0; //teprt
setarray .daily_delay_questid[0], //Quest ID for mob hunting check.
7543,7544,7545, //prt
7552,7553,7554, //pay
7549,7550,7551, //gef
7546,7547,7548, //alde
7557,7558,0, //aru
7555,7556,0, //sch
7563,7564,0, //tealde
7559,7560,0; //teprt
setarray .ordinal$[0],"first","second","third";
end;
function brief {
switch(getarg(0)){
case 7527:
case 7530:
case 7533:
case 7536:
mes "It is to deal with the powerful creatures that appear in the Corridor of the Abyss.";
break;
default:
mes "It is to eliminate the monsters that appear in the guild dungeon.";
break;
}
return;
}
function mob_brief {
switch(getarg(0)){
case 7525:
mes "You should hunt 50 or more Caterpillars and Creamy Fear monsters..";
break;
case 7526:
mes "Hunt down 30 or more of all 3 types of Abyss Kobolds.";
break;
case 7527:
mes "^4d4dffYou should kill furious 'Pyuriel' and warrior 'Lora'.^000000";
return 1;
case 7528:
mes "^4d4dffHunt 50 or more of Giant Hornets and Ancient Worms, respectively.^000000";
break;
case 7529:
mes "^4d4dffHunt 40 or more of Killer Mantises and 50 or more of Angra Mantises.^000000";
break;
case 7530:
mes "They are ^4d4dff'Elvira' and 'Gioia,' which is a strange mechanical creature of heroes' tears.^000000";
return 1;
case 7531:
mes "^4d4dffHunt 50 or more Zombie Masters and Wraith Deads, respectively.^000000";
break;
case 7532:
mes "^4d4dffHunt 50 GLD_DARK_SHADOW, 20 GLD_DARK_FRAME, and 20 GLD_DARK_PRIEST monsters.^000000";
break;
case 7533:
mes "They are ^4d4dff'Kades' and 'Rudo' who wander around the dead's hill.^000000";
return 1;
case 7534:
mes "^4d4dffHunt 50 or more Gullinbursti and Leib Olmai, respectively.^000000";
break;
case 7535:
mes "^4d4dffHunt 45 or more Skeleton General, 20 or more Am Mut and 25 or more Gajomart, respectively.^000000";
break;
case 7536:
mes "^4d4dffThey are Old Empire's General 'Daehyon' and Guard 'Soheon'.^000000";
return 1;
case 7537:
mes "^4d4dffHunt 50 or more Hell Apocalypse and Zakudam, respectively.^000000";
break;
case 7538:
mes "^4d4dffHunt 35 or more Heavy Metaling and Cobalt Mineral, respectively.^000000";
break;
case 7539:
mes "^4d4dffHunt more than 50 Banshee Masters and 30 Beholder Masters.^000000";
break;
case 7540:
mes "^4d4dffHunt 50 Aunoes, and 20 Fanats.^000000";
break;
case 7541:
mes "^4d4dffHunt 30 or more Knight, Blacksmith, Assassin, respectively.^000000";
break;
case 7542:
mes "^4d4dffHunt 30 or more Wizard, Priest, Hunter respectively.^000000";
break;
case 7561:
mes "^4d4dffHunt 30 or more, Crusader, Rogue, Alchemist, respectively.^000000";
break;
case 7562:
mes "^4d4dffHunt 30 or more Sage, Monk, Bard, respectively.^000000";
break;
}
return 0;
}
function calcexp {
.@zoneid = getarg(0);
.@index = getarg(1);
.@maxlevel = .max_level[.@index];
.@isboss = (.@zoneid < 4 && !((.@index+1)%3));
if(!.@isboss && BaseLevel > .@maxlevel){
return 1000 * (100 + ((.@maxlevel - 100) * 3));
} else {
return 1000 * (100 + ((BaseLevel - 100) * 3)) * (1 + .@isboss);
}
}
function calcjobexp {
.@edition = getarg(0);
if(.@edition == 3){
if(jobcanentermap("te_prtcas01")){
if (JobLevel > 50)
return 1000 * (50 + ((JobLevel - 50) * 3));
else
return 5000;
} else {
debugmes "Unexpected case for Job: " + Class + "(" + jobname(Class) + ") for gld_mission#core::calcjobexp";
return 0;
}
} else if(.@edition == 2 ) {
if(JobLevel > 50)
return 1000 * (50 + ((JobLevel - 50) * 3));
else
return 3000;
} else {
return 5000 * JobLevel;
}
return 0;
}
}

View File

@ -0,0 +1,19 @@
//===== rAthena Script =======================================
//= Guild Mission - NPC Duplicates
//===== Description: =========================================
//= Mission NPCs for Guild Mission added in episode 14.3
//===== Changelogs: ==========================================
//= [Official Conversion]
//= 1.0 First version [Secretdataz]
//============================================================
alde_gld,176,163,5 duplicate(gld_mission#core) Luina Training Instructor#gqaldeg 4_M_HUMAN_02
gef_fild13,197,242,3 duplicate(gld_mission#core) Britoria Training Instructor#gqgefg 4_M_HUMAN_02
pay_gld,198,178,5 duplicate(gld_mission#core) Greenwood Lake Training Instructor#gqpayg 4_M_HUMAN_02
prt_gld,125,149,3 duplicate(gld_mission#core) Valkyrie Realm Training Instructor#gqprtg 4_M_HUMAN_02
aru_gld,96,203,3 duplicate(gld_mission#core) Valfreyja Training Instructor#gqaru 4_M_HUMAN_02
sch_gld,270,117,3 duplicate(gld_mission#core) Nidhoggur Training Instructor#gqsch 4_M_HUMAN_02
te_alde_gld,189,159,3 duplicate(gld_mission#core) Kafragarten Training Instructor#gqtealde 4_M_HUMAN_02
te_prt_gld,112,150,5 duplicate(gld_mission#core) Gloria Training Instructor#gqteprt 4_M_HUMAN_02

View File

@ -0,0 +1,469 @@
//===== rAthena Script =======================================
//= Guild Dungeon Daily Quest Coin Exchange
//===== Description: =========================================
//= [Official Conversion]
//= NPCs reward from Guild Dungeon's Daily Missions.
//===== Changelogs: ==========================================
//= 1.0 First Version. [Cydh]
//= 1.1 Minified the script. [Secretdataz]
//= 1.2 Script cleanup. [aleos]
//= 1.3 Minified Kvasir's ring part. [Lemongrass]
//============================================================
// Templates
- script #GldDungeonReward -1,{
if (checkweight(1304,3) == 0) {
mes "You have too many items to proceed with the quest.";
mes "Please lighten your load and try again.";
close;
}
mes "It's a machine that exchanges Commemorative Siege Guild Coins for special items.";
mes "Select the desired item and insert as many coins as necessary.";
next;
while(1) {
switch(select("View exchangeable items","Trade for Investment Certificates","Trade for Good Medicines","Trade for Gifts","Kvasir's Ring","Leave")) {
case 1:
mes "[ClickClick MeowMeow-GX]";
mes "Thank you for choosing ClickClick MeowMeow!";
mes "Here is a list of items you can purchase with Commemorative Siege Guild Coins.";
next;
mes "= Blood of Frost Giant =";
mes "New medicine developed by the joint effort of Alchemy Union of 3 countries. Gives the user supernatural powers for a short period of time.";
mes "^4d4dffDrains 3000 HP, but increases physical and magical damage to the user's counterpart players by 100% for 10 seconds.";
mes "Required Level: 80 or higher^000000";
next;
mes "= Core of Golem =";
mes "New medicine developed by the joint effort of Alchemy Union of 3 countries. Gives the user supernatural powers for a short period of time.";
mes "^4d4dffDrains 300 SP, but decreases the damage taken from the user's counterpart players by 50% for 10 seconds.";
mes "Required Level: 80 or higher^000000";
next;
setarray .@status$, "Stun", "Petrify", "Frozen", "Sleep", "Curse", "Silence", "Blind";
.@size = getarraysize(.@status$);
for(.@i = 0; .@i < .@size; ++.@i) {
mes "= Fairy's Tear (" + .@status$[.@i] + ") =";
mes "A potion developed by Vicent, a pharmaceutical genius. Gives the user supernatural powers for a short period of time.";
mes "^4d4dffDrains 3000 HP, but allows the user to become immune to " + (.@i == 1 ? "Petrification" : .@status$[.@i]) + " status for 10 seconds.^000000";
next;
}
mes "= Feather Beret[1] =";
mes "A comfortable, sky blue-colored hat decorated with feathers.";
mes "^4d4dffMDEF + 1, Decreases the damage taken from the user's counterpart players by 10%.";
mes "Card Slot [1], available to all job classes except for Novices.";
next;
mes "= Feather Beret Costume =";
mes "A comfortable, sky blue-colored hat decorated with feathers.";
mes "^4d4dffCostume Equipment, available to all job classes.^000000";
next;
mes "This is the end of the list.";
break;
case 2:
mes "[ClickClick MeowMeow-GX]";
mes "We exchange the ^4d4dff1Investment Certificate^000000 of Cat's Paw Merchant Group for ^4d4dff10Commemorative Coins!^000000";
mes "Do you want to exchange?";
next;
switch(select("Yes.","View other items.")) {
case 1:
mes "[ClickClick MeowMeow-GX]";
if (countitem(6615) > 9) {
mes "Thank you for using our service, meow!";
delitem 6615,10; // Siege_Guild_Coin
getitem 6489,1; // Cats_Invest_Certif
} else {
mes "You don't have enough coins for Investment Certificates.";
mes "1 Investment Certificate is worth 10 coins.";
}
break;
case 2:
mes "[ClickClick MeowMeow-GX]";
mes "You've decided to view other items.";
break;
}
break;
case 3:
mes "[ClickClick MeowMeow-GX]";
mes "You have selected a list of good medicines!";
mes "All items listed below are worth ^4d4dff300 coins each^000000, meow!";
next;
switch(select("Blood of Frost Giants", "Core of Golem", "Fairy's Tear (Stun)", "Fairy's Tear (Frozen)", "Fairy's Tear (Sleep)", "Fairy's Tear (Curse)", "Fairy's Tear (Petrify)", "Fairy's Tear (Silence)", "Fairy's Tear (Blind)", "View other items.")) {
case 1:
callsub S_PurchaseMedicine, "Blood of Frost Giant", 12874;
break;
case 2:
callsub S_PurchaseMedicine, "Core of Golem", 12875;
break;
case 3:
callsub S_PurchaseMedicine, "Fairy's Tear(Stun)", 12876;
break;
case 4:
callsub S_PurchaseMedicine, "Fairy's Tear(Frozen)", 12878;
break;
case 5:
callsub S_PurchaseMedicine, "Fairy's Tear(Sleep)", 12879;
break;
case 6:
callsub S_PurchaseMedicine, "Fairy's Tear(Curse)", 12880;
break;
case 7:
callsub S_PurchaseMedicine, "Fairy's Tear(Petrify)", 12877;
break;
case 8:
callsub S_PurchaseMedicine, "Fairy's Tear(Silence)", 12881;
break;
case 9:
callsub S_PurchaseMedicine, "Fairy's Tear(Blind)", 12882;
break;
case 10:
mes "You've decided to view other items.";
break;
}
break;
case 4:
mes "[ClickClick MeowMeow-GX]";
mes "You have selected a list of good gifts!";
mes "The price for each item is listed separately, meow!";
next;
switch(select("Old Card Album -500 Coins", "Old Purple Box -300 Coins", "Old Blue Box -100 Coins", "Jewelry Box -500 Coins", "Wrapped Mask -500 Coins", "Feather Beret","Leave")) {
case 1:
callsub S_PurchaseGift, "Old Card Album", 616, 500;
break;
case 2:
callsub S_PurchaseGift, "Old Purple box", 617, 300;
break;
case 3:
callsub S_PurchaseGift, "Old Blue Box", 603, 100;
break;
case 4:
callsub S_PurchaseGift, "Jewelry Box", 12106, 500;
break;
case 5:
callsub S_PurchaseGift, "Wrapped Mask", 12107, 500;
break;
case 6:
mes "[ClickClick MeowMeow-GX]";
mes "You have selected a nice beret decorated with feathers!";
mes "We have Feather Berets and Feather Beret Costumes to which you can install cards, meow!";
next;
switch(select("Feather Beret[1] -1500 Coins","Feather Beret Costume -800 Coins","Purchase a Beret","View other items.")) {
case 1:
mes "[ClickClick MeowMeow-GX]";
mes "It's a feather beret to which you can install cards!";
mes "It is worth 1500 Commemorative Coins. Do you want to purchase it?";
next;
switch(select("Yes!","No!")) {
case 1:
mes "[ClickClick MeowMeow-GX]";
if (countitem(6615) > 1499) {
mes "Thank you for using our service, meow!";
delitem 6615,1500; // Siege_Guild_Coin
getitem 18755,1; // Feather_Beret_
} else {
mes "You need 1500 Commemorative Coins in order to purchase the selected item.";
mes "You've decided to view other items.";
}
break;
case 2:
mes "[ClickClick MeowMeow-GX]";
mes "You've decided to view other items.";
break;
}
break;
case 2:
mes "[ClickClick MeowMeow-GX]";
mes "It's a feather beret costume!";
mes "It is worth 800 Commemorative Coins. Do you want to purchase it?";
next;
switch(select("Yes!","No!")) {
case 1:
mes "[ClickClick MeowMeow-GX]";
if (countitem(6615) > 799) {
mes "Thank you for using our service, meow!";
delitem 6615,800; // Siege_Guild_Coin
getitem 19585,1; // C_Feather_Beret
} else {
mes "You need 800 Commemorative Coins in order to purchase the selected item.";
mes "You've decided to view other items.";
}
break;
case 2:
mes "[ClickClick MeowMeow-GX]";
mes "You've decided to view other items.";
break;
}
break;
case 3:
mes "[ClickClick MeowMeow-GX]";
mes "The preparations for changing the color of feather beret costumes are under way.";
mes "Please come back later!";
mes "Let me show you other items!";
break;
case 4:
mes "[ClickClick MeowMeow-GX]";
mes "You've decided to view other items.";
break;
}
break;
case 7:
mes "[ClickClick MeowMeow-GX]";
mes "Do not use the exchange machine.";
break;
}
break;
case 5:
mes "[ClickClick MeowMeow-GX]";
mes "This is the category of Kvasir's Rings.";
mes "You can view the description for each ring and purchase one here.";
next;
switch(select("Trade for Kvasir's Ring (Blue)", "Trade for Kvasir's Ring (Red)", "Trade for Kvasir's Ring (Green)", "Trade for Kvasir's Ring (Brown)", "Leave")) {
case 1:
mes "= Kvasir's Ring (Blue) =";
mes "A ring that is rumored to be filled with the power of Kvasir, a sage god. ";
mes "^4d4dffMSP + 30. 'Snow Flip' 1Lv available^000000";
mes "Accessory. Available to all job classes. Required Level: 1";
next;
mes "[ClickClick MeowMeow-GX]";
mes "Kvasir's Ring (Blue) can be purchased with ^4d4dff20Blood of Frost Giant and 20 Core of Golem^000000";
mes "or ^4d4dff1Kvasir's Ring in different color and 10 Commemorative Coins!^000000";
mes "Do you want to purchase it?";
next;
switch(select("Pay with Blood and Core","Pay with Kvasir's Ring (Red)","Pay with Kvasir's Ring (Green)","Pay with Kvasir's Ring (Brown)","Leave")) {
case 1:
mes "[ClickClick MeowMeow-GX]";
if ((countitem(12874) > 19) & (countitem(12875) > 19)) {
mes "Kvasir's Ring (Blue) has been purchased.";
delitem 12874,20; // Frost_Giant_Blood
delitem 12875,20; // Golem_Stone
getitem 2951,1; // Kvasir_Ring_Blue
} else {
mes "Looks like Kvasir's Ring (Blue) can be purchased with ^4d4dff20Blood of Frost Giant and 20 Core of Golem.^000000";
mes "You don't have enough items to complete the purchase. View other items.";
}
break;
case 2:
callsub S_Kvasir, "Kvasir's Ring (Red)", 2952, "Kvasir's Ring (Blue)", 2951;
break;
case 3:
callsub S_Kvasir, "Kvasir's Ring (Green)", 2953, "Kvasir's Ring (Blue)", 2951;
break;
case 4:
callsub S_Kvasir, "Kvasir's Ring (Brown)", 2954, "Kvasir's Ring (Blue)", 2951;
break;
case 5:
mes "[ClickClick MeowMeow-GX]";
mes "You've decided to view other items.";
break;
}
break;
case 2:
mes "= Kvasir's Ring (Red) =";
mes "A ring that is rumored to be filled with the power of Kvasir, a sage god. ";
mes "^4d4dffMSP + 30. 'Peony Mamy' 1Lv available^000000";
mes "Accessory. Available to all job classes. Required Level: 1";
next;
mes "[ClickClick MeowMeow-GX]";
mes "Kvasir's Ring (Red) can be purchased with ^4d4dff1Kvasir's Ring and 10 Commemorative Coins.^000000";
mes "Which of the followings do you want to trade for Kvasir's Ring (Red)?";
next;
switch(select("Kvasir's Ring (Blue)","Kvasir's Ring (Green)","Kvasir's Ring (Brown)","Leave")) {
case 1:
callsub S_Kvasir, "Kvasir's Ring (Blue)", 2951, "Kvasir's Ring (Red)", 2952;
break;
case 2:
callsub S_Kvasir, "Kvasir's Ring (Green)", 2953, "Kvasir's Ring (Red)", 2952;
break;
case 3:
callsub S_Kvasir, "Kvasir's Ring (Brown)", 2954, "Kvasir's Ring (Red)", 2952;
break;
case 4:
mes "[ClickClick MeowMeow-GX]";
mes "You've decided to view other items.";
break;
}
break;
case 3:
mes "= Kvasir's Ring (Green) =";
mes "A ring that is rumored to be filled with the power of Kvasir, a sage god. ";
mes "^4d4dffMSP + 100. 'Sada Ear' 1Lv available^000000";
mes "Accessory. Available to all job classes. Required Level: 1";
next;
mes "[ClickClick MeowMeow-GX]";
mes "Kvasir's Ring (Green) can be purchased with ^4d4dff1Kvasir's Ring and 10 Commemorative Coins.^000000";
mes "Which of the followings do you want to trade for Kvasir's Ring (Red)?";
next;
switch(select("Kvasir's Ring (Blue)","Kvasir's Ring (Red)","Kvasir's Ring (Brown)","Leave")) {
case 1:
callsub S_Kvasir, "Kvasir's Ring (Blue)", 2951, "Kvasir's Ring (Green)", 2953;
break;
case 2:
callsub S_Kvasir, "Kvasir's Ring (Red)", 2952, "Kvasir's Ring (Green)", 2953;
break;
case 3:
callsub S_Kvasir, "Kvasir's Ring (Brown)", 2954, "Kvasir's Ring (Green)", 2953;
break;
case 4:
mes "[ClickClick MeowMeow-GX]";
mes "You've decided to view other items.";
break;
}
break;
case 4:
mes "= Kvasir Ring Brown =";
mes "A ring that is rumored to be filled with the power of Kvasir, a sage god. ";
mes "^4d4dffMSP + 100. 'Dust of Galaxy' 1Lv available^000000";
mes "Accessory. Available to all job classes. Required Level: 1";
next;
mes "[ClickClick MeowMeow-GX]";
mes "Kvasir's Ring (Brown) can be purchased with ^4d4dff1Kvasir's Ring and 10 Commemorative Coins.^000000";
mes "Which of the followings do you want to trade for Kvasir's Ring (Red)?";
next;
switch(select("Kvasir's Ring (Blue)","Kvasir's Ring (Red)","Kvasir's Ring (Green)","Leave")) {
case 1:
callsub S_Kvasir, "Kvasir's Ring (Blue)", 2951, "Kvasir's Ring (Brown)", 2954;
break;
case 2:
callsub S_Kvasir, "Kvasir's Ring (Red)", 2952, "Kvasir's Ring (Brown)", 2954;
break;
case 3:
callsub S_Kvasir, "Kvasir's Ring (Green)", 2953, "Kvasir's Ring (Brown)", 2954;
break;
case 4:
mes "[ClickClick MeowMeow-GX]";
mes "You've decided to view other items.";
break;
}
break;
case 5:
mes "[ClickClick MeowMeow-GX]";
mes "You've decided to view other items.";
break;
}
break;
case 6:
mes "[ClickClick MeowMeow-GX]";
mes "Do not use the exchange machine.";
break;
}
}
close;
S_PurchaseMedicine:
mes "[ClickClick MeowMeow-GX]";
mes "You're purchasing 1 " + getarg(0) + ", meow!";
mes "Are you sure?";
next;
switch(select("Yes!","No!")) {
case 1:
mes "[ClickClick MeowMeow-GX]";
if (countitem(6615) > 299) {
mes "Thank you for using our service, meow!";
delitem 6615,300; // Siege_Guild_Coin
getitem getarg(1),1;
} else
mes "One good medicine is worth 300 commemorative coins that you've raked and scraped...";
break;
case 2:
mes "[ClickClick MeowMeow-GX]";
mes "You've decided to view other items.";
break;
}
return;
S_PurchaseGift:
.@itemid = getarg(1);
.@price = getarg(2);
mes "[ClickClick MeowMeow-GX]";
mes "You're purchasing 1 " + getarg(0) + ", meow!";
mes "Are you sure?";
next;
switch(select("Yes!","No!")) {
case 1:
mes "[ClickClick MeowMeow-GX]";
if (countitem(6615) >= .@price) {
mes "Thank you for using our service, meow!";
delitem 6615,.@price; // Siege_Guild_Coin
getitem .@itemid,1;
} else {
mes "You need " + .@price + " Commemorative Coins in order to purchase the selected item.";
mes "You've decided to view other items.";
}
break;
case 2:
mes "[ClickClick MeowMeow-GX]";
mes "You've decided to view other items.";
break;
}
return;
S_Kvasir:
.@fromid = getarg(1);
.@fromname$ = getarg(2);
.@toid = getarg(3);
.@toname$ = getarg(4);
mes "[ClickClick MeowMeow-GX]";
// One of Kvasir's Rings and 10 Siege_Guild_Coin
if( countitem( .@fromid ) > 0 && countitem( 6615 ) > 9 ){
mes "You have " + .@fromname$ + ".";
mes "Do you want to trade this in for " + .@toname$ + "?";
next;
mes "[ClickClick MeowMeow-GX]";
switch( select( "Yes!:Leave" ) ){
case 1:
// Recheck the items once more
if( countitem( .@fromid ) > 0 && countitem( 6615 ) > 9 ){
mes "You have traded " + .@fromname$ + " for " + .@toname$ + ".";
delitem .@fromid, 1;
delitem 6615, 10; // Siege_Guild_Coin
getitem .@toid, 1;
close;
}
break;
case 2:
mes "You've decided to view other items.";
return;
}
}
mes "You need 1 " + .@fromname$ + " and 10 Commemorative Coins in order to complete the purchase.";
return;
}
// Main NPCs
alde_gld,180,163,3 duplicate(#GldDungeonReward) ClickClick MeowMeow-GX#1 2_VENDING_MACHINE1
pay_gld,196,176,5 duplicate(#GldDungeonReward) ClickClick MeowMeow-GX#2 2_VENDING_MACHINE1
gef_fild13,198,246,3 duplicate(#GldDungeonReward) ClickClick MeowMeow-GX#3 2_VENDING_MACHINE1
sch_gld,266,119,5 duplicate(#GldDungeonReward) ClickClick MeowMeow-GX#4 2_VENDING_MACHINE1
aru_gld,89,204,5 duplicate(#GldDungeonReward) ClickClick MeowMeow-GX#5 2_VENDING_MACHINE1
prt_gld,107,155,3 duplicate(#GldDungeonReward) ClickClick MeowMeow-GX#6 2_VENDING_MACHINE1
te_prt_gld,107,155,3 duplicate(#GldDungeonReward) ClickClick MeowMeow-GX#7 2_VENDING_MACHINE1
te_alde_gld,180,163,3 duplicate(#GldDungeonReward) ClickClick MeowMeow-GX#8 2_VENDING_MACHINE1

View File

@ -84,6 +84,7 @@ npc: npc/re/merchants/enchan_ko.txt
npc: npc/re/merchants/enchan_mal.txt
npc: npc/re/merchants/enchan_mora.txt
npc: npc/re/merchants/flute.txt
npc: npc/re/merchants/gld_mission_exchange.txt
npc: npc/re/merchants/hd_refiner.txt
npc: npc/re/merchants/HorrorToyFactory_merchants.txt
npc: npc/re/merchants/inn.txt

View File

@ -19,3 +19,7 @@ npc: npc/re/guild3/te_prtcas02.txt
npc: npc/re/guild3/te_prtcas03.txt
npc: npc/re/guild3/te_prtcas04.txt
npc: npc/re/guild3/te_prtcas05.txt
// - Guild Mission
npc: npc/re/guild/mission_main.txt
npc: npc/re/guild/mission_npc.txt