Jump to content
Sign in to follow this  
AnaMutaz

How to install cloak

Recommended Posts

since no one answer my question long time ago i repeat it 

How to install cloak xD

steps from 0 or any youtube sux can`t understand any thing 

best grades 

Share this post


Link to post
Share on other sites

The topic has been moved to Questions & Help section.

 

15 часов назад, AnaMutaz сказал:

@V3ct0r here 

 

I don't know what is cloak and have no idea how to install it. You better ask author of this feature.


Share this post


Link to post
Share on other sites
On 16/08/2017 at 8:00 PM, AnaMutaz said:

i get errors when i put them on the iteminfo 

 

it`s broke on item infot not work 

 

 

what about get us a print screen with the error.

no one will help you if we dont know what you doing wrong

Share this post


Link to post
Share on other sites
14 hours ago, DarkRulez said:

@Nobre bro i did all the steps but this appear can u help me?

Captura.JPG

On 16/8/2017 at 9:00 PM, AnaMutaz said:

i get errors when i put them on the iteminfo 

 

it`s broke on item infot not work 

 

 

sorry for the missing file

local ext = {}
ext.title = 'Admiral Cloak'
ext.author = '[email protected]'
-- Required File:
--			* hook.lua
-- ChangeLogs:
ext.version = '1.0'
-- 			= Can be unsealed
-- 			= Can be upgraded
-- 			= Can be socketed
-- 			= Can be gemmed
print('	Loading '..ext.title..' v'..ext.version..' By '..ext.author..'')


 CloakGem = {};
		CloakGem[9206]			= 9205;
		CloakGem[9207]			= 9205;
		CloakGem[9208]			= 9205;
		CloakGem[9209]			= 9205;
		CloakGem[9210]			= 9205;
		CloakGem[9211]			= 9205;

 cloak = {};
 	-- Cloak Upgrade Device: 9203
 	cloak.conf 		= {
 		itemId 		= 9205,
 		dustyId		= 9204, 
 		itemSlot	= 5,
 		maxLv		= 10,
 		statperLv	= 1
 	};
 	cloak.race 		= {
 		[1]			= 249, --Lance
 		[2]			= 250, --Carsise
 		[3]			= 251, --Phyllis
 		[4]			= 252 --Ami
 	}; -- cloak.conf['statperLv']

 	cloak.hook = {
 		tick = cha_timer
 	};
 	cloak.aId 		= {
 		[cloak.conf['itemId']] = true
 	};

 	cloak.upRate 				= {};
 		cloak.upRate[0]			= 1 --100%
 		cloak.upRate[1]			= 1 --100%
 		cloak.upRate[2]			= 1 --100%
 		cloak.upRate[3]			= .7 --70%
 		cloak.upRate[4]			= .6 --60%
 		cloak.upRate[5]			= .5 --50%
 		cloak.upRate[6]			= .4 --40%
 		cloak.upRate[7]			= .3 --30%
 		cloak.upRate[8]			= .2 --20%
 		cloak.upRate[9]			= .1 --10%

 	cloak.getCloakLv = function(item)
 		local getLv = GetItemAttr(item, 55);
 		if getLv > 0 then
 			return getLv;
 		end
 		return 0;
 	end

 	cloak.hasCloak = function(cha)
 		local slot = GetChaItem(cha, 2, (cloak.conf['itemSlot'] - 1));
 		local slotId = GetItemID(slot);
 		if slotId == cloak.conf['itemId'] then
 			return 1;
 		end
 		return 0;
 	end

 	cloak.getGem = function(item)
 		local chaCloak = {};
 		local param = GetItemForgeParam(item, 1)
		param = TansferNum(param)
		chaCloak[1] = GetNum_Part2(param)
		chaCloak[2] = GetNum_Part3(param)
		chaCloak[3] = GetNum_Part4(param)
		chaCloak[4] = GetNum_Part5(param)
		chaCloak[5] = GetNum_Part6(param)
		chaCloak[6] = GetNum_Part7(param)
		return chaCloak;
 	end

 	cloak.hasGem = function(item, stoneId)
 		local gem = cloak.getGem(item);
 		if gem[1] == stoneId or
 			gem[3] == stoneId or
 				gem[5] == stoneId then
 			return 1;
 		end
 		return 0;
 	end

 	cloak.getGemLv = function(item, stoneId)
 		local gem = cloak.getGem(item);
 		if gem[1] == stoneId then
 			return gem[2];
 		end
 		if gem[3] == stoneId then
 			return gem[4];
 		end
 		if gem[5] == stoneId then
 			return gem[6];
 		end
 	end

 	cloak.skill = function(ATKER, DEFER, sklv)
 		if cloak.hasCloak(ATKER) == 1 then
 			local cloakSlot = GetChaItem(ATKER, 2, (cloak.conf['itemSlot'] - 1));
 			if cloak.hasGem(cloakSlot, 66) == 1 then --Riven Soul Rune
				local Percentage = Percentage_Random(.07)
				if Percentage == 1 then
					local getStateLv = GetChaStateLv(DEFER, 234);
					if getStateLv == 0 then
		 				local gemLv = cloak.getGemLv(cloakSlot, 66);
		 				AddState(ATKER, DEFER, 234, gemLv, 3);
		 				local ret = gemLv * 5
		 				--SystemNotice(ATKER, "Recieved bonus from Admiral Cloak. Target Physical Resistence reduce by "..ret.." for 3 sec")
		 			end
	 			end
 			end
 			if cloak.hasGem(cloakSlot, 67) == 1 then --Piercing Rune
				local Percentage = Percentage_Random(.07)
				if Percentage == 1 then
					local getStateLv = GetChaStateLv(DEFER, 235);
					if getStateLv == 0 then
		 				local gemLv = cloak.getGemLv(cloakSlot, 67);
		 				AddState(ATKER, DEFER, 235, gemLv, 3);
		 				local ret = gemLv * 50
		 				--SystemNotice(ATKER, "Recieved bonus from Admiral Cloak. Target Defence reduce by "..ret.." for 3 sec")
		 			end
	 			end
 			end
 			if cloak.hasGem(cloakSlot, 68) == 1 then --Illusory Rune
 				local Percentage = Percentage_Random(.07)
				if Percentage == 1 then
					local getStateLv = GetChaStateLv(DEFER, 236);
					if getStateLv == 0 then
		 				local gemLv = cloak.getGemLv(cloakSlot, 68);
		 				AddState(ATKER, DEFER, 236, gemLv, 3);
		 				local ret = gemLv * 10
		 				--SystemNotice(ATKER, "Recieved bonus from Admiral Cloak. Target Dodge reduce by "..ret.." for 3 sec")
		 			end
	 			end
 			end
 			if cloak.hasGem(cloakSlot, 71) == 1 then --Curse Rune
 				local Percentage = Percentage_Random(.07)
				if Percentage == 1 then
					local getStateLv = GetChaStateLv(DEFER, 237);
					if getStateLv == 0 then
		 				local gemLv = cloak.getGemLv(cloakSlot, 71);
		 				AddState(ATKER, DEFER, 237, gemLv, 3);
		 				local ret = gemLv * 10
		 				--SystemNotice(ATKER, "Recieved bonus from Admiral Cloak. Target Hitrate reduce by "..ret.." for 3 sec")
		 			end
	 			end
 			end
 		end
 	end

 	cha_timer = function(role, freq, time)
 		cloak.hook['tick'](role, freq, time)
 		if IsPlayer(role) == 1 then
 			-- PlayEffect(role, 319)
 			local slot = GetChaItem(role, 2, (cloak.conf['itemSlot'] - 1));
 			local slotId = GetItemID(slot);
			local raceId = GetChaTypeID(role);
			local state = cloak.race[raceId];
 			if cloak.aId[slotId] == true then
				local cloakLv = cloak.getCloakLv(slot);
 				AddState(role, role, state, cloakLv, 3600);
 			else
 				local hasCloak = GetChaStateLv(role, state);
 				if hasCloak ~= 0 and slotId ~= cloak.conf['itemId'] then
 					--BickerNotice(role, 'asd');
 					RemoveState(role, state);
 				end
 			end
 		end
 	end

 	function ItemUse_PFFYJCQ(role, Item)
 		local Cha_Boat = GetCtrlBoat ( role )
		if Cha_Boat ~=  nil then
			SystemNotice( role , "Cannot use while sailing" )
			UseItemFailed ( role )
			return
		end
 		local slot = GetChaItem(role, 2, (cloak.conf['itemSlot'] - 1));
 		local slotId = GetItemID(slot);
 		local cloakLv = cloak.getCloakLv(slot);
 		local deviceId = GetItemID(Item);
 		if slotId ~= cloak.conf['itemId'] then
			BickerNotice(role, 'Cannot use ['..GetItemName(deviceId)..'] on '..GetItemName(slotId)..'!');
			UseItemFailed(role);
			return
		end
		local cloakLv = cloak.getCloakLv(slot);
		if cloakLv >= cloak.conf['maxLv'] then
			BickerNotice(role, '['..GetItemName(slotId)..'] already maxed Upgrade!');
			UseItemFailed(role);
			return
		end

		local successRate = Percentage_Random(cloak.upRate[cloakLv]);
		if successRate == 1 then
			local startAttr,endAttr = ITEMATTR_VAL_STR,ITEMATTR_VAL_STA;
			local itemAttr = {};
			local increment = 1;
			for i = startAttr,endAttr do
				itemAttr[i] = GetItemAttr(slot, i);
				SetItemAttr(slot, i, itemAttr[i] + cloak.conf['statperLv']);
			end
			SetItemAttr(slot, 55, cloakLv + 1);
			PlayEffect(role, 345);
		else
			SystemNotice(role , "Sorry, upgrade has failed! Luckily Cloak is not damaged...");
			PlayEffect(role, 346);
		end
	end

	function ItemUse_PFFYJCQG(role, Item)
 		local Cha_Boat = GetCtrlBoat ( role )
		if Cha_Boat ~=  nil then
			SystemNotice( role , "Cannot use while sailing" )
			UseItemFailed ( role )
			return
		end
		local HasItem = CheckBagItem(role, cloak.conf['dustyId']);
		if HasItem < 1 then
			BickerNotice(role,"You need ["..GetItemName(cloak.conf['dustyId']).."] in your Inventory!");
			UseItemFailed(role);
			return
		else
			TakeItem(role, 0, cloak.conf['dustyId'], 1) 
			GiveItem(role, 0, cloak.conf['itemId'], 1, 25);
			Notice(GetChaDefaultName(role)..' successfully Unsealed a '..GetItemName(cloak.conf['dustyId'])..'!');
			PlayEffect(role, 345)
			RefreshCha(role)
		end
	end

function STATE_AC_Add ( role , statelv ) 
	local strsb_dif = cloak.conf['statperLv'] * statelv
	local consb_dif = cloak.conf['statperLv'] * statelv
	local agisb_dif = cloak.conf['statperLv'] * statelv
	local dexsb_dif = cloak.conf['statperLv'] * statelv
	local stasb_dif = cloak.conf['statperLv'] * statelv
	local strsb = StrSb( role ) + strsb_dif
	SetCharaAttr( strsb , role , ATTR_STATEV_STR )
	local consb = ConSb( role ) + consb_dif
	SetCharaAttr( consb , role , ATTR_STATEV_CON )
	local agisb = AgiSb( role ) + agisb_dif
	SetCharaAttr( agisb , role , ATTR_STATEV_AGI )
	local dexsb = DexSb( role ) + dexsb_dif
	SetCharaAttr( dexsb , role , ATTR_STATEV_DEX )
	local stasb = StaSb( role ) + stasb_dif
	SetCharaAttr( stasb , role , ATTR_STATEV_STA )
	ALLExAttrSet(role)  
end 

function STATE_AC_Rem ( role , statelv )
	local strsb_dif = cloak.conf['statperLv'] * statelv
	local consb_dif = cloak.conf['statperLv'] * statelv
	local agisb_dif = cloak.conf['statperLv'] * statelv
	local dexsb_dif = cloak.conf['statperLv'] * statelv
	local stasb_dif = cloak.conf['statperLv'] * statelv
	local strsb = StrSb( role ) - strsb_dif
	SetCharaAttr( strsb , role , ATTR_STATEV_STR )
	local consb = ConSb( role ) - consb_dif
	SetCharaAttr( consb , role , ATTR_STATEV_CON )
	local agisb = AgiSb( role ) - agisb_dif
	SetCharaAttr( agisb , role , ATTR_STATEV_AGI )
	local dexsb = DexSb( role ) - dexsb_dif
	SetCharaAttr( dexsb , role , ATTR_STATEV_DEX )
	local stasb = StaSb( role ) - stasb_dif
	SetCharaAttr( stasb , role , ATTR_STATEV_STA )
	ALLExAttrSet(role)  
end

function STATE_Riven_Add(role, statelv)
	local pdef_dif = 5 * statelv
	local pdef = ResistSb(role) - pdef_dif 
	SetCharaAttr( pdef , role , ATTR_STATEV_PDEF )
	ALLExAttrSet(role)  
end

function STATE_Riven_Rem(role, statelv)
	local pdef_dif = 5 * statelv
	local pdef = ResistSb(role) + pdef_dif 
	SetCharaAttr( pdef , role , ATTR_STATEV_PDEF )
	ALLExAttrSet(role)  
end

function STATE_Pierc_Add(role, statelv)
	local defsb_dif = 50 * statelv
	local defsb = DefSb(role) - defsb_dif
	SetCharaAttr( defsb , role , ATTR_STATEV_DEF ) 
	ALLExAttrSet(role)
end

function STATE_Pierc_Rem(role, statelv)
	local defsb_dif = 50 * statelv
	local defsb = DefSb(role) + defsb_dif
	SetCharaAttr( defsb , role , ATTR_STATEV_DEF ) 
	ALLExAttrSet(role)
end

function STATE_Illus_Add(role, statelv)
	local fleesb_dif = 10 * statelv
	local fleesb = FleeSb(role) - fleesb_dif 
	SetCharaAttr( fleesb , role , ATTR_STATEV_FLEE )
	ALLExAttrSet(role)  
end

function STATE_Illus_Rem(role, statelv)
	local fleesb_dif = 10 * statelv
	local fleesb = FleeSb(role) + fleesb_dif 
	SetCharaAttr( fleesb , role , ATTR_STATEV_FLEE )
	ALLExAttrSet(role)  
end

function STATE_Curse_Add(role, statelv)
	local hitsb_dif = 10 * statelv
	local hitsb = HitSb(role) - hitsb_dif
	SetCharaAttr( hitsb , role , ATTR_STATEV_HIT ) 
	ALLExAttrSet(role) 
end

function STATE_Curse_Rem(role, statelv)
	local hitsb_dif = 10 * statelv
	local hitsb = HitSb(role) + hitsb_dif
	SetCharaAttr( hitsb , role , ATTR_STATEV_HIT ) 
	ALLExAttrSet(role) 
end

 

  • Like 1

Share this post


Link to post
Share on other sites

Please check the assigned slot, make sure you did some configuration on cha_timer, also make sure you have cloak effects...


Nissan-GT-R.gif

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...