Sign in to follow this  
cumbe11

Ticket de refine

Recommended Posts

Olá eu tenho esse ticket de refine que ao clicar ele refina o equipamento, queria colocar um bloqueio para quando a arma já estiver +10 ele não refinar.

20024,Ticket_Refine_Arma,Ticket Refine Arma,2,1,,10,,,,,0xFFFFFFFF,7,2,,,,,,{if(getequipisequiped(4)){successrefitem 4; dispbottom "[Refine] Equipamento refinado.";}else getitem 20024,1; },{},{}

Share this post


Link to post
Share on other sites
Quote

    20024,Ticket_Refine_Arma,Ticket Refine Arma,2,1,,10,,,,,0xFFFFFFFF,7,2,,,,,,{    if(getequiprefinerycnt(EQI_HAND_R)>=10){    dispbottom "[Refine] Equipamento no limite de refino.";    }else{    atcommand "@refine 8 4";dispbottom "[Refine] Equipamento refinado.";}getitem 20024,1;},{},{}

 

  • Upvote 1

Share this post


Link to post
Share on other sites

Muito obrigado..

como ficaria para outras partes? tipo essa é para arma, eu tenho ticket para

20022,Ticket_Refine_Cabeça,Ticket Refine Cabeça,2,1,,10,,,,,0xFFFFFFFF,7,2,,,,,,{if(getequipisequiped(1)){successrefitem 1; dispbottom "[Refine] Equipamento refinado.";}else getitem 20022,1; },{},{}
20023,Ticket_Refine_Armadura,Ticket Refine Armadura,2,1,,10,,,,,0xFFFFFFFF,7,2,,,,,,{if(getequipisequiped(2)){successrefitem 2; dispbottom "[Refine] Equipamento refinado.";}else getitem 20023,1; },{},{}
20024,Ticket_Refine_Arma,Ticket Refine Arma,2,1,,10,,,,,0xFFFFFFFF,7,2,,,,,,{if(getequipisequiped(4)){successrefitem 4; dispbottom "[Refine] Equipamento refinado.";}else getitem 20024,1; },{},{}
20025,Ticket_Refine_Escudo,Ticket Refine Escudo,2,1,,10,,,,,0xFFFFFFFF,7,2,,,,,,{if(getequipisequiped(3)){successrefitem 3; dispbottom "[Refine] Equipamento refinado.";}else getitem 20025,1; },{},{}
20026,Ticket_Refine_Manto,Ticket Refine Manto,2,1,,10,,,,,0xFFFFFFFF,7,2,,,,,,{if(getequipisequiped(5)){successrefitem 5; dispbottom "[Refine] Equipamento refinado.";}else getitem 20026,1; },{},{}
20027,Ticket_Refine_Sapatos,Ticket Refine Sapatos,2,1,,10,,,,,0xFFFFFFFF,7,2,,,,,,{if(getequipisequiped(6)){successrefitem 6; dispbottom "[Refine] Equipamento refinado.";}else getitem 20027,1; },{},{}

Lembrando que se o jogador não estiver equipado com o item na hora do refino ele ganhara outro ticket

 

 

Edited by cumbe11

Share this post


Link to post
Share on other sites

Me repute, é uma forma de agradecer 😉

Só pegar o exemplo que te dei ..

    20024,Ticket_Refine_Arma,Ticket Refine Arma,2,1,,10,,,,,0xFFFFFFFF,7,2,,,,,,{    if(getequiprefinerycnt(EQI_HAND_R)>=10){    dispbottom "[Refine] Equipamento no limite de refino.";    }else{    atcommand "@refine 8 4";dispbottom "[Refine] Equipamento refinado.";}getitem 20024,1;},{},{}

 

Quote

if(getequiprefinerycnt(EQI_HAND_R)>=10   - Aqui voce altera a localidade do item

atcommand "@refine 8 4";   aqui voc da @refine ingame e pega o ID da posição   - @refine <posição> <quantidade de refino>

getitem 20024,1; ID do ticket caso falhe no uso

 

  • Upvote 1

Share this post


Link to post
Share on other sites

O problema é que as pessoas estão usando o ticket estão ganhando outro, eles deveriam ganhar outro apenas se eles não estivesse equipado o item.

Share this post


Link to post
Share on other sites

you can try something like this

// callfunc("func_Refine", <EQI>, <max_refine>, <item_id>);
function	func_Refine	{
	[email protected] = getarg(0, 0);
	[email protected]_refine = getarg(1, 10);
	[email protected]_id = getarg(2, 0);
	[email protected] = getarg(3, 1);
	
	if ([email protected] > 0 && [email protected]_id > 0 && [email protected] > 0) {
		if (getequipisenableref([email protected])) {
			if (getequiprefinerycnt([email protected]) < [email protected]_refine) {
				delitem [email protected]_id, [email protected];
				successrefitem [email protected];
				dispbottom "[Refine] Refined Equipment.";
			}
			else {
				dispbottom "[Refine] already reached max refine of "[email protected]_refine+".";
			}
		}
	}
	return;
}
20022,Ticket_Refine_Head,Ticket Refine Weapon,11,1,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ callfunc("func_Refine", EQI_HEAD_TOP, 10, 20022); },{},{}
20023,Ticket_Refine_Armature,Ticket Refine Weapon,11,1,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ callfunc("func_Refine", EQI_HAND_R, 10, 20023); },{},{}
20024,Ticket_Refine_Arma,Ticket Refine Weapon,11,1,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ callfunc("func_Refine", EQI_ARMOR, 10, 20024); },{},{}
20025,Ticket_Refine_Shield,Ticket Refine Weapon,11,1,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ callfunc("func_Refine", EQI_HAND_L, 10, 20025); },{},{}
20026,Ticket_Refine_Manto,Ticket Refine Weapon,11,1,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ callfunc("func_Refine", EQI_COSTUME_GARMENT, 10, 20026); },{},{}
20027,Ticket_Refine_Shoes,Ticket Refine Weapon,11,1,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ callfunc("func_Refine", EQI_SHOES, 10, 20027); },{},{}

 

  • Upvote 1

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.   Paste as plain text instead

  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.

Loading...
Sign in to follow this