Issue information

Issue ID
#361
Status
Fixed
Severity
None
Started
Hercules Elf Bot
Nov 3, 2007 23:04
Last Post
Hercules Elf Bot
Nov 3, 2007 23:04
Confirmation
N/A

Hercules Elf Bot - Nov 3, 2007 23:04

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

Since i was reading the [acronym="/npc/merchants/old_pharmacist.txt"]script[/acronym] to use in other way i discovered that somebody has modified the "making potion function" to adapt it in "orange potion" case, but left the "getarg" on the script and w/o a "callfunc" (or something like it) it doesn't work.

In preliminary tests i got this corrections:
(Follow: Case 1 ~> ELSE ~> Case 2)
---------------------------------------------------------------------------------------------
Change ~>
---------------------------------------------------------------------------------------------
if (countitem(507) < countitem(713)) {
set .@max,countitem(507);
}
if (countitem(508) < countitem(713)) {
set .@max,countitem(508);
} else {
set .@max,countitem(713);
}
---------------------------------------------------------------------------------------------
To ~>
---------------------------------------------------------------------------------------------
if (countitem(507) < countitem(508) && countitem(507) < countitem(713)) {
set .@max,countitem(507);
}else
if (countitem(508) < countitem(713)) {
set .@max,countitem(508);
} else {
set .@max,countitem(713);
}
---------------------------------------------------------------------------------------------
Also change ~>
---------------------------------------------------------------------------------------------
set Zeny,Zeny-(.@max*getarg(1));
delitem getarg(0),.@max*2;
delitem 713,.@max;
getitem getarg(2),.@max;
---------------------------------------------------------------------------------------------
To ~>
---------------------------------------------------------------------------------------------
set Zeny,Zeny-(.@max*3);
delitem 507,.@max;
delitem 508,.@max;
delitem 713,.@max;
getitem 502,.@max;
---------------------------------------------------------------------------------------------
And Change ~>
---------------------------------------------------------------------------------------------
set Zeny,Zeny-(.@amount*getarg(1));
delitem getarg(0),.@amount*2;
delitem 713,.@amount;
getitem getarg(2),.@amount;
---------------------------------------------------------------------------------------------
To ~>
---------------------------------------------------------------------------------------------
set Zeny,Zeny-(.@amount*3);
delitem 507,.@amount;
delitem 507,.@amount;
delitem 713,.@amount;
getitem 502,.@amount;
---------------------------------------------------------------------------------------------

This post has been edited by David Boy: Nov 3 2007, 04:07 PM