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

Thread Closed 
 
Thread Rating:
  • 4 Vote(s) - 3.75 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Giant Energy - Provisional Clan Hall
Author Message
NaoJogoMais Offline
I'm Watching You!
**

Posts: 924
Joined: Oct 2012
Reputation: 194
Version: 1.4.2.132
Post: #1
Giant Energy - Provisional Clan Hall

I tryed:

http://forum.l2tower.eu/thread-giants-en...ant+Energy

http://forum.l2tower.eu/thread-request-b...ht=autobuy

but this dont work at Provisional, idk why.

I try change npc name and Windows Option, it work, but only one time, then, stop work. :/

.


[ RETIRED ]
...from retail!



[Image: 201628.png]
05-27-2013 05:34 AM
Find all posts by this user
PvPSuite Offline
Manners Maketh Man
*****

Posts: 277
Joined: Feb 2013
Reputation: 277
Version: 1.4.2.133
Post: #2
RE: Giant Energy - Provisional Clan Hall

Check your PMs
05-27-2013 15:02 PM
Find all posts by this user
TheQQmaster Offline
Trolling the Trolls
*****

Posts: 1,532
Joined: Jun 2012
Reputation: 640
Version: 1.4.2.133
Post: #3
RE: Giant Energy - Provisional Clan Hall

works for me Smile

    LUA Programming
buy = true;
afk = false; -- will go out clan hall then soe in time if true
LastBuyTimeManually = os.time({year=2013, month=5, day=22, hour=23, min=34, sec=30})
ClanHallNpcName = "Albert";
 
skip = false;
GiantEnergyQuantityAfterBuy = nil;
GiantEnergyQuantityBeforeBuy = nil;
 
function LoadLastBuyfromFile(filename) --function that uses filename file to obtain player stock.
	local file = io.open(GetDir() .. filename, "r")
	if (file == nil) then -- then create a file
 file = io.open(GetDir() .. filename, "w")	
	else	
 for line in file:lines() do
 if (tonumber(line) ~= nil) then
 return tonumber(line);
 end;
 end;
	end;
	file:close();	
	return 0;	
end;
 
function UpdateLastEnergyBuyFile(thefile)
	local file = io.open(GetDir() .. thefile, "w+")
	file:write(tostring(os.time() + 2) .. "\n");
	file:close();
end;
 
LastBuyOnFile = LoadLastBuyfromFile(GetMe():GetName() .. "LastEnergyBuy.txt");
 
if (LastBuyTimeManually > LastBuyOnFile) then
	LastBuyTime = LastBuyTimeManually;
else
	LastBuyTime = LastBuyOnFile;
end;
	--ShowToClient("Buying Energies Script","Next Giant Energy Sale will occur between " .. os.date("%X") .. " and ".. os.date("%X",os.time()+3600) .. " and it need to be done manually.");
if buy then
	if (os.time() > LastBuyTime + 7200) then
 ShowToClient("Buying Energies Script","No Idea When Spawn Might be.");
	elseif (os.time() > LastBuyTime + 3610) and (os.time() < LastBuyTime + 7200) then
 ShowToClient("Buying Energies Script","Next Giant Energy Sale will occur between " .. os.date("%X") .. " and ".. os.date("%X",os.time()+3600) .. " and it need to be done manually.");
 while (GiantEnergyQuantityBeforeBuy == nil) or (GiantEnergyQuantityAfterBuy == nil) or ((GiantEnergyQuantityAfterBuy-GiantEnergyQuantityBeforeBuy) <= 0) do
 Sleep(2000);
 MyTarget = GetTarget();
 if (MyTarget ~= nil) and (MyTarget:GetName() == ClanHallNpcName) then
 GiantEnergy = GetInventory():FindByDisplayId(35563);
 if (GiantEnergy == nil) then
 GiantEnergyQuantityAfterBuy = 0;
 if (GiantEnergyQuantityBeforeBuy == nil) then
 GiantEnergyQuantityBeforeBuy = 0;
 end;
 else
 GiantEnergyQuantityAfterBuy = GiantEnergy.ItemNum;
 end;
 else
 GiantEnergy = GetInventory():FindByDisplayId(35563);
 if (GiantEnergy == nil) then
 GiantEnergyQuantityBeforeBuy = 0;
 if (GiantEnergyQuantityAfterBuy == nil) then
 GiantEnergyQuantityAfterBuy = 0;
 end;
 else
 GiantEnergyQuantityBeforeBuy = GiantEnergy.ItemNum;
 end;
 end;
 end;
 ShowToClient("Buying Energies Script","Giant Energy Quantity Change Detected, time set for now");
 UpdateLastEnergyBuyFile(GetMe():GetName() .. "LastEnergyBuy.txt");
 skip = true;
	else
 ShowToClient("Buying Energies Script","Started, buy will occur in " .. tostring(math.ceil((3600-(os.time()-LastBuyTime))/60)).. " minutes.");
 while ((os.time()-LastBuyTime) < 3600) do
 Sleep(1000);
 end;
	end;
	ShowToClient("Buying Energies Script","Attempting to buy for First Time.");
	repeat
 if not skip then
 GiantEnergy = GetInventory():FindByDisplayId(35563);
 if (GiantEnergy == nil) then
 GiantEnergyQuantityBeforeBuy = 0;
 else
 GiantEnergyQuantityBeforeBuy = GiantEnergy.ItemNum;
 end;
 Command("/target " .. ClanHallNpcName);
 Sleep(500);
 Command("/target " .. ClanHallNpcName);
 GetNormalNPCExchangeManager():Clear();
 while(not GetNormalNPCExchangeManager():GetStatus()) do
 Click("menu_select?ask=-201&reply=3", "Clan hall functions");
 Sleep(1000);
 Click("menu_select?ask=-201&reply=12", "Item Creation");
 Sleep(1500);
 end;
 if (GetNormalNPCExchangeManager():AddBuyByID(35563,2) == true) then
 Sleep(1000);
 GetNormalNPCExchangeManager():RequestBuyItems();
 ShowToClient("Auto Clan Hal buy","Request Buying");
 UpdateLastEnergyBuyFile(GetMe():GetName() .. "LastEnergyBuy.txt")
 end;
 Sleep(100);
 GetNormalNPCExchangeManager():RequestShopUIClose();
 Sleep(4000);
 GiantEnergy = GetInventory():FindByDisplayId(35563);
 if (GiantEnergy == nil) then
 GiantEnergyQuantityAfterBuy = 0;
 else
 GiantEnergyQuantityAfterBuy = GiantEnergy.ItemNum;
 end;
 Adena = GetInventory():FindByDisplayId(57);
 if (Adena == nil) then
 AdenaQuantity = 0;
 else
 AdenaQuantity = Adena.ItemNum;
 end; 
 ShowToClient("Buying Energies Script","I got extra " .. tostring(GiantEnergyQuantityAfterBuy-GiantEnergyQuantityBeforeBuy) .. " Giant Energy.");
 end;
 skip = false;
 ClanHallSoE = GetInventory():FindByDisplayId(1829);
 if (ClanHallSoE == nil) then
 ClanHallSoEQuantity = 0;
 else
 ClanHallSoEQuantity = ClanHallSoE.ItemNum;
 end;
 if (ClanHallSoEQuantity > 0) and (afk) then
 moveDistance = 30;
 waittime = 0;
 timeofteleport = GetTime();
 MoveTo(144841, 27723, -2269, moveDistance);
 waittime = GetTime() - timeofteleport;
 Sleep(57*60*1000 -2000);
 timeofteleport = GetTime();
 UseItem(1829); -- Scroll of Escape: Clan Hall
 WaitForTeleport();
 MoveTo(144227, 28245, -2242, moveDistance);
 Command("/target " .. ClanHallNpcName);
 waittime = waittime + GetTime() - timeofteleport;
 else
 waittime = 0;
 Sleep(57*60*1000 -2000);-- this sleep can be slpit into more for soe scrolls
 end;
 ShowToClient("Buying Energies Script","Clicking in 2 minutes...");
 Sleep(3*60*1000 -waittime);
	until ((GiantEnergyQuantityAfterBuy-GiantEnergyQuantityBeforeBuy) <= 0) or (AdenaQuantity < 11000000)
end;


PUSH [Image: knUu53] IF HELPED
05-27-2013 23:16 PM
Visit this user's website Find all posts by this user
Soax Offline
VIP Member
***

Posts: 272
Joined: Sep 2011
Reputation: 12
Version: 1.4.2.135
Post: #4
RE: Giant Energy - Provisional Clan Hall

I edit that from amiroooo, for those CH and works, but as i said, sometimes randomly stops or delays for mins/secs and all goes to hell. So, i can purchase randomly 4-5 to 7-8 hrs without problems, then stops, most of time if you minimize the window.

PHP Code:
buy true;
afk false; -- will go out clan hall then soe in time if true
LastBuyTimeManually 
os.time({year=2012month=1day=1hour=1min=1sec=1})
ClanHallNpcName "Maid";
 
skip false;
GiantEnergyQuantityAfterBuy nil;
GiantEnergyQuantityBeforeBuy nil;
 
function 
LoadLastBuyfromFile(filename) --function that uses filename file to obtain player stock.
    
local file io.open(GetDir() .. filename"r")
    if (
file == nilthen -- then create a file
 file 
io.open(GetDir() .. filename"w")    
    else    
 for 
line in file:lines() do
 if (
tonumber(line) ~= nilthen
 
return tonumber(line);
 
end;
 
end;
    
end;
    
file:close();    
    return 
0;    
end;
 
function 
UpdateLastEnergyBuyFile(thefile)
    
local file io.open(GetDir() .. thefile"w+")
    
file:write(tostring(os.time() + 2) .. "\n");
    
file:close();
end;
 
LastBuyOnFile LoadLastBuyfromFile(GetMe():GetName() .. "LastEnergyBuy.txt");
 
if (
LastBuyTimeManually LastBuyOnFilethen
    LastBuyTime 
LastBuyTimeManually;
else
    
LastBuyTime LastBuyOnFile;
end;
    --
ShowToClient("Buying Energies Script","Next Giant Energy Sale will occur between " .. os.date("%X") .. " and ".. os.date("%X",os.time()+3600) .. " and it need to be done manually.");
if 
buy then
    
if (os.time() > LastBuyTime 7200then
 ShowToClient
("Buying Energies Script","No Idea When Spawn Might be.");
    elseif (
os.time() > LastBuyTime 3610) and (os.time() < LastBuyTime 7200then
 ShowToClient
("Buying Energies Script","Next Giant Energy Sale will occur between " .. os.date("%X") .. " and ".. os.date("%X",os.time()+3600) .. " and it need to be done manually.");
 while (
GiantEnergyQuantityBeforeBuy == nil) or (GiantEnergyQuantityAfterBuy == nil) or ((GiantEnergyQuantityAfterBuy-GiantEnergyQuantityBeforeBuy) <= 0) do
 
Sleep(2000);
 
MyTarget GetTarget();
 if (
MyTarget ~= nil) and (MyTarget:GetName() == ClanHallNpcNamethen
 GiantEnergy 
GetInventory():FindByDisplayId(35563);
 if (
GiantEnergy == nilthen
 GiantEnergyQuantityAfterBuy 
0;
 if (
GiantEnergyQuantityBeforeBuy == nilthen
 GiantEnergyQuantityBeforeBuy 
0;
 
end;
 else
 
GiantEnergyQuantityAfterBuy GiantEnergy.ItemNum;
 
end;
 else
 
GiantEnergy GetInventory():FindByDisplayId(35563);
 if (
GiantEnergy == nilthen
 GiantEnergyQuantityBeforeBuy 
0;
 if (
GiantEnergyQuantityAfterBuy == nilthen
 GiantEnergyQuantityAfterBuy 
0;
 
end;
 else
 
GiantEnergyQuantityBeforeBuy GiantEnergy.ItemNum;
 
end;
 
end;
 
end;
 
ShowToClient("Buying Energies Script","Giant Energy Quantity Change Detected, time set for now");
 
UpdateLastEnergyBuyFile(GetMe():GetName() .. "LastEnergyBuy.txt");
 
skip true;
    else
 
ShowToClient("Buying Energies Script","Started, buy will occur in " .. tostring(math.ceil((3600-(os.time()-LastBuyTime))/60)).. " minutes.");
 while ((
os.time()-LastBuyTime) < 3600) do
 
Sleep(1000);
 
end;
    
end;
    
ShowToClient("Buying Energies Script","Attempting to buy for First Time.");
    
repeat
 
if not skip then
 GiantEnergy 
GetInventory():FindByDisplayId(35563);
 if (
GiantEnergy == nilthen
 GiantEnergyQuantityBeforeBuy 
0;
 else
 
GiantEnergyQuantityBeforeBuy GiantEnergy.ItemNum;
 
end;
 
Command("/target " .. ClanHallNpcName);
 
Sleep(500);
 
Command("/target " .. ClanHallNpcName);
 
GetNormalNPCExchangeManager():Clear();
 while(
not GetNormalNPCExchangeManager():GetStatus()) do
 
Click("menu_select?ask=300&reply=1""Create Item");
 
Sleep(1500);
 
end;
 if (
GetNormalNPCExchangeManager():AddBuyByID(35563,2) == truethen
 Sleep
(1000);
 
GetNormalNPCExchangeManager():RequestBuyItems();
 
ShowToClient("Auto Clan Hal buy","Request Buying");
 
UpdateLastEnergyBuyFile(GetMe():GetName() .. "LastEnergyBuy.txt")
 
end;
 
Sleep(100);
 
GetNormalNPCExchangeManager():RequestShopUIClose();
 
Sleep(4000);
 
GiantEnergy GetInventory():FindByDisplayId(35563);
 if (
GiantEnergy == nilthen
 GiantEnergyQuantityAfterBuy 
0;
 else
 
GiantEnergyQuantityAfterBuy GiantEnergy.ItemNum;
 
end;
 
Adena GetInventory():FindByDisplayId(57);
 if (
Adena == nilthen
 AdenaQuantity 
0;
 else
 
AdenaQuantity Adena.ItemNum;
 
end
 
ShowToClient("Buying Energies Script","I got extra " .. tostring(GiantEnergyQuantityAfterBuy-GiantEnergyQuantityBeforeBuy) .. " Giant Energy.");
 
end;
 
skip false;
 
ClanHallSoE GetInventory():FindByDisplayId(1829);
 if (
ClanHallSoE == nilthen
 ClanHallSoEQuantity 
0;
 else
 
ClanHallSoEQuantity ClanHallSoE.ItemNum;
 
end;
 if (
ClanHallSoEQuantity 0) and (afkthen
 moveDistance 
30;
 
waittime 0;
 
timeofteleport GetTime();
 
MoveTo(14484127723, -2269moveDistance);
 
waittime GetTime() - timeofteleport;
 
Sleep(57*60*1000 -2000);
 
timeofteleport GetTime();
 
UseItem(1829); -- Scroll of EscapeClan Hall
 WaitForTeleport
();
 
MoveTo(14422728245, -2242moveDistance);
 
Command("/target " .. ClanHallNpcName);
 
waittime waittime GetTime() - timeofteleport;
 else
 
waittime 0;
 
Sleep(57*60*1000 -2000);-- this sleep can be slpit into more for soe scrolls
 end
;
 
ShowToClient("Buying Energies Script","Clicking in 2 minutes...");
 
Sleep(3*60*1000 -waittime);
    
until ((GiantEnergyQuantityAfterBuy-GiantEnergyQuantityBeforeBuy) <= 0) or (AdenaQuantity 11000000)
end
05-27-2013 23:36 PM
Find all posts by this user
Thread Closed 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  v.131 | Friends and Clan Member functions fails? rORUMI 2 2,207 09-21-2014 23:23 PM
Last Post: rORUMI
Smile CLAN BUFF wintersung13 4 4,310 05-12-2014 13:22 PM
Last Post: vochikien
  Superior Giant Codex multiboxingtoon 3 4,160 03-01-2014 11:58 AM
Last Post: nmerritt
Information Clan War NaoJogoMais 0 1,617 02-01-2014 13:35 PM
Last Post: NaoJogoMais
  Clan IDs change all the time since lindviour tuxevil 0 1,714 07-22-2013 20:04 PM
Last Post: tuxevil
  script to put money on clan warehouse zensation 0 1,838 03-29-2013 17:10 PM
Last Post: zensation
Sad RE: Giant's Energy siroga 1 3,800 03-06-2013 17:55 PM
Last Post: siroga
  clan pet holty 4 2,867 01-17-2013 18:41 PM
Last Post: holty
Exclamation l2t Auto Accept Clan inv darkpt123 2 3,513 08-14-2012 01:52 AM
Last Post: lougane
  Suggestion: Item use Energy Stone binazo 2 2,618 08-03-2012 15:21 PM
Last Post: binazo



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