diff options
author | j-tkay <joseph.tk.ea@gmail.com> | 2013-07-04 05:15:48 +0800 |
---|---|---|
committer | j-tkay <joseph.tk.ea@gmail.com> | 2013-07-04 05:15:48 +0800 |
commit | 28a9fec0916db3d92629ae6e6cd62b5777b09e73 (patch) | |
tree | 4babff20dd0a68025a489f410ebf96b8c1cc09af /npc/custom/quests | |
parent | 8489dbf3b58d3bff70b27ea42884a14d5229430a (diff) | |
download | hercules-28a9fec0916db3d92629ae6e6cd62b5777b09e73.tar.gz hercules-28a9fec0916db3d92629ae6e6cd62b5777b09e73.tar.bz2 hercules-28a9fec0916db3d92629ae6e6cd62b5777b09e73.tar.xz hercules-28a9fec0916db3d92629ae6e6cd62b5777b09e73.zip |
Merged/Updated/Added scripts from rAthena.
- Fixed Bug #7400
Signed-off-by: j-tkay <joseph.tk.ea@gmail.com>
Diffstat (limited to 'npc/custom/quests')
-rw-r--r-- | npc/custom/quests/hunting_missions.txt | 30 | ||||
-rw-r--r-- | npc/custom/quests/quest_shop.txt | 30 |
2 files changed, 46 insertions, 14 deletions
diff --git a/npc/custom/quests/hunting_missions.txt b/npc/custom/quests/hunting_missions.txt index fd07b8de6..8ce85bc7a 100644 --- a/npc/custom/quests/hunting_missions.txt +++ b/npc/custom/quests/hunting_missions.txt @@ -3,12 +3,19 @@ //===== By: ================================================== //= Euphy //===== Current Version: ===================================== -//= 1.3 +//= 1.3a //===== Compatible With: ===================================== //= Hercules //===== Description: ========================================= //= Random hunting missions. //= Rewards are based on quest difficulty. +//===== Additional Comments: ================================= +//= 1.0 Initial script. +//= 1.1 Small improvements and fixes. +//= 1.2 Added party support and replaced blacklists with an +//= SQL query, both thanks to AnnieRuru. +//= 1.3 Re-added a blacklist adapted for the SQL query. +//= 1.3a Added mission reset options. //============================================================ prontera,152,187,6 script Hunting Missions 951,{ @@ -72,10 +79,24 @@ function Chk; function Cm; mes "[Hunting Missions]"; mes "Do you really want to"; mes "abandon your mission?"; - if (.Delay) mes "Your delay time will not be reset."; + if (.Reset < 0 && .Delay) + mes "Your delay time will not be reset."; + else if (.Reset > 0) + mes "It will cost "+Cm(.Reset)+" Zeny."; next; switch(select(" ~ Abandon...: ~ ^777777Cancel^000000")) { case 1: + if (.Reset > 0) { + if (Zeny < .Reset) { + mes "[Hunting Missions]"; + mes "You don't have enough"; + mes "Zeny to drop this mission."; + emotion e_sry; + close; + } + set Zeny, Zeny-.Reset; + emotion e_cash; + } mes "[Hunting Missions]"; mes "Alright, I've dropped"; mes "your current mission."; @@ -85,7 +106,7 @@ function Chk; function Cm; setd "Mission"+.@i+"_",0; } set #Mission_Count,0; - if (.Delay) set #Mission_Delay, gettimetick(2)+(.Delay*3600); + if (.Reset < 0 && .Delay) set #Mission_Delay, gettimetick(2)+(.Delay*3600); close; case 2: mes "[Hunting Missions]"; @@ -262,6 +283,7 @@ OnInit: set .Delay,12; // Quest delay, in hours (0 to disable). set .Quests,4; // Number of subquests per mission (increases rewards). set .Party,3; // Party options: 0 (exclude party kills), 1 (include party kills), 2 (same map only), 3 (screen area only) + set .Reset,-1; // Reset options: -1 (abandoning mission sets delay time), 0 (no delay time), [Zeny] (cost to abandon mission, no delay time) setarray .Count[0], // Min and max monsters per subquest (increases rewards). 40,70; setarray .Modifier[0], // Multipliers for Base Exp, Job Exp, and Zeny rewards. @@ -280,4 +302,4 @@ OnInit: npcshopadditem "mission_shop", .Shop[.@i], .Shop[.@i+1]; end; } -- shop mission_shop -1,512:-1
\ No newline at end of file +- shop mission_shop -1,512:-1 diff --git a/npc/custom/quests/quest_shop.txt b/npc/custom/quests/quest_shop.txt index 3f69c73ef..3395ac102 100644 --- a/npc/custom/quests/quest_shop.txt +++ b/npc/custom/quests/quest_shop.txt @@ -3,13 +3,21 @@ //===== By: ================================================== //= Euphy //===== Current Version: ===================================== -//= 1.6 +//= 1.6a //===== Compatible With: ===================================== //= Hercules //===== Description: ========================================= //= A dynamic quest shop based on Lunar's, with easier config. //= Includes support for multiple shops & cashpoints. //= Item Preview script by ToastOfDoom. +//===== Additional Comments: ================================= +//= 1.0 Initial script. +//= 1.2 Added category support. +//= 1.3 More options and fixes. +//= 1.4 Added debug settings. +//= 1.5 Replaced categories with shop IDs. +//= 1.6 Added support for purchasing stackables. +//= 1.6a Added support for previewing costumes and robes. //============================================================ // Shop NPCs -- supplying no argument displays entire menu. @@ -116,11 +124,11 @@ OnBuyItem: mes " > "+Chk(countitem(.@q[.@i]),.@q[.@i+1]*.@q[1])+((.ShowID)?"{"+.@q[.@i]+"} ":"")+Slot(.@q[.@i])+" ("+countitem(.@q[.@i])+"/"+(.@q[.@i+1]*.@q[1])+")^000000"; next; setarray @qe[1], getiteminfo(.@q[0],5), getiteminfo(.@q[0],11); - if (((@qe[1] & 1) || (@qe[1] & 256) || (@qe[1] & 512)) && @qe[2] > 0) + if (@qe[2] > 0 && ((@qe[1] & 1) || (@qe[1] & 256) || (@qe[1] & 512) || (@qe[1] & 1024) || (@qe[1] & 2048) || (@qe[1] & 4096) || (@qe[1] & 4) || (@qe[1] & 8192))) set .@preview,1; addtimer 1000, strnpcinfo(0)+"::OnEnd"; while(1) { - switch(select(" ~ Purchase ^0055FF"+getitemname(.@q[0])+"^000000:"+((.@preview && !@qe[6])?" ~ Preview...":"")+": ~ ^777777Cancel^000000")) { + switch(select(" ~ Purchase ^0055FF"+getitemname(.@q[0])+"^000000:"+((.@preview && !@qe[7])?" ~ Preview...":"")+": ~ ^777777Cancel^000000")) { case 1: if (@qe[0]) { mes "[Quest Shop]"; @@ -138,13 +146,14 @@ OnBuyItem: delitem .@q[.@i],.@q[.@i+1]*.@q[1]; getitem .@q[0],.@q[2]; if (.Announce) announce strcharinfo(0)+" has created "+((.@q[2] > 1)?.@q[2]+"x "+getitemname(.@q[0]):A_An(getitemname(.@q[0])))+"!",0; - specialeffect2 699; + specialeffect2 EF_FLOWERLEAF; close; case 2: - setarray @qe[3], getlook(LOOK_HEAD_BOTTOM), getlook(LOOK_HEAD_TOP), getlook(LOOK_HEAD_MID), 1; - if (@qe[1] & 1) changelook LOOK_HEAD_BOTTOM, @qe[2]; - if (@qe[1] & 256) changelook LOOK_HEAD_TOP, @qe[2]; - if (@qe[1] & 512) changelook LOOK_HEAD_MID, @qe[2]; + setarray @qe[3], getlook(LOOK_HEAD_BOTTOM), getlook(LOOK_HEAD_TOP), getlook(LOOK_HEAD_MID), getlook(LOOK_ROBE), 1; + if ((@qe[1] & 1) || (@qe[1] & 4096)) changelook LOOK_HEAD_BOTTOM, @qe[2]; + else if ((@qe[1] & 256) || (@qe[1] & 1024)) changelook LOOK_HEAD_TOP, @qe[2]; + else if ((@qe[1] & 512) || (@qe[1] & 2048)) changelook LOOK_HEAD_MID, @qe[2]; + else if ((@qe[1] & 4) || (@qe[1] & 8192)) changelook LOOK_ROBE, @qe[2]; break; case 3: close; @@ -152,12 +161,13 @@ OnBuyItem: } OnEnd: - if (@qe[6]) { + if (@qe[7]) { changelook LOOK_HEAD_BOTTOM, @qe[3]; changelook LOOK_HEAD_TOP, @qe[4]; changelook LOOK_HEAD_MID, @qe[5]; + changelook LOOK_ROBE, @qe[6]; } - deletearray @qe[0],7; + deletearray @qe[0],8; end; function Add { |