Issue information

Issue ID
#2962
Status
Working as Intended
Severity
None
Started
Hercules Elf Bot
Apr 12, 2009 10:52
Last Post
Hercules Elf Bot
Mar 5, 2012 13:05
Confirmation
N/A

Hercules Elf Bot - Apr 12, 2009 10:52

Originally posted by [b]akd[/b]
http://www.eathena.ws/board/index.php?autocom=bugtracker&showbug=2962

Hi everyone,

Here is a bug I saw on the Bard Quest:

variables are cleaned before the end of the quest:

Call block:
CODE
if(countitem(1019) > 59) callsub S_ChangeJob,1019,1901;
        else if(countitem(1068) > 59) callsub S_ChangeJob,1068,1903;
        else if(countitem(1067) > 59) callsub S_ChangeJob,1067,1903;
        else if(countitem(1066) > 59) {
            if(JobLevel > 49) callsub S_ChangeJob,1066,1910;
            else callsub S_ChangeJob,1066,1905;
        }


Block in error:
CODE
S_ChangeJob:
        callfunc "Job_Change",Job_Bard;
        callfunc "F_ClearJobVar";
        mes "[Lalo]";
        mes "Good job. I will make you a job change souvenir with this.";
        mes "Wait just a moment.";
        next;
        mes "[Lalo]";
        mes "^3355FFScrape Scrape Tang Tang^000000";
        mes "^3355FFSqueak Squeak Scratch Scratch^000000";
        delitem getarg(0),60;
        getitem getarg(1),1;
        next;


callfunc "F_ClearJobVar"; must be AFTER delitem/getitem block.

I modified this way on my server:
CODE
S_ChangeJob:
        
        mes "[Lalo]";
        mes "Good job. I will make you a job change souvenir with this.";
        mes "Wait just a moment.";
        next;
        mes "[Lalo]";
        callfunc "Job_Change",Job_Bard;
        mes "^3355FFScrape Scrape Tang Tang^000000";
        mes "^3355FFSqueak Squeak Scratch Scratch^000000";
        delitem getarg(0),60;
        getitem getarg(1),1;
        callfunc "F_ClearJobVar";
        next;


It should work better (IMG:style_emoticons/default/halfsmile.gif)