Jump to content
  • 0

10 Cards Random to 1 Oridecon


daelgyn

Question


  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  2
  • Reputation:   0
  • Joined:  05/04/20
  • Last Seen:  

Boa noite,

Me ajude com este script.

Quero trocar 10 cartas aleatórias entre 4001-4453 pelo Oridecon_Enquerico.

O script precisa verificar se o jogador possui 10 cartas aleatórias no inventário; se ele tiver, ele receberá o item Oridecon_Enquecido e remove as 10 cartas do inventário.

-----------------------------------------

Good evening,

Help me with this script.

I want to exchange 10 random cards between 4001-4453 for Oridecon_Enquerico.

The script needs to check if the player has 10 random cards in the inventory, if he has, he will receive the item Oridecon_Enquecido and remove the 10 cards from the inventory.

 

prontera,154,179,3	script	Oca#cards	4W_M_01,{ 

	//GroupID do usuário
	set .@groupid_user, 1;
	
	// Quantidade Oridecon Enriquecidos entregue
	set .@qtd_oridecon, 1;
		
	// Quantidade cartas obrigatórias
	set .@qtd_item, 10;
	
	// Site no qual será indicado ao jogador para se tornar um Usuário VIP.
	.@WebSite$ = "https://google.com.br";

	if( getgroupid() >= .@groupid_user) {
		mes "Deseja trocar carta por Oridecon Enriquecidos?";
		switch( select("Sim", "Não"))
		{
			case 1:
				mes "Ok, irei verificar os requisitos.";
				next;
				for( set .@i,4001; .@i <= 4453; .@i++)
				{
					if(countitem(getitemname(.@i)) && .@qtd_item == 10) 
					{
						mes "Aqui está seu item.";
						getitem 7620,1;
						close2;
						cutin "", 255;					
					} else
					{
						mes "verifique os requisitos";
						close2;
						end;
					}
				}
			case 2:
				mes "até mais";
				close2;
				cutin "", 255;
				end;
		}
	} else 
	{
		mes "Somente VIP pode usar meus serviços. Para se tornar um usuário VIP, acesse nosso site:";
		mes "^0000FF" + .@WebSite$ + "^000000";
		close2;
		cutin "", 255;
		end;
	}
}

 

Edited by daelgyn
Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  18
  • Reputation:   12
  • Joined:  04/10/20
  • Last Seen:  

Try this:

 

prontera,154,179,3	script	Oca#cards	4W_M_01,{ 
//GroupID do usuário
	set .@groupid_user, 1;
	
	// Quantidade Oridecon Enriquecidos entregue
	set .@qtd_oridecon, 1;
		
	// Quantidade cartas obrigatórias
	set .@qtd_item, 10;
	
	// Site no qual será indicado ao jogador para se tornar um Usuário VIP.
	.@WebSite$ = "https://google.com.br";

	if( getgroupid() >= .@groupid_user) {
		mes "Deseja trocar carta por Oridecon Enriquecidos?";
		switch( select("Sim", "Não")){
			case 1:
				mes "Ok, irei verificar os requisitos.";
				next;
				getinventorylist;
				for( .@i=0; .@i < @inventorylist_count; .@i++){
					if(getiteminfo(@inventorylist_id[.@i],2) ==  6 && @inventorylist_id[.@i] >= 4001 && @inventorylist_id[.@i] <= 4453 ){
						dispbottom "Item Count: ["+getitemname(@inventorylist_id[.@i])+"] - "+countitem(@inventorylist_id[.@i]);
						if(countitem(@inventorylist_id[.@i]) > 1){
							if((countitem(@inventorylist_id[.@i])+.@k) >= 9){ .@c = (9-.@k); } else { .@c = countitem(@inventorylist_id[.@i]); }
							dispbottom ".@c = "+.@c;
							for(.@j=0; .@j < .@c; .@j++){
								.@cardsale[.@k] = @inventorylist_id[.@i];
								dispbottom ".@cardsale["+.@k+"] = "+.@cardsale[.@k];
								.@k+=1;
							}
						} else {
							.@cardsale[.@k] = @inventorylist_id[.@i];
							dispbottom ".@cardsale["+.@k+"] = "+.@cardsale[.@k];
							.@k+=1;
						}
						if(.@k == 10){
							for(.@e=0; .@e < 10; .@e++){
								if(.@cardsale[.@e] != .@cardsale[.@e+1]){
									.@cid = .@cardsale[.@e];
									mes "- ^bf7c0f"+getitemname(.@cid)+"^000000 x"+countinarray(.@cardsale[0], .@cid);
								} 
							}
							switch(select("~ Trade:~ ^FF0000Cancel^000000")){
								case 1:
									for(.@r=0; .@r < 10; .@r++){
										delitem .@cardsale[.@r],1;
									}
									clear;
									mes "Aqui está seu item.";
									getitem 7620,1;
									close3;
								case 2:
									close3;
							}
								
						}
					}
				}
				mes "...";
				mes "verifique os requisitos";
				close3;
			case 2:
				mes "até mais";
				close3;
		}
	} else {
		mes "Somente VIP pode usar meus serviços. Para se tornar um usuário VIP, acesse nosso site:";
		mes "^0000FF" + .@WebSite$ + "^000000";
		close3;
	}
}

 

Link to comment
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
Answer this question...

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

×
×
  • Create New...