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: 276
Joined: Feb 2013
Reputation: 277
Version: 1.4.3.143
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: 635
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
  Complete Strength CBD Tincture: Boost the energy, power and immunity level EvelyTalor 0 546 10-24-2019 12:26 PM
Last Post: EvelyTalor
  Keto Complex:-Use fat as source of energy BridgetHoerner 0 430 10-22-2019 07:25 AM
Last Post: BridgetHoerner
  Diamond Keto 24/7:-Help gain energy, enhance memory power RachelColon 0 440 10-19-2019 12:44 PM
Last Post: RachelColon
  http://www.dietpillsrevolution.com/spring-hall-health-keto/ Anty1965 0 312 09-24-2019 11:30 AM
Last Post: Anty1965
  XS Ketogenic Slim Keto:-provide energy, power and strength KatherinHartley 0 358 08-07-2019 13:40 PM
Last Post: KatherinHartley
  https://suplistar.com/spring-hall-health-keto/ SpringHallHealthKeto12 0 344 07-28-2019 09:09 AM
Last Post: SpringHallHealthKeto12
  https://fairsupplement.com/spring-hall-health-keto/ springhallhealthketo1 0 370 07-25-2019 09:29 AM
Last Post: springhallhealthketo1
  Spring Hall Health Keto Real Harsh Truth helgedopler 0 409 07-24-2019 14:24 PM
Last Post: helgedopler
  v.131 | Friends and Clan Member functions fails? rORUMI 2 1,275 09-21-2014 23:23 PM
Last Post: rORUMI
Smile CLAN BUFF wintersung13 4 2,663 05-12-2014 13:22 PM
Last Post: vochikien



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