Jump to content
Abdelrahman Hajjaj

Problem with Admiral Cloak

Recommended Posts

Hi

i have a problem with kong Admiral Cloak , i followed the instruction but still the cloak wont show in the game

the item itself is there but nothing happend , in scene or effect

here is what i have done:

iteminfo:

7990	Admiral Cloak	n2570	10130005	0	0	0	0	0	0	88	0	0	0	7	1	0	0	0	1	1	1	0	-1,-2,-2,-2	0	-1,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2	0	0	-1,-2,-2,-2,-2,-2,-2,-2,-2,-2	-1,-2,-2,-2,-2,-2,-2,-2,-2,-2	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	1,1	1,1	1,1	1,1	1,1	0,0	0,0	0,0	0,0	0,0	0,0	0,0	0,0	0,0	0,0	0,0	0,0	0,0	0,0	0,0	0,0	0,0	0	1000,1000	1000,1000	0	0	0	0	0	0	0	0	0	0	0	0	0	0,0	0	0	A Cloak commisioned by Argent's Admiral.A commendation for all the vigilant defenders of the country (Effective only when placed on the 2nd row, 1st slot of the Inventory Bar).	0

sceneeffectinfo:

4015	cap1.par	cap model	Sea Wave	1	0	24	-1	0	0	0	-1
4016	cap2.par	cap model	Sea Wave	1	0	24	-1	0	0	0	-1
4017	cap3.par	cap model	Sea Wave	1	0	24	-1	0	0	0	-1
4018	cap4.par	cap model	Sea Wave	1	0	24	-1	0	0	0	-1

skilleff:

235	cap1	-1	0	State_CAPE_Add	State_CAPE_Rem	3	0	1	1	1	1	1	1	1	1	1	1	1	1	0	0	0	-1	0	0	0	4015	24	0	0	0	0	0	0	0
236	cap2	-1	0	State_CAPE_Add	State_CAPE_Rem	3	0	1	1	1	1	1	1	1	1	1	1	1	1	0	0	0	-1	0	0	0	4016	24	0	0	0	0	0	0	0
237	cap3	-1	0	State_CAPE_Add	State_CAPE_Rem	3	0	1	1	1	1	1	1	1	1	1	1	1	1	0	0	0	-1	0	0	0	4017	24	0	0	0	0	0	0	0
238	cap4	-1	0	State_CAPE_Add	State_CAPE_Rem	3	0	1	1	1	1	1	1	1	1	1	1	1	1	0	0	0	-1	0	0	0	4018	24	0	0	0	0	0	0	0

variable:

STATE_CAPE1			=	235		
STATE_CAPE2			=	236		
STATE_CAPE3			=	237		
STATE_CAPE4			=	238		

functions:

function AdmiralCloak()
  
	local cha = TurnToCha ( role ) 
	local cha_type = GetChaTypeID ( cha )
	local Cape_bg = GetChaItem ( role , 2 , 4  )
	local Cape_id = GetItemID ( Cape_bg )
	
	if Cape_id == 7990 and cha_type == 1 then
		local statelv = 1
		local statetime = 3600
		AddState ( role , role , STATE_CAPE1 , statelv , statetime )
		
	elseif Cape_id == 7990 and cha_type == 2 then
		local statelv = 1
		local statetime = 3600
		AddState ( role , role , STATE_CAPE2 , statelv , statetime )		

	elseif Cape_id == 7990 and cha_type == 3 then
		local statelv = 1
		local statetime = 3600
		AddState ( role , role , STATE_CAPE3 , statelv , statetime )		

	elseif Cape_id == 7990 and cha_type == 4 then
		local statelv = 1
		local statetime = 3600
		AddState ( role , role , STATE_CAPE4 , statelv , statetime )		
	else
		local statelv_cape1 = GetChaStateLv ( role , STATE_CAPE1 )
		if statelv_cape1~=0 then
			RemoveState ( role , STATE_CAPE1 ) 
		end
		local statelv_cape2 = GetChaStateLv ( role , STATE_CAPE2 )
		if statelv_cape2~=0 then
			RemoveState ( role , STATE_CAPE2 ) 
		end
		local statelv_cape3 = GetChaStateLv ( role , STATE_CAPE3 )
		if statelv_cape3~=0 then
			RemoveState ( role , STATE_CAPE3 ) 
		end
		local statelv_cape4 = GetChaStateLv ( role , STATE_CAPE4 )
		if statelv_cape4~=0 then
			RemoveState ( role , STATE_CAPE4 ) 
		end
	end

end

did i do somthing wrong?

plz help

thanks in advance

Share this post


Link to post
Share on other sites
1 hour ago, Abdelrahman Hajjaj said:

function AdmiralCloak()

remove this  also put ur functions at cha_timer and try

 

Edited by InuYasha
  • Like 1

Share this post


Link to post
Share on other sites

Hello @Abdelrahman Hajjaj!

 

Try use IDs less than 200 in skilleff.txt. Do not forget to make table_bin for client.

  • Like 2

Share this post


Link to post
Share on other sites

Instead,if you don't want to make your cha_timer full of stuff.

 

create a function called custom_cha_timer and run hooks on it as an extension

 

Eg:

Hook:AddPostHook("custom_cha_timer",AdmiralCloak)
 

  • Like 2

Share this post


Link to post
Share on other sites
On 10/1/2016 at 5:12 PM, Vasil said:

Instead,if you don't want to make your cha_timer full of stuff.

 

create a function called custom_cha_timer and run hooks on it as an extension

 

Eg:

Hook:AddPostHook("custom_cha_timer",AdmiralCloak)
 

yea this much better 
thnx alot @Vasil

Share this post


Link to post
Share on other sites
On 10/3/2016 at 1:28 PM, Abdelrahman Hajjaj said:

yea this much better 
thnx alot @Vasil

 

On 10/1/2016 at 10:12 AM, Vasil said:

Instead,if you don't want to make your cha_timer full of stuff.

 

create a function called custom_cha_timer and run hooks on it as an extension

 

Eg:

Hook:AddPostHook("custom_cha_timer",AdmiralCloak)
 

I create new 


function custom_cha_timer(role, freq, time)
    cha locales = TurnToCha (papel) 
    cha_type locales = GetChaTypeID (CHA)
    locales Cape_bg = GetChaItem (papel, 2, 4)
    locales Cape_id = GetItemID (Cape_bg)
    
    si Cape_id == 7626 y cha_type == 1 entonces
        locales statelv = 1
        statetime locales = 3600
        ADDSTATE (papel, papel, STATE_CAPE1, statelv, statetime)
        
    elseif Cape_id == == 7626 y cha_type 2 a continuación,
        locales statelv = 1
        statetime locales = 3600
        ADDSTATE (papel, papel, STATE_CAPE2, statelv, statetime)        

    elseif Cape_id == == 7626 y cha_type 3 a continuación,
        locales statelv = 1
        statetime locales = 3600
        ADDSTATE (papel, papel, STATE_CAPE3, statelv, statetime)        

    elseif Cape_id == == 7626 y cha_type 4 a continuación,
        locales statelv = 1
        statetime locales = 3600
        ADDSTATE (papel, papel, STATE_CAPE4, statelv, statetime)        
    más
        statelv_cape1 locales = GetChaStateLv (papel, STATE_CAPE1)
        si statelv_cape1 ~ = 0 entonces
            RemoveState (papel, STATE_CAPE1) 
        fin
        statelv_cape2 locales = GetChaStateLv (papel, STATE_CAPE2)
        si statelv_cape2 ~ = 0 entonces
            RemoveState (papel, STATE_CAPE2) 
        fin
        statelv_cape3 locales = GetChaStateLv (papel, STATE_CAPE3)
        si statelv_cape3 ~ = 0 entonces
            RemoveState (papel, STATE_CAPE3) 
        fin
        statelv_cape4 locales = GetChaStateLv (papel, STATE_CAPE4)
        si statelv_cape4 ~ = 0 entonces
            RemoveState (papel, STATE_CAPE4) 
        fin
    fin

fin

and error 

Edited by KONG
CODES

Share this post


Link to post
Share on other sites
Guest
On 10/1/2016 at 6:12 PM, Vasil said:

Instead,if you don't want to make your cha_timer full of stuff.

 

create a function called custom_cha_timer and run hooks on it as an extension

 

Eg:

Hook:AddPostHook("custom_cha_timer",AdmiralCloak)
 

you'd still have to hook original timer, such a waste of resources. 

Share this post


Link to post
Share on other sites
23 hours ago, qwerty said:

you'd still have to hook original timer, such a waste of resources. 

Still it's a better way to not consumn the cha_timer memory.

Share this post


Link to post
Share on other sites
4 hours ago, Vasil said:

Still it's a better way to not consumn the cha_timer memory.

Not a better way since you're still calling the original function while hooking if I remember correctly. 

Share this post


Link to post
Share on other sites
10 hours ago, Vasil said:

Still it's a better way to not consumn the cha_timer memory.

i suggest you to get out of the thread. you dont know what you are talking about. 

Share this post


Link to post
Share on other sites
2 часа назад, BETEP/macs509 сказал:

@V3ct0r а почему именно ниже 200, id которые выше зарезервированы в гейм.ехе?

Потому что эффекты с ID > 200 не отображаются клиентом.


Share this post


Link to post
Share on other sites
6 hours ago, Jelo said:

i suggest you to get out of the thread. you dont know what you are talking about. 

Oh really,may you read exactly what the guy asked of and what did he tell me? Kindly without invoking any problem?

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.


×
×
  • Create New...