Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Need little help
Author Message
thedarkdiablo Offline
Elpy
*

Posts: 1
Joined: May 2018
Reputation: 0
Version: 1.4.2.133
Post: #1
Need little help

Huh i dont know, why dont work Big Grin

    LUA Programming
function OnCreate()
	AutoPot = false;
	this:RegisterCommand("autopot", CommandChatType.CHAT_ALLY, CommandAccessLevel.ACCESS_ME);
end;
--27000	Red Potion/27000
--27001	Endeavor Potion/27001
--734	Haste Potion/2011
--9149	Scroll of Acumen (Event)/2313
--9150	Scroll of Haste (Event)/2314
 
--Red Potion
function buff()
if (AutoPot == true) then
if (GetMe():GotBuff(27000) == false) then
UseItem(27000);
end;
end;
end;
--Endeavor Potion
function buff()
if (AutoPot == true) then
if (GetMe():GotBuff(27001) == false) then
UseItem(27001);
end;
end;
end;
--Haste Potion
function buff()
if (AutoPot == true) then
if (GetMe():GotBuff(2011) == false) then
UseItem(734);
end;
end;
end;
--Scroll upravit
function buff()
if (AutoPot == true) then
if (GetMe():GotBuff(2314) == false) then
UseItem(9150);
end;
end;
end;
 
 
function OnCommand_autoPot(vCommandChatType, vNick, vCommandParam)
 
		if (AutoPot == false) then
			 AutoPot = true;
			 ShowToClient(tostring(os.date("%X")),"Pot-Enabled!",3);
		else
			 AutoPot = false;
			 ShowToClient(tostring(os.date("%X")),"Pot-Disabled!",3);
 
 
		end;
end;

(This post was last modified: 01-01-2020 09:19 AM by thedarkdiablo.)
01-01-2020 07:26 AM
Find all posts by this user Quote this message in a reply
Post Reply 




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