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

Thread Closed 
 
Thread Rating:
  • 16 Vote(s) - 3.75 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Simple Edit
Author Message
NaoJogoMais Offline
I'm Watching You!
**

Posts: 922
Joined: Oct 2012
Reputation: 194
Version: 1.4.2.132
Post: #1
Simple Edit

    LUA Programming
buy = true;
afk = false; -- will go out clan hall then soe in time if true
LastBuyTimeManually = os.time({year=2012, month=11, day=5, hour=15, min=34, sec=30})
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 == 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", "Create Item");
 Sleep(1000);
 Click("menu_select?ask=-201&reply=12", "Create Item");
 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;



Simples question.. How can I adjust the scan time from 10 to 10 minutes?

.


[ RETIRED ]
...from retail!



[Image: 201628.png]
04-15-2013 19:30 PM
Find all posts by this user
Fox Away
Fraka-kaka-kaka-kaka-kow!
******

Posts: 5,632
Joined: Oct 2011
Reputation: -6666548
Version: 1.4.2.142
Post: #2
RE: Simple Edit

try last line

    LUA Programming
Sleep(10*60*1000 -waittime);


Heart
04-15-2013 21:29 PM
Visit this user's website Find all posts by this user
NaoJogoMais Offline
I'm Watching You!
**

Posts: 922
Joined: Oct 2012
Reputation: 194
Version: 1.4.2.132
Post: #3
RE: Simple Edit

ok, i'll try now

Dont work Fox.. They still w8ing 60 min :/

Have another idea?

I try
    LUA Programming
Sleep(10*10*1000 -waittime);

too =(

up

.


[ RETIRED ]
...from retail!



[Image: 201628.png]
(This post was last modified: 04-16-2013 00:49 AM by NaoJogoMais.)
04-15-2013 23:34 PM
Find all posts by this user
Fox Away
Fraka-kaka-kaka-kaka-kow!
******

Posts: 5,632
Joined: Oct 2011
Reputation: -6666548
Version: 1.4.2.142
Post: #4
RE: Simple Edit

Sleep(10*60*1000 -2000);-- this sleep can be slpit into more for soe scrolls

Try all Smile

Heart
(This post was last modified: 04-16-2013 05:40 AM by Fox.)
04-16-2013 05:40 AM
Visit this user's website Find all posts by this user
Hebdzik Offline
Tester

Posts: 1,235
Joined: Aug 2011
Reputation: 265
Version: 1.4.3.143
Post: #5
RE: Simple Edit

i look on your script and dont really know what you want. because in code i see 2 thing, gathering energy stones and buying CH SOE.
But if your sleep time dont work like you want, than problem can make waittime


    LUA Programming
buy = true;
afk = false; -- will go out clan hall then soe in time if true
LastBuyTimeManually = os.time({year=2012, month=11, day=5, hour=15, min=34, sec=30})
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 == 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.");
--------------------------------------------------------------------------------------------
-- MAIN LOOP
--------------------------------------------------------------------------------------------
	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", "Create Item");
				Sleep(1000);
				Click("menu_select?ask=-201&reply=12", "Create Item");
				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 translation:
		-- 1000ms = 1s
		-- 60*1000ms = 1min
		-- 3*60*1000ms = 3*60s = 3min
		-- 60*60*1000ms = 3600*1000 = 3600000ms = 1h
		-- Sleep(1*60*1000) = 60000ms = 60s = 1min
		Sleep(60*60*1000 -waittime); -- 1hour - waittime
--------------------------------------------------------------------------------------------END MAIN LOOP
	until ((GiantEnergyQuantityAfterBuy-GiantEnergyQuantityBeforeBuy) <= 0) or (AdenaQuantity < 11000000)
end;




Warning hammer!!! Use Search before you post something
If i hellp you, you can thx me by +1 Reputation
[Image: U63SU]
(This post was last modified: 04-16-2013 08:23 AM by Hebdzik.)
04-16-2013 08:21 AM
Find all posts by this user
NaoJogoMais Offline
I'm Watching You!
**

Posts: 922
Joined: Oct 2012
Reputation: 194
Version: 1.4.2.132
Post: #6
RE: Simple Edit

(04-16-2013 08:21 AM)Hebdzik Wrote:  i look on your script and dont really know what you want. because in code i see 2 thing, gathering energy stones and buying CH SOE.
But if your sleep time dont work like you want, than problem can make waittime


    LUA Programming
buy = true;
afk = false; -- will go out clan hall then soe in time if true
LastBuyTimeManually = os.time({year=2012, month=11, day=5, hour=15, min=34, sec=30})
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 == 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.");
--------------------------------------------------------------------------------------------
-- MAIN LOOP
--------------------------------------------------------------------------------------------
	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", "Create Item");
 Sleep(1000);
 Click("menu_select?ask=-201&reply=12", "Create Item");
 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 translation:
 -- 1000ms = 1s
 -- 60*1000ms = 1min
 -- 3*60*1000ms = 3*60s = 3min
 -- 60*60*1000ms = 3600*1000 = 3600000ms = 1h
 -- Sleep(1*60*1000) = 60000ms = 60s = 1min
 Sleep(60*60*1000 -waittime); -- 1hour - waittime
--------------------------------------------------------------------------------------------END MAIN LOOP
	until ((GiantEnergyQuantityAfterBuy-GiantEnergyQuantityBeforeBuy) <= 0) or (AdenaQuantity < 11000000)
end;




Thank you for help first.

This script is used to automatically purchase item Giant Energy from Provisional Clan Hall.

Did the way you ordered, changed the time for 3 minutes and even then, after the character buys the item he keeps waiting 60 minutes to buy the next.

I wanted him check item in NPC in 70 minutes, not 60 minutes. Because the item appears to buy again after 1 hour and 1 minute. Thus, if he tries to 60 in 60 minutes this will not work and script stop.
.


[ RETIRED ]
...from retail!



[Image: 201628.png]
04-16-2013 11:50 AM
Find all posts by this user
NaoJogoMais Offline
I'm Watching You!
**

Posts: 922
Joined: Oct 2012
Reputation: 194
Version: 1.4.2.132
Post: #7
RE: Simple Edit

Ok!

I pay in Adena or $ if someone fix it!

.


[ RETIRED ]
...from retail!



[Image: 201628.png]
04-18-2013 01:21 AM
Find all posts by this user
NaoJogoMais Offline
I'm Watching You!
**

Posts: 922
Joined: Oct 2012
Reputation: 194
Version: 1.4.2.132
Post: #8
RE: Simple Edit

no1?

.


[ RETIRED ]
...from retail!



[Image: 201628.png]
04-21-2013 03:54 AM
Find all posts by this user
NaoJogoMais Offline
I'm Watching You!
**

Posts: 922
Joined: Oct 2012
Reputation: 194
Version: 1.4.2.132
Post: #9
RE: Simple Edit

Up!

.


[ RETIRED ]
...from retail!



[Image: 201628.png]
04-23-2013 11:26 AM
Find all posts by this user
sasszem Offline
Expired VIP Member
**

Posts: 12
Joined: Oct 2012
Reputation: 0
Version: 1.4.2.139.2b
Post: #10
RE: Simple Edit

Sleep(57*60*1000 -2000); --> 57 min sleep
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 --> 57 min sleep
end;
ShowToClient("Buying Energies Script","Clicking in 2 minutes...");
Sleep(3*60*1000 -waittime);


Sleep(57*60*1000 -2000) => it makes 57min sleep and at the end it adds 3 more mins wait time, so if u edit both 57*60*1000 sleep then it will wait more...
04-23-2013 13:30 PM
Find all posts by this user
Thread Closed 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  SIMPLE SHOUT SCRIPT L2TOWER wtfunoob2 1 2,929 07-07-2016 16:36 PM
Last Post: blaaam
  Insert into edit box of windows maybeoutofrain 7 4,094 10-16-2015 23:42 PM
Last Post: snapit
Thumbs Up A simple trick to bypass GG even without cracking/disable gameguard vahnong 0 18,526 09-03-2015 10:50 AM
Last Post: vahnong
  LF A Simple script..DC When flaged maloukos 12 7,265 02-04-2014 16:47 PM
Last Post: maloukos
Rainbow LF Simple Script-DC when dead teoftw7 1 2,097 01-25-2014 12:50 PM
Last Post: thawk
  Any Mod or Admin, A simple questions about logs. colomaza 11 6,687 09-20-2013 16:48 PM
Last Post: colomaza
  Char no attack MOB Edit for Server leofurios 16 15,391 08-16-2012 12:06 PM
Last Post: TheBl4ckPhoenix
  A simple question SatanBarr41 2 2,484 08-04-2012 17:22 PM
Last Post: TheBl4ckPhoenix
Smile Simple Thank You Hellion 0 2,042 04-12-2011 00:01 AM
Last Post: Hellion



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