Jump to content
Sign in to follow this  
BlackBarba

[Question] how to make Effect like Vip Neck work in inventory?

Recommended Posts

21 минуту назад, BlackBarba сказал:

hello!

 

i want to know how to make a effect like Vip Neck, but i want to use it in "X" inventory slot

change local Necklace = GetEquipItemP( role, 5 )

to local Necklace = GetChaItem ( role , 2 , x  ) when X is number of slot (0-its a 1 slot,1-its a 2 slot etc.)

it will be like this

		local Necklace =  GetChaItem ( role , 2 , 5  ) ---- item w/ vip effect in 4 slot
		local Necklace_ID = GetItemID ( Necklace ) 
		if(Necklace_ID == ##PUT NECKLACE ID NUMBER HERE##)then ---- item id here
			local statelv = 1
			local statetime = 3600
			AddState ( role , role , VIPNECKY , statelv , statetime ) 
		else
			local state_vipnecky = GetChaStateLv ( role , VIPNECKY )
			if state_vipnecky ~= 0 then
				SystemNotice( role , "You've took off your VIP Necklace. Effect Removed!")
				RemoveState ( role , VIPNECKY )
			end
		end

 

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...