L2Tower Discord Let's keep the community alive with discord. Discussions about plugins and scripts L2Tower Discord

Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Fortune Pockets
Author Message
Onomatopeja Offline
VIP Member
***

Posts: 338
Joined: Sep 2011
Reputation: 34
Version: 1.4.2.142
Post: #11
RE: Fortune Pockets

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
06-23-2015 19:51 PM
Find all posts by this user Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Where i drop fortune pockets ? sectorzueira 4 4,546 09-10-2015 21:31 PM
Last Post: sectorzueira
  Fortune pockets alfonzo 5 3,930 11-23-2014 12:12 PM
Last Post: lwcdr



User(s) browsing this thread: 1 Guest(s)