Jump to content
  • 0

The weaponry doesn't work. Any problem with this?


Meister

Question


  • Group:  Members
  • Topic Count:  280
  • Topics Per Day:  0.06
  • Content Count:  841
  • Reputation:   17
  • Joined:  04/16/12
  • Last Seen:  

 
//===== rAthena Script ======================================
//= Kagerou/Oboro Job Change Quest
//===== By: ================================================== 
//= M45T3R, Dastgir Pojee
//===== Current Version: ===================================== 
//= 1.1
//===== Description: ========================================= 
//= Test of Weaponary KO
//===== Additional Comments: ================================= 
//= 1.0 Extracted from iRO(Official?) [M45T3R]/[Dastgir Pojee]
//= 1.1 Fixed Many Errors.    [Dastgir Pojee]
//============================================================
job_ko,117,128,0    script    Drawer#ko    999,{    //Sprite ID Needed.
mes "There is some kind of device on the drawer.";
switch(select("Stop.:Try to operate it.")){
    case 1:
        close;
    case 2:
        mes "Clank clunk clink";
        next;
        warp "amatsu",147,136;
        end;
}
 
OnEffect:
    misceffect 191;
end;
}
 
job_ko,127,125,1    script    Red Leopard Joe#ko    999,{    //Sprite ID Needed
if (checkquest(5145)==1){
    mes "[Red Leopard Joe]";
    mes "Did you get a successful result?";
    switch(select("Not yet.:Here it is.:Actually")){
        case 1:
            next;
            mes "[Red Leopard Joe]";
            mes "It isn't easy to get a satisfactory result at first.";
            close;
            
        case 2:
            next;
            mes "[Red Leopard Joe]";
            mes "You've lost the weapon even with my warning.";
            mes "Nothing else we can do. Wait!";
            next;
            mes "[Red Leopard Joe]";
            mes "Red Leopard Joe mumbles something and suddenly all weapons are unequipped.";
            if(countitem(13074))mes "What is this? You still have the prototype. Stop playing around.";
            else{erasequest 5143; erasequest 5145; close;}    //Needs Dialog
            close;
            
        case 3:
        mes "[Red Leopard Joe]";
        mes "Looks like you've got some results.";
        next;
        if (!isequipped(13074)){mes "[Red Leopard Joe]"; mes "Hmm? But you didn't equip the weapon you were going to show me."; close;}
        mes "[Red Leopard Joe]";
        mes "Looks like you've got some results.";
        next;
        mes "[Red Leopard Joe]";
        mes "Is that weapon yours? Let me have a look.";
        next;
        mes "[Red Leopard Joe]";
        mes "Joe took a thorough look at the seal.";
        next;
        if(getrefine()<7){
            mes "[Red Leopard Joe]";
            mes "Are you that low?";
            mes "I've must have misjudged you. You might have been satisfied yourself but I'm not. Do it again!!";
            close;
        }
        else if(getrefine()>=7){
            set @refine,getrefine();
            mes "[Red Leopard Joe]";
            mes "Hmm... Is this your limit?";
            mes "You've just made it that close to passing. I will ask one more time, are you satisfied?";
            switch(select("Yes:No")){
                case 2:
                    next;
                    mes "You're still here. Why?";
                    close;
                case 1:
                    next;
                    mes "[Red Leopard Joe]";
                    mes "Your competence is enough.";
                    next;
                    mes "[Red Leopard Joe]";
                    mes "I can feel it.";
                    next;
                    mes "[Red Leopard Joe]";
                    mes "I will take this weapon to give it some finishing touches";
                    next;
                    unequip 3;
                    if(!countitem2(13074,1,0,@refine,0,0,0,0)){mes "Remove any extra cards inserted on it"; close;}
                    delitem2 13074,1,0,@refine,0,0,0,0,0;
                    erasequest 5145;
                    erasequest 5138;
                    erasequest 5143;
                    set KO_QWC,1;
                    set KO_QWCC,1;
                    if (KO_QKCC == 1 && KO_QSCC == 1 || KO_QKCC == 1 && KO_QWCC == 1 || KO_QSCC == 1 && KO_QKCC == 1 || KO_QSCC == 1 && KO_QWCC == 1 || KO_QWCC == 1 && KO_QSCC == 1 || KO_QWCC == 1 && KO_QKCC == 1)
                    set KOLQ,"Weaponary";
                    set KOHS,KOHS+1;
                    mes "[Red Leopard Joe]";
                    mes "'"+strcharinfo(0)+"'";
                    mes "Passed the weapon test!!";
                    close;
            }
        }
    }
} else if (checkquest(5143)==1){
    mes "[Red Leopard Joe]";
    mes "Are you done making the prototype of the new weapons?";
    switch(select("Crafting Tools?:I don't have enough materials:How do you expect me to make a weapon?:Yes, I'm done.")){
        case 1:
            next;
            misceffect 191;
            mes "[Red Leopard Joe]";
            mes "Feel free to use tools from there and";
            next;
            misceffect 191;
            mes "[Red Leopard Joe]";
            mes "there";
            next;
            mes "[Red Leopard Joe]";
            mes "and anything else you can use";
            close;
 
        case 2:
            next;
            mes "[Red Leopard Joe]";
            mes "Are you done making the prototype of the new weapons?";
            next;
            mes "[Red Leopard Joe]";
            mes "You haven't brought enough materials?";
            next;
            mes "[Red Leopard Joe]";
            //donpcevent "Drawer#ko::OnEffect";    //Should be here.
            mes "Then we'll have to pay a visit to the village. Try the drawer over there. It'll take you to the village.";
            donpcevent "Drawer#ko::OnEffect";
            close;
            
        case 3:
            next;
            mes "[Red Leopard Joe]";
            mes "Hmm... Guess I expected too much? Let me explain.";
            next;
            mes "[Red Leopard Joe]";
            mes "You first have to melt the ore to use for the weapon. And the best way to get high purity metal is to melt materials that are of the same kind.";
            mes "For example, Iron Ore, Iron, and Steel are of similar property so you can get a high purity metal out of them.";
            next;
            mes "[Red Leopard Joe]";
            mes "Once you've melted a high purity metal, pour it in a mold to get the shape of the weapon and then make it firm through grinding and tempering.";
            next;
            mes "[Red Leopard Joe]";
            mes "By the way, you will get the best results by thoroughly rotating, grinding and tempering.";
            next;
            mes "[Red Leopard Joe]";
            mes "I think this is enough to get you started, don't you think? Now go and work on that prototype!!";
            close;
            
        case 4:
            mes "[Red Leopard Joe]";
            mes "Hmm... Interesting... Is it a dagger in a shape of a Kunai?";
            next;
            mes "[Red Leopard Joe]";
            mes "Very creative. I do see room for improvement but the weapon itself may come out useful after smoothing it out a bit.";
            next;
            mes "[Red Leopard Joe]";
            mes "Good. I think you are ready.";
            mes "Now it's time to upgrade?";
            next;
            mes "[Red Leopard Joe]";
            mes "There are refinement tools on both sides of me. Use those to refine a weapon and come back.";
            next;
            mes "[Red Leopard Joe]";
            mes "I created the refinement tools myself with great effort so you won't have any trouble using them.";
            setquest 5145;    //Prototype-(3)
            mes "Ah... But just in case,";
            mes "^ee1313be careful not to cause trouble by showing these to blacksmiths outside of here.^ee1313";
            close;
    }
}else if (checkquest(5142)==1){
    mes "Are you done making the prototype of the new weapons?";
    switch(select("Crafting tools?:I don't have enough meterials.:How do you expect me to make a weapon?")){
        case 1:
            next;
            misceffect 191;
            mes "[Red Leopard Joe]";
            mes "Feel free to use tools from there and";
            next;
            misceffect 191;
            mes "[Red Leopard Joe]";
            mes "there";
            next;
            mes "[Red Leopard Joe]";
            mes "and anything else you can use";
            close;
 
        case 2:
            next;
            mes "[Red Leopard Joe]";
            mes "Are you done making the prototype of the new weapons?";
            next;
            mes "[Red Leopard Joe]";
            mes "You haven't brought enough materials?";
            next;
            mes "[Red Leopard Joe]";
            //donpcevent "Drawer#ko::OnEffect";    //Should be here.
            mes "Then we'll have to pay a visit to the village. Try the drawer over there. It'll take you to the village.";
            donpcevent "Drawer#ko::OnEffect";
            close;
            
        case 3:
            next;
            mes "[Red Leopard Joe]";
            mes "Hmm... Guess I expected too much? Let me explain.";
            next;
            mes "[Red Leopard Joe]";
            mes "You first have to melt the ore to use for the weapon. And the best way to get high purity metal is to melt materials that are of the same kind.";
            mes "For example, Iron Ore, Iron, and Steel are of similar property so you can get a high purity metal out of them.";
            next;
            mes "[Red Leopard Joe]";
            mes "Once you've melted a high purity metal, pour it in a mold to get the shape of the weapon and then make it firm through grinding and tempering.";
            next;
            mes "[Red Leopard Joe]";
            mes "By the way, you will get the best results by thoroughly rotating, grinding and tempering.";
            next;
            mes "[Red Leopard Joe]";
            mes "I think this is enough to get you started, don't you think? Now go and work on that prototype!!";
            close;
 
    }
} else if (checkquest(5138)==1){
mes "[Red Leopard Joe]";
mes "Been a While";
next;
if (select("Long time indeed,Joe.")==1){
    mes "[Red Leopard Joe]";
    mes "You aren't surprised I'm here. Did you meet ^0237FDCougar^0237FD before coming here?";
    next;
    mes "[Red Leopard Joe]";
    mes "Don't like it that I'm not the first one you visited but that is not important.";
    next;
    mes "[Red Leopard Joe]";
    mes "Alright! "+strcharinfo(0);
    mes "Welcome to the workshop where weapons are created for the family.";
    next;
    mes "[Red Leopard Joe]";
    mes "Our family has been creating and using unique weapons to serve our secret missions since ancient times.";
    next;
    if (select("Really? At Einbroch?")==1){
        mes "[Red Leopard Joe]";
        mes "Hmm? You are not as slow as I thought you were!";
        next;
        mes "[Red Leopard Joe]";
        mes "Yes. Einbroch is known as an industrial city, the city of great blacksmiths create new technology.";
        next;
        mes "[Red Leopard Joe]";
        mes "My mission is to analyze their technology and report back to the family.";
        next;
        mes "[Red Leopard Joe]";
        mes "I spoke more than I intended to.";
        next;
        mes "[Red Leopard Joe]";
        mes "Did you bring enough ^6848B7Iron Ore^6848B7, ^6848B7Iron^6848B7, ^6848B7Steel^6848B7, ^6848B7Phracon^6848B7, ^6848B7Emveretaron^6848B7, ^6848B7Rough Oridecon^6848B7, and ^6848B7Rough Elunium^6848B7?";
        next;
        mes "Let's now create a new prototype weapon.";
        next;
        misceffect 191;
        mes "[Red Leopard Joe]";
        mes "Feel free to use tools from here,";
        next;
        misceffect 191;
        mes "[Red Leopard Joe]";
        mes "there";
        next;
        misceffect 191;
        setquest 5142;    //Prototype-(1)
        mes "[Red Leopard Joe]";
        mes "and everywhere else. Now let's begin!!";
        close;
    }
}
} else{
    mes "[Red Leopard Joe]";
    mes "Oh, I almost forgot";
    mes "Go report the test results to Gion";
    next;
    warp "job_ko",26,104;
    end;
}
}
 
job_ko,131,124,1    script    Crafting Tools#ko_01    999,{    //Needs Sprite ID
if (checkquest(5142)==1){
    function KO_WR; function KO_WC;
    set @percent,0; set @opt,0; set @wtype,0; set @temp,0; set @grind,0;
    mes "Tool to create weapons.";
    mes "First need to melt metals like iron and iron ore to use to create a weapon.";
    next;
    if (countitem(998) < 10 || countitem(999) < 7 || countitem(1002) < 7 || countitem(1010) < 7 || countitem(1011) < 10 || countitem(756) <10 || countitem(757) < 10){ mes "But you do not have any more metal to melt. Let's try again after getting more metal."; close;}
    while(1){
        set @opt,select("Melt iron ore.:Melt iron.:Melt steel.:Melt phracon.:Melt emveretarcon.:Melt rough oriecon.:Melt rough elunium.:Stop.");
        KO_WC(@opt);
        if (@percent>=100) break;
    }
    next;
    mes "Now the metal is melted to use for creating weapons.";
    next;
    mes "Next is to make the melted metal firm by pouring it into a mold. Which mold shape will you use?";
    set @opt,select("Dagger Mold:Shuriken Mold");
    mes "Poured the melted metal into the "+((@opt==1)?"dagger":"shuriken")+" mold.";
    next;
    progressbar "0x0449f0",3;    //Needs Color Info
    next;
    mes "Looks like the metal is taking shape. Now what next?";
    set @wtype,select("Grind the Weapon:Temper the weapon");
    while(1){
        KO_WR(@wtype-1);
        set @wtype,select("Grind the Weapon:Temper the weapon:Final Touches");
    }
    close;
    
}else{
    mes "A crafting tool.";
    mes "Don't really need it now.";
    close;
}
function    KO_WC    {    //Kagerou/Oboro    Weapon-Crafting
    switch(@opt){
        case 1: set .@item,1002;
        case 2: set .@item,998;
        case 3: set .@item,999;
        case 4: set .@item,1010;
        case 5: set .@item,1011;
        case 6: set .@item,756;
        case 7: set .@item,757;
        case 8: close;
    }
    if (!countitem(.@item)) {mes "Don't have "+getitemname(.@item); return;}
    delitem .@item,1;
    misceffect 302;    //NPC Uses Effect 302
    mes "Melted "+getitemname(.@item)+" in high temperature.";
    if (.@item == 1002 || .@item == 1010 || .@item == 999 || .@item == 756){
        set @percent,@percent+5;
    }
    if (.@item == 998 || .@item == 1011 || .@item == 999 || .@item == 756){
        set @percent,@percent+10;
    }
    if (.@item == 757){ set @percent,@percent+0;}    //Used 100+ And no Result.
    next;
    mes "Which metal will be melted next?";
    next;
    return;
}
function    KO_WR    {    //Kagerou/Oboro    Weapon-Refining
    if (getarg(0)<=1){
        if (getarg(0)) set @grind,@grind+1;    atcommand "@effect 21";
        if (!getarg(0)) set @temp,@temp+1;    atcommand "@effect 101";
        mes ((getarg(0)==0)?"Ground":"Tempered")+" the weapon";
        next;
        mes "Now what next?";
        return;
    }
    else if (getarg(0)==2){
        set @percent,100-(rand((@grind+1)*10,(@temp+1)*10));
    }
    mes "Start to sharpen the tool using a whetstone for finishing touches.";
    next;
    progressbar "0x0449f0",3;    //Needs Color Info
    atcommand "@effect 183";
    if (rand(0,100) > @percent){
        changequest 5142,5143;    //Prototype-(2)
        if(@opt==2){getitem 13074,1;}    //Ninja Cutter
        else if (@opt==1){getitem 13074,1;}    //Needs Info
        mes "The weapon was created successfully.";
        mes "Let's take it to Red Leopard Joe.";
        close;
    }
    else{
        mes "The weapon was destroyed while doing the finishing touches to it.";
        next;
        mes "There must have been something missed while creating the weapon. Very sad this happened but you'll have to start all over again.";
        close;
    }
    return;
}    
}
 
job_ko,121,121,1    script    Refinement Tools#ko_01    999,{
if (checkquest(5145)==1){
    mes "The equipment starts up with a pleasant vibration.";
    next;
    mes "Looks like you can use the tool right away for refinement because it holds a good deal of Elunium and Oridecon within it.";
    switch(select("Start refining.:Do not start refining.")){
        case 2:
            next;
            mes "You turned off the tool.";
            close;
            
        case 1:
            if (!getequipid(3)){
                next;
                mes "Bzzzt";
                next;
                mes "A warning beep comes from the tool.";
                next;
                mes "This equipment does not work without an equipped item to refine.";
                close;
            } else if (!isequipped(13074)){
                next;
                mes "Wait... this weapon is not a customized one.";
                next;
                mes "Why don't you refine this with those hot-headed blacksmiths out there?";
                close;
            } else if (getrefine()<4){
                next;
                mes "Analyzing the weapon.";
                next;
                mes "Start refining.";
                next;
                progressbar "0x0449f0",1;    //Needs Color Info
                mes "Succeeded in refining.";
                successrefitem 3;
                next;
                mes "You turn off the refinement tool.";
                close;
            } else if (getrefine()>10){    //Needs Info Here
                mes "Cannot Refine More";
                close;
            } else if (getrefine()>3){
                next;
                mes "This is very well refined equipment. Do you want to continue? Refine skill decreases by 1 if refinement fails.";
                switch(select("Continue.:Stop.")){
                    case 2:
                        next;
                        mes "You turned off the tool.";
                        close;
                    case 1:
                        next;
                        set @percent,40;
                        if (@percent > rand(1,100)){
                            mes "Succeeded in refining.";
                            successrefitem 3;
                            break;
                        } else {
                            mes "Failed in refining.";
                            downrefitem 3;
                            mes "Your weapon refinement skill dropped by 1.";
                        }
                }
                next;
                mes "You turn off the refinement tool.";
                close;
            }
            
    }
}
else{
    mes "This tool helps you refine your weapons automatically. However you won't need this just now.";
    close;
}
}
 
//Duplicates.
job_ko,129,129,1    duplicate(Crafting Tools#ko_01)    Crafting Tools#ko_02    999
job_ko,116,122,1    duplicate(Crafting Tools#ko_01)    Crafting Tools#ko_03    999
job_ko,127,121,1    duplicate(Refinement Tools#ko_01)    Refinement Tools#ko_02    999

Alright, it's almost done thank you to Emistry. The only problem now is the refine function or the part wherein the item needs to be refined. If anyone can help please do help me thank you.!

Edited by Gnome
Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...