Jump to content

christofereduardo

Members
  • Posts

    36
  • Joined

  • Last visited

Posts posted by christofereduardo

  1. On 09/09/2017 at 11:47 AM, mhielo12 said:
    On 09/09/2017 at 10:15 AM, mhielo12 said:

    No error on map server :( im really lost.. 

    you have a working sql for this? ill try to delete my sql..

    EDIT:

    Hi Technoken

    I check the previous version and compare to the new version

    in the old diff there is this line in item_vending.txt

    Index: db/item_vending.txt
    ===================================================================
    --- db/item_vending.txt    (nonexistent)
    +++ db/item_vending.txt    (working copy)
    @@ -0,0 +1,12 @@
    +// Specific items for Vending System
    +// Format: ItemID
    +// Max items is equal MAX_INVENTORY ( 100 by default )
    +
    +// TCG Card
    +7227
    +// Mithril Coin
    +674
    +// Silver Coin
    +675
    +// Bronze Coin
    +673

    Should I remove this on the new patch?

    I removed this in the new patch still not work.. :( help im lost.. :( is it zeny cash only working? :( 

     

    I have the same problem.

     

    the script is not working to buy in cash if the char does not have zeny the char in the minimum need to have 1 zeny in case he informs the message that you do not have cash even though okay I've tested everything is working right. Do not forget people who do not use sql tables need to do item_db2.txt

    emulador/db/pre-re/item_db2.txt
    emulador/db/re/item_db2.txt

    30000,Zeny,Zeny,3,,10,10,,,,,,,,,,,,,{},{},{}
    30001,Cash,Cash,3,,10,10,,,,,,,,,,,,,{},{},{}

    Tanks...

  2. /*===== By: =================================================\\
      - Rebel, Zephyrus [rAthena]                                 |
      - Mhalicot [Hercules]                                       |
      - Tradução/Revisão(ajuste) SlexFire [Cronus]                |
    ======= Versão atual: ========================================|
      - 1.2 													  |
    ======= Descrição ============================================|
      - Converte equipamentos de cabeça em visuais ou vise versa  |
    =============================================================*/
    
    -	script	Costume Conversor	-1,{
    
    if(countitem(671) >= 1)
    {
    	mes "[Conversor]";
    	mes "Aqui você pode converter seus equipamentos em visuais ou restaurar a sua forma original.";
    	switch(select("Quero converter:Quero restaurar.:Nada, obrigado.")) {
    	case 1:
    			next;
    			mes "[Conversor]";
    			mes "Pof favor, selecione qual você quer converter.";
    			mes "Lembre-se, cartas e refinamentos serão removidos.";
    			next;
    				setarray .@Position$[1],"Top","Mid","Low";
    				setarray .@Position[1], EQI_HEAD_TOP, EQI_HEAD_MID, EQI_HEAD_LOW;
    				set .@Menu$,"";
    			for( set .@i, 1; .@i < 5; set .@i, .@i + 1 )
    			{
    				if( getequipisequiped(.@Position[.@i]) )
    				set .@Menu$, .@Menu$ + .@Position$[.@i] + "-" + "[" + getequipname(.@Position[.@i]) + "]";
    				set .@Menu$, .@Menu$ + ":";
    			}
    			set .@Part, .@Position[ select(.@Menu$) ];
    			set .@id, getequipid(.@Part);
    			set .@ref, getequiprefinerycnt(.@Part);
    			if( !getequipisequiped(.@Part) )
    			{
    				mes "[Conversor]";
    				mes "Você não está equipado com nenhum equipamento de cabeça!";
    				close;
    			}
    			mes "[Conversor]";
    			mes "Quer converter seu " + getitemname(getequipid(.@Part)) + " em visual?";
    			next;
    			if( select("Sim, prosseguir:Não, me desculpe.") == 2 )
    			{
    				mes "[Conversor]";
    				mes "Precisa de algum tempo para pensar sobre isso?";
    				mes "Tudo bem, posso entender.";
    				close;
    			}
    			for(set .@i,0; .@i<4; set .@i,.@i+1)
    				set .@slot[.@i], getequipcardid(.@Part,.@i);
    			if (.@slot[0]>4000 && .@slot[0]<5000) { // Se o equipamento possuir cartas, não converter!
    				mes "[Conversor]";
    				mes "Uma carta? Aqui?!";
    				mes "Como eu disse antes, não converto equipamentos com cartas.";
    				emotion e_hmm;
    				close;
    			}
    			getinventorylist;
    			for(set .@i,0; .@i<@inventorylist_count; set .@i,.@i+1)
    				if (@inventorylist_expire[.@i] != 0 && @inventorylist_equip[.@i] != 0) { // Se o equipamento for de aluguel, não converter!
    				mes "[Conversor]";
    				mes "Desculpe, Não converto equipamentos de aluguel!";
    				emotion e_hmm;
    				close;
    				}
    				if (.@ref > 0) { // Se o equipamento for refinado, não converter!
    				mes "[Conversor]";
    				mes "Desculpe, mantenha em mente.";
    				mes "Não converto equipamento refinado!";
    				emotion e_hmm;
    				close;
    				}
    			if (!countitem(.@id)) { 
    				mes "[Conversor]";
    				mes "Onde está "+getitemname(@id)+"...?";
    				npctalk "Você é um trapaceiro!";
    				logmes "CHEATER: Tentou indicar um item que não possui: "+getitemname(@id);
    				emotion e_wah;
    				close;
    			}
    			costume .@Part; // Converte o equipamento
    			mes "[Conversor]";
    			mes "^0000FFConcluído^000000, aproveite seu equipamento visual.";
    			delitem 671,1;
    			close;
    	case 2:
    			next;
    			mes "Por favor, selecione qual você quer restaurar.";
    			mes "Lembre-se, Irei restaurá-lo de volta sem refinação e/ou cartas.";
    			next;
    				setarray .@Position$[1],"Top","Mid","Low";
    				setarray .@Position[1], EQI_COSTUME_HEAD_TOP, EQI_COSTUME_HEAD_MID, EQI_COSTUME_HEAD_LOW;
    				set .@Menu$,"";
    			for( set .@i, 1; .@i < 5; set .@i, .@i + 1 )
    			{
    				if( getequipisequiped(.@Position[.@i]) )
    				set .@Menu$, .@Menu$ + .@Position$[.@i] + "-" + "[" + getequipname(.@Position[.@i]) + "]";
    				set .@Menu$, .@Menu$ + ":";
    			}
    			set .@Part, .@Position[ select(.@Menu$) ];
    			if( !getequipisequiped(.@Part) )
    			{
    				mes "[Conversor]";
    				mes "Você não está equipado com nenhum equipamento de cabeça!";
    				close;
    			}
    			mes "[Conversor]";
    			mes "Quer restaurar seu " + getitemname(getequipid(.@Part)) + "?";
    			next;
    			if( select("Sim, prosseguir:Não, me desculpe.") == 2 )
    			{
    				mes "[Conversor]";
    				mes "Precisa de algum tempo para pensar sobre isso?";
    				mes "Tudo bem, posso entender.";
    				close;
    			}
    			a = getequipid(.@Part);
    			delitem a,1;
    			getitem a,1;
    						
    			mes "[Conversor]";
    			delitem 671,1;
    			mes "^0000FFConcluído^000000, aproveite seu equipamento de cabeça restaurado.";
    			close;
    	case 3:
    		next;
    		mes "[Conversor]";
    		mes "Muito bem. Retorne quando precisar dos meus serviços.";
    		close;
    	}
    OnInit:
    	waitingroom "Visuais",0;
    	end;
    }
    	mes "[Conversor]";
    	mes "Desculpe, só trabalho para quem me trouxer moedas de ouro.";
    	close;
    }
    // ---------------------------------------------------------------------------------
    // Use duplicatas para colocar o seu NPC em diferentes cidades                     |
    // ---------------------------------------------------------------------------------
    prontera,128,213,6	duplicate(Costume Conversor)	Conversor#1	1_M_SMITH

     

    Well I have a problem with that npc there in the command CUSTOM simply it arrives there and drops the server without even giving some error I searched in the whole server for other script and all give the same error and use the same configuration if someone can help me please give a look at me.

     

     

    I used this diff here https://github.com/rathena/rathena/compare/master...secretdataz:costume.diff

  3. On 10/09/2017 at 0:23 AM, M4karov said:

    The openshop command does not exist in the emulator, use callshop.

    Ok a make a test.

     

     

    An error has been fixed but now you have created another 2

    [Error]: npc_parsesrcfile: Unable to parse, probably a missing or extra TAB in file 'npc/DRAGONAROK/Eventos/Fidelidade.txt', line '149'. Skipping line...
     * w1=-
     * w2=trade
     * w3=loyalty#shop
     * w4=-1,{
    [Error]: npc_parsesrcfile: Unknown syntax in file 'npc/DRAGONAROK/Eventos/Fidelidade.txt', line '150'. Stopping...
     * w1=OnInit:
     * w2=
     * w3=
     * w4=

     

  4. Error:

    [Error]:  Loading NPC file: npc/DRAGONAROK/Eventos/Fidelidade.txt
    script error on npc/DRAGONAROK/Eventos/Fidelidade.txt line 128
        parse_line: expect command, missing function name or calling undeclared function
       123 :        mes "^3487C2- Voc� pode resgartar diversos pr�mios com Pontos de Fidelidade.^000000";
       124 :        next;
       125 :        switch(select("Sair"+( getvariableofnpc(.shop, "loyalty#controller") ? ":Resgatar Itens" : ":" )+( getvariableofnpc(.achievement, "loyalty#controller") ? ":Premia��es Extras" : "" )))
       126 :        {
       127 :                case 1: { mes .npc$; mes "Tudo bem, tenha um bom dia."; close; }
    *  128 :                case 2: { mes .npc$; mes "� pra j�, olha s� os itens incr�veis que temos em nossa lojinha. ^^"; close2; 'o'penshop("loyalty#shop"); end; }
       129 :                case 3:
       130 :                        mes .npc$;
       131 :                        mes "Premia��o Padr�o";
       132 :                        mes "^ff0000Por Hora:^000000 1 Ponto de Fidelidade.";
       133 :                        mes " ";

    Script npc:

    */
    //=========================================
    //	SQL
    //	-	Copiar e colar no PhpMyAdmin
    /*=========================================
    
    	ALTER TABLE `login` 
    	ADD `loyalty_minute` INT NOT NULL DEFAULT '0' , 
    	ADD `loyalty_points` INT NOT NULL DEFAULT '0' ;
    
    */
    
    // Quando player logar começa a contagem de tempo online.
    // A cada minuto ele ganha 1 ponto
    // Premiações extras a cada meta completa
    // A contagem é salva por conta
    -	script	loyalty#controller	-1,{ OnInit:
    //====================================================
    //	Configurações Sistema Fidelidade
    //====================================================
    //----------------------------------------------------
    //	1.	Quantidade de pontos de fidelidade por hora
    	set .pontos, 1;			// Padrão: 1 ponto por hora
    //----------------------------------------------------
    //	2.	Permitir contagem de pontos em @at/Vending?
    //	-	(0) Não permitir, (1) Permitir
    	set .vending, 0;		// Padrão: (0) Não permitir
    //----------------------------------------------------
    //	3.	Utilizar Cash ao inves de Pontos de Fidelidade?
    //	-	Caso ativado atribuirá a quantidade de pontos 
    //		p/hora ao comando @cash, sendo assim a cada 1h
    //		online o player recebe X de cash (rops).
    //	-	(0) Não permitir, (1) Permitir
    	set .cash, 0;			// Padrão: (0) Desativado
    //----------------------------------------------------
    //	4.	Ativa sistema de conquistas?
    //	-	Pontos extra para cada conquista alcançada
    //	-	(0) Desativar, (1) Ativar
    	set .achievement, 1;	// Padrão: (1) Ativar
    //----------------------------------------------------
    //	5.	Ativar Loja Itens Fidelidade
    //	-	(0) Desativar, (1) Ativar
    	set .shop, 1;			// Padrão: (1) Ativar
    //----------------------------------------------------
    //	5.1	Itens Loja Fidelidade
    //	-	<item_id>,<qtd_pontos>{<item_id>,<qtd_pontos>,...};
    	setarray .itens[0], 12208, 3, 12210, 4, 14232, 5, 12202, 1, 12203, 1, 12207, 1, 12204, 1, 12205, 1, 12206, 1, 13995, 4, 5423, 4300, 5137, 7200, 5490, 4300;
    //----------------------------------------------------
    //====================================================
    //	Conquistas
    //====================================================
    //	<n° horas>,<quantidade pontos>;
    //	6,5; 6 horas = 5 pontos.
    //	Deixar (;) apenas no ultimo
    	setarray .achievements[0],	6, 5,
    								12, 20,
    								24, 80,
    								48, 320,
    								96, 1280,
    								192, 5120,
    								384, 20480,
    								768, 81920; // Ultimo
    
    //====================================================
    //	IMPORTANTE: Não Alterar as linhas abaixo
    //====================================================									
    donpcevent "loyalty#shop::OnInit"; end; // Carregando Loja
    //----------------------------------------------------
    //	Contagem de minutos/pontos
    OnPCLoginEvent:
    	while(1)
    	{
    		sleep2 60000; // 1 minuto
    		if(!checkvending() || .vending)
    		{
    			query_sql("UPDATE `login` SET `loyalty_minute` = `loyalty_minute` + '1' WHERE `account_id` = '"+getcharid(3)+"'");
    			query_sql("SELECT `loyalty_minute` FROM `login` WHERE account_id = '"+getcharid(3)+"'",.@minuto);
    			if( !(.@minuto%60) )
    			{
    				if( .cash ) atcommand "@cash " + .pontos + "";
    				else query_sql("UPDATE `login` SET `loyalty_points` = `loyalty_points` + '"+.pontos+"' WHERE `account_id` = '"+getcharid(3)+"'");
    				
    				if( .achievement )
    				{
    					for(set .@i, 0; .@i < getarraysize(.achievement); set .@i, .@i + 2)
    						if( .achievements[.@i] == ( .@minuto / 60 ) ) {
    							if( .cash ) atcommand "@cash " + .achievements[.@i+1];
    							else query_sql("UPDATE `login` SET `loyalty_points` = `loyalty_points` + "+.achievements[.@i+1]+" WHERE account_id = '"+getcharid(3)+"'");
    							announce "[Sistema de Fidelidade]: Conquista obtida, "+.achievements[.@i]+"h online, parabéns! Receba "+.achievements[.@i+1]+" Pontos de "+(.cash? "Cash" : "Fidelidade"),bc_self,0xBF5EFF;
    						}
    				}
    			}
    		}
    	}
    end;
    }
    prontera,145,206,4	script	Fidelidade	4_M_ZONDAOYAJI,{mes "[Fidelidade]";mes "Opa, se está vendo esta mensagem, é porque ocorreu um erro.";next;mes "[Fidelidade]";mes "Para corrigir, basta usar a Kafra para teleportar a outro mapa, depois volte aqui.";close;OnInit:	waitingroom "Fidelidade",0;	end;}
    -	script	loyalty#agent	-1,{  callfunc "loyalty#resume"; end; }
    
    function	script	loyalty#resume	{
    	copyarray .@achievement[0], getvariableofnpc(.achievements[0],"loyalty#controller"),getarraysize(getvariableofnpc(.achievements,"loyalty#controller"));
    	query_sql ("SELECT `loyalty_minute` / 60 , `loyalty_minute`, `loyalty_points` FROM `login` WHERE account_id = '"+getcharid(3)+"'",.@hora,.@minuto,.@points);
    	set .npc$, "^6F34C2[Sistema de Fidelidade]^000000";
    	mes .npc$;
    	mes "Seja bem vind"+(Sex?"o":"a")+" ^ff0000"+strcharinfo(0)+"^000000!";
    	mes "Tempo de Jogo: ^ff0000"+.@hora+" hora"+(.@hora > 1? "s" : "")+" e "+(.@minuto%60)+" minuto"+(.@minuto > 1? "s" : "")+"^000000.";
    	mes "^F7AD00- Você pode acumular Pontos de Fidelidade permanecendo on-line.^000000";
    	mes "^3487C2- Você pode resgartar diversos prêmios com Pontos de Fidelidade.^000000";
    	next;
    	switch(select("Sair"+( getvariableofnpc(.shop, "loyalty#controller") ? ":Resgatar Itens" : ":" )+( getvariableofnpc(.achievement, "loyalty#controller") ? ":Premiações Extras" : "" )))
    	{
    		case 1: { mes .npc$; mes "Tudo bem, tenha um bom dia."; close; }
    		case 2: { mes .npc$; mes "É pra já, olha só os itens incríveis que temos em nossa lojinha. ^^"; close2; openshop("loyalty#shop"); end; }
    		case 3:
    			mes .npc$;
    			mes "Premiação Padrão";
    			mes "^ff0000Por Hora:^000000 1 Ponto de Fidelidade.";
    			mes " ";
    			mes "Premiações Extras: " + ( .@hora < getelementofarray(getvariableofnpc(.achievements, "loyalty#controller"), (getarraysize(getvariableofnpc(.achievements,"loyalty#controller")) - 2 )) ? "^ff0000Incompleto!":"^00B0EFCompleto!") + "^000000";
    			
    			for(set .@i, 0; .@i < getarraysize(.@achievement); set .@i, .@i + 2)
    			{
    				mes ( .@hora < .@achievement[.@i] ? "^ff0000" + .@achievement[.@i] + "h^000000: " : "^999999" + .@achievement[.@i] + ": ")  + .@achievement[.@i+1] + " Pontos de "+(getvariableofnpc(.cash,"loyalty#controller")? "Cash" : "Fidelidade")+".";
    			}
    			next;
    			mes .npc$;
    			mes "Continue juntando Pontos de Fidelidade e troque por itens incríveis aqui comigo. ^^";
    			mes "Tenha um bom jogo e nos vemos por aí!";
    			next;
    			callfunc "loyalty#resume";
    	}
    }
    
    -	trader	loyalty#shop	-1,{
    OnInit:
    	copyarray .@itens[0], getvariableofnpc(.itens[0],"loyalty#controller"),getarraysize(getvariableofnpc(.itens,"loyalty#controller"));
    	tradertype(NST_CUSTOM);
    	
    	for(set .@i, 0; .@i < getarraysize(.@itens); set .@i, .@i + 2) 
    		sellitem .@itens[.@i],.@itens[.@i+1];
    end;
    
    OnCountFunds: 
    	query_sql ("SELECT `loyalty_points` FROM `login` WHERE account_id = '"+getcharid(3)+"'",@loyalty);
    	setcurrency(@loyalty); 
    end;
    
    OnPayFunds:
    	if( @loyalty < @price )  end;
    	query_sql("UPDATE `login` SET `loyalty_points` = `loyalty_points` - '"+@price+"' WHERE `account_id` = '"+getcharid(3)+"'");
    	purchaseok();
    end;
    }
    
    /*
    	Duplicates
    */
    prontera,145,206,4	duplicate(loyalty#agent)	Sistema de Fidelidade#prt	4_M_ZONDAOYAJI
    
    
    /* Fim do NPC */

    Achei somente esse post no forum mas não está funcionando corretamente também ele não dá erro mas ele não exibe os items da loja
    link: 

     

    I only found this post in the forum but it is not working correctly also it does not give an error but it does not display the store items

    link: 

    Estou enfrentando esse erro alguém pode me ajudar.
    Obrigado:

     

    I'm facing this error and I can help.

    Thank you:

×
×
  • Create New...