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
Instant haste potion.
Author Message
kapa528 Offline
Ratman Chieftain
*

Posts: 21
Joined: Jan 2014
Reputation: -8
Version: 1.4.1.112
Post: #1
Instant haste potion.

Поедлитесь скриптиком на автоюз этих [Image: 4912.jpg] баночек.
09-26-2014 16:25 PM
Find all posts by this user Quote this message in a reply
bezumov Offline
Gremlin
*

Posts: 7
Joined: Jul 2014
Reputation: 0
Version: 1.4.1.112
Post: #2
RE: Instant haste potion.

Quote:InsPotId = 10157 -- Greater Magic Haste Potion
-----------------------------------------------------------------------

function DoYouHaveIns()
if(GetMe() ~= nil)then
if(GetMe():IsAlikeDeath() == false)then
if(GetMe():GotBuff(2398) == false) and (GetMe():GotBuff(837) == false) and (GetMe():GotBuff(1418) == false) and (GetMe():GotBuff(3158) == false) and (GetMe():GotBuff(1427) == false) and (GetMe():GotBuff(1505) == false) and (GetMe():GotBuff(922) == false)then
return false;
end;
end;
end;
return true;
end;

function GetItemsNumber(ItemId)
local a = 0;
invList = GetInventory();
for item in invList.list do
if(item.displayId == ItemId) then
a = item.ItemNum;
end;
end;
if(a ~= nil)then
return a;
end
if (a == nil)then
return 0;
end;
end;

function WhatHastePotUse()
if(GetItemsNumber(HastePotId) >= 1)then
return HastePotId;
end
end;

repeat
if(IsPaused() == false)then
if (DoYouHaveIns() == false) and (GetItemsNumber(InsPotId) >= 1) then
UseItem(InsPotId);
Sleep(100);
end;
Sleep(300);
end;
until false;
Если кто-то знает как добавить исключение что бы он их юзал только в осадной зоне, буду благодарен.
[/code]


Attached File(s)
.lua  InsPotion.lua (Size: 1.08 KB / Downloads: 34)
(This post was last modified: 11-21-2014 17:12 PM by bezumov.)
11-21-2014 17:11 PM
Find all posts by this user Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Warriors temporary healing potion (хиро квики) hesoyammi 1 3,743 04-16-2016 10:09 AM
Last Post: TheQQmaster



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