Lineage 2 Tower Forum

Full Version: Fortune Pockets
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Code:
function TradeFortunePocket(id)
-- B0
-- 92 03 00 00
-- 01 00 00 00 -- 1/3/5/7 (1 = stage2, 3 = stage3, 5 = stage4, 7 = stage5)
-- 01 00 00 00
-- 00 00 00 00 00 00 00 00
-- 00 00 00 00
-- 00 00
-- FE FF 00 00
-- 00 00 00 00 00 00 00 00
-- 00 00 00 00
    local packet = PacketBuilder();
    packet:AppendInt(0xB0, 1);
    packet:AppendInt(0x392, 4);
    packet:AppendInt(id, 4);
    packet:AppendInt(0x01, 4);
    packet:AppendInt(0x00, 8);
    packet:AppendInt(0x00, 4);
    packet:AppendInt(0x00, 2);
    packet:AppendInt(0xFFFE, 4);
    packet:AppendInt(0x00, 8);
    packet:AppendInt(0x00, 4);
    SendPacket(packet);
end;


function GetItemCount(id)
    local itemId = GetInventory():FindByDisplayId(id);
    if (itemId) then
return itemId.ItemNum;
    end;
    return 0;
end;


TargetNpc("Pelu", 33936);
Talk();
Click("menu_select?ask=-303&reply=914", "\"I need to enhance Fortune Pocket.\"");
Sleep(4000);


while (GetItemCount(39629) >= 2) do -- Fortune Pocket - Stage 1
    TradeFortunePocket(1);
    Sleep(500);
end;


while (GetItemCount(39630) >= 2) do -- Fortune Pocket - Stage 2
    TradeFortunePocket(3);
    Sleep(500);
end;

its script
Pages: 1 2
Reference URL's