Skip to content

Commit

Permalink
- Added custom HD Refiner NPC Dwarf Mighty Hammer. (Disabled by defau…
Browse files Browse the repository at this point in the history
…lt.)

 * This NPC uses the cash shop HD ores to upgrade your weapon or gear up to +10 when your current gear or weapon is already +7 without breaking it but downgrading it.
- Moved Malaya Port NPC's to re folder and updated the Malaya Port warps.
- Fixed Bug where players weren't able to finish the Guardian of Yggdrasil Quest and didn't get their reward.
- Fixed that players weren't able to start the "Ring of the wise king" and "Finding a Fairy" quest using the Cat Hand Agent warper inside Eden Group Headquarters.

Signed-off-by: Masao <masao@gmx.ch>
  • Loading branch information
Masao87 committed May 27, 2013
1 parent fe15780 commit b17e2b7
Show file tree
Hide file tree
Showing 8 changed files with 309 additions and 39 deletions.
1 change: 1 addition & 0 deletions npc/instances/NydhoggsNest.txt
Expand Up @@ -2134,6 +2134,7 @@ OnTimer180000:
switch(select("Please let me out.:I want to look around for a while.")) {
case 1:
set 'ins_nyd2,0;
set ins_nyd,203;
//setquest 3135;
warp "nyd_dun02",98,196;
end;
Expand Down
211 changes: 211 additions & 0 deletions npc/merchants/hd_refine.txt
@@ -0,0 +1,211 @@
//===== Hercules Script ======================================
//= HD Refiner
//===== By: ==================================================
//= Masao
//===== Current Version: =====================================
//= 1.0
//===== Compatible With: =====================================
//= Hercules
//===== Description: =========================================
//= Dwarf Mighty Hammer is an refining NPC which allows you
//= to upgrade your weapon or gear up to +10 without breaking
//= the weapon or gear but instead downgrading it by -1 using
//= the HD Ores which are usually only obtainable through the
//= *RO cashshops.
//=
//= Even at +0 refine, if you use the HD stones, the weapon
//= or gear will not break but stay at +0 if it fails.
//===== Additional Comments: =================================
//= 1.0 First Version, dialogue and coordinations are custom.
//============================================================

// Dwarf Mighty Hammer Locations (Custom)
//============================================================
prontera,145,170,6 script Dwarf Mighty Hammer#prt 826,{
callfunc "refinehd","Dwarf Mighty Hammer";
end;
}
moc_para01,175,115,5 script Dwarf Mighty Hammer#moc 826,{
callfunc "refinehd","Dwarf Mighty Hammer";
end;
}
payon,140,175,6 script Dwarf Mighty Hammer#pay 826,{
callfunc "refinehd","Dwarf Mighty Hammer";
end;
}

//============================================================
// +7 to +10 Refiner Function
//============================================================
function script refinehd {
disable_items;
mes "["+ getarg(0) +"]";
mes "I am the best Blacksmith ever!";
mes "I don't work with normal, boring items.";
mes "But only with items that are level 7 or higher!";
next;
mes "["+ getarg(0) +"]";
mes "Anyway, you may use my services if your item is lv 7 or higher.";
mes "What do you want to have refined?";
next;
setarray .@position$[1],"Head","Body","Left hand","Right hand","Robe","Shoes","Accessory 1","Accessory 2","Head 2","Head 3";
set .@menu$,"";
for(set .@i,1; .@i<=10; set .@i,.@i+1) {
if(getequipisequiped(.@i))
set .@menu$, .@menu$ + .@position$[.@i] + "-" + "[" + getequipname(.@i) + "]";
set .@menu$, .@menu$ + ":";
}
set .@part,select(.@menu$);
if(!getequipisequiped(.@part)) {
mes "[" + getarg(0) + "]";
mes "You're not wearing";
mes "anything there that";
mes "I can refine.";
emotion e_an;
close;
}
//Check if the item is refinable...
if(!getequipisenableref(.@part)) {
mes "[" + getarg(0) + "]";
mes "I don't think I can";
mes "refine this item at all...";
close;
}
//Check if the item is identified... (Don't know why this is in here... but kept it anyway)
if(!getequipisidentify(.@part)) {
mes "[" + getarg(0) + "]";
mes "You can't refine this";
mes "if you haven't appraised";
mes "it first. Make sure your";
mes "stuff is identified before";
mes "I can refine it.";
close;
}
//Check to see if the item is at least +7
if(getequiprefinerycnt(.@part) < 7) {
mes "["+ getarg(0) +"]";
mes "I said I don't work with Equipment under lv. 7.";
close;
}
if(getequiprefinerycnt(.@part) >= 10) {
mes "["+ getarg(0) +"]";
mes "I can't refine this";
mes "any more. This is as";
mes "refined as it gets!";
close;
}
set .@refineitemid, getequipid(.@part); // save id of the item
set .@refinerycnt, getequiprefinerycnt(.@part); //save refinery count
if ((getequipweaponlv(.@part) >= 1) && (getequipweaponlv(.@part) <= 4)) {
set .@material,6240;
mes "["+ getarg(0) +"]";
mes "Hmm a weapon, is that ok?";
mes "If you want to refine this weapon,";
mes "I will need 1 ^003366Purified Oridecon^000000.";
mes "Are you sure you want to continue?";
} else {
set .@material,6241;
mes "["+ getarg(0) +"]";
mes "Hmm an armor, is that ok?";
mes "If you want to refine this armor,";
mes "I will need 1 ^003366Purified Elunium^000000.";
mes "Are you sure you want to continue?";
}
next;
if(select("Yes:No") == 2){
mes "["+ getarg(0) +"]";
mes "Well, no challenge is one way...";
mes "No risk... that could be wise.";
close;
}
set .@continue,1;
while(.@continue == 1){
if(getequiprefinerycnt(.@part) >= 10) {
mes "["+ getarg(0) +"]";
mes "I can't refine this";
mes "any more. This is as";
mes "refined as it gets!";
close;
}
if ((getequipweaponlv(.@part) >= 1) && (getequipweaponlv(.@part) <= 4)) {
mes "["+ getarg(0) +"]";
mes "This weapon already has been refined serveral times.";
mes "You could have the upgrade level of the weapon decreased.";
} else {
mes "["+ getarg(0) +"]";
mes "This armor already has been refined serveral times.";
mes "You could have the upgrade level of the armor decreased.";
}
next;
mes "["+ getarg(0) +"]";
mes "Do you want me to refine it?";
mes "I think I gave you enough warnings.";
next;
if(select("Yes.:No.") == 2) {
mes "["+ getarg(0) +"]";
mes "Well, no challenge is one way..";
mes "No risk.. that could be wise.";
close;
}
if(countitem(.@material) < 1) {
mes "["+ getarg(0) +"]";
mes "Hm, it seems you don't have enough materials.";
mes "Please check it out.";
close;
}
delitem .@material,1;
if(getequipisequiped(.@part) == 0) { // hacker has removed the item (not changed, why?)
mes "[" + getarg(0) + "]";
mes "Look here... you don't have any items on...";
close;
}
set .@rand,rand(100);
if (getequippercentrefinery(.@part) > .@rand) {
mes "Clang! Clang! Clang! Clang!";
successrefitem .@part;
next;
emotion e_no1;
mes "["+ getarg(0) +"]";
mes "Good! Succes!!!";
mes "I am the best Blacksmith.";
next;
mes "["+ getarg(0) +"]";
mes "Ould you like to continue?";
if(select("No:Yes") == 1){
mes "[" + getarg(0) + "]";
mes "All finished... Come again soon.";
close;
}
next;
}
if (getequippercentrefinery(.@part) < .@rand) {

This comment has been minimized.

Copy link
@saithis

saithis May 27, 2013

Shouldn't there be some code handling "getequippercentrefinery(.@part) == .@rand"?

This comment has been minimized.

Copy link
@Masao87

Masao87 May 28, 2013

Author Contributor

It's not necessary since the chance is like really small for that to happen, but the script will be replaced soon by the official one from Euphy.

mes "["+ getarg(0) +"]";
mes "Clang! Clang! Clang! Clang!";
if(getequiprefinerycnt(.@part) >= 1) {
downrefitem .@part;
}
next;
emotion (!rand(5))?e_cash:e_omg;
mes "["+ getarg(0) +"]";
mes "Ahhh!!!";
next;
mes "["+ getarg(0) +"]";
mes "Oh my!";
mes "The upgrade level has dropped...";
mes "There could've been made an mistake even though I am the best ever.";
mes "It was out of my hands.";
next;
mes "["+ getarg(0) +"]";
mes "I will do a better job next time! Don't worry!";
next;
mes "["+ getarg(0) +"]";
mes "Ould you like to continue?";

This comment has been minimized.

Copy link
@euphyy

euphyy May 28, 2013

Contributor

--> Ould

This comment has been minimized.

Copy link
@Masao87

Masao87 May 28, 2013

Author Contributor

Will be replaced by your originial Script, thank you very much.

if(select("No:Yes") == 1){
mes "[" + getarg(0) + "]";
mes "All finished... Come again soon.";
close;
}
next;
}
}
}
4 changes: 2 additions & 2 deletions npc/quests/quests_13_1.txt
Expand Up @@ -4783,7 +4783,7 @@ mid_camp,240,270,3 script Botanist#ep13 750,{

mid_camp,336,171,1 script Camp Guard#man1 852,{
if (ep13_animal == 0) {
if (ep13_newbs == 6 || ep13_newbs == 19) goto OnHalt;
if (ep13_newbs == 6 || ep13_newbs == 19 || ep13_start == 100) goto OnHalt;
else {
mes "[Camp Guard]";
mes "Stop!";
Expand Down Expand Up @@ -4877,7 +4877,7 @@ OnHalt:

mid_camp,13,143,5 script Camp Guard#man2 852,{
if (ep13_animal == 0) {
if (ep13_newbs == 6 || ep13_newbs == 19) goto OnHalt;
if (ep13_newbs == 6 || ep13_newbs == 19 || ep13_start == 100) goto OnHalt;

This comment has been minimized.

Copy link
@euphyy

euphyy May 28, 2013

Contributor

You forgot "Camp Guard#man3".

This comment has been minimized.

Copy link
@Masao87

Masao87 May 28, 2013

Author Contributor

Thanks for pointing that out.

else {
mes "[Camp Guard]";
mes "Stop!";
Expand Down
10 changes: 5 additions & 5 deletions npc/quests/quests_13_2.txt
Expand Up @@ -3324,23 +3324,23 @@ mid_camp,192,239,4 script Wanted Sign#ep13_2ect01 857,{
if ((ep13_2_dayegg == 1) && (countitem(6093) < 10)) {
mes "We just got fresh eggs from the dragon nest.";
getitem 6093,1; //Egg_Of_Draco
disablenpc strnpcinfo(1);
disablenpc strnpcinfo(0);
initnpctimer;
close;
}
end;

OnTimer420000:
enablenpc strnpcinfo(1);
enablenpc strnpcinfo(0);
stopnpctimer;
end;

OnEnable:
enablenpc strnpcinfo(1);
enablenpc strnpcinfo(0);
end;

OnDisable:
disablenpc strnpcinfo(1);
disablenpc strnpcinfo(0);
end;
}

Expand Down Expand Up @@ -3560,7 +3560,7 @@ OnTimer300000:
// Otherworld language
//============================================================
mid_camp,197,237,3 script Schwartzvalt Mechanic#1 869,{
if (ep13_1_edq > 2) {
if (ep13_1_edq > 2 || ep13_start == 100) {
if (ep13_2_rhea < 1) {
mes "[Mechanic Engineer Dorance]";
mes "Do you know about the Ring of the Ancient Wise King? If you wear that Ring, you can talk to animals.";
Expand Down
File renamed without changes.
1 change: 1 addition & 0 deletions npc/re/scripts.conf
Expand Up @@ -13,6 +13,7 @@ npc: npc/re/cities/dicastes.txt
npc: npc/re/cities/izlude.txt
npc: npc/re/cities/jawaii.txt
npc: npc/re/cities/malangdo.txt
npc: npc/re/cities/malaya.txt
npc: npc/re/cities/mora.txt

// --------------------------- Guides ---------------------------
Expand Down

1 comment on commit b17e2b7

@euphyy
Copy link
Contributor

@euphyy euphyy commented on b17e2b7 May 28, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.