Jump to content

Like it

Members
  • Posts

    24
  • Joined

  • Last visited

Posts posted by Like it

  1. 15 hours ago, FXFreitas said:

    This version works perfectly, only the weapons are missing, I just rip all sprites from NDS for myself.

    I'll work on Shaman Sprites Later, they are a bit harder to work, but when I done, I'll release as free just like with dark knight.

    Okay, we'll be looking forward to it. Thank you very much!

  2. 4 hours ago, FXFreitas said:

    Well Dark knight is ready to be coded, just need someone to code it:

    Axe, Shield and Dagger and robe sprite still missing,


    Wow, thank you very much, it seems nice, good work.
    Would you recommend using it on an online server since you are missing some sprites? I think it would not mess up, since most sprites are ready, but I need to listen to other people.

    Are you planning to work on Shaman's sprites as well?

  3. On 25/05/2017 at 1:56 AM, Ninja said:

    Yes, because we are saying different points. @Secrets is saying that it can be a security issue for your server if someone knows how to do SQL injection. I was simply checking things that I was not aware of about your server.

    On her second point she is suggesting that you check if the player is online or not, if he is online you should delete directly the items in his inventory through delitem2, if not, proceed with SQL Delete query. Her second point also invalidates my point regarding "you will not be able to delete items of players that are online because items get saved when players logout."

    So you think I'd better not create this drop-down menu?

    What if we kick the player(s) before deleting the items?

    @Ninja

  4. 3 hours ago, Ninja said:

    Well, before I do anything with your script, You should be aware that first of all, you will not be able to delete items of players that are online because items get saved when players logout.  Second,  you may make sure that you are using the right group id in your script. I guess setting it to < 99 Will be a better choice. Then try it again and let us know the results. :)

     

    2 hours ago, Secrets said:

    First, this script is vulnerable to SQL injection.

    Second, add a check if each owner of the target item is online or not. If they are online, use `delitem2`. Otherwise, query for deletion directly. 

    I'm confused, you're saying different things ...

    After all, can I delete items from online players? If not, there is no need to tinker with the script unless it is to optimize it.
    As for the id group, whatever, because on my server there is only Admin, players group 0 and group 1, there are no GMs

  5. Hello, I would like someone to help me with this script, because I tried anyway to show the menu to delete items if GM wants and I could not ... There are no errors in map-server, but as explained, I would like the option to delete Items along with the rest of npc.

    OBS: Yes, the script is very messy, if you want to optimize it, I will also thank.

     

    Spoiler
    
    prontera,162,161,6	script	ghjkl	56,{
    	if ( getgroupid() <= 1 ){
    	mes "Input a item id.";
    		input .@tmp$;
    		if( getitemname( .@tmp$ ) != "null" ){
    			for( set .@i,0; .@i < .sql_size; set .@i,.@i + 1 ){
    				query_sql( "SELECT SUM(`amount`) FROM `"+.sql_table$[.@i]+"` WHERE `nameid`='"+.@tmp$+"'",.@amount );
    				query_sql( "SELECT COUNT(`card0`) FROM `"+.sql_table$[.@i]+"` WHERE `card0`='"+.@tmp$+"'",.@card0 );
    				query_sql( "SELECT COUNT(`card1`) FROM `"+.sql_table$[.@i]+"` WHERE `card1`='"+.@tmp$+"'",.@card1 );
    				query_sql( "SELECT COUNT(`card2`) FROM `"+.sql_table$[.@i]+"` WHERE `card2`='"+.@tmp$+"'",.@card2 );
    				query_sql( "SELECT COUNT(`card3`) FROM `"+.sql_table$[.@i]+"` WHERE `card3`='"+.@tmp$+"'",.@card3 );
    				set .@total,.@total + ( .@amount + .@card0 + .@card1 + .@card2 + .@card3 );
    			}
    			mes "Found "+.@total+" x "+getitemname( .@tmp$ );
    		}
    		else{
    			mes "Wrong item id";
    			}
    		close;
    	}
    	if ( getgroupid() == 99 ){
    		mes "Enter an item id or item name. Display a list order by max amount found.";
    		input .@tmp$;
    		set .@item_id, atoi( .@tmp$ );
    		if ( .@item_id == 0 && getstrlen( .@tmp$ ) > 2 ) {// item name, eventually
    			set .@count, searchitem( .@tmp_array, .@tmp$ );
    			if ( .@count == 0 ) {// none item found
    				next;
    				mes "None item found.";
    				close;
    			}
    			next;
    			mes "I found the following items: ";
    			next;
    			while( .@i < .@count ) {
    				set .@menu$, .@menu$ + getitemname( .@tmp_array[.@i] ) +" (ID "+ .@tmp_array[.@i] +"):";
    				set .@i, .@i +1;
    			}
    			set .@s, select( .@menu$ ) -1;
    			set .@item_id, .@tmp_array[.@s];
    		}
    		else if ( .@item_id == 0 || getiteminfo( .@item_id,2 ) == -1 ) {
    			next;
    			mes "Wrong item id";
    			close;
    		}
    	
    		set .@search$, "`nameid` = "+ .@item_id +" or `card0` = "+ .@item_id +" or `card1` = "+ .@item_id +" or `card2` = "+ .@item_id +" or `card3` = "+ .@item_id;
    		while(1) {
    			set .@count, query_sql( "SELECT `char`.`name`, "+
    				"( SELECT COALESCE( SUM(`amount`),0 ) FROM `inventory` WHERE `char`.`char_id` = `inventory`.`char_id` and ( "+ .@search$ +" ) ) AS inv, "+
    				"( SELECT COALESCE( SUM(`amount`),0 ) FROM `cart_inventory` WHERE `char`.`char_id` = `cart_inventory`.`char_id` and ( "+ .@search$ +" ) ) AS cart, "+
    				"( SELECT COALESCE( SUM(`amount`),0 ) FROM `storage` WHERE `storage`.`account_id` = `char`.`account_id` and ( "+ .@search$ +" ) ) AS sto, "+
    				"( SELECT COALESCE( SUM(`amount`),0 ) FROM `guild_storage` WHERE `guild_storage`.`guild_id` = `char`.`guild_id` and ( "+ .@search$ +" ) ) AS gsto "+
    				"FROM `char` order by ( inv + cart + sto + gsto ) desc limit "+ ( .@page * 100 ) +", 100", .@name$, .@inventory, .@cart, .@storage, .@gstorage );
    			if ( .@count == 0 ) break;
    			for ( set .@i, 0; .@i < .@count && .@name$[.@i] != ""; set .@i, .@i +20 ) {
    				mes "^ff0000<player>^000000 <inv>,^00ff00<cart>,^0000ff<sto>,^006600<gsto>";
    				for ( set .@j, 0; .@j < 20 && .@name$[ (.@i+.@j) ] != ""; set .@j, .@j +1 ) {
    					set .@tmp, .@i + .@j;
    					if ( ( .@inventory[.@tmp] + .@cart[.@tmp] + .@storage[.@tmp] + .@gstorage[.@tmp] ) == 0 ) {
    						next;
    						goto L_End;// XP!
    					}
    					set .@num, .@num +1;
    					mes .@num +"/ ^ff0000"+ .@name$[.@tmp] +"^000000 : < "+ .@inventory[.@tmp] +", ^00ff00"+ .@cart[.@tmp] +", ^0000ff"+ .@storage[.@tmp] +", ^006600"+ .@gstorage[.@tmp] +"^000000 >";
    				}
    				next;
    				set .@page, .@page +1;
    			}
    				if ( select( "Cancel", "Delete item" ) == 2 ) {
    					for( set .@i,0; .@i < .@count; set .@i,.@i + 1 ) {
    						query_sql "delete from `"+.sql_table$[.@i]+"` WHERE ( `nameid`='"+.@item_id+"' or `card0`='"+.@item_id+"' or "+
    								"`card1`='"+.@item_id+"' or `card2`='"+.@item_id+"' or `card3`='"+.@item_id+"' )";
    					}
    					set .@count, query_sql( "select `account_id` from `char` where `online` = 1", .@account_id );
    					set .@origin, getcharid(3);
    					for( set .@i,0; .@i < .@count; set .@i,.@i + 1 ){
    						attachrid .@account_id;
    						set .@amount, countitem( .@item_id );
    						delitem .@item_id, .@amount;
    					}
    					attachrid .@origin;
    					mes "Pronto.";
    				}	
    		}
    	}
    L_End:
    	mes "*end of the list*";
    	close;
    	
    OnInit:
    	setarray .sql_table$[0],"inventory","cart_inventory","guild_storage","storage","mail";
    	set .sql_size,getarraysize( .sql_table$ );
    	end;
    }

     

     

  6. Hello. I'm trying together some scripts to make a woe guild points + woe players point.

    Here Capuche made a script for the petitioner, who forgot to give some important information. I need to tailor your script for this request, join the scripts, and complete the script with the following things.

    On 2013-2-2 at 5:53 AM, Linkin Park said:

    This will only add points to the castle that is active on that day? I mean, it should not add points to those guild that owns a castle that is not active during the WoE on that day.

    Example

    Monday = Kriemhild and Fad

    Guild A owns Hohen, the points will be added only to the guild that owns Kriemhild and Fad.

     

    On 2013-2-2 at 10:51 AM, Capuche said:

    No you didn't specify this I will make an edit... wait

     

    Another thing is, like:

    • Would I add 2 points every minute (60 seconds) for each player and his guild to be inside a castle and not die? The player must be moving, to prevent players from entering and hiding standing in a place without movement ...

    I researched and found this to do time counting.

    OnSec:
    	.@player_name$ = strcharinfo(0);
    	setarray getd( "."+.@player_name$+"_WoeTimes[getarraysize(."+.@player_name$+"_WoeTimes)]") , getd( "."+.@player_name$+"_WoeTimes[getarraysize(."+.@player_name$+"_WoeTimes)]") + 1; //add 1 second to counter
    • Would I always add points to the player and his guild, not just his guild?

     

    • Display the deaths of each player?

     

    • When changing month save in a different table all points for future queries or backup, avoiding problems. And then convert the total points of the guild woe to total_guild_shop to buy consumables in a total_guild_shop points shop, where only the guild master or players authorized by him could use the points for purchase.

     

    • Merge the scripts.
    Spoiler
    
    // alter table guild add column pk_woe_points int(11) default 0 after emblem_data, add index (pk_woe_points);
    prontera,155,181,5	script	PK Woe Points	100,{
    	.@nb = query_sql( "SELECT name, pk_woe_points from guild order by pk_woe_points desc limit 3", .@guild_name$, .@points ); // top 3
    	for ( .@i = 0; .@i < .@nb; .@i++ ) {
    		if ( !.@points[.@i] ) break;
    		mes ( .@i +1 )+". "+ .@guild_name$[.@i] +" -> "+ .@points[.@i];
    	}
    	close;
    
    OnPCKillEvent:
    	if( agitcheck() && getcharid(2) && compare( .castle$, strcharinfo(3) ) )
    		query_sql "update guild set pk_woe_points = pk_woe_points +1 where guild_id = "+ getcharid(2);
    	end;
    OnInit:
    	setarray .@castle_name$, "prtg_cas01", "prtg_cas02"; // etc.. add yours castles
    	.castle$ = implode( .@castle_name$, "|" );
    	end;
    }
    
    /*
    CREATE TABLE IF NOT EXISTS `guild_points` (
     `guild_id` int(11) unsigned NOT NULL default '0',
     `guild_name` varchar(255) NOT NULL DEFAULT 'NULL',
     `total_points` int(11) unsigned NOT NULL default '0',
     `woe_points` int(11) unsigned NOT NULL default '0',
     PRIMARY KEY  (`guild_id`)
    ) ENGINE=MyISAM;
    */
    
    prontera,160,164,5    script    Guild Points    90,{
    
    // Configurations
    // --------------
       function displaypoints;
       .@guild_cID = getcharid(2);
       .@npc$ = "[^7600CC Guild Points ^000000]";
       .@GM = getgmlevel();
    
    L_main:
    // Unavailable during WOE
    // ----------------------
       if( ( agitcheck() || agitcheck2() ) && !.@GM ) {
           mes .@npc$;
           mes "Hello,",
               "I'm busy there is a WOE now, can you come back later ?.";
           close;
       }
    
    // Main menu
    // ---------
       mes .@npc$;
       mes "Hello "+ ( .@GM ? "^FF0000[ GM ] "+ strcharinfo(0) +"^000000," : strcharinfo(0) +"," );
       mes " ";
       mes "What can I do for you ?";
       next;
    
       switch( select( "^777777~ Top 3 Guild^000000", "^777777~ Last WOE statistics^000000", ( !.@guild_cID ? "" : "^777777~ My Guild Points^000000" ), "^777777~ Leave^000000" ) ) {
           case 1:
           case 2:
               if( !displaypoints( ( @menu -1 ? 0 : 1 ), 1 ) ) {
                   mes .@npc$;
                   mes " ";
                   mes "There is no result sorry.";
                   emotion e_swt;
                   next;
               }
               break;
           case 3:
               query_sql( "SELECT `total_points` FROM `guild_points` WHERE `guild_id` = '"+ .@guild_cID +"'", .@total_points );
               mes .@npc$;
               mes " ";
               mes "Your guild have "+ .@total_points +" total points.";
               next;
               break;
           case 4:
               mes .@npc$,
                   " ",
                   "Then Goodbye !";
                   close;
       }
       goto L_main;
    
    
    OnAgitStart:
       initnpctimer;
       .timetick = gettimetick(2) + 1500;    // display an announce every 1500 secs ~ 25 min
       query_sql( "UPDATE `guild_points` SET `woe_points` = '0'" );
       end;
    
    // give points every 30 min
    // ------------------------
    OnTimer1799000:
       if( gettimetick(2) > .timetick ) {
           .timetick = gettimetick(2) + 1500;
           displaypoints( 0,0 );
       }
       for( .@i = 0; .@i < .size_c; .@i++ ) {
           .@owned_by = getcastledata( .castle$[ .@i ],1 );
           if( .@owned_by )
               callfunc( "gpoints_woe", .@owned_by, 1 );
       }
       initnpctimer;
       end;
    
    OnAgitEnd:
       displaypoints( 0,0 );
       stopnpctimer;
       sleep 5000;
       displaypoints( 1,0 );
       end;
    
    
    // Display guild point to all / self
    // ---------------------------------
    function displaypoints {
       if( getarg(0) )
           .@nb = query_sql( "SELECT `guild_name`, `total_points` FROM `guild_points` WHERE `total_points` > 0 ORDER BY `total_points` DESC LIMIT 10", .@guild_name$, .@points );
       else
           .@nb = query_sql( "SELECT `guild_name`, `woe_points` FROM `guild_points` WHERE `woe_points` > 0 ORDER BY `woe_points` DESC LIMIT 10", .@guild_name$, .@points );
    
       if( !.@nb ) return 0;
    
       announce ( getarg(0) ? "~~~~~ Guild POINTS ~~~~~" : "~~~~~ Woe POINTS ~~~~~" ), ( getarg(1) ? bc_self : bc_all );
       for( .@i = 0; .@i < .@nb; .@i++ )
           announce .@points[ .@i ] +" points : "+ .@guild_name$[ .@i ], ( getarg(1,0) ? bc_self : bc_all );
       return 1;
    }
    
    
    OnInit:
    // Castle list - 1 point for each castle owned
    // -------------------------------------------
       setarray .castle$, "aldeg_cas01",    "aldeg_cas02",    "aldeg_cas03",    "aldeg_cas04",    "aldeg_cas05",
                           "gefg_cas01",    "gefg_cas02",    "gefg_cas03",    "gefg_cas04",    "gefg_cas05",
                           "payg_cas01",    "payg_cas02",    "payg_cas03",    "payg_cas04",    "payg_cas05",
                           "prtg_cas01",    "prtg_cas02",    "prtg_cas03",    "prtg_cas04",    "prtg_cas05",
                           "nguild_alde",    "nguild_gef",    "nguild_pay",    "nguild_prt",
                           "schg_cas01",    "schg_cas02",    "schg_cas03",    "schg_cas04",    "schg_cas05",
                           "arug_cas01",    "arug_cas02",    "arug_cas03",    "arug_cas04",    "arug_cas05";
    
       .size_c = getarraysize( .castle$ );
       end;
    }
    
    // Update guild_points table
    // -------------------------
    function    script    gpoints_woe    {
       .@guild_id = getarg(0);
    
       if( !query_sql( "SELECT `guild_id` FROM `guild_points` WHERE `guild_id` = '"+ .@guild_id +"' ", .@guild_id ) )
           query_sql( "INSERT INTO `guild_points` (`guild_id`, `guild_name`, `total_points`, `woe_points`) VALUE ('"+ .@guild_id +"', '"+ getguildname( .@guild_id ) +"', '0', '0')" );
    
       .@value = getarg(1);
       query_sql( "UPDATE `guild_points` SET `total_points` = ( total_points + ("+ .@value +") ), `woe_points` = ( woe_points + ("+ .@value +") ) WHERE `guild_id` = '" + .@guild_id + "'" );
       return;
    }

     

     

  7. On 2016-9-24 at 7:58 AM, Emistry said:

    File Name: GM Rewarder - Shop-based

    File Submitter: Emistry

    File Submitted: 24 Sep 2016

    File Category: Utilities

    Content Author: Emistry

     

     

     

    Introduction :
    I made this script roughly early of last year( Jan 2015), quite an old script that left unused in my laptop.
    "GM Rewarder" script become much more popular and widely used across the private service, it was first introduced as "Itemizer" script and made by @Latheesan back in eAthena era.

    Many types of Rewarder npc pop up since then. However, some server still having issue with "corruption" due to untraceable records that was removed by NPC if available, or GM often send rewards to their own characters. Beside, most of the Rewarder NPC that exist in forum required more steps/works to create multiple rewards to send to specific players.

    Right after I made this

     

     

     

    , I decided to play around with Rewarder NPC using same type of features, mainly ease in use.
    So I am here to share this script to everyone.


    Differences :
    NPC that enable GM to setup rewards and sent to players in ease.

    • It allow only GM can send multiple rewards to player, only if GM has that items with them.
    • Only players able to claim the rewards.
    • All transactions will be recorded, even if GM "deleted" the history, it still exist in database.

     

    0PSUztG.jpg

     


     

    * HHooooorayyy, it's my 8000th posts in rAthena

    /oops

     




    Notes :
    There are actually got several unique ways to use/improve this NPC. I dont want to spoonfeed to much, so I will just leave this part to your own imagination/creativity. /ic
    However, if you wish to share your idea to use/improve this NPC with the rest of the community, feel free to leave a comment in this topics.
    Who knows, I might implement your idea into this NPC in case I find it suitable with it. /no1

     

     

    Click here to download this file

     

     

     

    Hi, Emistry. All right? I use Hercules and I loved your script, however, when trying to use it, every time I try to send any item, the map-server terminates itself without presenting any errors.

    Note: I already imported the tables to my database.

  8. Olá.

    Hoje vim trazer um tutorial muito simples, mas que é de grande utilidade para todos, até pelo motivo de eu não ter encontrado em nenhuma comunidade PT-BR. Tive um grande trabalho para achar um tutorial que tivesse uma línguagem mais prática e funcionasse, então devido a isso decidi postar. 

     

    Utilizar multíplos iteminfo.lub/lua.

     

    Primeiro, como sabemos, os clientes mais novos estão usando itemInfo.lua / lub para substituir arquivos TXT para informações de item no lado do cliente, dentro da pasta System.

    Acho que grande parte dos criadores de servidores mais complexos, se depararam com a situação de adicionar algum(ns) item(ns) de outro RO como idRO, iRO, & jRO, KRO e sempre receber "Item desconhecido" e "Maçãs", e não saber o verdadeiro motivo causador disso, exceto ao trocar os arquivos itemInfo.lua/lub. Eis que surgiu uma solução! Vamos lá.

     

    Utilidade:  utilizar itemInfo de outros servidores oficiais, como kRO, iRO e idRO, e fazer com que aqueles possam substituir informações não existentes de outros arquivos.

    Tutorial

    - 1º Passo:

    Prepare os arquivos a ser utilizado, exemplo:

    "itemInfo_bRO.lua" - Traduzido do BRO com todos os arquivos em PT-BR.

    "itemInfo_iRO.lua" Servidor internacional iRO.

    "itemInfo_idRO.lua".

    "iteminfo_custom" - Seu iteminfo customizado, com seus itens criados.

    "itemInfo_kRO.lua" - Servidor oficial e distribuidor do jogo RO.

     

    - 2º Passo:

    Faça um arquivo .lua vazio, dê o nome "itemInfo.lua". Este será o arquivo principal para ser lido pelo cliente.
    Edite o "itemInfo.lua", e cole este código.

     

    Spoiler
    
    main = function()
    	iiFiles = {
    		"System/itemInfo_Translation.lua", -- 1st priority
    		"System/itemInfo_iRO.lua", -- 2nd
    		"System/itemInfo_idRO.lua", -- 3rd
    		"System/itemInfo_kRO.lua", -- 4th
    	}
    
    	_TempItems = {}
    	_Num = 0
    
    	-- check existing item
    	function CheckItem(ItemID, DESC)
    		if not (_TempItems[ItemID]) then
    			_TempItems[ItemID] = DESC
    			_Num = _Num + 1
    		else
    			myTbl = {}
    			for pos,val in pairs(_TempItems[ItemID]) do
    				myTbl[pos] = val
    			end
    
    			for pos,val in pairs(DESC) do
    				if not (myTbl[pos]) or myTbl[pos] == "" then
    					myTbl[pos] = val
    				end
    
    			end
    
    			_TempItems[ItemID] = myTbl
    		end
    
    	end
    	-- end check
    
    	-- Read all files
    	for i,iiFile in pairs(iiFiles) do
    		d = dofile(iiFile)
    	end
    	-- Read all files
    
    
    	-- process _TempItems
    	for ItemID,DESC in pairs(_TempItems) do
    		--print("ItemID",ItemID,"Name",DESC.identifiedDisplayName)
    		result, msg = AddItem(ItemID, DESC.unidentifiedDisplayName, DESC.unidentifiedResourceName, DESC.identifiedDisplayName, DESC.identifiedResourceName, DESC.slotCount, DESC.ClassNum)
    		if not result then
    			return false, msg
    		end
    		for k,v in pairs(DESC.unidentifiedDescriptionName) do
    			result, msg = AddItemUnidentifiedDesc(ItemID, v)
    			if not result then
    				return false, msg
    			end
    		end
    		for k,v in pairs(DESC.identifiedDescriptionName) do
    			result, msg = AddItemIdentifiedDesc(ItemID, v)
    			if not result then
    				return false, msg
    			end
    		end
    	end
    	-- process _TempItems
    
    	_TempItems = nil
    
        return true, "good"
    end

     

     

    - 3º Passo:
    entre no arquivo criado iteminfo.lua, que foi colado o código e onde estiver essa parte
     
    main = function()
    	iiFiles = {
    		"System/itemInfo_Translation.lua", -- 1st priority
    		"System/itemInfo_iRO.lua", -- 2nd
    		"System/itemInfo_idRO.lua", -- 3rd
    		"System/itemInfo_kRO.lua", -- 4th
    	}
     

    Mude para o nome dos seus arquivos, colocando em ordem de prioridade qual arquivo deve ser lido primeiro pelo Hexed (Geralmente iniciado com o BRO). Salve e feche.

     

    - 4º Passo: 

    Em seguida, copie o arquivo e renomeie o arquivo copiado para "iteminfo.lub".

     

    - 5º Passo:

    Entre em todos seus arquivos preparados no Passo 1, e verifique se ambos começam assim:

     
    tbl = {
    ...
    }

    Caso sim, continue no mesmo arquivo e vá para o próximo passo.

     

    - 6º Passo:

    Vá até o final do arquivo e remova a função principal. Geralmente estará assim.

     

    Spoiler 
    function main()
    	for ItemID, DESC in pairs(tbl) do
    		result, msg = AddItem(ItemID, DESC.unidentifiedDisplayName, DESC.unidentifiedResourceName, DESC.identifiedDisplayName, DESC.identifiedResourceName, DESC.slotCount, DESC.ClassNum)
    		if not result then
    			return false, msg
    		end
    		for k, v in pairs(DESC.unidentifiedDescriptionName) do
    			result, msg = AddItemUnidentifiedDesc(ItemID, v)
    			if not result then
    				return false, msg
    			end
    		end
    		for k, v in pairs(DESC.identifiedDescriptionName) do
    			result, msg = AddItemIdentifiedDesc(ItemID, v)
    			if not result then
    				return false, msg
    			end
    		end
    	end
    	return true, "good"
    end

     

     

     

    Adicione ao lugar removido o seguinte código.

    for ItemID,DESC in pairs(tbl) do
    CheckItem(ItemID,DESC)
    end
     

    Fim!

    Aprecie seus novos arquivos.

    Notas e Créditos.

     

    OBS¹: Apenas traduzi um tutorial já existente, no qual vou estar deixando a fonte a baixo. Mas tive que modificar praticamente todo tutorial, então os créditos são a ambos.

    OBS²: Não irei fornecer nenhum arquivo, isto é apenas um tutorial, não me envie pm me solicitando nada.

    OBS³: todos os arquivos devem ser decompilado .lua, não compilado.

    OBS4:Se você tiver itens com ícone vazio , isso significa que sua data não tem o sprite / textura necessária ou seus arquivos itemInfo estão com o "unidentifiedResourceName" ou "identifiedResourceName" vazio ou não preenchidos. 

    Fonte: http://pservero.com/...iteminfo-files

    • Upvote 8
    • Love 2
    • Like 1
  9. Hello. I wonder if it is possible to clone the transclasses skills that had change with the arrival of the renewal, and apply the mechanical pre-renewal on a renewa server?
    Example: Storm Gust and Lord of Vermilion of Warlock reached IC (instant cast) with 150 DEX before renewal. If I clone the skills, would I apply the above pre-renewal formula? If so, how would I do it? Would I add a skill normally, as if it were a custom skill? And then would she give the player through an NPC?
    I thought about following this tutorial: http://herc.ws/wiki/Adding_new_skills
    Is there another easy way to clone skill?

  10. Name: The battle

     

     

     

     

    Description:

    • The Game contains 3 teams (modifiable).
    • Each team contains 3 players (modifiable).
    • Each team has its point: return / initial, where it begins and recomposes after being killed.
    • This initial / return point would be random, ranging from 3 (modifiable).
    • Each team has a mission, which is received when entering the map.
    • Each team needs to meet its mission, where it will be subject to many things.
    • PvP will be connected at all times.
    • At death you are automatically directed to the return point.
    • The game lasts for 20 minutes.
    • Each team must score 3 points (modifiable, depending on the number of players in each team).

    How it works?

     

    There will be a npc of registration with open chat informing the amount of players entered and the amount of players needed to start the battle.By completing the number of subscribers, the battle chat would close, all players would be teleported to the battle map, where 3 teams will be formed randomly, and will be informed the mission of each team (In brodcast will appear at the top of the screen, just for the players of cda time, the name of the team that they will have to eliminate.

    Example: Your task is to delete the "Blue" group. And for the "Blue" members, the message would be: Your task is to eliminate the "Red" group and so on ...). Each team will be at its starting point / return. Then a countdown will be made (no one can move) and the battle will begin. The 20-minute count starts. The PvP will be turned on,
    And from there, players would have to hunt on the map the assigned team on the mission, this happening on the same map, while other teams also seek their respective missions (times to remove). At death you are automatically directed to the return point. When the death occurs for the hunter team (team that aims to eliminate its team), it counts a point, otherwise, no.
    It will win the first team to accomplish its mission, which is: add 3 points, defeating 3 players of the target team.
     
    Comments
     
    I tried to start the script myself based on a custom BG script from AnnieRuru, but since I'm not a programmer and much less scripter, it did not work very well. So because of this, I decided to bring the idea to the community, and also post here my initial flawed script, for anyone who knows someone who wants to contribute to the community, help us in creating the script. The script of our master AnnieRuru already has some parts (The Battle) and it sure will also help us a lot to start.
     
    My initial script. Display error on line 25
    Spoiler 

     

    -	script	battle#custom	-1,{
    L_Start:
    	if ( .signup_count < .min2start *2 ) end;
    	for ( .@i = 0; .@i < .signup_count; .@i++ ) {
    		if ( attachrid( .signup_aid[.@i] ) ) {
    			if ( strcharinfo(3) != strnpcinfo(4) ) { // player is no longer on this map
    				deletearray .signup_aid[.@i], 1;
    				.signup_count--;
    				.@i--;
    			}
    		}
    		else {
    			deletearray .signup_aid[.@i], 1;
    			.signup_count--;
    			.@i--;
    		}
    	}
    	if ( .start || .signup_count < .min2start *2 ) end;
    	announce "event started", bc_all;
    	.start = 1;
    	.red = createbgid( "guild_vs3", 13,50, strnpcinfo(0)+"::OnredQuit", strnpcinfo(0)+"::OnredDead" );
    	.blue = createbgid( "guild_vs3", 86,50, strnpcinfo(0)+"::OnblueQuit", strnpcinfo(0)+"::OnblueDead" );
    	.black = createbgid( "guild_vs3", 49,15, strnpcinfo(0)+"::OnblackQuit", strnpcinfo(0)+"::OnblackDead" );
    	for ( .@i = 0; .@i < .min2start *2; .@i++ )
    		setbgid ( .@i %3 )? .red : .blue : .black, .signup_aid[.@i];
    	deletearray .signup_aid, .min2start *2;
    	.signup_count -= .min2start *2;
    	bg_warp .red, "guild_vs3", 13,50;
    	bg_warp .blue, "guild_vs3", 86,50;
    	bg_warp .black, "guild_vs3", 49,15;
    	.score[1] = .score[2] .score[3] = .startingscore;
    	bg_updatescore "guild_vs3", .score[1], .score[2], .score[3] ;
    	sleep .eventlasting * 1000;
    	if ( .start == 1 ) {
    		if ( .score[1] == .score[2] == .score[3] )
    			mapannounce "guild_vs3", "Draw !", bc_map;
    		else if ( .score[1] > .score[2] & .score[3]) {
    			mapannounce "guild_vs3", " Red side wins !", 0;
    			callsub L_reward, .red;
    		}
    		else if ( .score[1] & .score[3] < .score[2] ) {
    			mapannounce "guild_vs3", " Blue side wins !", 0;
    			callsub L_reward, .blue;
    		}
    		else if ( .score[3] > .score[2] & .score[1] ) {
    		mapannounce "guild_vs3", " Black side wins !", 0;
    		callsub L_reward, .black;
    		}
    	}
    	bg_warp .red, "prt_gld", 155,82;
    	bg_warp .blue, "prt_gld", 158,82;
    	bg_warp .black, "prt_gld", 158,82;
    	bg_destroy .red;
    	bg_destroy .blue;
    	bg_destroy .black;
    	.start = .score[1] = .score[2] = .score[3] = 0;
    	goto L_Start;
    L_Reward:
    	getbgusers getarg(0);
    	for ( .@i = 0; .@i < $@arenamembersnum; .@i++ )
    		getitem 501, 1, $@arenamembers[.@i]; // item Reward
    	return;
    OnredDead: callsub L_dead, 1;
    OnblueDead: callsub L_dead, 2;
    OnblackDead: callsub L_dead, 3;
    L_dead:
    	.score[ getarg(0) ]--;
    	bg_updatescore "guild_vs3", .score[1], .score[2] .score[3];
    	if ( !.score[ getarg(0) ] )
    		awake strnpcinfo(0);
    	sleep2 1250;
    	percentheal 100,100;
    	end;
    OnredQuit: callsub L_quit, 1, .red;
    OnblueQuit: callsub L_quit, 2, .blue;
    OnblackQuit: callsub L_quit, 3, .black;
    L_quit:
    	percentheal 100, 100;
    	if ( bg_get_data( getarg(1), 0 ) ) end;
    	.score[ getarg(0) ] = 0;
    	awake strnpcinfo(0);
    	end;
    OnInit:
    	.eventlasting = 20 * 60; // how long would the event last or it auto-reset. 30 *60 = 30 mins
    	.min2start = 1; // minimum player to start. If 1vs1 (2 players to start), set to 1. If 2vs2 (4 players to start), set to 2.
    	.startingscore = 3; // score at start
    	end;
    //	setarray .rewarditem,
    //		501, 10, // reward to the winning team
    //		501, 3, // reward to the losing team
    //		501, 3; // reward to the losing team
    //	set .red_cloth, 1; // color value from red clothing
    //	set .blue_cloth, 2; // color value from blue clothing
    //	set .black_cloth, ?; // color value from black clothing
    //	end;
    	}
    
    prt_gld,174,104,5	script	Sala de entrada	100,{
    	end;
    OnInit:
    		waitingroom "Name",4, "battle#custom::L_Start", .min2start *2;
    		end;
    }
    
    guild_vs3	mapflag	battleground	2
    guild_vs3	mapflag	nosave	SavePoint
    guild_vs3	mapflag	nowarp
    guild_vs3	mapflag	nowarpto
    guild_vs3	mapflag	noteleport
    guild_vs3	mapflag	nomemo
    guild_vs3	mapflag	nopenalty
    guild_vs3	mapflag	nobranch
    guild_vs3	mapflag	noicewall
    
    function	script	rand__	{
    	.@range = getarg(0);
    	.@count = getarg(2, 0);
    	if ( !.@count || .@count > .@range )		.@count = .@range;
    	else if ( .@count > 128 )		.@count = 128;
    	while ( .@i < .@count ) {		.@r = .@save = rand( .@i, .@range -1 ) ;
    		if ( !getd( ".@tmp1_"+ .@i ) ) {			.@r = ( getd(".@tmp1_"+ .@r ) )? getd( ".@tmp2_"+ .@r ) : .@r;
    			setd ".@tmp2_"+ .@i, .@r;
    			setd ".@tmp2_"+ .@save , .@i;
    			setd ".@tmp1_"+ .@save , 1;
    			set getelementofarray( getarg(1), .@i ), .@r;
    			if ( .@save < .@count )				set getelementofarray( getarg(1), .@save ), .@i;
    		}		.@i++;
    	}	return .@count;
    }

     

     
     
    AnnieRuru Script base
     
    Spoiler 
    prontera,150,153,5	script	kjdhfkdjsf	100,{
    	mes "wanna sign up";
    	if ( select( "yes", "no" ) == 2 ) close;
    	while ( .signup_aid[.@i] != getcharid(3) && .@i < .signup_count ) .@i++;
    	if ( .@i < .signup_count ) {
    		mes "you have already sign up in this event";
    		close;
    	}
    	.signup_aid[ .signup_count ] = getcharid(3);
    	.signup_count++;
    	mes "You are now signed to the BG event";
    //	.@i = 0; // DEBUG
    //	while ( .signup_aid[.@i] ) {
    //		.@signup_name$ = .@signup_name$ +","+ rid2name( .signup_aid[.@i] );
    //		.@i++;
    //	}
    //	mes "[Debug] Currently have "+ .signup_count +" sign-in and they are "+ .@signup_name$;
    	close2;
    L_Start:
    	if ( .signup_count < .min2start *2 ) end;
    	for ( .@i = 0; .@i < .signup_count; .@i++ ) {
    		if ( attachrid( .signup_aid[.@i] ) ) {
    			if ( strcharinfo(3) != strnpcinfo(4) ) { // player is no longer on this map
    				deletearray .signup_aid[.@i], 1;
    				.signup_count--;
    				.@i--;
    			}
    		}
    		else {
    			deletearray .signup_aid[.@i], 1;
    			.signup_count--;
    			.@i--;
    		}
    	}
    	if ( .start || .signup_count < .min2start *2 ) end;
    	announce "event started", bc_all;
    	.start = 1;
    	.red = createbgid( "guild_vs3", 13,50, strnpcinfo(0)+"::OnredQuit", strnpcinfo(0)+"::OnredDead" );
    	.blue = createbgid( "guild_vs3", 86,50, strnpcinfo(0)+"::OnblueQuit", strnpcinfo(0)+"::OnblueDead" );
    	for ( .@i = 0; .@i < .min2start *2; .@i++ )
    		setbgid ( .@i %2 )? .red : .blue, .signup_aid[.@i];
    	deletearray .signup_aid, .min2start *2;
    	.signup_count -= .min2start *2;
    	bg_warp .red, "guild_vs3", 13,50;
    	bg_warp .blue, "guild_vs3", 86,50;
    	.score[1] = .score[2] = .startingscore;
    	bg_updatescore "guild_vs3", .score[1], .score[2];
    	sleep .eventlasting * 1000;
    	if ( .start == 1 ) {
    		if ( .score[1] == .score[2] )
    			mapannounce "guild_vs3", "Draw !", bc_map;
    		else if ( .score[1] > .score[2] ) {
    			mapannounce "guild_vs3", " Red side wins !", bc_map;
    			callsub L_Reward, .red;
    		}
    		else if ( .score[1] < .score[2] ) {
    			mapannounce "guild_vs3", " Blue side wins !", bc_map;
    			callsub L_Reward, .blue;
    		}
    	}
    	bg_warp .red, "prontera", 155,182;
    	bg_warp .blue, "prontera", 158,182;
    	bg_destroy .red;
    	bg_destroy .blue;
    	.start = .score[1] = .score[2] = 0;
    	goto L_Start;
    L_Reward:
    	getbgusers getarg(0);
    	for ( .@i = 0; .@i < $@arenamembersnum; .@i++ )
    		getitem 501, 1, $@arenamembers[.@i]; // item Reward
    	return;
    OnredDead: callsub L_dead, 1;
    OnblueDead: callsub L_dead, 2;
    L_dead:
    	.score[ getarg(0) ]--;
    	bg_updatescore "guild_vs3", .score[1], .score[2];
    	if ( !.score[ getarg(0) ] )
    		awake strnpcinfo(0);
    	sleep2 1250;
    	percentheal 100,100;
    	end;
    OnredQuit: callsub L_quit, 1, .red;
    OnblueQuit: callsub L_quit, 2, .blue;
    L_quit:
    	percentheal 100, 100;
    	if ( bg_get_data( getarg(1), 0 ) ) end;
    	.score[ getarg(0) ] = 0;
    	awake strnpcinfo(0);
    	end;
    OnInit:
    	.eventlasting = 30 * 60; // how long would the event last or it auto-reset. 30 *60 = 30 mins
    	.min2start = 1; // minimum player to start. If 1vs1 (2 players to start), set to 1. If 2vs2 (4 players to start), set to 2.
    	.startingscore = 5; // score at start
    	end;
    }
    guild_vs3	mapflag	battleground	2
    guild_vs3	mapflag	nosave	SavePoint
    guild_vs3	mapflag	nowarp
    guild_vs3	mapflag	nowarpto
    guild_vs3	mapflag	noteleport
    guild_vs3	mapflag	nomemo
    guild_vs3	mapflag	nopenalty
    guild_vs3	mapflag	nobranch
    guild_vs3	mapflag	noicewall
    
    
    function	script	rand__	{
    	.@range = getarg(0);
    	.@count = getarg(2, 0);
    	if ( !.@count || .@count > .@range )		.@count = .@range;
    	else if ( .@count > 128 )		.@count = 128;
    	while ( .@i < .@count ) {		.@r = .@save = rand( .@i, .@range -1 ) ;
    		if ( !getd( ".@tmp1_"+ .@i ) ) {			.@r = ( getd(".@tmp1_"+ .@r ) )? getd( ".@tmp2_"+ .@r ) : .@r;
    			setd ".@tmp2_"+ .@i, .@r;
    			setd ".@tmp2_"+ .@save , .@i;
    			setd ".@tmp1_"+ .@save , 1;
    			set getelementofarray( getarg(1), .@i ), .@r;
    			if ( .@save < .@count )				set getelementofarray( getarg(1), .@save ), .@i;
    		}		.@i++;
    	}	return .@count;
    }

     

     
     
  11. Hello, team.

     

    I would like to limit the number of  per guild.Example, a guild can only have a maximum of 5 Wizards, 5 Assassins, 5
    Do you think it is possible?
    Novices would also have to be automatically rejected so that no one enters as an novice and becomes a limited class within the guild. This would aim to balance WOE.
     
    PS: Sorry for my terrible English.
  12. On 16/01/2015 at 0:58 AM, antoniorosa said:

    Olá!

     

    Como não localizei nenhum material sobre a CloneWars resolvi reinventar a roda... porém estou com uma duvida, o correto seria criar um Clone de um Char existente e chamar pelo @slaveclone ou criar um custom mob e fazer a chamada dele pelo @summon?

     

    @clonewars

    Em resumo é uma guerra onde você invita jogadores(clone) para sua guilda, fazendo assim uma guerra de 1jogador+"bot(Clone)" VS 1jogador+"bot(Clone)"

     

    Abraço,

    Talvez possa te ajudar.

    http://herc.ws/board/topic/4850-fight-your-clone/

    https://rathena.org/board/topic/103202-clone-wars/

    @offtopic

    Vc se importaria de me disponibilizar após concluir?

  13. On 16/01/2015 at 0:58 AM, antoniorosa said:

    Olá!

     

    Como não localizei nenhum material sobre a CloneWars resolvi reinventar a roda... porém estou com uma duvida, o correto seria criar um Clone de um Char existente e chamar pelo @slaveclone ou criar um custom mob e fazer a chamada dele pelo @summon?

     

    @clonewars

    Em resumo é uma guerra onde você invita jogadores(clone) para sua guilda, fazendo assim uma guerra de 1jogador+"bot(Clone)" VS 1jogador+"bot(Clone)"

     

    Abraço,

    Talvez possa te ajudar.

    http://herc.ws/board/topic/4850-fight-your-clone/

    https://rathena.org/board/topic/103202-clone-wars/

    @offtopic

    Vc se importaria de me disponibilizar após concluir?

  14. Olá.

     

    Estou tentando utilizar os seguintes NPCS, e cansei de quebrar a cabeça tentando fazê-los funcionar, mas não consegui. Nenhum apresenta erro no map-server, mas não funciona

     

    Spoiler 

    Esse é pra criar um túmulo quando um mvp morrer.

    OBS: sistema de túmulos está ligado em conf/battle/monster

    // Utilizar ou não sistema de túmulos de MvP
    // Veja http://irowiki.org/wiki/MVP#Gravestone 
    mvp_tomb_enabled: on
    -	script	Tumulo::TOMBSTONE	565,{
    mes "[ ^FF0000" + getmonsterinfo(atoi(strnpcinfo(2)),0) + "^000000 ]";
    mes "Sua curta vida acabou.";
    mes "Horário da Derrota : ^FF0000"+getd(".h"+strnpcinfo(3)+"")+":"+getd(".m"+strnpcinfo(3)+"")+"^000000";
    mes "Herói que derrotou o MVP";
    set .@b, (atoi(strnpcinfo(3))/ pow(10,(getstrlen(strnpcinfo(3)) - 6)));
    query_sql "SELECT `name` FROM `char` WHERE `char_id` = "+ .@b +"",.@charname$;
    mes "[^FF0000" + .@charname$ + "^000000]";
    close;
    OnTombstone:
    setd ".h"+strnpcinfo(3)+"",gettime(3);
    setd ".m"+strnpcinfo(3)+"",gettime(2);
    sleep2 10000;
    setnpcdisplay(strnpcinfo(3),565);
    end;
    } 

    Essse para teleportar o jogador ao ponto de retorno automaticamente qdo morrer.

    -	script	noress	-1,{
    
    setarray .mapas$,"bossnia_01"; // Adicione os mapas. ,"",""
    set .mapa_r$,"SavePoint"; // Mapa de retorno.
    OnPCDieEvent:
    for (set @i,0; @i < getarraysize(.mapas$); set @i,@i+1) {
    if (strcharinfo(3) == .mapas$) {
    sleep 1;
    warp .mapa_r$,0,0;
    }
    }
    end ();
    } 

    E esse para kickar automaticamente, quanto o comando agitstart e agitstart2 forem ligados.

    -	script	autokick	-1,{
    if (agitcheck() == 1 | agitcheck2() == 1 ) {
    dispbottom "Desabilitada em WOE!";
    mapwarp "bossnia_01","SavePoint",0,0;
    end;
    }
    } 
×
×
  • Create New...