Jump to content

gabrielks

Members
  • Posts

    11
  • Joined

  • Last visited

Posts posted by gabrielks

  1. hi guys, i'm lost here because my pvp system is not counting the frags and it doesn't show in rank either. 
    Could someone please help me?
    
    Sorry for my bad english
    Spoiler
    
    /=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=+
    // Npc criado por marcio93
    //=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=+
    // Nome do Npc PvP sem ygg
    //=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=+
    // Versão atual 1.2
    //=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=+
    // Npc criado em 13/10/2010
    //=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=+
    // Compatível com Cronus e Eathena
    //=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=+
    
    prontera,150,150,3	script	PvP sem Ygg	56,{
    
    Mes "[PvP Sem YGG]";
    mes "Olá gostaria de entrar em qual Arena sem YGG?";
    menu "PvP",pvp,"GvG",gvg,"Ranking",rank,"Nenhuma obrigado",-;
    
    mes "[PvP sem YGG]";
    mes "volte quando quiser";
    close;
    
    pvp:
    if(countitem(610)>= 1) goto temitem;
    if(countitem(607)>= 1) goto temitem;
    mes "Boa sorte na Arena!!";
    next;
    warp "pvp_y_2-2",0,0;
    mapannounce "pvp_y_2-2","O jogador "+strcharinfo(0)+" entrou na Arena sem Ygg", bc_yellow;
    end;
    
    gvg:
    if(getcharid(2) == 0) goto semg;
    if(countitem(610)>= 1) goto temitem;
    if(countitem(607)>= 1) goto temitem;
    mes "Boa sorte na Arena!!";
    next;
    warp "guild_vs2",0,0;
    mapannounce "guild_vs2","O jogador "+strcharinfo(0)+" entrou na Arena sem Ygg", bc_yellow;
    end;
    
    			temitem:
    				mes "[PvP sem YGG]";
       	  			mes "Você não pode entrar com os seguintes itens:";
    			mes "getitemname(607)";
    			mes "getitemname(610)";
    			mes "Retire-os do seu inventario e tente novamente";
    			close;
    
    			semg:
     					 mes "[PvP sem YGG]";
    	 			 mes "Você Não possui clã, somente quem tem clã pode entrar nesta sala";
     				 close;
    
    rank:
     				  	mes "[PvP sem YGG]";
    			  	mes "Olá "+strcharinfo(0)+" gostaria de ver qual ranking?";
    			  	menu  "PvP sem YGG",pv,"GvG sem YGG",gv,"Nenhum, Obrigado",-;
    
    			  	mes "Ok, Quando precisar so vir falar comigo";
    			  	close;
    		pv:
    		   	  	mes @nome$;
    		mes "Ok, este o nosso Ranking de PvP [TOP 10]";
    		next;
    		query_sql "SELECT name, kills, deaths FROM pvp ORDER BY kills DESC LIMIT 10",@name$,@kills,@deaths;
    		dispbottom "Ranking PvP [TOP 10]";
    		dispbottom " ";
    		dispbottom "Posição <~> Nome <~> Matou <~> Morreu";
    		dispbottom " ";
    		for(set @i,0;@i<=9;set @i,@i+1) {
    			dispbottom "["+(@i+1)+"] <~> "+@name$[@i]+" <~> "+@kills[@i]+" <~> "+@deaths[@i]+"";
    		}
    		close;
    
    		gv:
    		  	mes @nome$;
    		mes "Ok, este 0 nosso Ranking de GvG [TOP 10]";
    		next;
    		query_sql "SELECT name, kills, deaths FROM gvg ORDER BY kills DESC LIMIT 10",@guild_name$,@guild_kills,@guild_deaths;
    		dispbottom "Ranking GvG [TOP 10]";
    		dispbottom " ";
    		dispbottom "Posição <~> Nome da Guild <~> Vitórias <~> Derrotas";
    		dispbottom " ";
    		for(set @i,0;@i<=9;set @i,@i+1) {
    		dispbottom "["+(@i+1)+"] <~> "+@guild_name$[@i]+" <~> "+@guild_kills[@i]+" <~> "+@guild_deaths[@i]+"";
    		}
    		close;
    
    
    
    }
    //================= parte dos ranking's==============
    -	script	rankingygg	-1,{
    
    OnPCKillevent:
    	   	GetMapxy(.@mapa$,.@x,.@y,0);
    	if(.@mapa$ == "guild_vs2") nowarp;
    	if(.@mapa$ == "pvp_y_2-2") nowarp;
    
    pvp:
    	set @CID,getcharid(0);set @name$,"";set @points,0;
    					query_sql "SELECT `kills` FROM `pvp` WHERE `char_id`="+@CID+"",@points;
    					query_sql "SELECT `name` FROM `pvp` WHERE `char_id`="+@CID+"",@name$;
    			if ( @name$ == "" ) { query_sql "INSERT INTO `pvp`  (`char_id`,`name`,`kills`) VALUES  ("+@CID+",'"+strcharinfo(0)+"',1)",@esc$; dispbottom "Você Matou seu  primeiro jogador"; end; }
    					query_sql "UPDATE `pvp` SET `kills` = `kills` +1 WHERE `char_id`="+@CID+"",@esc$;
    		set @points,@points+1;
    		dispbottom "[PvP]: Você tem "+@points+" Pontos no PVP sem YGG.";
    						end;
    
    gvg:
    
    		set @GID,getcharid(2);set @name$,"";set @points,0;
    					query_sql "SELECT `kills` FROM `gvg` WHERE `guild_id`="+@GID+"",@gpoints;
    					query_sql "SELECT `name` FROM `gvg` WHERE `guild_id`="+@GID+"",@name$;
    			if ( @name$ == "" ) { query_sql "INSERT INTO `gvg`  (`guild_id`,`name`,`kills`) VALUES  ("+@GID+",'"+strcharinfo(2)+"',1)",@esc$; dispbottom "Primeiro Frag da  Guild"; end; }
    					query_sql "UPDATE `gvg` SET `kills` = `kills` + 1 WHERE `guild_id`="+@GID+"",@esc$;
    		set @gpoints,@gpoints+1;
    		mapannounce	@map$,"A Guild [ "+@name$+" ] empilhou "+@gpoints+" caveiras.",bc_self,0x90FFFF;
    						end;
    //==========
    OnPCDieEvent:
    
    	 	getmapxy @map$,@x,@y,0;
    			if(.@mapa$ == "guild_vs2") nowarp;
    			if(.@mapa$ == "pvp_y_2-2") nowarp;
    
    pvp1:
    		set @CID,getcharid(0);set @name$,"";set @points,0;
    					query_sql "SELECT `deaths` FROM `pvp` WHERE `char_id`="+@CID+"",@points;
    					query_sql "SELECT `name` FROM `pvp` WHERE `char_id`="+@CID+"",@name$;
    			if ( @name$ == "" ) { query_sql "INSERT INTO `pvp`  (`char_id`,`name`,`deaths`) VALUES  ("+@CID+",'"+strcharinfo(0)+"',1)",@esc$; end; }
    					query_sql "UPDATE `pvp1` SET `deaths` = `deaths` + 1 WHERE `char_id`="+@CID+"",@esc$;
    						end;
    
    gvg1:
    		set @GID,getcharid(2);set @name$,"";set @gpoints,0;
    					query_sql "SELECT `deaths` FROM `gvg` WHERE `guild_id`="+@GID+"",@gpoints;
    					query_sql "SELECT `name` FROM `gvg` WHERE `guild_id`="+@GID+"",@name$;
    			if ( @name$ == "" ) { query_sql "INSERT INTO`gvg`  (`guild_id`,`name`,`deaths`) VALUES  ("+@GID+",'"+strcharinfo(2)+"',1)",@esc$; end; }
    					query_sql "UPDATE `gvg1` SET `deaths` = `deaths` + 1 WHERE `guild_id`="+@GID+"",@esc$;
    						end;
    } 

    Thanks

  2.  

    I would like someone who could change this script. I would just like npc to retrieve weapons / shields. And only the final slot in the case of 4 slots

    Spoiler
    
    prontera,194,188,4	script	Enchant Expert	712,{
    	mes .npc$;
    	mes "Hello there!";
    	mes "I can enchant your items,";
    	mes "for a small fee of "+.pric+"z.";
    	emotion e_no1,0; next;
    	if(select("Yes:No")&2) { mes .npc$; mes "Alright, thanks anyways!"; close; }
    	if(Zeny<.pric) { mes .npc$; mes "I'm sorry you don't have enough Zeny, please come back later."; close; }
    	
    	mes .npc$;
    	mes "Which item would you like to enchant?"; next;
    	while(set(.@a,.@a+1)<=.e_len) {
    		if(getequipid(.@a)>-1)
    			set .@menu$, .@menu$+.eqp$[.@a-1]+"- [^0000FF"+getitemname(getequipid(.@a))+"^000000]:";
    		else set .@menu$, .@menu$+"^adb4be"+.eqp$[.@a-1]+"- [Empty]^000000:";
    	}
    		
    	select(.@menu$);
    	set .@eq_loc, @menu;
    	set .@eq_itm, getequipid(.@eq_loc);
    	if(.@eq_itm<0) {
    		mes .npc$;
    		mes "Hmm, I don't think you have anything equipped there.";
    		close;
    	}
    	
    	set .@menu$, "";
    	set .@a, .en_orb[0];
    	while((set(.@a,.@a+1)-1)<=.en_orb[1])
    		if(getiteminfo(.@a-1,2)>-1)
    			if(set(.@c,countitem(.@a-1))) {
    				set .@menu$, .@menu$+getitemname(.@a-1)+" x"+.@c+":";
    				set .@b,.@b+1; set .@item[.@b], .@a-1;
    			}
    			
    	if(.@menu$=="") {
    		mes .npc$;
    		mes "Hmm, you don't seem to have any enchantment orbs.";
    		close;
    	}
    
    	mes .npc$;
    	mes "Please, select an enchantment from the menu."; next;
    	select(.@menu$);
    	set .@itm, .@item[@menu];
    
    	set .@menu$, ""; set .@a, 0;
    	while((set(.@a,.@a+1))<4) {
    		if(getequipcardid(.@eq_loc,.@a))
    			set .@menu$, .@menu$+(.@a+1)+.crd_c$[.@a]+" Slot- [^a92435"+getitemname(getequipcardid(.@eq_loc,.@a))+"^000000]:";
    		else set .@menu$, .@menu$+(.@a+1)+.crd_c$[.@a]+" Slot- [^30ad25Empty^000000]:";
    	}
    	
    	setarray .@card, getequipcardid(.@eq_loc,0), getequipcardid(.@eq_loc,1), getequipcardid(.@eq_loc,2), getequipcardid(.@eq_loc,3);
    	
    	mes .npc$;
    	mes "Select a slot."; next;
    	set .@men, select(.@menu$);
    	set .@eqrf,	getequiprefinerycnt(.@eq_loc);
    	if(getequipcardid(.@eq_loc,@menu)) {
    		mes .npc$;
    		mes "Would you like me to remove this card?"; next;
    		if(select("Yes:No")&2) { mes .npc$; mes "Alright, thanks anyways!"; close; }
    		getitem getequipcardid(.@eq_loc,.@men),1;
    		unequip(.@eq_loc);
    		delitem2 .@eq_itm, 1, 1, .@eqrf, 0, .@card[0], .@card[1], .@card[2], .@card[3];
    		set .@card[.@men], 0;
    		getitem2 .@eq_itm, 1, 1, .@eqrf, 0, .@card[0], .@card[1], .@card[2], .@card[3];
    	}
    
    	if(rand(100)>.perc) {
    		mes .npc$;
    		mes "I'm sorry but I've failed you!";
    		misceffect 155; emotion e_sob,0;
    		set Zeny,Zeny-.pric;
    		close;
    	}
    	
    	set Zeny,Zeny-.pric;
    	delitem .@itm,1;
    	delitem2 .@eq_itm, 1, 1, .@eqrf, 0, .@card[0], .@card[1], .@card[2], .@card[3];
    	set .@card[.@men], .@itm;
    	getitem2 .@eq_itm, 1, 1, .@eqrf, 0, .@card[0], .@card[1], .@card[2], .@card[3];
    	misceffect .efet;
    	emotion e_no1,0;
    	mes .npc$;
    	mes "All done!";
    	equip .@eq_itm;
    	close;
    
    //NPC Constants
    	OnInit:
    		//=-=-=-=-=-=-=Configuration=-=-=-=-=-=-=
    		set      .npc$  ,	"[^0000FFEnchant Expert^000000]"; // NPC Name
    		set      .pric  ,	1000000;                          // Price
    		set      .efet  ,	154;                              // Effect Number
    		set      .perc  ,	rand(50,80);                      // Percent
    		setarray .crd_c$,	"st", "nd", "rd", "th";           // Count
    		setarray .en_orb,	4700, 4862;                       // Range of IDs selected for enchanting.
    		setarray .eqp$  ,	"Upper Headgear", "Armor", "Left Hand", "Right Hand", "Garment",
    		                	"Shoes", "Accessory1", "Accessory2", "Mid Headgear", "Low Headgear";
    		set      .e_len ,	getarraysize(.eqp$);
    		//=-=-=-=-=-=-=-=-Skorm-=-=-=-=-=-=-=-=-=
    }

     

×
×
  • Create New...