Issue information

Issue ID
#4858
Status
Fixed
Severity
None
Started
Hercules Elf Bot
Apr 10, 2011 7:39
Last Post
Hercules Elf Bot
Mar 5, 2012 15:49
Confirmation
N/A

Hercules Elf Bot - Apr 10, 2011 7:39

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

Simple script

QUOTE
function script F_OnCore_Sell {

function F_OnValuePrice
{
switch(getarg(0))
{
case 2302:
return 500;
case 1228:
return 1000000;
}
return getiteminfo(getarg(0),0);
}

set .@tmp_zeny, 0;

for (set .@i, 0; .@i < getarraysize(@sold_nameid); set .@i, .@i + 1)
{
set .@nameid, @sold_nameid[.@i];
set .@amount, @sold_quantity[.@i];

if (.@nameid <= 0 || countitem(.@nameid) < .@amount)
continue;

// add tmp
set .@t, getarraysize(.@tmp_nameid);
set .@tmp_nameid[.@t], .@nameid;
set .@tmp_amount[.@t], .@amount;
set .@tmp_zeny, .@tmp_zeny + F_OnValuePrice(.@nameid) * .@amount;
}

set zeny,zeny+ .@tmp_zeny;
for (set .@i, 0; .@i < getarraysize(.@tmp_nameid); set .@i, .@i + 1)
{
if (.@tmp_nameid[.@i] <= 0 || .@tmp_amount[.@i] <= 0)
continue;

delitem .@tmp_nameid[.@i], .@tmp_amount[.@i];
}
return;
}


Simple event

If the items within the same item id.
However, different parts of the upgrade.

QUOTE
Event For example
1. Buy weapons in the shop to 3-4 ea
2. Equip weapons in hand and then use the command @refine 0 10
- knife +10 1ea in hand
- knife +0 1ea in inventory
- knife +0 1ea in inventory
- knife +0 1ea in inventory

3. Unequip weapons in hand
- knife +10 1ea in inventory
- knife +0 1ea in inventory
- knife +0 1ea in inventory
- knife +0 1ea in inventory

4. Sell for script control, Select the items sold not upgrade.


Results event
Item that upgrade, Be sold by

I think it would have a problem with array itemlist and sort item
Between inventory and sell windows type.

Sorry for my language is not strong. (IMG:style_emoticons/default/smile.gif)

This post has been edited by BabyIze: Apr 10 2011, 04:28 AM

Hercules Elf Bot - Dec 6, 2011 15:22

Originally posted by [b]Ind[/b]
i'm not sure its a core issue -- I'll pass to scripting section and if they find it to not belong there they'll pass back to core.

Hercules Elf Bot - Dec 6, 2011 16:51

Originally posted by [b]Epoque[/b]
Should be resolved now, [b]r15017[/b] includes additional information when selling items including attribute, refine, identify flag and the card information for the equipment. You can use [u]delitem2[/u] to delete the items matching the parameters provided.