summaryrefslogtreecommitdiff
path: root/npc/custom/quests
diff options
context:
space:
mode:
authorbrianluau <brianluau@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-07-30 07:32:24 +0000
committerbrianluau <brianluau@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-07-30 07:32:24 +0000
commitd5b0b8a2d33541d03f6ede756b1dc7948aecd39e (patch)
tree0b4a26fb5f27da3c0c9f1e780f966699c5438a24 /npc/custom/quests
parentff2362c56f938be3004ecbc6debffc37a46e4eed (diff)
downloadhercules-d5b0b8a2d33541d03f6ede756b1dc7948aecd39e.tar.gz
hercules-d5b0b8a2d33541d03f6ede756b1dc7948aecd39e.tar.bz2
hercules-d5b0b8a2d33541d03f6ede756b1dc7948aecd39e.tar.xz
hercules-d5b0b8a2d33541d03f6ede756b1dc7948aecd39e.zip
- Added svn:eol-style=native property on some recently added text files.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16534 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'npc/custom/quests')
-rw-r--r--npc/custom/quests/quest_shop.txt296
-rw-r--r--npc/custom/quests/questboard.txt648
2 files changed, 472 insertions, 472 deletions
diff --git a/npc/custom/quests/quest_shop.txt b/npc/custom/quests/quest_shop.txt
index fd58e49a4..ad7b44ea9 100644
--- a/npc/custom/quests/quest_shop.txt
+++ b/npc/custom/quests/quest_shop.txt
@@ -1,148 +1,148 @@
-//===== rAthena Script =======================================
-//= Euphy's Quest Shop
-//===== By: ==================================================
-//= Euphy
-//===== Current Version: =====================================
-//= 1.4a
-//===== Compatible With: =====================================
-//= rAthena SVN r15340+
-//===== Description: =========================================
-//= A dynamic quest shop based on Lunar's, with easier config.
-//= Includes support for multiple shops & cashpoints.
-//= Item Preview script by ToastOfDoom.
-//============================================================
-
-prontera,164,203,6 script Quest Shop 998,{
-function Add; function Chk; function Slot; function A_An;
-
- if(.Shops$ != "") set .@i,1;
- else {
- set .@menu$,"";
- for(set .@i,1; .@i<=getarraysize(.Shops$); set .@i,.@i+1)
- set .@menu$, .@menu$+.Shops$[.@i]+":";
- set .@i, select(.@menu$); }
- dispbottom "Select one item at a time.";
- callshop "qshop"+.@i,1;
- npcshopattach "qshop"+.@i;
- end;
-
-function Add {
- if (getitemname(getarg(1))=="null") {
- debugmes "Quest reward #"+getarg(1)+" invalid (skipped)."; return; }
- for(set .@n,5; .@n<127; set .@n,.@n+2) {
- if (!getarg(.@n,0)) break;
- if (getitemname(getarg(.@n))=="null") {
- debugmes "Quest requirement #"+getarg(.@n)+" invalid (skipped)."; return; } }
- for(set .@i,2; .@i<.@n; set .@i,.@i+1)
- set getd(".q_"+getarg(1)+"["+(.@i-2)+"]"), getarg(.@i);
- npcshopadditem "qshop"+getarg(0),getarg(1),((.ShowZeny)?getarg(3):0);
- return; }
-function Chk {
- if (getarg(0)<getarg(1)) { set @qe0,1; return "^FF0000"; }
- else return "^00FF00"; }
-function Slot {
- set .@s$,getitemname(getarg(0));
- switch(.ShowSlot){
- case 1: if (!getitemslots(getarg(0))) return .@s$;
- case 2: if (getiteminfo(getarg(0),11)>0) return .@s$+" ["+getitemslots(getarg(0))+"]";
- default: return .@s$; } }
-function A_An {
- setarray .@A$[0],"a","e","i","o","u";
- set .@B$, "_"+getarg(0);
- for(set .@i,0; .@i<5; set .@i,.@i+1)
- if (compare(.@B$,"_"+.@A$[.@i])) return "an "+getarg(0);
- return "a "+getarg(0); }
-
-OnBuyItem:
- set .@q[0],@bought_nameid;
- copyarray .@q[1],getd(".q_"+@bought_nameid+"[0]"),getarraysize(getd(".q_"+@bought_nameid+"[0]"));
- if (!.@q[1]) { message strcharinfo(0),"An error has occurred."; end; }
- mes "[Quest Shop]";
- mes "Reward: ^0055FF"+((.@q[1]>1)?.@q[1]+"x ":"")+Slot(.@q[0])+"^000000";
- mes "Requirements:";
- if (.@q[2]) mes " > "+Chk(Zeny,.@q[2])+.@q[2]+" Zeny^000000";
- if (.@q[3]) mes " > "+Chk(getd(.Points$[0]),.@q[3])+.@q[3]+" "+.Points$[1]+" ("+getd(.Points$[0])+"/"+.@q[3]+")^000000";
- if (.@q[4]) for(set .@i,4; .@i<getarraysize(.@q); set .@i,.@i+2)
- mes " > "+Chk(countitem(.@q[.@i]),.@q[.@i+1])+((.DisplayID)?"{"+.@q[.@i]+"} ":"")+Slot(.@q[.@i])+" ("+countitem(.@q[.@i])+"/"+.@q[.@i+1]+")^000000";
- next;
- set @qe1, getiteminfo(.@q[0],5); set @qe2, getiteminfo(.@q[0],11);
- addtimer 1000, strnpcinfo(1)+"::OnEnd";
- while(1){
- switch(select(" ~ Purchase ^0055FF"+getitemname(.@q[0])+"^000000:"+((((@qe1&1) || (@qe1&256) || (@qe1&512)) && @qe2>0 && !@qe6)?" ~ Preview...":"")+": ~ ^777777Cancel^000000")) {
- case 1:
- if (@qe0) {
- mes "[Quest Shop]";
- mes "You're missing one or more quest requirements.";
- close; }
- if (!checkweight(.@q[0],.@q[1])) {
- mes "[Quest Shop]";
- mes "^FF0000You need "+(((.@q[1]*getiteminfo(.@q[0],6))+Weight-MaxWeight)/10)+" additional weight capacity to complete this trade.^000000";
- close; }
- if (.@q[2]) set Zeny, Zeny-.@q[2];
- if (.@q[3]) setd .Points$[0], getd(.Points$[0])-.@q[3];
- if (.@q[4]) for(set .@i,4; .@i<getarraysize(.@q); set .@i,.@i+2)
- delitem .@q[.@i],.@q[.@i+1];
- getitem .@q[0],.@q[1];
- if (.Announce) announce strcharinfo(0)+" has created "+A_An(getitemname(.@q[0]))+"!",0;
- specialeffect2 699;
- close;
- case 2:
- set @qe3, getlook(3); set @qe4, getlook(4); set @qe5, getlook(5);
- if (@qe1&1) atcommand "@changelook 3 "+@qe2;
- if (@qe1&256) atcommand "@changelook 1 "+@qe2;
- if (@qe1&512) atcommand "@changelook 2 "+@qe2;
- set @qe6,1;
- break;
- case 3:
- close; } }
-OnEnd:
- if (@qe6) { atcommand "@changelook 3 "+@qe3; atcommand "@changelook 1 "+@qe4; atcommand "@changelook 2 "+@qe5; }
- for(set .@i,0; .@i<7; set .@i,.@i+1) setd "@qe"+.@i,0;
- end;
-OnInit:
- freeloop(1);
-// --------------------- Config ---------------------
-// Custom points, if needed: "<variable>","<name to display>"
- setarray .Points$[0],"#CASHPOINTS","Cash Points";
-
- set .Announce,1; // Announce quest completion? (1: yes / 0: no)
- set .ShowSlot,1; // Show item slots? (2: all equipment / 1: if slots > 0 / 0: never)
- set .DisplayID,0; // Show item IDs? (1: yes / 0: no)
- set .ShowZeny,0; // Show Zeny cost, if any? (1: yes / 0: no)
-
-// Shop categories, if needed: "<Shop 1>","<Shop 2>"{,...};
-// Duplicate dummy data for any additional shops (bottom of script).
-// If no categories, use the second line instead (remove //).
-
- setarray .Shops$[1],"Headgears","Weapons","Other";
- // set .Shops$,"n/a";
-
-// Add(<shop number>,<reward ID>,<reward amount>,<Zeny cost>,<point cost>,
-// <required item ID>,<required item amount>{,...});
-// Shop number corresponds with order above (default is 1).
-// Note: Do NOT use a reward item more than once!
-
- Add(1,5022,1,0,0,7086,1,969,10,999,40,1003,50,984,2);
- Add(1,5032,1,0,0,1059,250,2221,1,2227,1,7063,600);
- Add(1,5027,1,0,0,2252,1,1036,400,7001,50,4052,1);
- Add(1,5045,1,0,0,2252,1,1054,450,943,1200);
-
- Add(2,1224,1,0,0,7297,30,969,10,999,50,714,10);
- Add(2,1225,1,0,0,7292,30,969,10,999,50,714,10);
-
- Add(3,531,1,3,0,512,1,713,1);
- Add(3,532,1,3,0,513,1,713,1);
- Add(3,533,1,3,0,514,1,713,1);
- Add(3,534,1,3,0,515,1,713,1);
-
-// --------------------------------------------------
- freeloop(0);
- for(set .@i,1; .@i<=getarraysize(.Shops$); set .@i,.@i+1)
- npcshopdelitem "qshop"+.@i,909;
- end;
-}
-
-// -------- Dummy data (duplicate as needed) --------
-- shop qshop1 -1,909:-1
-- shop qshop2 -1,909:-1
-- shop qshop3 -1,909:-1 \ No newline at end of file
+//===== rAthena Script =======================================
+//= Euphy's Quest Shop
+//===== By: ==================================================
+//= Euphy
+//===== Current Version: =====================================
+//= 1.4a
+//===== Compatible With: =====================================
+//= rAthena SVN r15340+
+//===== Description: =========================================
+//= A dynamic quest shop based on Lunar's, with easier config.
+//= Includes support for multiple shops & cashpoints.
+//= Item Preview script by ToastOfDoom.
+//============================================================
+
+prontera,164,203,6 script Quest Shop 998,{
+function Add; function Chk; function Slot; function A_An;
+
+ if(.Shops$ != "") set .@i,1;
+ else {
+ set .@menu$,"";
+ for(set .@i,1; .@i<=getarraysize(.Shops$); set .@i,.@i+1)
+ set .@menu$, .@menu$+.Shops$[.@i]+":";
+ set .@i, select(.@menu$); }
+ dispbottom "Select one item at a time.";
+ callshop "qshop"+.@i,1;
+ npcshopattach "qshop"+.@i;
+ end;
+
+function Add {
+ if (getitemname(getarg(1))=="null") {
+ debugmes "Quest reward #"+getarg(1)+" invalid (skipped)."; return; }
+ for(set .@n,5; .@n<127; set .@n,.@n+2) {
+ if (!getarg(.@n,0)) break;
+ if (getitemname(getarg(.@n))=="null") {
+ debugmes "Quest requirement #"+getarg(.@n)+" invalid (skipped)."; return; } }
+ for(set .@i,2; .@i<.@n; set .@i,.@i+1)
+ set getd(".q_"+getarg(1)+"["+(.@i-2)+"]"), getarg(.@i);
+ npcshopadditem "qshop"+getarg(0),getarg(1),((.ShowZeny)?getarg(3):0);
+ return; }
+function Chk {
+ if (getarg(0)<getarg(1)) { set @qe0,1; return "^FF0000"; }
+ else return "^00FF00"; }
+function Slot {
+ set .@s$,getitemname(getarg(0));
+ switch(.ShowSlot){
+ case 1: if (!getitemslots(getarg(0))) return .@s$;
+ case 2: if (getiteminfo(getarg(0),11)>0) return .@s$+" ["+getitemslots(getarg(0))+"]";
+ default: return .@s$; } }
+function A_An {
+ setarray .@A$[0],"a","e","i","o","u";
+ set .@B$, "_"+getarg(0);
+ for(set .@i,0; .@i<5; set .@i,.@i+1)
+ if (compare(.@B$,"_"+.@A$[.@i])) return "an "+getarg(0);
+ return "a "+getarg(0); }
+
+OnBuyItem:
+ set .@q[0],@bought_nameid;
+ copyarray .@q[1],getd(".q_"+@bought_nameid+"[0]"),getarraysize(getd(".q_"+@bought_nameid+"[0]"));
+ if (!.@q[1]) { message strcharinfo(0),"An error has occurred."; end; }
+ mes "[Quest Shop]";
+ mes "Reward: ^0055FF"+((.@q[1]>1)?.@q[1]+"x ":"")+Slot(.@q[0])+"^000000";
+ mes "Requirements:";
+ if (.@q[2]) mes " > "+Chk(Zeny,.@q[2])+.@q[2]+" Zeny^000000";
+ if (.@q[3]) mes " > "+Chk(getd(.Points$[0]),.@q[3])+.@q[3]+" "+.Points$[1]+" ("+getd(.Points$[0])+"/"+.@q[3]+")^000000";
+ if (.@q[4]) for(set .@i,4; .@i<getarraysize(.@q); set .@i,.@i+2)
+ mes " > "+Chk(countitem(.@q[.@i]),.@q[.@i+1])+((.DisplayID)?"{"+.@q[.@i]+"} ":"")+Slot(.@q[.@i])+" ("+countitem(.@q[.@i])+"/"+.@q[.@i+1]+")^000000";
+ next;
+ set @qe1, getiteminfo(.@q[0],5); set @qe2, getiteminfo(.@q[0],11);
+ addtimer 1000, strnpcinfo(1)+"::OnEnd";
+ while(1){
+ switch(select(" ~ Purchase ^0055FF"+getitemname(.@q[0])+"^000000:"+((((@qe1&1) || (@qe1&256) || (@qe1&512)) && @qe2>0 && !@qe6)?" ~ Preview...":"")+": ~ ^777777Cancel^000000")) {
+ case 1:
+ if (@qe0) {
+ mes "[Quest Shop]";
+ mes "You're missing one or more quest requirements.";
+ close; }
+ if (!checkweight(.@q[0],.@q[1])) {
+ mes "[Quest Shop]";
+ mes "^FF0000You need "+(((.@q[1]*getiteminfo(.@q[0],6))+Weight-MaxWeight)/10)+" additional weight capacity to complete this trade.^000000";
+ close; }
+ if (.@q[2]) set Zeny, Zeny-.@q[2];
+ if (.@q[3]) setd .Points$[0], getd(.Points$[0])-.@q[3];
+ if (.@q[4]) for(set .@i,4; .@i<getarraysize(.@q); set .@i,.@i+2)
+ delitem .@q[.@i],.@q[.@i+1];
+ getitem .@q[0],.@q[1];
+ if (.Announce) announce strcharinfo(0)+" has created "+A_An(getitemname(.@q[0]))+"!",0;
+ specialeffect2 699;
+ close;
+ case 2:
+ set @qe3, getlook(3); set @qe4, getlook(4); set @qe5, getlook(5);
+ if (@qe1&1) atcommand "@changelook 3 "+@qe2;
+ if (@qe1&256) atcommand "@changelook 1 "+@qe2;
+ if (@qe1&512) atcommand "@changelook 2 "+@qe2;
+ set @qe6,1;
+ break;
+ case 3:
+ close; } }
+OnEnd:
+ if (@qe6) { atcommand "@changelook 3 "+@qe3; atcommand "@changelook 1 "+@qe4; atcommand "@changelook 2 "+@qe5; }
+ for(set .@i,0; .@i<7; set .@i,.@i+1) setd "@qe"+.@i,0;
+ end;
+OnInit:
+ freeloop(1);
+// --------------------- Config ---------------------
+// Custom points, if needed: "<variable>","<name to display>"
+ setarray .Points$[0],"#CASHPOINTS","Cash Points";
+
+ set .Announce,1; // Announce quest completion? (1: yes / 0: no)
+ set .ShowSlot,1; // Show item slots? (2: all equipment / 1: if slots > 0 / 0: never)
+ set .DisplayID,0; // Show item IDs? (1: yes / 0: no)
+ set .ShowZeny,0; // Show Zeny cost, if any? (1: yes / 0: no)
+
+// Shop categories, if needed: "<Shop 1>","<Shop 2>"{,...};
+// Duplicate dummy data for any additional shops (bottom of script).
+// If no categories, use the second line instead (remove //).
+
+ setarray .Shops$[1],"Headgears","Weapons","Other";
+ // set .Shops$,"n/a";
+
+// Add(<shop number>,<reward ID>,<reward amount>,<Zeny cost>,<point cost>,
+// <required item ID>,<required item amount>{,...});
+// Shop number corresponds with order above (default is 1).
+// Note: Do NOT use a reward item more than once!
+
+ Add(1,5022,1,0,0,7086,1,969,10,999,40,1003,50,984,2);
+ Add(1,5032,1,0,0,1059,250,2221,1,2227,1,7063,600);
+ Add(1,5027,1,0,0,2252,1,1036,400,7001,50,4052,1);
+ Add(1,5045,1,0,0,2252,1,1054,450,943,1200);
+
+ Add(2,1224,1,0,0,7297,30,969,10,999,50,714,10);
+ Add(2,1225,1,0,0,7292,30,969,10,999,50,714,10);
+
+ Add(3,531,1,3,0,512,1,713,1);
+ Add(3,532,1,3,0,513,1,713,1);
+ Add(3,533,1,3,0,514,1,713,1);
+ Add(3,534,1,3,0,515,1,713,1);
+
+// --------------------------------------------------
+ freeloop(0);
+ for(set .@i,1; .@i<=getarraysize(.Shops$); set .@i,.@i+1)
+ npcshopdelitem "qshop"+.@i,909;
+ end;
+}
+
+// -------- Dummy data (duplicate as needed) --------
+- shop qshop1 -1,909:-1
+- shop qshop2 -1,909:-1
+- shop qshop3 -1,909:-1
diff --git a/npc/custom/quests/questboard.txt b/npc/custom/quests/questboard.txt
index 56357601a..cccbea7ee 100644
--- a/npc/custom/quests/questboard.txt
+++ b/npc/custom/quests/questboard.txt
@@ -1,324 +1,324 @@
-//===== rAthena Script =======================================
-//= tr0n's Questboard
-//===== By: ==================================================
-//= tr0n
-//===== Current Version: =====================================
-//= 1.4.4
-//===== Compatible With: =====================================
-//= rAthena SVN
-//===== Description: =========================================
-//= Easily add collection and hunting quests.
-//===== Additional Comments: =================================
-// 1.0.0 Release
-// 1.1.0 Added zeny reward
-// 1.2.0 Rewrote checkmob and killcounter
-// 1.3.1 Added level restriction
-// 1.3.4 Added Reward Item Amount
-// 1.4.4 Added Quest delay
-//============================================================
-
-prontera,129,215,5 script Questboard 857,{
-
- if(c_run==1){
- mes "[^FF7700Questboard^000000]";
- mes "^0000FF"+getd("." + currentquest$ + "_collectionname$")+"^000000";
- mes "--------------------------------";
- for( set .@j, 0; .@j < getarraysize(getd("."+ currentquest$ + "_collectionitem")); set .@j,.@j+2) {
- mes "^FF0000"+getitemname(getd("."+currentquest$+"_collectionitem["+.@j+"]"))+" - "+countitem(getd("."+currentquest$+"_collectionitem["+.@j+"]"))+"/"+getd("."+currentquest$+"_collectionitem["+(.@j+1)+"]")+" ea.^000000";
- }
- mes "--------------------------------";
- mes "[Reward]";
- mes "Item: ^0000FF"+((getd("." +currentquest$+"_collectionprize"))?getitemname(getd("." +currentquest$+"_collectionprize"))+" - "+getd("." +currentquest$+"_collectionamount")+" ea.^000000":"Nothing^000000");
- mes "Zeny: ^0000FF"+getd("." +currentquest$+"_collectionzeny")+"^000000";
- mes "Base EXP: ^0000FF"+getd("." +currentquest$+"_collectionexp["+0+"]")+"^000000";
- mes "Job EXP: ^0000FF"+getd("." +currentquest$+"_collectionexp["+1+"]")+"^000000";
- next;
- if(select("Finish:Abort") == 2){
- mes "[^FF7700Questboard^000000]";
- mes "Quest aborted.";
- set currentquest$, "";
- set c_run, 0;
- close;
- }
- goto L_checkitems;
- }
-
- if(h_run==1){
- mes "[^FF7700Questboard^000000]";
- mes "^0000FF"+getd("." + currentquest$ + "_huntingname$")+"^000000";
- mes "--------------------------------";
- for( set .@j, 0; .@j < getarraysize(getd("."+ currentquest$ + "_huntingmob")); set .@j,.@j+2) {
- set .@currentmob, getd("."+currentquest$+"_huntingmob["+(.@j)+"]");
- mes "^FF0000"+strmobinfo(1,getd("."+currentquest$+"_huntingmob["+.@j+"]"))+" - "+getd(currentquest$+"_"+.@currentmob+"_"+(.@j+1)+"_killcount")+"/"+getd("."+currentquest$+"_huntingmob["+(.@j+1)+"]")+" ea.^000000";
- }
- mes "--------------------------------";
- mes "[Reward]";
- mes "Item: ^0000FF"+((getd("." +currentquest$+"_huntingprize"))?getitemname(getd("." +currentquest$+"_huntingprize"))+" - "+getd("." +currentquest$+"_huntingamount")+" ea.^000000":"Nothing^000000");
- mes "Zeny: ^0000FF"+getd("." +currentquest$+"_huntingzeny")+"^000000";
- mes "Base EXP: ^0000FF"+getd("." +currentquest$+"_huntingexp["+0+"]")+"^000000";
- mes "Job EXP: ^0000FF"+getd("." +currentquest$+"_huntingexp["+1+"]")+"^000000";
- next;
- if(select("Finish:Abort") == 2){
- mes "[^FF7700Questboard^000000]";
- mes "Quest aborted.";
- for(set .@x, 1; .@x < getarraysize(getd("."+currentquest$+"_huntingmob")); set .@x,.@x+2){
- set .@currentmob, getd("."+currentquest$+"_huntingmob["+(.@x-1)+"]");
- setd(currentquest$+"_"+.@currentmob+"_"+.@x+"_killcount", 0);
- }
- set currentquest$, "";
- set h_run, 0;
- close;
- }
- goto L_checkmobs;
- }
-
-L_questmenu:
- mes "[^FF7700Questboard^000000]";
- mes "Select category:";
- next;
-
- switch(select((.collection)?"Collection Quests":"",
- (.hunting)?"Hunting Quests":"",
- "Exit")) {
-
-case 1:
- set .@collectmenu$, "";
- for( set .@i,0; .@i < .collectionquestcount; set .@i,.@i+1) {
- if (.@i) set .@collectmenu$,.@collectmenu$+":";
- set .@collectmenu$, .@collectmenu$ + "[" + getd("." +(.@i+1)+"_collectionmin") + " - " + getd("." +(.@i+1)+"_collectionmax") + "] " + getd("." + (.@i+1) + "_collectionname$");
- }
- set .@selection,select(.@collectmenu$);
- if(gettimetick(2) < getd(.@selection + "_collection_delay")){
- set .@time_left, getd(.@selection + "_collection_delay")-gettimetick(2);
- mes "[^FF7700Questboard^000000]";
- if(.@time_left < 60) mes "You have to wait ^0000FF"+.@time_left+" seconds^000000 to do this quest again.";
- if(.@time_left < 3600) mes "You have to wait ^0000FF"+.@time_left/60+" minutes^000000 to do this quest again.";
- mes "You have to wait ^0000FF"+.@time_left/60/60+" hours^000000 to do this quest again.";
- close;
- }
- mes "[^FF7700Questboard^000000]";
- mes "^0000FF"+getd("." + .@selection + "_collectionname$")+"^000000";
- mes "--------------------------------";
- for( set .@j, 0; .@j < getarraysize(getd("."+ .@selection + "_collectionitem")); set .@j,.@j+2) {
- mes "^FF0000"+getitemname(getd("."+.@selection+"_collectionitem["+.@j+"]"))+" - "+getd("."+.@selection+"_collectionitem["+(.@j+1)+"]")+" ea.^000000";
- }
- mes "--------------------------------";
- mes "[Reward]";
- mes "Item: ^0000FF"+((getd("." +.@selection+"_collectionprize"))?getitemname(getd("." +.@selection+"_collectionprize"))+" - "+getd("." +.@selection+"_collectionamount")+" ea.^000000":"Nothing^000000");
- mes "Zeny: ^0000FF"+getd("." +.@selection+"_collectionzeny")+"^000000";
- mes "Base EXP: ^0000FF"+getd("." +.@selection+"_collectionexp["+0+"]")+"^000000";
- mes "Job EXP: ^0000FF"+getd("." +.@selection+"_collectionexp["+1+"]")+"^000000";
- next;
- if(select("Accept:Decline") == 2){
- close;
- }
- if(BaseLevel >= getd("." +.@selection+"_collectionmin") && BaseLevel <= getd("." +.@selection+"_collectionmax"))
- {
- mes "[^FF7700Questboard^000000]";
- mes "Quest accepted.";
- set c_run, 1;
- set currentquest$, .@selection;
- close;
- }
- else
- {
- mes "[^FF7700Questboard^000000]";
- mes "You don't have the required";
- mes "level to do this quest.";
- close;
- }
-
-case 2:
- set .@huntmenu$, "";
- for( set .@i,0; .@i < .huntingquestcount; set .@i,.@i+1) {
- if (.@i) set .@huntmenu$,.@huntmenu$+":";
- set .@huntmenu$, .@huntmenu$ + "[" + getd("." +(.@i+1)+"_huntingmin") + " - " + getd("." +(.@i+1)+"_huntingmax") + "] " + getd("." + (.@i+1) + "_huntingname$");
- }
- set .@selection,select(.@huntmenu$);
- if(gettimetick(2) < getd(.@selection + "_hunting_delay")){
- set .@time_left, getd(.@selection + "_hunting_delay")-gettimetick(2);
- mes "[^FF7700Questboard^000000]";
- if(.@time_left < 60) mes "You have to wait ^0000FF"+.@time_left+" seconds^000000 to do this quest again.";
- if(.@time_left < 3600) mes "You have to wait ^0000FF"+.@time_left/60+" minutes^000000 to do this quest again.";
- mes "You have to wait ^0000FF"+.@time_left/60/60+" hours^000000 to do this quest again.";
- close;
- }
- mes "[^FF7700Questboard^000000]";
- mes "^0000FF"+getd("." + .@selection + "_huntingname$")+"^000000";
- mes "--------------------------------";
- for( set .@j, 0; .@j < getarraysize(getd("."+ .@selection + "_huntingmob")); set .@j,.@j+2) {
- mes "^FF0000"+strmobinfo(1,getd("."+.@selection+"_huntingmob["+.@j+"]"))+" - "+getd("."+.@selection+"_huntingmob["+(.@j+1)+"]")+" ea.^000000";
- }
- mes "--------------------------------";
- mes "[Reward]";
- mes "Item: ^0000FF"+((getd("." +.@selection+"_huntingprize"))?getitemname(getd("." +.@selection+"_huntingprize"))+" - "+getd("." +.@selection+"_huntingamount")+" ea.^000000":"Nothing^000000");
- mes "Zeny: ^0000FF"+getd("." +.@selection+"_huntingzeny")+"^000000";
- mes "Base EXP: ^0000FF"+getd("." +.@selection+"_huntingexp["+0+"]")+"^000000";
- mes "Job EXP: ^0000FF"+getd("." +.@selection+"_huntingexp["+1+"]")+"^000000";
- next;
- if(select("Accept:Decline") == 2){
- close;
- }
- if(BaseLevel >= getd("." +.@selection+"_huntingmin") && BaseLevel <= getd("." +.@selection+"_huntingmax"))
- {
- mes "[^FF7700Questboard^000000]";
- mes "Quest accepted.";
- set h_run, 1;
- set currentquest$, .@selection;
- close;
- }
- else
- {
- mes "[^FF7700Questboard^000000]";
- mes "You don't have the required";
- mes "level to do this quest.";
- close;
- }
-
-case 3:
- close;
- }
-
-L_checkitems:
- for( set .@k,0; .@k < getarraysize(getd("."+currentquest$+"_collectionitem")); set .@k,.@k+2) {
- if(countitem(getd("."+currentquest$+"_collectionitem["+.@k+"]"))>=getd("."+currentquest$+"_collectionitem["+(.@k+1)+"]")){
- set .@checkitem,.@checkitem+2;
- }
- }
- if(.@checkitem<getarraysize(getd("."+currentquest$+"_collectionitem"))){
- mes "[^FF7700Questboard^000000]";
- mes "You don't have everything.";
- close;
- }
- for( set .@delcount,0; .@delcount < getarraysize(getd("."+currentquest$+"_collectionitem")); set .@delcount,.@delcount+2) {
- delitem getd("."+currentquest$+"_collectionitem["+.@delcount+"]"),getd("."+currentquest$+"_collectionitem["+(.@delcount+1)+"]");
- }
- mes "[^FF7700Questboard^000000]";
- mes "Congratulation! Here is your Reward.";
- if(getd("." +currentquest$+"_collectionprize")!=0) getitem(getd("." +currentquest$+"_collectionprize"),getd("." +currentquest$+"_collectionamount"));
- set Zeny,Zeny+getd("." +currentquest$+"_collectionzeny");
- getexp getd("." +currentquest$+"_collectionexp["+0+"]"),getd("." +currentquest$+"_collectionexp["+1+"]");
- setd(currentquest$ + "_collection_delay"),gettimetick(2)+.quest_delay;
- set currentquest$, "";
- set c_run, 0;
- close;
-
-L_checkmobs:
- set .@goal, (getarraysize(getd("."+currentquest$+"_huntingmob"))/2);
- for(set .@i, 1; .@i < getarraysize(getd("."+currentquest$+"_huntingmob")); set .@i,.@i+2){
- set .@currentmob, getd("."+currentquest$+"_huntingmob["+(.@i-1)+"]");
- if(getd(currentquest$+"_"+.@currentmob+"_"+.@i+"_killcount")==getd("."+currentquest$+"_huntingmob["+.@i+"]")){
- set .@checkmonster, .@checkmonster+1;
- if(.@checkmonster==.@goal){
- goto L_checkmobs2;
- }
- continue;
- }
- goto L_checkmobs2;
- }
-
-L_checkmobs2:
- if(.@checkmonster<.@goal){
- mes "[^FF7700Questboard^000000]";
- mes "You didn't kill everything.";
- close;
- }
- mes "[^FF7700Questboard^000000]";
- mes "Congratulation! Here is your Reward.";
- for(set .@x, 1; .@x < getarraysize(getd("."+currentquest$+"_huntingmob")); set .@x,.@x+2){
- set .@currentmob, getd("."+currentquest$+"_huntingmob["+(.@x-1)+"]");
- setd(currentquest$+"_"+.@currentmob+"_"+.@x+"_killcount", 0);
- }
- if(getd("." +currentquest$+"_huntingprize")!=0) getitem(getd("." +currentquest$+"_huntingprize"),getd("." +currentquest$+"_huntingamount"));
- set Zeny, Zeny+getd("." +currentquest$+"_huntingzeny");
- getexp getd("." +currentquest$+"_huntingexp["+0+"]"),getd("." +currentquest$+"_huntingexp["+1+"]");
- setd(currentquest$ + "_hunting_delay"),gettimetick(2)+.quest_delay;
- set currentquest$, "";
- set h_run, 0;
- close;
-
-OnNPCKillEvent:
- if(h_run!=1) end;
- for(set .@i, 1; .@i < getarraysize(getd("."+currentquest$+"_huntingmob")); set .@i,.@i+2){
- if(killedrid==getd("."+currentquest$+"_huntingmob["+(.@i-1)+"]")){
- set .@currentmob, getd("."+currentquest$+"_huntingmob["+(.@i-1)+"]");
- if(getd(currentquest$+"_"+.@currentmob+"_"+.@i+"_killcount")>=getd("."+currentquest$+"_huntingmob["+.@i+"]")) end;
- setd(currentquest$+"_"+.@currentmob+"_"+.@i+"_killcount", getd(currentquest$+"_"+.@currentmob+"_"+.@i+"_killcount")+1);
- dispbottom getd("."+currentquest$+"_huntingname$")+": ["+strmobinfo(1,.@currentmob)+"] ("+ getd(currentquest$+"_"+.@currentmob+"_"+.@i+"_killcount")+"/"+getd("."+currentquest$+"_huntingmob["+.@i+"]")+")";
- end;
- }
- continue;
- }
- end;
-
-OnInit:
-
- function AddCollection;
- function AddHunting;
-
- //Activate/Deactive quest categories here
- set .collection, 1;
- set .hunting, 1;
-
- //Quest Delay (seconds)
- //24 hours = 86400 seconds
- set .quest_delay, 0;
-
- //Checks if quests are loaded (prevents out of index)
- if(.questsloaded==1) end;
- set .questsloaded, 1;
-
- //Add Collection Quests here
- //AddCollection("<Quest Name>",<Min Lvl>,<Max Lvl>,<Reward|Item ID>,<Reward|Item Amount>,<Zeny Reward>,<Base EXP>,<Job EXP>,<Item ID>,<Item Amount>,...);
-
-
- //Add Hunting Quests here
- //AddHunting("<Quest Name>",<Min Lvl>,<Max Lvl>,<Reward|Item ID>,<Reward|Item Amount>,<Zeny Reward>,<Base EXP>,<Job EXP>,<Monster ID>,<Monster Amount>,...);
-
- end;
-
-
-function AddCollection {
- set .collectionquestcount,.collectionquestcount+1;
- setd ("." +.collectionquestcount+"_collectionname$", getarg(0));
- setd ("." +.collectionquestcount+"_collectionmin", getarg(1));
- setd ("." +.collectionquestcount+"_collectionmax", getarg(2));
- setd ("." +.collectionquestcount+"_collectionprize", getarg(3));
- setd ("." +.collectionquestcount+"_collectionamount", getarg(4));
- setd ("." +.collectionquestcount+"_collectionzeny", getarg(5));
- set .@argcount, 6;
- set .@size, getarraysize(getd("."+ .collectionquestcount + "_collectionexp"));
- setd ("." +.collectionquestcount+"_collectionexp["+.@size+"]",getarg(.@argcount));
- setd ("." +.collectionquestcount+"_collectionexp["+(.@size+1)+"]",getarg(.@argcount+1));
- set .@argcount, .@argcount+2;
- while(getarg(.@argcount,-1)!=-1 && getarg(.@argcount+1,-1)!=-1) {
- set .@size, getarraysize(getd("."+ .collectionquestcount + "_collectionitem"));
- setd ("."+.collectionquestcount+"_collectionitem["+.@size+"]",getarg(.@argcount));
- setd ("."+.collectionquestcount+"_collectionitem["+(.@size+1)+"]",getarg(.@argcount+1));
- set .@argcount,.@argcount+2;
- }
- return;
-}
-
-function AddHunting {
- set .huntingquestcount,.huntingquestcount+1;
- setd ("." +.huntingquestcount+"_huntingname$", getarg(0));
- setd ("." +.huntingquestcount+"_huntingmin", getarg(1));
- setd ("." +.huntingquestcount+"_huntingmax", getarg(2));
- setd ("." +.huntingquestcount+"_huntingprize", getarg(3));
- setd ("." +.huntingquestcount+"_huntingamount", getarg(4));
- setd ("." +.huntingquestcount+"_huntingzeny", getarg(5));
- set .@size, getarraysize(getd("."+ .huntingquestcount + "_huntingexp"));
- set .@argcount, 6;
- setd ("." +.huntingquestcount+"_huntingexp["+.@size+"]",getarg(.@argcount));
- setd ("." +.huntingquestcount+"_huntingexp["+(.@size+1)+"]",getarg(.@argcount+1));
- set .@argcount, .@argcount+2;
- while(getarg(.@argcount,-1)!=-1 && getarg(.@argcount+1,-1)!=-1) {
- set .@size, getarraysize(getd("."+ .huntingquestcount + "_huntingmob"));
- setd ("."+.huntingquestcount+"_huntingmob["+.@size+"]",getarg(.@argcount));
- setd ("."+.huntingquestcount+"_huntingmob["+(.@size+1)+"]",getarg(.@argcount+1));
- set .@argcount, .@argcount+2;
- }
- return;
-}
-} \ No newline at end of file
+//===== rAthena Script =======================================
+//= tr0n's Questboard
+//===== By: ==================================================
+//= tr0n
+//===== Current Version: =====================================
+//= 1.4.4
+//===== Compatible With: =====================================
+//= rAthena SVN
+//===== Description: =========================================
+//= Easily add collection and hunting quests.
+//===== Additional Comments: =================================
+// 1.0.0 Release
+// 1.1.0 Added zeny reward
+// 1.2.0 Rewrote checkmob and killcounter
+// 1.3.1 Added level restriction
+// 1.3.4 Added Reward Item Amount
+// 1.4.4 Added Quest delay
+//============================================================
+
+prontera,129,215,5 script Questboard 857,{
+
+ if(c_run==1){
+ mes "[^FF7700Questboard^000000]";
+ mes "^0000FF"+getd("." + currentquest$ + "_collectionname$")+"^000000";
+ mes "--------------------------------";
+ for( set .@j, 0; .@j < getarraysize(getd("."+ currentquest$ + "_collectionitem")); set .@j,.@j+2) {
+ mes "^FF0000"+getitemname(getd("."+currentquest$+"_collectionitem["+.@j+"]"))+" - "+countitem(getd("."+currentquest$+"_collectionitem["+.@j+"]"))+"/"+getd("."+currentquest$+"_collectionitem["+(.@j+1)+"]")+" ea.^000000";
+ }
+ mes "--------------------------------";
+ mes "[Reward]";
+ mes "Item: ^0000FF"+((getd("." +currentquest$+"_collectionprize"))?getitemname(getd("." +currentquest$+"_collectionprize"))+" - "+getd("." +currentquest$+"_collectionamount")+" ea.^000000":"Nothing^000000");
+ mes "Zeny: ^0000FF"+getd("." +currentquest$+"_collectionzeny")+"^000000";
+ mes "Base EXP: ^0000FF"+getd("." +currentquest$+"_collectionexp["+0+"]")+"^000000";
+ mes "Job EXP: ^0000FF"+getd("." +currentquest$+"_collectionexp["+1+"]")+"^000000";
+ next;
+ if(select("Finish:Abort") == 2){
+ mes "[^FF7700Questboard^000000]";
+ mes "Quest aborted.";
+ set currentquest$, "";
+ set c_run, 0;
+ close;
+ }
+ goto L_checkitems;
+ }
+
+ if(h_run==1){
+ mes "[^FF7700Questboard^000000]";
+ mes "^0000FF"+getd("." + currentquest$ + "_huntingname$")+"^000000";
+ mes "--------------------------------";
+ for( set .@j, 0; .@j < getarraysize(getd("."+ currentquest$ + "_huntingmob")); set .@j,.@j+2) {
+ set .@currentmob, getd("."+currentquest$+"_huntingmob["+(.@j)+"]");
+ mes "^FF0000"+strmobinfo(1,getd("."+currentquest$+"_huntingmob["+.@j+"]"))+" - "+getd(currentquest$+"_"+.@currentmob+"_"+(.@j+1)+"_killcount")+"/"+getd("."+currentquest$+"_huntingmob["+(.@j+1)+"]")+" ea.^000000";
+ }
+ mes "--------------------------------";
+ mes "[Reward]";
+ mes "Item: ^0000FF"+((getd("." +currentquest$+"_huntingprize"))?getitemname(getd("." +currentquest$+"_huntingprize"))+" - "+getd("." +currentquest$+"_huntingamount")+" ea.^000000":"Nothing^000000");
+ mes "Zeny: ^0000FF"+getd("." +currentquest$+"_huntingzeny")+"^000000";
+ mes "Base EXP: ^0000FF"+getd("." +currentquest$+"_huntingexp["+0+"]")+"^000000";
+ mes "Job EXP: ^0000FF"+getd("." +currentquest$+"_huntingexp["+1+"]")+"^000000";
+ next;
+ if(select("Finish:Abort") == 2){
+ mes "[^FF7700Questboard^000000]";
+ mes "Quest aborted.";
+ for(set .@x, 1; .@x < getarraysize(getd("."+currentquest$+"_huntingmob")); set .@x,.@x+2){
+ set .@currentmob, getd("."+currentquest$+"_huntingmob["+(.@x-1)+"]");
+ setd(currentquest$+"_"+.@currentmob+"_"+.@x+"_killcount", 0);
+ }
+ set currentquest$, "";
+ set h_run, 0;
+ close;
+ }
+ goto L_checkmobs;
+ }
+
+L_questmenu:
+ mes "[^FF7700Questboard^000000]";
+ mes "Select category:";
+ next;
+
+ switch(select((.collection)?"Collection Quests":"",
+ (.hunting)?"Hunting Quests":"",
+ "Exit")) {
+
+case 1:
+ set .@collectmenu$, "";
+ for( set .@i,0; .@i < .collectionquestcount; set .@i,.@i+1) {
+ if (.@i) set .@collectmenu$,.@collectmenu$+":";
+ set .@collectmenu$, .@collectmenu$ + "[" + getd("." +(.@i+1)+"_collectionmin") + " - " + getd("." +(.@i+1)+"_collectionmax") + "] " + getd("." + (.@i+1) + "_collectionname$");
+ }
+ set .@selection,select(.@collectmenu$);
+ if(gettimetick(2) < getd(.@selection + "_collection_delay")){
+ set .@time_left, getd(.@selection + "_collection_delay")-gettimetick(2);
+ mes "[^FF7700Questboard^000000]";
+ if(.@time_left < 60) mes "You have to wait ^0000FF"+.@time_left+" seconds^000000 to do this quest again.";
+ if(.@time_left < 3600) mes "You have to wait ^0000FF"+.@time_left/60+" minutes^000000 to do this quest again.";
+ mes "You have to wait ^0000FF"+.@time_left/60/60+" hours^000000 to do this quest again.";
+ close;
+ }
+ mes "[^FF7700Questboard^000000]";
+ mes "^0000FF"+getd("." + .@selection + "_collectionname$")+"^000000";
+ mes "--------------------------------";
+ for( set .@j, 0; .@j < getarraysize(getd("."+ .@selection + "_collectionitem")); set .@j,.@j+2) {
+ mes "^FF0000"+getitemname(getd("."+.@selection+"_collectionitem["+.@j+"]"))+" - "+getd("."+.@selection+"_collectionitem["+(.@j+1)+"]")+" ea.^000000";
+ }
+ mes "--------------------------------";
+ mes "[Reward]";
+ mes "Item: ^0000FF"+((getd("." +.@selection+"_collectionprize"))?getitemname(getd("." +.@selection+"_collectionprize"))+" - "+getd("." +.@selection+"_collectionamount")+" ea.^000000":"Nothing^000000");
+ mes "Zeny: ^0000FF"+getd("." +.@selection+"_collectionzeny")+"^000000";
+ mes "Base EXP: ^0000FF"+getd("." +.@selection+"_collectionexp["+0+"]")+"^000000";
+ mes "Job EXP: ^0000FF"+getd("." +.@selection+"_collectionexp["+1+"]")+"^000000";
+ next;
+ if(select("Accept:Decline") == 2){
+ close;
+ }
+ if(BaseLevel >= getd("." +.@selection+"_collectionmin") && BaseLevel <= getd("." +.@selection+"_collectionmax"))
+ {
+ mes "[^FF7700Questboard^000000]";
+ mes "Quest accepted.";
+ set c_run, 1;
+ set currentquest$, .@selection;
+ close;
+ }
+ else
+ {
+ mes "[^FF7700Questboard^000000]";
+ mes "You don't have the required";
+ mes "level to do this quest.";
+ close;
+ }
+
+case 2:
+ set .@huntmenu$, "";
+ for( set .@i,0; .@i < .huntingquestcount; set .@i,.@i+1) {
+ if (.@i) set .@huntmenu$,.@huntmenu$+":";
+ set .@huntmenu$, .@huntmenu$ + "[" + getd("." +(.@i+1)+"_huntingmin") + " - " + getd("." +(.@i+1)+"_huntingmax") + "] " + getd("." + (.@i+1) + "_huntingname$");
+ }
+ set .@selection,select(.@huntmenu$);
+ if(gettimetick(2) < getd(.@selection + "_hunting_delay")){
+ set .@time_left, getd(.@selection + "_hunting_delay")-gettimetick(2);
+ mes "[^FF7700Questboard^000000]";
+ if(.@time_left < 60) mes "You have to wait ^0000FF"+.@time_left+" seconds^000000 to do this quest again.";
+ if(.@time_left < 3600) mes "You have to wait ^0000FF"+.@time_left/60+" minutes^000000 to do this quest again.";
+ mes "You have to wait ^0000FF"+.@time_left/60/60+" hours^000000 to do this quest again.";
+ close;
+ }
+ mes "[^FF7700Questboard^000000]";
+ mes "^0000FF"+getd("." + .@selection + "_huntingname$")+"^000000";
+ mes "--------------------------------";
+ for( set .@j, 0; .@j < getarraysize(getd("."+ .@selection + "_huntingmob")); set .@j,.@j+2) {
+ mes "^FF0000"+strmobinfo(1,getd("."+.@selection+"_huntingmob["+.@j+"]"))+" - "+getd("."+.@selection+"_huntingmob["+(.@j+1)+"]")+" ea.^000000";
+ }
+ mes "--------------------------------";
+ mes "[Reward]";
+ mes "Item: ^0000FF"+((getd("." +.@selection+"_huntingprize"))?getitemname(getd("." +.@selection+"_huntingprize"))+" - "+getd("." +.@selection+"_huntingamount")+" ea.^000000":"Nothing^000000");
+ mes "Zeny: ^0000FF"+getd("." +.@selection+"_huntingzeny")+"^000000";
+ mes "Base EXP: ^0000FF"+getd("." +.@selection+"_huntingexp["+0+"]")+"^000000";
+ mes "Job EXP: ^0000FF"+getd("." +.@selection+"_huntingexp["+1+"]")+"^000000";
+ next;
+ if(select("Accept:Decline") == 2){
+ close;
+ }
+ if(BaseLevel >= getd("." +.@selection+"_huntingmin") && BaseLevel <= getd("." +.@selection+"_huntingmax"))
+ {
+ mes "[^FF7700Questboard^000000]";
+ mes "Quest accepted.";
+ set h_run, 1;
+ set currentquest$, .@selection;
+ close;
+ }
+ else
+ {
+ mes "[^FF7700Questboard^000000]";
+ mes "You don't have the required";
+ mes "level to do this quest.";
+ close;
+ }
+
+case 3:
+ close;
+ }
+
+L_checkitems:
+ for( set .@k,0; .@k < getarraysize(getd("."+currentquest$+"_collectionitem")); set .@k,.@k+2) {
+ if(countitem(getd("."+currentquest$+"_collectionitem["+.@k+"]"))>=getd("."+currentquest$+"_collectionitem["+(.@k+1)+"]")){
+ set .@checkitem,.@checkitem+2;
+ }
+ }
+ if(.@checkitem<getarraysize(getd("."+currentquest$+"_collectionitem"))){
+ mes "[^FF7700Questboard^000000]";
+ mes "You don't have everything.";
+ close;
+ }
+ for( set .@delcount,0; .@delcount < getarraysize(getd("."+currentquest$+"_collectionitem")); set .@delcount,.@delcount+2) {
+ delitem getd("."+currentquest$+"_collectionitem["+.@delcount+"]"),getd("."+currentquest$+"_collectionitem["+(.@delcount+1)+"]");
+ }
+ mes "[^FF7700Questboard^000000]";
+ mes "Congratulation! Here is your Reward.";
+ if(getd("." +currentquest$+"_collectionprize")!=0) getitem(getd("." +currentquest$+"_collectionprize"),getd("." +currentquest$+"_collectionamount"));
+ set Zeny,Zeny+getd("." +currentquest$+"_collectionzeny");
+ getexp getd("." +currentquest$+"_collectionexp["+0+"]"),getd("." +currentquest$+"_collectionexp["+1+"]");
+ setd(currentquest$ + "_collection_delay"),gettimetick(2)+.quest_delay;
+ set currentquest$, "";
+ set c_run, 0;
+ close;
+
+L_checkmobs:
+ set .@goal, (getarraysize(getd("."+currentquest$+"_huntingmob"))/2);
+ for(set .@i, 1; .@i < getarraysize(getd("."+currentquest$+"_huntingmob")); set .@i,.@i+2){
+ set .@currentmob, getd("."+currentquest$+"_huntingmob["+(.@i-1)+"]");
+ if(getd(currentquest$+"_"+.@currentmob+"_"+.@i+"_killcount")==getd("."+currentquest$+"_huntingmob["+.@i+"]")){
+ set .@checkmonster, .@checkmonster+1;
+ if(.@checkmonster==.@goal){
+ goto L_checkmobs2;
+ }
+ continue;
+ }
+ goto L_checkmobs2;
+ }
+
+L_checkmobs2:
+ if(.@checkmonster<.@goal){
+ mes "[^FF7700Questboard^000000]";
+ mes "You didn't kill everything.";
+ close;
+ }
+ mes "[^FF7700Questboard^000000]";
+ mes "Congratulation! Here is your Reward.";
+ for(set .@x, 1; .@x < getarraysize(getd("."+currentquest$+"_huntingmob")); set .@x,.@x+2){
+ set .@currentmob, getd("."+currentquest$+"_huntingmob["+(.@x-1)+"]");
+ setd(currentquest$+"_"+.@currentmob+"_"+.@x+"_killcount", 0);
+ }
+ if(getd("." +currentquest$+"_huntingprize")!=0) getitem(getd("." +currentquest$+"_huntingprize"),getd("." +currentquest$+"_huntingamount"));
+ set Zeny, Zeny+getd("." +currentquest$+"_huntingzeny");
+ getexp getd("." +currentquest$+"_huntingexp["+0+"]"),getd("." +currentquest$+"_huntingexp["+1+"]");
+ setd(currentquest$ + "_hunting_delay"),gettimetick(2)+.quest_delay;
+ set currentquest$, "";
+ set h_run, 0;
+ close;
+
+OnNPCKillEvent:
+ if(h_run!=1) end;
+ for(set .@i, 1; .@i < getarraysize(getd("."+currentquest$+"_huntingmob")); set .@i,.@i+2){
+ if(killedrid==getd("."+currentquest$+"_huntingmob["+(.@i-1)+"]")){
+ set .@currentmob, getd("."+currentquest$+"_huntingmob["+(.@i-1)+"]");
+ if(getd(currentquest$+"_"+.@currentmob+"_"+.@i+"_killcount")>=getd("."+currentquest$+"_huntingmob["+.@i+"]")) end;
+ setd(currentquest$+"_"+.@currentmob+"_"+.@i+"_killcount", getd(currentquest$+"_"+.@currentmob+"_"+.@i+"_killcount")+1);
+ dispbottom getd("."+currentquest$+"_huntingname$")+": ["+strmobinfo(1,.@currentmob)+"] ("+ getd(currentquest$+"_"+.@currentmob+"_"+.@i+"_killcount")+"/"+getd("."+currentquest$+"_huntingmob["+.@i+"]")+")";
+ end;
+ }
+ continue;
+ }
+ end;
+
+OnInit:
+
+ function AddCollection;
+ function AddHunting;
+
+ //Activate/Deactive quest categories here
+ set .collection, 1;
+ set .hunting, 1;
+
+ //Quest Delay (seconds)
+ //24 hours = 86400 seconds
+ set .quest_delay, 0;
+
+ //Checks if quests are loaded (prevents out of index)
+ if(.questsloaded==1) end;
+ set .questsloaded, 1;
+
+ //Add Collection Quests here
+ //AddCollection("<Quest Name>",<Min Lvl>,<Max Lvl>,<Reward|Item ID>,<Reward|Item Amount>,<Zeny Reward>,<Base EXP>,<Job EXP>,<Item ID>,<Item Amount>,...);
+
+
+ //Add Hunting Quests here
+ //AddHunting("<Quest Name>",<Min Lvl>,<Max Lvl>,<Reward|Item ID>,<Reward|Item Amount>,<Zeny Reward>,<Base EXP>,<Job EXP>,<Monster ID>,<Monster Amount>,...);
+
+ end;
+
+
+function AddCollection {
+ set .collectionquestcount,.collectionquestcount+1;
+ setd ("." +.collectionquestcount+"_collectionname$", getarg(0));
+ setd ("." +.collectionquestcount+"_collectionmin", getarg(1));
+ setd ("." +.collectionquestcount+"_collectionmax", getarg(2));
+ setd ("." +.collectionquestcount+"_collectionprize", getarg(3));
+ setd ("." +.collectionquestcount+"_collectionamount", getarg(4));
+ setd ("." +.collectionquestcount+"_collectionzeny", getarg(5));
+ set .@argcount, 6;
+ set .@size, getarraysize(getd("."+ .collectionquestcount + "_collectionexp"));
+ setd ("." +.collectionquestcount+"_collectionexp["+.@size+"]",getarg(.@argcount));
+ setd ("." +.collectionquestcount+"_collectionexp["+(.@size+1)+"]",getarg(.@argcount+1));
+ set .@argcount, .@argcount+2;
+ while(getarg(.@argcount,-1)!=-1 && getarg(.@argcount+1,-1)!=-1) {
+ set .@size, getarraysize(getd("."+ .collectionquestcount + "_collectionitem"));
+ setd ("."+.collectionquestcount+"_collectionitem["+.@size+"]",getarg(.@argcount));
+ setd ("."+.collectionquestcount+"_collectionitem["+(.@size+1)+"]",getarg(.@argcount+1));
+ set .@argcount,.@argcount+2;
+ }
+ return;
+}
+
+function AddHunting {
+ set .huntingquestcount,.huntingquestcount+1;
+ setd ("." +.huntingquestcount+"_huntingname$", getarg(0));
+ setd ("." +.huntingquestcount+"_huntingmin", getarg(1));
+ setd ("." +.huntingquestcount+"_huntingmax", getarg(2));
+ setd ("." +.huntingquestcount+"_huntingprize", getarg(3));
+ setd ("." +.huntingquestcount+"_huntingamount", getarg(4));
+ setd ("." +.huntingquestcount+"_huntingzeny", getarg(5));
+ set .@size, getarraysize(getd("."+ .huntingquestcount + "_huntingexp"));
+ set .@argcount, 6;
+ setd ("." +.huntingquestcount+"_huntingexp["+.@size+"]",getarg(.@argcount));
+ setd ("." +.huntingquestcount+"_huntingexp["+(.@size+1)+"]",getarg(.@argcount+1));
+ set .@argcount, .@argcount+2;
+ while(getarg(.@argcount,-1)!=-1 && getarg(.@argcount+1,-1)!=-1) {
+ set .@size, getarraysize(getd("."+ .huntingquestcount + "_huntingmob"));
+ setd ("."+.huntingquestcount+"_huntingmob["+.@size+"]",getarg(.@argcount));
+ setd ("."+.huntingquestcount+"_huntingmob["+(.@size+1)+"]",getarg(.@argcount+1));
+ set .@argcount, .@argcount+2;
+ }
+ return;
+}
+}