Open Items - for the few event ones you can't auto open!

Post Reply
User avatar
0x00
VIP
Posts: 105
Joined: Tue Jan 10, 2017 11:40 pm
Has thanked: 10 times
Been thanked: 23 times

Open Items - for the few event ones you can't auto open!

Post by 0x00 » Thu Feb 02, 2017 3:19 am

Code: Select all

--
-- Open Event Item
-- Author:  0x00 <0x00.ninja@gmail.com>
--
-- FOR USE ONLY WITH AIONSCRIPT 2.0 from Nyerk.xyz

-- Purpose:
--     Open all those [RANDOM ITEM NAME] event items

-- change this to the event item
inventory_item_name = "Kuporinerk's box containing Ceranium Medal Fragments";
-- change this to the cool down, in seconds
inventory_item_cool_down = 4;

timer = 0;

function OnLoad()
  Write("Open Event Item - by 0x00");
end

function OnRun()
    if timer >= Time() then
		return true;
	end
	local Inventory = InventoryList[inventory_item_name];
	if Inventory ~= nil then
		if Inventory:GetCooldown() == 0 then
			PlayerInput:Inventory( Inventory:GetName());
			timer = Time() + (1000 * inventory_item_cool_down) + 50; -- add "cast time" of ~1s
			return true;
		end
	end
end

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest