Jump to content
  • 0

"Adding" Battle Manual to this script


Question

Posted

I'm trying to add the Battle Manual effect to this script, but I don't know how to make it.

-	script	175Exp	-1,{
	
OnNPCKillEvent:
    if(BaseLevel >= 99 && BaseLevel <= 120 && getmonsterinfo(killedrid, 1) >= 70) {
        BaseExp = BaseExp + 100 * getmonsterinfo(killedrid, 3);
        JobExp = JobExp + 50 * getmonsterinfo(killedrid, 4);
    }
        else if(BaseLevel >= 120 && BaseLevel <= 139 && getmonsterinfo(killedrid, 1) >= 70) {
        BaseExp = BaseExp + 3000 * getmonsterinfo(killedrid, 3);
        JobExp = JobExp + 2500 * getmonsterinfo(killedrid, 4);
    }
        else if(BaseLevel >= 140 && BaseLevel <= 159 && getmonsterinfo(killedrid, 1) >= 70) {
        BaseExp = BaseExp + 3000 * getmonsterinfo(killedrid, 3);
        JobExp = JobExp + 1500 * getmonsterinfo(killedrid, 4);
    }
        else if(BaseLevel >= 160 && BaseLevel <= 180 && getmonsterinfo(killedrid, 1) >= 70) {
        BaseExp = BaseExp + 40000 * getmonsterinfo(killedrid, 3);
        JobExp = JobExp + 6000 * getmonsterinfo(killedrid, 4);
    }
    else if(BaseLevel >= 180 && BaseLevel <= 199 && getmonsterinfo(killedrid, 1) >= 70) {
        BaseExp = BaseExp + 200000 * getmonsterinfo(killedrid, 3);
        JobExp = JobExp + 8000 * getmonsterinfo(killedrid, 4);
    }
    else if(BaseLevel >= 200 && BaseLevel <= 250 && getmonsterinfo(killedrid, 1) >= 70) {
        BaseExp = BaseExp + 600000 * getmonsterinfo(killedrid, 3);
        JobExp = JobExp + 300000 * getmonsterinfo(killedrid, 4);
    }
end;

}

Like, in the fist case, if I have the SC_EXPBOOST stat active, instead of BaseExp + 100*, I would get 150, and so on. I'm pretty new at programing, so if someone could shine a light for me, I would be pretty grateful.
Thanks in advance!

2 answers to this question

Recommended Posts

  • 1
Posted

Hi. You can use getstatus command to check if player used Battle Manual.

*getstatus(<effect type>{,<type>{,<char_id>}})

Retrieve information about a specific status effect when called. Depending on <type>
specified the function will return different information.

Possible <type> values:
	- 0 or undefined: whether the status is active
	- 1: the val1 of the status

 

8 hours ago, SovietBR said:

Like, in the fist case, if I have the SC_EXPBOOST stat active, instead of BaseExp + 100*, I would get 150

if (getstatus(SC_EXPBOOST))
	BaseExp = BaseExp + 100 + 50 * getmonsterinfo(killedrid, 3);

 

Example:

-	script	175Exp	-1,{
OnNPCKillEvent:
	if (getmonsterinfo(killedrid, 1) < 70)
		end;

	if (BaseLevel >= 99 && BaseLevel <= 120) {
        .@base_bonus = 100;
        .@job_bonus = 50;
    }
	else if (BaseLevel >= 120 && BaseLevel <= 139) {
        .@base_bonus = 3000;
        .@job_bonus = 2500;
    }
    else if (BaseLevel >= 140 && BaseLevel <= 159) {
        .@base_bonus = 3000;
        .@job_bonus = 1500;
    }
    else if (BaseLevel >= 160 && BaseLevel <= 180) {
		.@base_bonus = 40000;
		.@job_bonus = 6000;
	}
    else if (BaseLevel >= 180 && BaseLevel <= 199) {
        .@base_bonus = 200000;
        .@job_bonus = 8000;
    }
    else if (BaseLevel >= 200 && BaseLevel <= 250) {
        .@base_bonus = 600000;
        .@job_bonus = 300000;
    }

	if (getstatus(SC_EXPBOOST)) {
		.@base_bonus += getstatus(SC_EXPBOOST,1);
		.@job_bonus += getstatus(SC_EXPBOOST,1);
	}
	
	.@base_total = .@base_bonus * getmonsterinfo(killedrid, MOB_BASEEXP);
	.@job_total = .@job_bonus * getmonsterinfo(killedrid, MOB_JOBEXP);
	getexp2 .@base_total,.@job_total;
	end;
}

 

  • Upvote 1
  • 0
Posted
3 hours ago, Racaae said:

Hi. You can use getstatus command to check if player used Battle Manual.

*getstatus(<effect type>{,<type>{,<char_id>}})

Retrieve information about a specific status effect when called. Depending on <type>
specified the function will return different information.

Possible <type> values:
	- 0 or undefined: whether the status is active
	- 1: the val1 of the status

 

if (getstatus(SC_EXPBOOST))
	BaseExp = BaseExp + 100 + 50 * getmonsterinfo(killedrid, 3);

 

Example:

-	script	175Exp	-1,{
OnNPCKillEvent:
	if (getmonsterinfo(killedrid, 1) < 70)
		end;

	if (BaseLevel >= 99 && BaseLevel <= 120) {
        .@base_bonus = 100;
        .@job_bonus = 50;
    }
	else if (BaseLevel >= 120 && BaseLevel <= 139) {
        .@base_bonus = 3000;
        .@job_bonus = 2500;
    }
    else if (BaseLevel >= 140 && BaseLevel <= 159) {
        .@base_bonus = 3000;
        .@job_bonus = 1500;
    }
    else if (BaseLevel >= 160 && BaseLevel <= 180) {
		.@base_bonus = 40000;
		.@job_bonus = 6000;
	}
    else if (BaseLevel >= 180 && BaseLevel <= 199) {
        .@base_bonus = 200000;
        .@job_bonus = 8000;
    }
    else if (BaseLevel >= 200 && BaseLevel <= 250) {
        .@base_bonus = 600000;
        .@job_bonus = 300000;
    }

	if (getstatus(SC_EXPBOOST)) {
		.@base_bonus += getstatus(SC_EXPBOOST,1);
		.@job_bonus += getstatus(SC_EXPBOOST,1);
	}
	
	.@base_total = .@base_bonus * getmonsterinfo(killedrid, MOB_BASEEXP);
	.@job_total = .@job_bonus * getmonsterinfo(killedrid, MOB_JOBEXP);
	getexp2 .@base_total,.@job_total;
	end;
}

 

Thanks! I'll try that later. 

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...